########################################################### #Pinj Readme - Date: 13.07.09 - Author: Stefan Schmiederer# ########################################################### Here is short description of the pinj - pretrigger injection - tool, which is meant for sending commands to the Control Boxes of the Pretrigger System. #Parameters (commandline) -v verbose mode, show more debug informations, optional. -b select box (integer) to send commands to, can be one of the following: 10 = CBAP, Control Box A-side Primary 11 = CBAB, Control Box A-side Backup 20 = CBBP, Control Box Bottom Primary 21 = CBBB, Control Box Bottom Backup 30 = CBCP, Control Box C-side Primary 31 = CBCB, Control Box C-side Backup -f read a list of commands from a file specified just after that argument. -c send single command following the conventions for that individual cmd, see below. -h print help #Arguments of commands SCSN commands are not mentioned here. They are only for experts and are explained in Tobias Krawutschkes PH.D. thesis. CMD (ARG1, type)(ARG2, type)... *Reading, writing, reseting Control Box via scsn CCWR (register, int32) (value to write, int32) CCRD (register, int32 CCRST (none) *Reading, writing, reseting Front-End Box via scsn FEBWR (register, int32) (value to write, int32) FEBRD (register, int32) FEBRST(none) *Reading a range of registers CCRM (start register, int32) (end register, int32) FEBRM (start register, int32) (end register, int32) *Configuring Lookuptables, not defined yet! CBBC (probably a file location) LMUC (probably a file location) *Selecting lines... JTAG (line, int) FEBS (box, int) box: 1=V0; 2=V1; 3=V2; 4=V3; 5=T0; 6,7=return to normal trigger operation. *Playxsvf, loading design file (.xsvf) to FPGA PXSV (file location, string) (tag=identifying file, integer) (vector index, integer) Currently are 4 tags defined: 1 = cbb.xsvf, design file for CB-B 2 = cbc.xsvf, design file for CB-A/C 3 = febfpga.xsvf, design file for FEB 4 = tlmu.xsvf, design file for TLMU The vector index tells ptss the position of the file appending. It should always start with 0. All consecutive calls of PXSV should increase this number in steps of 1, which is of course only true for reading from file. For -c option the vector index should be always 0. *Counter Readout, gives back 2 32bit values, representing a 64 bit value, first *value corresponds to the low bits, second to higher bits. *result = value2*(2^32) + value1 COUR (box, integer) (spec. counter, integer) Box values can be: 0 CB itself 1...5 FEBs (see FEBS cmd) spec. counter has to be find out in Stefan Zimmers diploma thesis 0 is always number of clock cycles