The purpose of this manual is to provide a user with information to run the cosmic ray trigger for the STAR Cosmic Ray Test, Summer 1999. There is an assumption that the hardware is configured in a specific way and that all the user needs to do is follow these instructions from the STAR online workstation, startrg.star.bnl.gov.
This "manual" is written with some detail in the beginning and a short summary of the commands at the end. Between are a few words about possible commands and configuration files. The user only needs to be concerned with TCU configuration files.
If one runs into problems, the people to contact are:
Eleanor Judd | Zoran Milosevich |
Jack Engelage | Hank Crawford |
After logging onto startrg (usually as user trg or sysuser), one will have to then log onto the trigger Level 1 Control (L1CTL) front end processor:
> telnet trgfe2<CR> Trying 130.199.88.178... Connected to trgfe2.star.bnl.gov. Escape character is '^]'. <CR> trgfe2_dev>
Note the extra <CR> needed.
After having logged into the L1CTL processor, it might be a good idea to take a look a what code is loaded. The command to do it is i and if the processor is in a state immediately after a reboot, the response should look something like this:
NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY ---------- ------------ -------- --- ---------- -------- -------- ------- ----- tExcTask excTask 1dfeb48 0 PEND 16d4e4 1dfea68 0 0 tLogTask logTask 1dfc1d0 0 PEND 16d4e4 1dfc100 0 0 tEvtTask tEvtTask 1deb130 0 PEND 16db98 1deb098 0 0 tShell shell 1dde478 1 READY 171c94 1dde0f0 320001 0 tTelnetd telnetd 1df4288 2 PEND 16db98 1df4118 0 0 tWdbTask 164028 1de6848 3 PEND 16db98 1de66a0 0 0 tNetTask netTask 1df7a70 50 PEND 16db98 1df79b0 0 0 tPortmapd portmapd 1df2cf8 100 PEND 16db98 1df2b78 16 0 tWvSvc wvSvc 1de93d0 100 PEND 16db98 1de9260 0 0 value = 0 = 0x0 trgfe2_dev>
If all the code has been loaded, then one will see something like this:
NAME ENTRY TID PRI STATUS PC SP ERRNO DELAY ---------- ------------ -------- --- ---------- -------- -------- ------- ----- tExcTask excTask 1dfeb48 0 PEND 16d4e4 1dfea68 0 0 tLogTask logTask 1dfc1d0 0 PEND 16d4e4 1dfc100 0 0 tEvtTask tEvtTask 1deb130 0 PEND 16db98 1deb098 0 0 tShell shell 1dde478 1 READY 171c94 1dde0f0 d 0 tTelnetd telnetd 1df4288 2 PEND 16db98 1df4118 0 0 tWdbTask 164028 1de6848 3 PEND 16db98 1de66a0 0 0 tSciErrTasksciErrTask__ 1d9b3d8 20 PEND 16d4e4 1d9b2e0 0 0 tNetTask netTask 1df7a70 50 PEND 16db98 1df79b0 0 0 L1_SC L1_Software_ 1511640 90 PEND+T 16d4e4 15113d0 3d0004 211 L1_TM L1_Token_Man 14f1438 90 PEND+T 16d4e4 14f1340 3d0004 1 tPortmapd portmapd 1df2cf8 100 PEND 16db98 1df2b78 16 0 tWvSvc wvSvc 1de93d0 100 PEND 16db98 1de9260 0 0 t1 L1Control__F 14add58 100 PEND+T 16d4e4 14adc70 3d0004 178 t2 L1QueManager 14a8d30 100 PEND+T 16d4e4 14a8c50 3d0004 169 t3 L1Analysis__ 14a3d08 100 PEND+T 16d4e4 14a3c28 3d0004 161 L1_HI L1_Hardware_ 14cdf60 110 READY 14ce470 14cdef0 0 0 value = 0 = 0x0 trgfe2_dev>
If one is not sure of what state the processor is in, one can always reboot it by using a ^x, in which case one will see:
^x
: You will not see the following scrolling text on your screen. It is put here to show you what is happenning. You will not see anything on the screen, and should wait about 3-4 minutes until the processor reboots.
boot device : dc processor number : 0 host name : rsh file name : wind_ppc/target/config/kern2306/vxWorks.trg inet on ethernet (e) : 130.199.88.178:fffffe00 host inet (h) : 130.199.88.142 user (u) : vxworks ftp password (pw) : tonko1 flags (f) : 0x0 target name (tn) : trgfe2 startup script (s) : trgfe2.startup.dev Attaching network interface dc0... done. Attaching network interface lo0... done. Loading... 1159380 Starting at 0x100000... Attaching network interface dc0... done. Attaching network interface lo0... done. Adding 4842 symbols for standalone. ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]] ]]]] ]]]]]]]]]] ]] ]]]] (R) ] ]]]]]]]]] ]]]]]] ]]]]]]]] ]] ]]]] ]] ]]]]]]] ]]]]]]]] ]]]]]] ] ]] ]]]] ]]] ]]]]] ] ]]] ] ]]]] ]]] ]]]]]]]]] ]]]] ]] ]]]] ]] ]]]]] ]]]] ]]] ]] ] ]]] ]] ]]]]] ]]]]]] ]] ]]]]]]] ]]]] ]] ]]]] ]]]]] ] ]]]] ]]]]] ]]]]]]]] ]]]] ]] ]]]] ]]]]]]] ]]]] ]]]]]] ]]]]] ]]]]]] ] ]]]]] ]]]] ]] ]]]] ]]]]]]]] ]]]] ]]]]]]] ]]]]] ] ]]]]]] ] ]]] ]]]] ]] ]]]] ]]]] ]]]] ]]]] ]]]]]]]] ]]]]] ]]] ]]]]]]] ] ]]]]]]] ]]]] ]]]] ]]]] ]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]]]] Development System ]]]]]]]]]]]]]]]]]]]]]]]]]]]] ]]]]]]]]]]]]]]]]]]]]]]]]]]] VxWorks version 5.3.1 ]]]]]]]]]]]]]]]]]]]]]]]]]] KERNEL: WIND version 2.5 ]]]]]]]]]]]]]]]]]]]]]]]]] Copyright Wind River Systems, Inc., 1984-1997 CPU: Motorola MVME2300 - MPC 604r. Processor #0. Memory Size: 0x1ffe000. BSP version 1.1/4. WDB: Ready. Executing startup script trgfe2.startup.dev ... # this should be common # 09-apr-99 je replace nfsMount to antares with startrg routeAdd "0", "130.199.88.24" value = 0 = 0x0 hostAdd "startrg.star","130.199.88.142" value = 0 = 0x0 hostAdd "antares.star","130.199.88.155" value = 0 = 0x0 hostAdd "daq","130.199.88.55" value = 0 = 0x0 nfsAuthUnixSet("vxworks",1001,10,0,0) value = 0 = 0x0 #nfsMount "antares.star","/export/startrg/users","/home" nfsMount "startrg.star","/export/startrg2/users","/home" value = 0 = 0x0 cd "/home/trg/trg_soft_dev" value = 0 = 0x0 tonkoDbgMpic=0 tonkoDbgMpic = 0x1d9370: value = 0 = 0x0 tonkoSuspendOnBerr=0 tonkoSuspendOnBerr = 0x1d9530: value = 0 = 0x0 ld <rsh:wind_ppc/target/config/kern2306/uniDmaLib.o value = 31297704 = 0x1dd90a8 # local difference shellPromptSet("trgfe2_dev> ") value = 1966012 = 0x1dffbc = shellHistSize + 0x4 # users code after this point Done executing startup script trgfe2.startup.dev trgfe2_dev>
At this point, or any point, one can look to see what directory one is in. The script that runs at boot time for this particular processor, puts you in the ~trg/trg_soft_dev directory.
trgfe2_dev> pwd<CR> /home/trg/trg_soft_dev value = 23 = 0x17 trgfe2_dev>
To run the Cosmic Ray Trigger code, one needs to be in the "/home/trg/trg_soft_dev/L1CTL" directory, so if you are not there, you need to go there.
trgfe2_dev> cd "L1CTL"<CR> value = 0 = 0x0 trgfe2_dev>
The code then needs to be loaded (done after every reboot, for now).
trgfe2_dev> < load_L1CTL<CR> # Load file for L1 crate system. # File for trgfe2 cd ".." value = 0 = 0x0 cd "lib" value = 0 = 0x0 tonkoDbgMpic=0 tonkoDbgMpic = 0x1d9370: value = 0 = 0x0 ISPlogMsgEnable=0 new symbol "ISPlogMsgEnable" added to symbol table. ISPlogMsgEnable = 0x1dd9410: value = 0 = 0x0 hostAdd "trgfe1", "130.199.88.177" value = 0 = 0x0 hostAdd "trgfe2", "130.199.88.178" value = -1 = 0xffffffff = ISPlogMsgEnable + 0xfe226bef ld < sciLib value = 31321144 = 0x1ddec38 ld < memcpy32.o value = 33530464 = 0x1ffa260 = memcpy32 + 0x700 L1_NodeId=sciHostGetByName("trgfe2") new symbol "L1_NodeId" added to symbol table. L1_NodeId = 0x1dd15c0: value = 62154 = 0xf2ca DC_NodeId=sciHostGetByName("trgfe1") new symbol "DC_NodeId" added to symbol table. DC_NodeId = 0x1dd1578: value = 62150 = 0xf2c6 sci_init L1_NodeId,0x50000000, 0x02000000, 0x60000000, 0x1000000 0x1dde478 (tShell): After clear_localLc2 0x1dde478 (tShell): After SET_PSB_ISTAT 0x1dde478 (tShell): after sciAdapterInitialize val0xue = 1dde478 (tShell0): after sciSWPacketInit = 0x0 sciRemoteMap 0x50000000,DC_NodeId<<16,0x0,0x02000000 value = 0 = 0x0 DC_Win_Base=0x50000000 new symbol "DC_Win_Base" added to symbol table. DC_Win_Base = 0x1dd14d8: value = 1342177280 = 0x50000000 cd ".." value = 0 = 0x0 cd "trglib" value = 0 = 0x0 ld < date_str.o value = 31266416 = 0x1dd1670 = L1_NodeId + 0xb0 ld < logmessage.o value = 31264888 = 0x1dd1078 = date_str + 0x220 cd ".." value = 0 = 0x0 cd "L1CTL/start" value = 0 = 0x0 ld < L1_Startup.o value = 31268216 = 0x1dd1d78 = L1_NodeId + 0x7b8 L1_Startup value = 0 = 0x0 cd ".." value = 0 = 0x0 cd "config" value = 0 = 0x0 ld < tcu_config.o value = 31021696 = 0x1d95a80 ld < L1_Hardware_Config.o value = 31023488 = 0x1d96180 ld < L1_Software_Config.o value = 31020440 = 0x1d95598 = L1_Hardware_Config(void) + 0xca8 taskSpawn "L1_SC",90,0x0,0x20000,L1_Software_Config value = 22091328 = 0x1511640 cd ".." value = 0 = 0x0 cd "io" value = 0 = 0x0 ld < L1_IO.o value = 22110512 = 0x1516130 = L1_IO(int,int) + 0xcb0 cd ".." value = 0 = 0x0 cd "tokn_mngr" value = 0 = 0x0 ld < L1_Token_Manager.o value = 22112296 = 0x1516828 taskSpawn "L1_TM",90,0x0,0x20000,L1_Token_Manager value = 21959736 = 0x14f1438 cd ".." value = 0 = 0x0 cd "hard_int" value = 0 = 0x0 ld < L1_Hardware_Interface.o value = 22112904 = 0x1516a88 taskSpawn "L1_HI",110,0x0,0x20000,L1_Hardware_Interface value = 21828144 = 0x14d1230 cd ".." value = 0 = 0x0 cd "control" value = 0 = 0x0 ld < L1Control.o value = 22111712 = 0x15165e0 sp L1Control task spawned: id = 0x14aea28, name = t1 value = 21686824 = 0x14aea28 ld < L1QueManager.o value = 22111272 = 0x1516428 = L1_IO(int,int) + 0xfa8 sp L1QueManager task spawned: id = 0x14a9a00, name = t2 value = 21666304 = 0x14a9a00 ld < L1Analysis.o value = 31021080 = 0x1d95818 = L1_Hardware_Config(void) + 0xf28 sp L1Analysis task spawned: id = 0x14a49d8, name = t3 value = 21645784 = 0x14a49d8 cd ".." value = 0 = 0x0 trgfe2_dev>
To configure the Hardware and Software, one has to do the following command. : This needs to be done every time a different trigger is requested, i.e. Physics (cosmic), geometry, Pulser. This first example shows a problem in that there is a zero labeled token loaded into the TCU. The only way at this point to stop it is reboot with a ^x.
trgfe2_dev> L1_IO(3)<CR> L1_HC: TCU Base Address = 0x20000000 L1_HC: TCU Configuration File is TCU_Conf.dat D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_MaUsing input connectorsnage): L1_TM: RecTrigger Word LUT will be filled with 00000000 eived token 0 Trigger Word LUT entries with address bits 00002001 will be set to 00000001 Pre-scale table will be filled with 00000001 back from L1CTLPre-scale table entry 00000000 will be set to 00000000 Action Word LUT will be filled with 00004502 D(L1_HI fillEvent)NO tokens will be loaded into the Priority Token FIFO NO tokens will be loaded into the Token FIFO : token=0 aw=0xTCU will be put in RUN Mode after configuration TCU Local Address = 0 Fifo Status = 0003f007 Finished configuring TCU send message cmd is 0x0003 send message token is 1 send_message sourceId is 0x0000f2ca send message src_task is 5 send message dst_task is 6 sciMsgSend targetId is 0x0000f2ca L1_IO: Sent command CONFIG to L1_SC value = 3 = 0x3 trgfe2_dev> src task is 5 token is 1 source is 0x0000f2ca cmd is 0x0003 L1SC gets message from IO !!!!!!!!! 0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0L1_SC: Finished read back from L1CTL ing L1 Configuration File D(L1_HI fillEvenL1_SC: Base Address of DC Window = 0xt):50000000 token=0 aw= 0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back from L1CTL D(L1_HI fillEvent): token=0 aw=0x0 dsm_data=0x0 dsm_adr=0x0 busy=0x0 pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 0 back fro ^x Press any key to stop auto-boot... 0 auto-booting...Output has been truncated.
This is an example of a configuration that returns with no error.
trgfe2_dev> L1_IO(3)<CR> L1_HC: TCU Base Address = 0x20000000 L1_HC: TCU Configuration File is TCU_Conf.dat Using input connectors Trigger Word LUT will be filled with 00000000 Trigger Word LUT entries with address bits 00002001 will be set to 00000001 Pre-scale table will be filled with 00000001 Pre-scale table entry 00000000 will be set to 00000000 Action Word LUT will be filled with 00004502 NO tokens will be loaded into the Priority Token FIFO NO tokens will be loaded into the Token FIFO TCU will be put in RUN Mode after configuration TCU Local Address = 0 Fifo Status = 0003f007 Finished configuring TCU send message cmd is 0x0003 send message token is 1 send_message sourceId is 0x0000f2ca send message src_task is 5 send message dst_task is 6 sciMsgSend targetId is 0x0000f2ca L1_IO: Sent command CONFIG to L1_SC value = 3 = 0x3 trgfe2_dev> src task is 5 token is 1 source is 0x0000f2ca cmd is 0x0003 L1SC gets message from IO !!!!!!!!! L1_SC: Finished reading L1 Configuration File L1_SC: Base Address of DC Window = 0x50000000 trgfe2_dev>
Most of the time only one token will be requested. To get two at a time, the command is L1_IO(2,2), for three, L1_IO(2,3), etc.
trgfe2_dev> L1_IO(2,1)<CR> send message cmd is 0x0002 send message token is 1 send_message sourceId is 0x0000f2ca send message src_task is 5 send message dst_task is 3 sciMsgSend targetId is 0x0000f2ca L1_IO: Sent command ADD_TOKEN to TM with 1 tokens value = 2 = 0x2 trgfe2_dev> D(L1_Token_Manage): L1_TM: Adding tokens 32 - 32 D(L1_HI fillEvent): token=32 aw=0x4502 dsm_data=0xf00 dsm_adr=0x5afb busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 32 back from L1CTL trgfe2_dev>
To run in a continuous mode where the tokens are fed back into the TCU, one types L1_IO(1,1) for one token to go through the system continously. To stop the run, one types L1_IO(0) where you will not see this command on the screen due to the continuous output to the screen.
trgfe2_dev> L1_IO(1,1)<CR> send message cmd is 0x0001 send message token is 1 send_message sourceId is 0x0000f2ca send message src_task is 5 send message dst_task is 3 sciMsgSend targetId is 0x0000f2ca L1_IO: Sent command START_RUN to TM with 1 tokens value = 1 = 0x1 trgfe2_dev> D(L1_Token_Manage): L1_TM: Starting run with tokens 1 - 1 start run at time 73711 sec 750000000 cticks D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf01 dsm_adr=0x559a busy=0xff pri=0x0 tw=0x1 npre=1 npost=1 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x1aed busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x3cd6 busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue L1_D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x6d1 busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue IO(D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x79a4 busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue 0)D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf01 dsm_adr=0x47e3 busy=0xff pri=0x0 tw=0x1 npre=1 npost=1 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x192f busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x5e5e busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x2087 busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL D(L1_Token_Manage): L1_TM: Wrote token 1 to HI Queue send message cmd is 0x0000 send message token is 1 send_message sourceId is 0x0000f2ca send message src_task is 5 send message dst_task is 3 sciMsgSend targetId is 0x0000f2ca L1_IO: Sent command STOP_RUN to TM value = 0 = 0x0 trgfe2_dev> D(L1_HI fillEvent): token=1 aw=0x4502 dsm_data=0xf00 dsm_adr=0x5fc2 busy=0xff pri=0x0 tw=0x0 npre=0 npost=0 D(L1_Token_Manage): L1_TM: Received token 1 back from L1CTL trgfe2_dev>
A summary of the four commands that can be issued at this point are
L1_IO(2,X) - where X is the number of tokens (max 4095 for now). This issues tokens and they are not returned to the TCU token FIFO.
L1_IO(0) - This stops the run.
L1_IO(3) - This configures for a run or for a different run.
A few words on the configuration file needed to configure the TCU. These files are found on startrg.star.bnl.gov in the directory /home/startrg/trg/trg_soft_dev/cfg. To change the configuration file, all one needs to do is change the soft link found in /home/startrg/trg/trg_soft_dev/L1CTL. The soft link of interest is TCU_Conf.dat. The following files will be used for the Cosmic Ray tests:
Run Type | Input Bit to TCU | TRG Command Word | Configuration File |
---|---|---|---|
Cosmic Ray (West) | 0 | 4 | TCU_EXT_npri_CR.dat TCU_EXT_npri_CRBUSY.dat |
Pedestals | 1 | 4 | TCU_EXT_npri_PED.dat TCU_EXT_npri_PEDBUSY.dat |
Laser | 2 | 4 | TCU_EXT_npri_LASER.dat TCU_EXT_npri_LASERBUSY.dat |
CTB MULT | 3 | 4 | TCU_EXT_npri_MULT.dat TCU_EXT_npri_MULTBUSY.dat |
ZDC EAST | 4 | 4 | TCU_EXT_npri_ZDCEAST.dat TCU_EXT_npri_ZDCEASTBUSY.dat |
ZDC WEST | 5 | 4 | TCU_EXT_npri_ZDCWEST.dat TCU_EXT_npri_ZDCWESTBUSY.dat |
TIME (Beam Injection) | 6 | 4 | TCU_EXT_npri_TIME.dat TCU_EXT_npri_TIMEBUSY.dat |
RICH (Cosmic Ray East) | 7 | 4 | TCU_EXT_npri_RICH.dat TCU_EXT_npri_RICHBUSY.dat |
cr, zdcw | 0 & 5 | 4 | TCU_EXT_npri_COLL_05.dat TCU_EXT_npri_COLL_05BUSY.dat |
mult, zdce (Beam - Gas) | 3 & 4 | 4 | TCU_EXT_npri_COLL_34.dat TCU_EXT_npri_COLL_34BUSY.dat |
mult, zdcw (Collisions) | 3 & 5 | 4 | TCU_EXT_npri_COLL_35.dat TCU_EXT_npri_COLL_35BUSY.dat |
zdce, zdcw | 4 & 5 | 4 | TCU_EXT_npri_COLL_45.dat TCU_EXT_npri_COLL_45BUSY.dat |
zdce OR zdcw | 4 || 5 | 4 | TCU_EXT_npri_COLL_4or5.dat TCU_EXT_npri_COLL_4or5BUSY.dat |
zdce, time | 4 & 6 | 4 | TCU_EXT_npri_COLL_46.dat TCU_EXT_npri_COLL_46BUSY.dat |
zdcw, time | 5 & 6 | 4 | TCU_EXT_npri_COLL_56.dat TCU_EXT_npri_COLL_56BUSY.dat |
cr, zdce, time | 0 & 4 & 6 | 4 | TCU_EXT_npri_COLL_046.dat TCU_EXT_npri_COLL_046BUSY.dat |
cr, zdcw, time (ZDCW-Cosmic-Injection) | 0 & 5 & 6 | 4 | TCU_EXT_npri_COLL_056.dat TCU_EXT_npri_COLL_056BUSY.dat |
mult, zdce, zdcw | 3 & 4 & 5 | 4 | TCU_EXT_npri_COLL_345.dat TCU_EXT_npri_COLL_345BUSY.dat |
zdce, zdcw, time | 4 & 5 & 6 | 4 | TCU_EXT_npri_COLL_456.dat TCU_EXT_npri_COLL_456BUSY.dat |
mult, zdce, zdcw, time | 3 & 4 & 5 & 6 | 4 | TCU_EXT_npri_COLL_3456.dat TCU_EXT_npri_COLL_3456BUSY.dat |
Internal Pulser | 1 | 8 | TCU_EXT_npri_INTPULS.dat TCU_EXT_npri_INTPULSBUSY.dat |
Ground Plane Pulser | 1 | a | TCU_EXT_npri_GPPULS.dat TCU_EXT_npri_GPPULSBUSY.dat |
Geometry | 1 | c | TCU_EXT_npri_GEOM.dat TCU_EXT_npri_GEOMBUSY.dat |
The difference in each of these files is basically the line that configures the Action Word LUT:
where the 4 indicates a physics event, a c would indicate a geometry and 8 would be a pulser. Note that the *BUSY is a configuration for a busy input, i.e. if there is a busy input (as from DAQ), then a trigger will not be issued when the line is busy. If you want to ignore all busy's, then use the corresponding files without the "BUSY" (i.e. TCU_EXT_npri_CR.dat). The busy bit is the 14th bit set in the DSM input of the TCU and is set high when the TPC is NOT busy.
The other difference is what bit pattern in the Trigger Word LUT gets loaded with one's, so for the Cosmic Ray trigger, since the DSM input into the TCU has the lowest order bit set whenever there is a trigger of this type, the Trigger Word LUT is loaded with the following line:
The difference if one wants to include the TPC busy, is that the 14th bit also has to be set, so the configuration file will look a little different when loading the Trigger Word LUT:
This is a summary of what to do from the beginning. Note that one will not always have to go through all these steps from the beginning, for example, if you have been running a trigger for a while and just want to configure a different trigger (say from cosmics to pulser) then do steps 1-3 (in a window logged onto startrg.star.bnl.gov and linking the appropriate configuration file) and then do steps 8 & 9.
> cd /home/startrg/sysuser <CR>
This is done on startrg.star.bnl.gov.
> rm TCU_Conf.dat <CR>
This is done on startrg.star.bnl.gov if you want a different configuration file than the one that is being linked.
> ln -s ..trg/trg_soft_dev/cfg/TCU_EXT_npri_CRBUSY.dat TCU_Conf.dat <CR>
This is done on startrg.star.bnl.gov again and choosing the Cosmic Ray configuration file configured with the busy. See the above list of configuration file options in the Configuration Summary Section. Note that the link is always called TCU_Conf.dat.
> telnet trgfe2<CR><CR>
This is done on startrg.star.bnl.gov again to get you logged into the front end processor. Not necessary if you are logged in already in another window.
trgfe2_dev> ^x
This will reboot the processor. Might not be necessary if the code is already loaded (see above). If this is done, just wait a few minutes since you will not see anything scrolling on your screen. Also note that this may disconnect your telnet session to the front end processor. In this case, wait about five (5) minutes before trying to connect again.
trgfe2_dev> cd "L1CTL" <CR>
This will get you in the correct directory.
trgfe2_dev> < load_L1CTL <CR>
This will load the software.
trgfe2_dev> L1_IO(3) <CR>
This will configure the TCU according to the file used as the TCU configuration file (see step 3 above) . See above if you get endless scrolling, with messages stating the tokens are zero. Under normal conditions, there will be some messages printed, but they should stop after a few lines (see above). If the output is continuous with no end in sight, you will have to reboot (step 5)
trgfe2_dev> L1_IO(2,1) <CR>
This will load one token to the TCU token FIFO and await a trigger. See above for other possible commands.