************************************************************************* * * * MAIN_SYMBOLS.INCLUDE Rev. 19-NOV-1992 * * * * For use with Jan-1991 COMINT PROM's * * * * This is the Include file that holds most of the symbols and * * constants for use with the 68020 Data Block Builder, Jet List * * Builder, and VBD control program. When possible all symbols and * * constants that are used by more than one module should be defined * * in this file. * * * * Symbols that need to be "exported" to other modules need to be * * included in an XDEF assembler directive and thus given the * * external definition attribute. * * * * A few symbols must be defined in other program modules (e.g. the * * targets of JSR from the main program section). These need to be * * included in an XREF assembler directive in the module where they * * are referenced but not defined. * * * ************************************************************************* ************************************************************************* * * * This section defines the Addresses of the Registers on the VBD card. * * * ************************************************************************* VBDBASE EQU $FFFFA000 ; Base Address of the VBD's Registers VBDCSR0 EQU VBDBASE+$0000 ; VBD Control Status Reg 0 VBDCSR1 EQU VBDBASE+$0002 ; VBD Control Status Reg 1 VBDCSR2 EQU VBDBASE+$0004 ; VBD Control Status Reg 2 VBDCSR3 EQU VBDBASE+$0006 ; VBD Control Status Reg 3 CrateTypeReg EQU VBDBASE+$0008 ; Reg for Crate Type for VBD operation EvtNmbAdrReg EQU VBDBASE+$000A ; Reg for the Adrs of the Event Number CrtIDAdrReg EQU VBDBASE+$000C ; Reg for the Address of the Crate ID DControlReg EQU VBDBASE+$0010 ; Data Read Format Control Reg. PControlReg EQU VBDBASE+$0012 ; Parameter Read Format Control Reg. IOUPAdrsReg EQU VBDBASE+$0014 ; Parameter Read Adrs Bits 31-16 WCPntList EQU VBDBASE+$1000 ; List of Pointers to Word Counts DataPntList EQU VBDBASE+$1800 ; List of Base Adrs's of Data BLK's XDEF VBDCSR0,CrateTypeReg,EvtNmbAdrReg ; Define as Global XDEF CrtIDAdrReg,DControlReg,PControlReg ; Symbols for use XDEF IOUPAdrsReg,WCPntList,DataPntList ; in other program XDEF VBDCSR2 ; modules. ************************************************************************* * * * This section defines the data loaded into registers on the VBD * * card and masks used to test bits in status registers on the VBD. * * * ************************************************************************* ALIGN 4 ; Align to longwords. VBDDMATO DC.W $000C ; VBD DMA time-out value VBDToLock DC.W $001C ; VBD DMA time-out value & Lock memory VBDReset DC.W $00CC ; Reset the VBD and load DMA time-out CrateType DC.W $0001 ; Crate Type is 1 i.e. Calorimeter DCtrlData DC.W $BD00 ; Control format of DMA reads A24-LW PCtrlData DC.W $ED00 ; Control format of param reads A24-W IOUPAdrs DC.W $0000 ; Upper address bits for param reads Buf0DMAGo DC.W $001D ; Code to start the DMA running into ; Buf 0, also pick DMA time out and ; keep the control memory write locked. ALIGN 4 ; Align to longwords. MskBuf0Sta DC.L $00000005 ; Mask to select from VBD CSR2 the bits ; that indicate buf 0's DMA status ; and Buf 0's port status. MskBuf0DMA DC.L $00000004 ; Mask to select from VBD CSR2 the bit ; that indicate buf 0's DMA status. Buf1DMAGo DC.W $001F ; Code to start the DMA running into ; Buf 1, also pick DMA time out and ; keep the control memory write locked. ALIGN 4 ; Align to longwords. MskBuf1Sta DC.L $0000000A ; Mask to select from VBD CSR2 the bits ; that indicate buf 1's DMA status ; and Buf 1's port status. MskBuf1DMA DC.L $00000008 ; Mask to select from VBD CSR2 the bit ; that indicate buf 1's DMA status. XDEF VBDDMATO,VBDToLock,VBDReset ; Define as Global XDEF CrateType,DCtrlData,PCtrlData ; Symbols for use XDEF IOUPAdrs ; in other program XDEF Buf0DMAGo,Buf1DMAGo ; modules. XDEF MskBuf0Sta,MskBuf1Sta XDEF MskBuf0DMA,MskBuf1DMA ************************************************************************* * * * This section specifies the storage location in Short IO Address * * Space read by the VBD to obtain the crate ID from the Crate ID Card. * * * ************************************************************************* ALIGN 4 ; Align to longwords. CrateIDAdrs DC.W $C0D0 ; Address of Crate ID card in I/O space. ; Address of Mike Shea's Crate ID card. XDEF CrateIDAdrs ; Make this symbol global. ************************************************************************* * * * This section defines the storage locations in the 2k byte Short IO * * Address memory (Sort 214) that are used to store the Word Counts for * * the various Data Blocks, and the Event Number. * * * ************************************************************************* IOMemBase EQU $9000 ; Base Address of the Short IO Memory ; i.e. starting adrs of the Short 214 EvtNmbAdR EQU IOMemBase+$0010 ; Short IO Address Storage Location ; for Event Number for the VBD to read. EvtNmbAdr133 EQU $FFFF0000+EVTNMBADR ; MVME-133A version of the Short IO ; Address for the storage location ; for the Event Number. WCStore1 EQU IOMemBase+$0100 ; Storage location for Header Word Cnt. WCStore2 EQU IOMemBase+$0102 ; Storage location for Current FrmWk WC. WCStore3 EQU IOMemBase+$0104 ; Storage location for Curnt Cal Trg WC. WCStore4 EQU IOMemBase+$0106 ; Storage location for Prev FrameWrk WC. WCStore5 EQU IOMemBase+$0108 ; Storage location for Prev Cal Trg WC. WCStore6 EQU IOMemBase+$010A ; Storage location for EM Jet List WC. WCStore7 EQU IOMemBase+$010C ; Storage location for TEt Jet List WC. WCStore8 EQU IOMemBase+$010E ; Storage location for Jet Mask Word C. WCStore9 EQU IOMemBase+$0110 ; Storage location for TRD Hot Table WC. WCStore10 EQU IOMemBase+$0112 ; Storage location for Spec Trg Prg WC. WCStore11 EQU IOMemBase+$0114 ; Storage location Super Tower Ptrn WC. WCStore12 EQU IOMemBase+$0116 ; Storage location Level 1.5 Data WC. WCStore13 EQU IOMemBase+$0118 ; Storage location for Absolute Time WC. WCStore14 EQU IOMemBase+$011A ; Storage locat L1 & Foreign Scalers WC. WCStore15 EQU IOMemBase+$011C ; Storage location for Pulser Data WC. XDEF IOMemBase,EvtNmbAdr,EvtNmbAdr133 ; Define as Global XDEF WCStore1,WCStore2,WCStore3,WCStore4 ; Symbols for use XDEF WCStore5,WCStore6,WCStore7,WCStore8 ; in other program XDEF WCStore9,WCStore10,WCStore11,WCStore12 ; modules. XDEF WCStore13,WCStore14,WCStore15 ************************************************************************* * * * This section defines the list of Word Counts for the various blocks * * of data from the Trigger Crate. (number of Long Words in each block) * * These control the length of the DMA data transfers into the VBD. * * * ************************************************************************* ALIGN 4 ; Align to longwords. WCHeader DC.W 5 ; Define the Crate Header Word Count. WCCurFrWk DC.W 266 ; Current Trig Framework Word Count. WCCurCalT DC.W 640 ; Current Cal Trig Word Count. WCPrvFrWk DC.W 266 ; Previous Trig Framework Word Count. WCPrvCalT DC.W 640 ; Previous Cal Trig Word Count. WCEMJetL DC.W 65 ; Define the EM Jet List Word Count. WCTEtJetL DC.W 65 ; Define Total Et Jet List Word Count. WCJetMask DC.W 320 ; Define the Jet Mask Word Count. WCTRDHotT DC.W 160 ; TRD Hot Tower Table Word Count. WCSpTrPrg DC.W 41 ; Spec Trig Programming Word Count. WCSupTowPtrn DC.W 20 ; Super Tower Jet Paterns Word Count. WCL15Data DC.W 36 ; Level 1.5 Data Word Count. WCAbsoTime DC.W 6 ; Define the Absolute Time Word Countd. WCL1ForScaler DC.W 170 ; New L1 & Foreign Scalers Word Count. WCPulser DC.W 128 ; Pulser Data Word Count i.e. 64 x 2. XDEF WCHeader,WCCurFrWk,WCCurCalT,WCPrvFrWk ; Define as Global XDEF WCPrvCalT,WCEMJetL,WCTEtJetL,WCJetMask ; Symbols for use XDEF WCTRDHotT,WCSpTrPrg,WCSupTowPtrn,WCL15Data ; in other program XDEF WCAbsoTime,WCL1ForScaler,WCPulser ; modules. ************************************************************************* * * * This section defines the list of Base Addresses for the various * * blocks of data from the Trigger Crate. These are the locations * * where the VBD will start to read. (32 bit Base Addresses) * * * * RECALL Because the VBD does not work right for now we will need * * to use Base Adresses that are #10000 less that the real * * Base Address. * ************************************************************************* ALIGN 4 ; Align to longwords. BAHeader DC.L $00305000 ; Define the Crate Header Base Address. BACurFrWk DC.L $00300004 ; Current Trig Framework Base Address. BACurCalT DC.L $00300430 ; Current Cal Trigger Base Address. BAPrvFrWk DC.L $00300E34 ; Previous Trig Framework Base Address. BAPrvCalT DC.L $00301260 ; Previous Cal Trigger Base Address. BAEMJetL DC.L $00301C64 ; Define the EM Jet List Base Address. BATEtJetL DC.L $00301D6C ; Define Total Et Jet List Base Adrss. BAJetMask DC.L $00301E74 ; Define the Jet Mask Base Address. BATRDHotT DC.L $00302378 ; Define TRD Hot Tower Table Base Adrs. BASpTrPrg DC.L $003025FC ; Define Spec Trig Progrming Base Adrs. BASupTowPtrn DC.L $003026A4 ; Define the Super Tower Pat Base Addrs. BAL15Data DC.L $003026F8 ; Define the Level 1.5 data Base Addrs. BAL1ForScaler DC.L $003027A8 ; Define L1 & Foreign Scaler Base Addrs. BAAbsoTime DC.L $00340800 ; Define the Abso Time Data Base Addrs. ; Note this is a "2nd" MVME 214 address. BAPulser DC.L $00340000 ; Define the Pulser Data Base Address. ; Note this is a "2nd" MVME 214 address. XDEF BAHeader,BACurFrWk,BACurCalT,BAPrvFrWk ; Define as Global XDEF BAPrvCalT,BAEMJetL,BATEtJetL,BAJetMask ; Symbols for use XDEF BATRDHotT,BASpTrPrg,BASupTowPtrn,BAL15Data ; in other program XDEF BAAbsoTime,BAL1ForScaler,BAPulser ; modules. ************************************************************************* * * * This section specifies locations used the the 214 VMX to VME memory. * * * * Export the following symbols to other modules: * * TrgBuffer The base address where the COMINT builds the data blk. * * TrgFire Base addrs of list of Spec Trigs fired for this event. * * EMJetListBA Base address of the ordered EM Jet List. * * TEtJetListBA Base address of the Total Et Jet List. * * BAEMM0...BAEMM3 Base address of the EM Jet Masks. * * BATEtM0...BATEtM3 Base address of the Total Et Jet Masks. * * BASEM P/N Base address where COMINT writes the CTFE EM data. * * BASHD P/N Base address where COMINT writes the CTFE HD data. * * EMRef0Prg...EMRef3Prg Programming data Spec Trigs vs EM Ref Sets. * * TEtRef0Prg...TEtRef3Prg Progming data Spec Trigs vs TEt Ref Sets. * * BAPrgFire Base Adrs of the Spec Trig's Programmed to depend on * * a Ref Set AND Fired on the event data. * ************************************************************************* XDEF TrgBuffer,TrgFire ; Symbols to export XDEF EMJetListBA,TEtJetListBA ; to other modules. XDEF BAEMM0,BAEMM1,BAEMM2,BAEMM3 XDEF BATEtM0,BATEtM1,BATEtM2,BATEtM3 XDEF BASEMP,BASEMN XDEF BASHDP,BASHDN XDEF EMRef0Prg,EMRef1Prg,EMRef2Prg,EMRef3Prg XDEF TEtRef0Prg,TEtRef1Prg,TEtRef2Prg,TEtRef3Prg XDEF BAPrgFire,TrgNum XDEF CrtHDWord1,CrtHDWord2,CrtHDWord3 XDEF CrtHDWord4,CrtHDWord5 TrgBuffer EQU $00300000 ; L1 Data Block MVME214 base address. TrgFire EQU TrgBuffer+$00000384 ; Spc Trig fired Adrs in MVME214. ; This is the address of the first ; long word that holds Spec Trigs ; Fired information. TrgNum EQU TrgBuffer+$00000284 ; Transfer Num Address in MVME214. ; This is the address of the first ; long word that holds Transfer ; Number information. EMJetListBA EQU TrgBuffer+$00001C64 ; Base Address of the ordered final ; form EM Jet List for VBD to read. TEtJetListBA EQU TrgBuffer+$00001D6C ; Base Address of the ordered final ; form Total Et Jet List. ; ***** EM and Total Et Jet Mask Base Addresses ***** BAEMM0 EQU TrgBuffer+$00001E74 ; Base Address of EM Jet Mask Ref 0 BAEMM1 EQU BAEMM0+160 ; Base Address of EM Jet Mask Ref 1 BAEMM2 EQU BAEMM0+320 ; Base Address of EM Jet Mask Ref 2 BAEMM3 EQU BAEMM0+480 ; Base Address of EM Jet Mask Ref 3 BATEtM0 EQU BAEMM0+640 ; Base Address of Total Et Jet Mask Ref 0 BATEtM1 EQU BAEMM0+800 ; Base Address of Total Et Jet Mask Ref 1 BATEtM2 EQU BAEMM0+960 ; Base Address of Total Et Jet Mask Ref 2 BATEtM3 EQU BAEMM0+1120 ; Base Address of Total Et Jet Mask Ref 3 ; ***** Base Addresses of the EM and HD Et Data from the CTFE cards ***** BASEMP EQU TrgBuffer+$00000430 ; Base Adrs of Positive Eta EM CTFE data. BASEMN EQU BASEMP+640 ; Base Adrs of Negative Eta EM CTFE data. BASHDP EQU BASEMP+1280 ; Base Adrs of Positive Eta HD CTFE data. BASHDN EQU BASEMP+1920 ; Base Adrs of Negative Eta HD CTFE data. ; ***** Base Addresses of the Programming data showing which Specific ***** ; ***** Triggers Depend on which Ref Sets and Depend AND Fired data. ***** EMRef0Prg EQU TrgBuffer+$000025FC ; VME Base Address for the list of ; Specific Trigs that use EM Ref Set 0 EMRef1Prg EQU EMRef0Prg+8 ; VME Base Address for the list of ; Specific Trigs that use EM Ref Set 1 EMRef2Prg EQU EMRef0Prg+16 ; VME Base Address for the list of ; Specific Trigs that use EM Ref Set 2 EMRef3Prg EQU EMRef0Prg+24 ; VME Base Address for the list of ; Specific Trigs that use EM Ref Set 3 TEtRef0Prg EQU EMRef0Prg+32 ; VME Base Address for the list of ; Specific Trigs that use TEt Ref Set 0 TEtRef1Prg EQU EMRef0Prg+40 ; VME Base Address for the list of ; Specific Trigs that use TEt Ref Set 1 TEtRef2Prg EQU EMRef0Prg+48 ; VME Base Address for the list of ; Specific Trigs that use TEt Ref Set 2 TEtRef3Prg EQU EMRef0Prg+56 ; VME Base Address for the list of ; Specific Trigs that use TEt Ref Set 3 BAPrgFire EQU EMRef0Prg+68 ; VME Base Address for the lists of ; Specific Triggers that were both ; Programmed to use a given Ref Set ; and that fired on this event. ; ***** Addresses in the MVME-214 Memory Module for the Crate Header ***** HeadBase EQU TrgBuffer+$00005000 ; Crate Header MVME214 Base Address CrtHDWord1 EQU HeadBase+$00000000 ; First long word of the Crate Header ; This is the SYNC Word CrtHDWord2 EQU HeadBase+$00000004 ; 2nd long word of the Crate Header ; This is the Controller word CrtHDWord3 EQU HeadBase+$00000008 ; 3rd long word of the Crate Header ; This is the Version Number CrtHDWord4 EQU HeadBase+$0000000C ; 4th long word of the Crate Header ; This is the Revision Number CrtHDWord5 EQU HeadBase+$00000010 ; 5th long word of the Crate Header ; This is the Spec Trig Fired Mask *************************************************************************** * * * These are symbols used by the routine that builds the Specific * * Triggers Fired List. Most of these symbols refer to L15 operation * * * *************************************************************************** Andor110 EQU TrgBuffer+$2FD ; VME byte address for AND-OR Term 110. L15SingStr EQU TrgBuffer+$427 ; VME byte address for L15 Single Start. L15Accept EQU TrgBuffer+$2748 ; VME longword addrs of L15 Accept list. XDEF Andor110,L15SingStr,L15Accept *************************************************************************** * * * These are the symbols used by the Move_Data Routine. These control * * which sections of CTFE data will be set to zero energy response and * * which sections of CHTCR data will be set to zero hot towers in the * * Level 1 Trigger Data Block. * * * *************************************************************************** StrZeroEta EQU 17 ; First Eta Index to "zero". EndZeroEta EQU 20 ; Last Eta Index to "Zero". SecLength EQU (EndZeroEta-StrZeroEta+1)*8 ; Number of Lngwrds to zero. StrZeroEMPos EQU BASEMP+((StrZeroEta-1)*32) ; First Pos eta EM Adrs to 0. StrZeroEMNeg EQU BASEMN+((StrZeroEta-1)*32) ; First Neg eta EM adrs to 0. StrZeroHDPos EQU BASHDP+((StrZeroEta-1)*32) ; First Pos eta HD adrs to 0. StrZeroHDNeg EQU BASHDN+((StrZeroEta-1)*32) ; First Neg eta HD adrs to 0. DifCurPrev EQU 3632 ; Difference in VME address ; between Current and Prev ; Beam Crossing CTFE data. EndEta EQU 64 ; This is the offset from a Jet Mask Base Address ; to the first longword address that is to be ; "zeroed" because it is an eta that does not yet ; have CHTCR's installed. This is equal to the Eta ; Index of last (highest) installed eta times 4. OffPosNeg EQU 80 ; Offset in bytes between the positive eta CHTCR ; "Mask of Jet Patterns" data and the negative ; eta CHTCR "Mask of Jet Patterns" data. EndNegEta EQU EndEta+OffPosNeg ; Offset to the first long word to ; zero in the negative eta CHTCR data. XDEF StrZeroEta,EndZeroEta,SecLength,DifCurPrev XDEF StrZeroEMPos,StrZeroEMNeg,StrZeroHDPos,StrZeroHDNeg XDEF EndEta,OffPosNeg,EndNegEta ************************************************************************* * * * Define miscellaneous constants. * * * ************************************************************************* DCDrFin EQU $FFFFF003 ; addrs data cable driver finished port SlvRdy EQU $FFFFF005 ; address of slave ready port Bit1High EQU $01 ; only 1st bit in high state Bit5High EQU $10 ; only 5th bit in high state Bits1and5Hi EQU $11 ; only 1st and 5th bits in high state AllBitsLow EQU $00 ; all bits low ALIGN 4 ; Align to longwords. Low4Long DC.L $0000000F ; Low order 4 bits set, Mask for Sync. TrgNumStore DC.L $00000000 ; Store for 16 bit trigger number. TrgsFired DC.L $00000000 ; Store Specific Trigs Fired longword. MskMonSpTrg DC.L $7FFFFFFF ; Mask for non-monitor Spec Trigs ; a 1 in the mask -> normal Spec Trig ; a 0 in the mask -> monitor Spec Trig SJLLoopCnt DC.L $00000000 ; Loop count of tests of Start Jet List SJLMaxWait DC.L $02000000 ; Max number of loops looking waiting ; for a Start Jet List signal before ; "resetting" COMINT by sending a ; pulse on Data Cable Driver Finished. ; $01000000 gives about 55 seconds ?? SRLoopCnt DC.L $00000000 ; Loop count of tests for Slave Ready SRMaxWait DC.L $00100000 ; Max number of loops looking waiting ; for Slave Ready to go high before ; "resetting" COMINT by sending a ; pulse on Data Cable Driver Finished. ; $01000000 gives about 55 seconds ?? SRMinDisp DC.L $01000000 ; Min number of loops waiting for Slave ; Ready for the transfer rate to be ; low enough to send full message ; at the end of the transfer. ; $00010000 implies a transfer rate ; of 5 Hz or less for the full ; message to be displayed. ; 28-July-92 was $00010000 ; for test change to $01000000 BBSMaxWait DC.L $00100000 ; Max number of loops looking waiting ; for a free VBD buffer before ; concluding that both buffers are ; stuck waiting to transfer on the ; Data Cable. $0004000 implies max ; wait of about 1 sec for a buffer. WaitDMA DC.L $00240000 ; Maximum loop count to wait for the ; VBD DMA cycle to complete. ; $00040000 ---> About 1/4 second. ; $030D4000 ---> About 30 seconds. BufSelect DC.L $00000000 ; Buffer Select i.e. VBD BUFFER 0 or 1. GetTimeError DC.L $00000000 ; Storage for the Flag that indicates a ; Bus Error during read Absolute Time. ; non-zero value of the flag --> error. GetCentPulsEr DC.L $00000000 ; Storage for the Flag that indicates ; a Bus Error while reading the Central ; Detector Pulser Programming Data. A ; non-zero value of the flag --> error. GetCalPulsErr DC.L $00000000 ; Storage for the Flag that indicates a ; Bus Error while reading Calorimeter ; Pulser Programming Data. A non-zero ; value of the flag --> error. TWBData DC.L $00000000 ; Storage location for the Trigger ; Warning Bits data. TWBPortAdrs EQU $FFFFF001 ; Address of the Ironics output port ; for the Trigger Warning Bits. StateWaitSvRd EQU $01 ; State bits for Wait for a Slave Ready. StateRun68k EQU $02 ; State bits for Running the 68k code i.e. ; move data, build lists, read pulsers. StateSearchVBD EQU $04 ; State bits for Searching Free VBD Buffer. StateRunDMA EQU $08 ; State bits for Run the VBD DMA List. StateNone EQU $10 ; Indicate that the L1 to L2 transfer is ; Not in any of the above states. StatePortAdrs EQU $FFFFF007 ; Address of the Ironics output port ; for the State Bits from Cyclic Section. RdTimeBA EQU $13000788 ; Base Address to read the Abso Time from ; the Shea Front-End Crate. Buf2nd214 EQU $00340000 ; This is the starting address of the "2nd" ; MVME-214 memmory, i.e. the memory for ; the Vertical Interconnect data. It ; runs from $00340000 through $00347FFF. XDEF DCDrFin,SlvRdy,Bit1High,AllBitsLow ; Symbols to export XDEF Bit5High,Bits1and5Hi ; to other modules. XDEF BufSelect,SRLoopCnt,SRMaxWait XDEF SJLLoopCnt,SJLMaxWait XDEF SRMinDisp,BBSMaxWait,WaitDMA XDEF Low4Long,TrgNumStore,TrgsFired,MskMonSpTrg XDEF GetTimeError,GetCentPulsEr,GetCalPulsErr XDEF TWBPortAdrs,TWBData XDEF StatePortAdrs XDEF StateWaitSvRd,StateRun68k,StateSearchVBD,StateRunDMA,StateNone XDEF RdTimeBA,Buf2nd214 ************************************************************************* * * * END of the Define Constants Section: * * * *************************************************************************