TEt_Jet_List IDNT ; title TEt Jet List Builder SECTION Sect_TEt_Jet_List,4,C ; Declare a noncommon code section. *************************************************************************** * Total Et Jet List Builder Routine Rev. 18-APR-1992 * * * * * * Registers used in this routine: * * * * A0 Base Address of TEt Reference Set 0 Jet Masks. * * A1 Base Address of TEt Reference Set 1 Jet Masks. * * A2 Base Address of TEt Reference Set 2 Jet Masks. * * A3 Base Address of TEt Reference Set 3 Jet Masks. * * A4 Pointer to the Raw TEt Jet List working area. * * A5 Pointer to Trigger Tower Phi Index Relative Address Offset Table. * * A6 Temporary pointer to data. * * * * D0 Temporary storage of a Reference Set 0 Mask of Jet Patterns data. * * D1 Temporary storage of a Reference Set 1 Mask of Jet Patterns data. * * D2 Temporary storage of a Reference Set 2 Mask of Jet Patterns data. * * D3 Temporary storage of a Reference Set 3 Mask of Jet Patterns data. * * D4 Temporary storage, Bit Offset during HitProcess. * * D5 Storage flag to indicate if any of the Jet Masks had set bits. * * D6 Flag to indicate if any SpecTrigs fired that depended on a RefSet.* * D7 Temporary storage * * * *************************************************************************** *************************************************************************** * * * Initialization section for the Total Et Jet List Builder * * * *************************************************************************** Begin_TEt_Jet_List CLR.L JetListCNT ; Zero the count of the number of ; items in the TEt Jet List. MOVEA.L #BATEtM0,A0 ; TEt Mask Ref 0 Base Adrs ---> register A0. MOVEA.L #BATEtM1,A1 ; TEt Mask Ref 1 Base Adrs ---> register A1. MOVEA.L #BATEtM2,A2 ; TEt Mask Ref 2 Base Adrs ---> register A2. MOVEA.L #BATEtM3,A3 ; TEt Mask Ref 3 Base Adrs ---> register A3. MOVEA.L #EtIndexList,A6 ; Base Adrress of the Et Index List ; that will be used to order the ; Raw TEt Jet List stored in reg A6. FOR.B D7 = #1 TO #18 DO.S ; Clear the memory locations where CLR.L (A6)+ ; the TEt Index List is going ENDF ; to be built. MOVEA.L #RawTEtList,A4 ; Base Adrs of the Raw TEt Jet List. MOVEA.L #RelPhiAdrs,A5 ; Base Adrs of the table of relative ; phi offsets is loaded into A5. *************************************************************************** * * * Build D6 so that it indicates if any Specific Triggers fired on this * * event that depended on a given TEt Reference Set. * * * * Register D6 bits 31..24 will be FF if for this event at least * * one Specific Trigger fired that depended on TEt Ref Set 3. * * Register D6 bits 23..16 will be FF if for this event at least * * one Specific Trigger fired that depended on TEt Ref Set 2. * * Register D6 bits 15...8 will be FF if for this event at least * * one Specific Trigger fired that depended on TEt Ref Set 1. * * Register D6 bits 7...0 will be FF if for this event at least * * one Specific Trigger fired that depended on TEt Ref Set 0. * * * * If no specific Trigger fired that depended on a given TEt Ref Set * * then that section of D6 will be 00. * *************************************************************************** CLR.L D6 ; Clear register D6. D6 will hold the flags that ; showed if any if any Spec Trigs fired that ; depended on TEt Ref Set 0, 1, 2, or 3. MOVEA.L #BAPrgFire+32,A6 ; Load register A6 with a pointer ; to the longword above the Prog ; AND Fired data for TEt RefSet 3. TST.L -(A6) ; Set Condition Codes according to the ; Longword which indicates Spec Trig's ; that fired and depended on TEt RefSet 3. BEQ.S NoTEtRef3 ; Branch if NO Spec Trigs fired on this event ; that depended on TEt Ref Set 3. SNE D6 ; Store 1's if a Trg depended on TEt Ref Set 3. NoTEtRef3 LSL.L #8,D6 ; Shift the TEt Ref Set 3 flag up by 8. TST.L -(A6) ; Set Condition Codes according to the ; Longword which indicates Spec Trig's ; that fired and depended on TEt RefSet 2. BEQ.S NoTEtRef2 ; Branch if NO Spec Trigs fired on this event ; that depended on TEt Ref Set 2. SNE D6 ; Store 1's if a Trg depended on TEt Ref Set 2. NoTEtRef2 LSL.L #8,D6 ; Shift the TEt Ref Set 2 flag up by 8. TST.L -(A6) ; Set Condition Codes according to the ; Longword which indicates Spec Trig's ; that fired and depended on TEt RefSet 1. BEQ.S NoTEtRef1 ; Branch if NO Spec Trigs fired on this event ; that depended on TEt Ref Set 1. SNE D6 ; Store 1's if a Trg depended on TEt Ref Set 1. NoTEtRef1 LSL.L #8,D6 ; Shift the TEt Ref Set 1 flag up by 8. TST.L -(A6) ; Set Condition Codes according to the ; Longword which indicates Spec Trig's ; that fired and depended on TEt RefSet 0. BEQ.S NoTEtRef0 ; Branch if NO Spec Trigs fired on this event ; that depended on TEt Ref Set 0. SNE D6 ; Store 1's if a Trg depended on TEt Ref Set 0. NoTEtRef0 IF.L D6 #0 THEN.S ; If for this event no Spec Trigs fired JMP OrderTEtList ; that depended on a Trigger Tower being ENDI ; above an TEt Ref Set then skip looking ; through all the TEt Jet Masks. *************************************************************************** * Total Et Tower Processor * * * * This Tower Processor routine handles sorting through the Trigger * * Towers by testing the Total Et Jet Masks and looking for candidates * * for the Total Et Jet List. * * * * Branch to the HitProcessor only if there is a Jet Mask for a Total * * Et Ref Set which shows at least one Trigger Tower that is above * * threshold AND at least one Spec Trig fired that depended on there * * being a Trigger Tower over threshold in that Ref Set. * * * *************************************************************************** MOVEA.L #EtIndexList,A6 ; Base Adrress of the Et Index List ; that will be used to order the ; Raw TEt Jet List stored in reg A6. FOR.B EtaIndex = #1 TO #20 DO ; Loop over the tower Eta Index. CLR.L EtaSign ; At this Eta Index first look at the Positive ; Eta Trigger Tower, i.e. EtaSign = zero. MOVE.L (A3),D3 ; Get next Ref 3 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 3 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 3 Mask all 0's flag up by 8. MOVE.L (A2),D2 ; Get next Ref 2 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 2 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 2 Mask all 0's flag up by 8. MOVE.L (A1),D1 ; Get next Ref 1 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 1 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 1 Mask all 0's flag up by 8. MOVE.L (A0),D0 ; Get next Ref 0 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 0 Mask is not all 0's. ; D5 now contans flags which indicate if any ; of these TEt Jet Masks contain any set bits. ; If D5 is all zeros then there were no bits ; set in any of these TEt Jet Masks. ; If D5 bits 31-24 are all 1's then at least ; one bit was set in this Ref 3 TEt Jet Mask. ; If D5 bits 23-16 are all 1's then at least ; one bit was set in this Ref 2 TEt Jet Mask. ; If D5 bits 15-8 are all 1's then at least ; one bit was set in this Ref 1 TEt Jet Mask. ; If D5 bits 7-0 are all 1's then at least ; one bit was set in this Ref 0 TEt Jet Mask. AND.L D6,D5 ; AND D5, the flags that show which Ref Sets had ; at least one Trigger Tower above threshold ; with D6 the flags that show which RefSets had: ; at least one Specific Trigger programmed ; to depend on these Ref Sets AND ; at least one of these Spec Trig's fired. ; Store this in register D5. BEQ.S NoPosHit ; Branch around the JSR HitProcessor if ; none of the Jet Masks at the current eta ; contain a hit and a Spec Trig fired that ; depends on that hit. I.E. branch if the ; "mask" in D5 is all zero's. IF.L JetListCNT #MaxJLCNT THEN.S ; Exit if the number of items JMP OrderTEtList ; in the Jet List is greater ENDI ; than MaxJLCNT and flag that ; the Jet List is incomplete. JSR TEtHitProc ; Jump to the HitProcessor because there is ; one or more Trigger Towers at this eta that ; participated in making the decision to trigger ; and there are less the MaxJLCNT entries in ; the Raw Total Et Jet List table so far. NoPosHit ADDQ.B #1,EtaSign ; At this Eta Index now look at the Negative ; Eta Trigger Tower, i.e. EtaSign = one. MOVE.L OffPosNeg(A3),D3 ; Get next Ref 3 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 3 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 3 Mask all 0's flag up by 8. MOVE.L OffPosNeg(A2),D2 ; Get next Ref 2 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 2 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 2 Mask all 0's flag up by 8. MOVE.L OffPosNeg(A1),D1 ; Get next Ref 1 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 1 Mask is not all 0's. LSL.L #8,D5 ; Shift the Ref 1 Mask all 0's flag up by 8. MOVE.L OffPosNeg(A0),D0 ; Get next Ref 0 TEt Mask, increment pointer. SNE D5 ; Store 1's if TEt Ref 0 Mask is not all 0's. ADDQ.L #4,A3 ; Increment the Address Registers A3 through A0 ADDQ.L #4,A2 ; so that they are pointing to the next long ADDQ.L #4,A1 ; work so that they are ready for the next ADDQ.L #4,A0 ; positive eta (it looks like auto increment). ; D5 now contans flags which indicate if any ; of these TEt Jet Masks contain any set bits. ; If D5 is all zeros then there were no bits ; set in any of these TEt Jet Masks. ; If D5 bits 31-24 are all 1's then at least ; one bit was set in this Ref 3 TEt Jet Mask. ; If D5 bits 23-16 are all 1's then at least ; one bit was set in this Ref 2 TEt Jet Mask. ; If D5 bits 15-8 are all 1's then at least ; one bit was set in this Ref 1 TEt Jet Mask. ; If D5 bits 7-0 are all 1's then at least ; one bit was set in this Ref 0 TEt Jet Mask. AND.L D6,D5 ; AND D5, the flags that show which Ref Sets had ; at least one Trigger Tower above threshold ; with D6 the flags that show which RefSets had: ; at least one Specific Trigger programmed ; to depend on these Ref Sets AND ; at least one of these Spec Trig's fired. ; Store this in register D5. BEQ.S NoNegHit ; Branch around the JSR HitProcessor if ; none of the Jet Masks at the current eta ; contain a hit and a Spec Trig fired that ; depends on that hit. I.E. branch if the ; "mask" in D5 is all zero's. IF.L JetListCNT #MaxJLCNT THEN.S ; Exit if the number of items JMP OrderTEtList ; in the Jet List is greater ENDI ; than MaxJLCNT and flag that ; the Jet List is incomplete. JSR TEtHitProc ; Jump to the HitProcessor because there is ; one or more Trigger Towers at this eta that ; participated in making the decision to trigger ; and there are less the MaxJLCNT entries in ; the Raw Total Et Jet List table so far. NoNegHit ENDF ; End of Eta Index Loop. ; Finished scanning all the Jet Masks and ; have found less than the Max number of ; items for the Jet List so now order it. JMP OrderTEtList ; Jump to the routine that orders the TEt list. *************************************************************************** * * * This is the routine to process a "Hit" in the Total Et Jet Mask. * * * *************************************************************************** ; If processing reaches this routine then at least one of the Reference Sets ; will have a hit (i.e. a Trigger Tower over threhold for a Ref Set and at ; least one Specific Trigger that depends on that Reference Set has fired ; for this event. TEtHitProc BTST.L #3,D5 ; Examine D5 to see which Ref Sets BEQ.S NoneTEtRef0 ; have hits that participated in the JSR StrWithTEtR0 ; trigger. Start with TEt Ref Set 0. NoneTEtRef0 BTST.L #11,D5 ; Now test for TEt Ref Set 1. BEQ.S NoneTEtRef1 JSR StrWithTEtR1 NoneTEtRef1 BTST.L #19,D5 ; Now test for TEt Ref Set 2. BEQ.S NoneTEtRef2 JSR StrWithTEtR2 NoneTEtRef2 BTST.L #27,D5 ; Now test for TEt Ref Set 3. BEQ.S NoneTEtRef3 JSR StrWithTEtR3 NoneTEtRef3 RTS ; All TEt Ref Sets Checked so return. *************************************************************************** * * * This is the routine to process "Hits" that were * * first found in a Jet Mask for TEt Reference Set 0. * * * * Note: The offset loaded into D4 is not the Bit Number of the most * * significant of the set bits in D0; rather it is the offset * * to the most significant set bit. e.g. If Bit Number 31 is * * set in D0 then an offset of 0 is loaded into D4, if Bit * * Number 2 is set then an offset of 29 is loaded into D4. * * * *************************************************************************** StrWithTEtR0 BFFFO D0{0:32},D4 ; Load the offset (i.e. 0...31) of the BEQ.S TEtR0NoHit ; most significant of the set bits in D0 JSR TEtRnHit ; into D4. Then JSR to TEtR0Hit. If no JMP StrWithTEtR0 ; bit is set in D0 then return. Note the TEtR0NoHit RTS ; offset is not the same as Bit Number. *************************************************************************** * * * This is the routine to process "Hits" that were * * first found in a Jet Mask for TEt Reference Set 1. * * * *************************************************************************** StrWithTEtR1 BFFFO D1{0:32},D4 ; Load the offset (i.e. 0...31) of the BEQ.S TEtR1NoHit ; most significant of the set bits in D1 JSR TEtRnHit ; into D4. Then JSR to TEtR1Hit. If no JMP StrWithTEtR1 ; bit is set in D1 then return. Note the TEtR1NoHit RTS ; offset is not the same as Bit Number. *************************************************************************** * * * This is the routine to process "Hits" that were * * first found in a Jet Mask for TEt Reference Set 2. * * * *************************************************************************** StrWithTEtR2 BFFFO D2{0:32},D4 ; Load the offset (i.e. 0...31) of the BEQ.S TEtR2NoHit ; most significant of the set bits in D2 JSR TEtRnHit ; into D4. Then JSR to TEtR2Hit. If no JMP StrWithTEtR2 ; bit is set in D2 then return. Note the TEtR2NoHit RTS ; offset is not the same as Bit Number. *************************************************************************** * * * This is the routine to process "Hits" that were * * first found in a Jet Mask for TEt Reference Set 3. * * * *************************************************************************** StrWithTEtR3 BFFFO D3{0:32},D4 ; Load the offset (i.e. 0...31) of the BEQ.S TEtR3NoHit ; most significant of the set bits in D3 JSR TEtRnHit ; into D4. Then JSR to TEtR3Hit. If no JMP StrWithTEtR3 ; bit is set in D3 then return. Note the TEtR3NoHit RTS ; offset is not the same as Bit Number. *************************************************************************** * * * Subroutine to add a "hit" first found in * * TEt Ref Set 0, 1, 2, or 3 to the Raw TEt Jet List. * * * * This routine also adds an entry to the EtIndexList * * that is used to order the Raw TEt Jet List into the TEt Jet List * * * *************************************************************************** TEtRnHit MOVE.L #31,D7 ; We arrive here with D4 containing SUB.L D4,D7 ; the offset to the most significant MOVE.L D7,D4 ; set bit of the Jet Mask. What is ; needed in D4 is the Bit Number of ; the most sig set bit in the Jet Msk. CLR.L D7 ; Clear register D7 for building the ; merged list (i.e. combination from ; all Ref Sets) of Spec. Trigs. that ; fired and depended on this Trigger ; Tower being above threshold. BCLR.L D4,D0 ; Test if this Trig Tower was BEQ.S Tst0now1 ; above threshold for TEt Ref Set 0. OR.L BAPrgFire+16,D7 ; If so, OR it to the merged list ; and clear it from Ref Set 0. Tst0now1 BCLR.L D4,D1 ; Test if this Trig Tower was BEQ.S Tst1now2 ; above threshold for TEt Ref Set 1. OR.L BAPrgFire+20,D7 ; If so, OR it to the merged list ; and clear it from Ref Set 1. Tst1now2 BCLR.L D4,D2 ; Test if this Trig Tower was BEQ.S Tst2now3 ; above threshold for TEt Ref Set 2. OR.L BAPrgFire+24,D7 ; If so, OR it to the merged list ; and clear it from Ref Set 2. Tst2now3 BCLR.L D4,D3 ; Test if this Trig Tower was BEQ.S AllMerg ; above threshold for TEt Ref Set 3. OR.L BAPrgFire+28,D7 ; If so, OR it to the merged list ; and clear it from Ref Set 3. AllMerg MOVE.L D7,(A4)+ ; Store this merged list of the Spec ; Trigs that depend on this Trigger ; Tower in the first longword of this ; TEt Jet List entry in the Raw TEt Jet ; List work area. JSR RelVAXAdrs ; Calculate the VAX Byte offset to the ; TEt Et data for this Trigger Tower. ; It will be returned in register D7. MOVE.L D7,(A4)+ ; Store this VAX Byte offset (relative ; Address) of this Trigger Tower in ; second longword of this TEt Jet List ; entry in the Raw Jet List work area. JSR AddIndex ; Run the routine that will add an ; entry to the EtIndexList that will ; be used to order the raw TEt Jet Lst. ADDI.L #1,JetListCNT ; Increment the counter for the ; number of items in the Jet List. RTS ; The Jet List Entry has been added ; to the Raw Jet List work area. *************************************************************************** * * * This is the routine to Order the Total Et Jet List. * * * *************************************************************************** ; ; This routine orders the Et Index List and uses the pointers in it to order ; the Raw Total Et Jet List thus making the Final Form Total Et Jet List. ; ; This routine makes the "header" for the Total Et Jet List (i.e. the first ; longword which indicates if the list is complete and how many entries ; are in it), it also orders the list in decreasing Total Et energy, and it ; writes it to the section of MVME-214 memory where the VBD will read it. ; OrderTEtList IF.L JetListCNT #0 THEN.S ; If there are no entries JMP NoTEtList ; in the Raw TEt Jet List ENDI ; then make just a header. IF.L JetListCNT #1 THEN.S ; If there is only 1 entry in JMP SkipOrdering ; the Raw TEt Jet List then ENDI ; there is no need to order it. IF.L JetListCNT #MaxJLCNT THEN.S ; If there are more than MOVE.L #MaxJLCNT,D6 ; MaxJLCNT entries in the ELSE.L ; Raw TEt Jet List then set the MOVE.L JetListCNT,D6 ; list length to MaxJLCNT when ENDI ; calling the routing to order ; the Et Index list. MOVEA.L #EtIndexList,A0 ; Base Adrress of the Et Index ; list. This list will be ; ordered bythe sorting routine. JSR Begin_Sort_TEt_Jet_List ; D6 holds the number of entries ; in the Et Index List and A0 ; holds base adrs of this list. SkipOrdering MOVEA.L #EtIndexList,A0 ; Base Adrress of the Et Index ; list. MOVEA.L #RawTEtList,A1 ; Put the base address of the Raw ; TEt Jet List into register A1. MOVEA.L #TEtJetListBA,A2 ; Put the base address of the final ; form (i.e. ordered) TEt Jet List ; into register A2. MOVE.L JetListCNT,D0 ; Get bits 0...7 of the list header. ; If there are more than IF.L JetListCNT #MaxJLCNT THEN.S ; MaxJLCNT entries in the Move.L #MaxJLCNT,D0 ; list then set the list ORI.L #$00008000,D0 ; length = MaxJLCNT and set the ENDI ; incomplete flag in the final ; form Jet List header. MOVE.L D0,(A2)+ ; Write out the header into the list. ; From here on JetListCNT IF.L JetListCNT #MaxJLCNT THEN.S ; is only used to control MOVE.L #MaxJLCNT,JetListCNT ; the number of entries ENDI ; written into the Final Form ; Total Et Jet List, ; so keep it <= MaxJLCNT. FOR.L D7 = #1 TO JetListCNT DO.S ; Write the entries into TEt JL MOVE.L (A0)+,D0 ; Get 1st entry form Index list ANDI.L #$0000001F,D0 ; Mask everything but the Index MOVE.L (A1,D0.L*8),(A2)+ ; Copy the Spec Trigs Fired MOVE.L 4(A1,D0.L*8),(A2)+ ; Copy the VAX relative adrs ENDF FOR.L D7 = JetListCNT TO #MaxJLCNT DO.S ; Pack out the rest of CLR.L (A2)+ ; the MaxJLCNT entries CLR.L (A2)+ ; in the final form TEt ENDF ; Jet List with zeros. RTS ; The ordered final form TEt Jet list ; has been built so now return. NoTEtList MOVEA.L #TEtJetListBA,A2 ; Put the base address of the final form ; (i.e. ordered) TEt Jet List into A2. CLR.L (A2)+ ; "Write" the header for this TEt Jet ; List that has zero entries. FOR.L D0 = #1 TO #MaxJLCNT DO.S ; "Write" the "entries" into CLR.L (A2)+ ; the Jet List. Spec Trg Fired CLR.L (A2)+ ; Mask and VAX 32bit relative byte ENDF ; address of the TEt Trigger Tower Et. RTS ; The Final Form (i.e. ordered) TEt Jet ; List with no entries has been written. *************************************************************************** * * * Calculate the Relative BYTE Address in VAX memory * * of the EM Et data for this Trigger Tower * * * * Note the byte offset of the HD Et data for this Trigger Tower with * * respect to the HD Et data for Trigger Tower (eta=1,phi=1) is the * * same as the offset between the EM Et data for this Trigger Tower * * and the EM Et data for the Trigger Tower (eta=1,phi=1). * *************************************************************************** ; This routine calculates the Relative BYTE Address (offset) for the EM Et ; data for this Trigger Tower with respect to the data for the Trigger Tower ; at location eta=1, phi=1. ; ; This relative byte address consists of 3 parts: ; an offset for the EtaSign ; EtaSign offset = EtaSign * 640 ; ; an offset for the EtaIndex ; EtaIndex offset = EtaIndex * 32 ; ; and an offset that depends on the PhiIndex of this Trigger Tower. ; ; Note that the EtaSign and the EtaIndex may be used directly but that the ; PhiIndex must be dirived by looking at which bit is set in register D4 ; (i.e. which bit has been found set in the Total Et Jet Mask longword). ; ; ; VME-VAX byte byte VME-VAX byte byte ; data bit Trig offset offset data bit Trig offset offset ;in an TEt Tower to VAX to VME in an TEt Tower to VAX to VME ; Jet Mask Phi memory memory Jet Mask Phi memory memory ; Longword Index locatn locatn Longword Index locatn locatn ;------------------------------------ ------------------------------------ ; D00 phi 1 0 3 D16 phi 9 16 19 ; D01 phi 2 2 1 D17 phi 10 18 17 ; D02 phi 3 4 7 D18 phi 11 20 23 ; D03 phi 4 6 5 D19 phi 12 22 21 ; D04 phi 5 8 11 D20 phi 13 24 27 ; D05 phi 6 10 9 D21 phi 14 26 25 ; D06 phi 7 12 15 D22 phi 15 28 31 ; D07 phi 8 14 13 D23 phi 16 30 29 ; ; D08 phi 17 1 2 D24 phi 25 17 18 ; D09 phi 18 3 0 D25 phi 26 19 16 ; D10 phi 19 5 6 D26 phi 27 21 22 ; D11 phi 20 7 4 D27 phi 28 23 20 ; D12 phi 21 9 10 D28 phi 29 25 26 ; D13 phi 22 11 8 D29 phi 30 27 24 ; D14 phi 23 13 14 D30 phi 31 29 30 ; D15 phi 24 15 12 D31 phi 32 31 28 ; RelVAXAdrs CLR.L D7 ; Clear working register D7. MOVE.B EtaIndex,D7 ; Move the EtaIndex into D7. SUBQ.L #1,D7 ; Subtract 1 because EtaIndex runs between ; 1...20 and an index of 1 needs 0 offset. LSL.L #5,D7 ; Multiply the (EtaIndex - 1) by 32. IF.B EtaSign #1 THEN.S ; If EtaSign is 1 (i.e. negative ADDI.L #640,D7 ; eta's), then add an offset ENDI ; of 640 ADD.L (A5,D4.L*4),D7 ; Use Address Register Indirect with Index ; and Displacement addressing (scale is 4) ; to get the Phi offset from the Phi Offset ; Table. Add this phi part to the VAX ; Address Byte offset to the EM Et data ; in register D7. RTS ; Return, the relative VAX byte address is in D7. *************************************************************************** * * * This is the routine to add an entry to the EtIndexList * * that will be used to order the Raw Total Et Jet List. * * * * An entry in the EtIndexList has the following form: * * bits 31...17 are all zeros. * * bits 16...8 the (EM Et + HD Et) of the Trigger Tower in the * * Raw Total Et Jet List. * * bits 7...0 are an index number showing which entry in the Raw * * Total Et Jet List this EtIndexList entry represents. * *************************************************************************** AddIndex SUB.L (A5,D4.L*4),D7 ; D7 still contains the VAX memory ; address byte offset to the Et of the ; Trigger Tower that we are adding to ; the list. Subtracts the the VAX ADD.L $0080(A5,D4.L*4),D7 ; specific phi part of the Ards offset. ; Now add the VME specific phi part to ; the remaining eta and eta sign parts. ADDI.L #BASEMP,D7 ; Now add the Base Address of the EM ; Et data in the MVME-214. Thus D7 now ; holds the VME address of the byte ; that contains the Et of the TEt Trig ; Tower that we are adding to the list. CLR.L D4 ; Clear the register where we build ; this entry to the Et Index List. MOVE.B (D7.L*1),D4 ; Get the byte of data from the memory ; address stored in register D7. ; This is the EM Et for the Trig Tower ; that is being added to the list. MOVE.L D4,EMHDEt ; The longword storage location EMHDEt ; now holds the EM Et in its LSByte. SUBI.L #BASEMP,D7 ; Now Subtract the Base Address of the ; EM Et data and Added the Base Addres ADDI.L #BASHDP,D7 ; of the HD ET data in the MVME 214 ; Memory Module. CLR.L D4 ; Clear the register where we build ; this entry to the Et Index List. MOVE.B (D7.L*1),D4 ; Get the byte of data from the memory ; address stored in register D7. ; This is the HD Et for the Trig Tower ; that is being added to the list. ADD.L EMHDEt,D4 ; Add the EM Et of this Trig Tower to ; the HD Et already in register D4. LSL.L #8,D4 ; Shift the Et byte to the left by 8. OR.L JetListCNT,D4 ; "Add" the index number that shows ; which entry to the Raw TEt Jet List ; this Et represents. MOVE.L D4,(A6)+ ; Store this on the Et Index List. RTS ; The entry has been added to the ; Et Index list so return. *************************************************************************** * * * Constants Section for Jet List Builder * * * * Export the following symbols to other program modules: * * Begin_TEt_Jet_List This is the label for the entry point * * for this routine. * * * * Import the following symbols are from other modules: * * BAPrgFire This is the base address of the lists of SpecTrigs that * * are programmed to use a given Ref Set and that fired. * * BASEMP This is the base address of the CTFE EM Et data. * * BASHDP This is the base address of the CTFE HD Et data. * * Begin_Sort_TEt_Jet_List This is the entry point for the Total * * Et Jet List Sorter. * * TEtJetListBA This is the base address of the final form ordered * * Total Et Jet List that the VBD will read. * * BATEtM0 This is the Base Address of TEt Jet Mask Ref 0. * * BATEtM1 This is the Base Address of TEt Jet Mask Ref 1. * * BATEtM2 This is the Base Address of TEt Jet Mask Ref 2. * * BATEtM3 This is the Base Address of TEt Jet Mask Ref 3. * * * *************************************************************************** XDEF Begin_TEt_Jet_List ; Symbols that will be referenced ; externally to this Program Module. XREF BAPrgFire,BASEMP,BASHDP ; Symbols that are XREF Begin_Sort_TEt_Jet_List ; referenced in this XREF TEtJetListBA ; module but defined XREF BATEtM0,BATEtM1,BATEtM2,BATEtM3 ; in another module. ALIGN 4 ; Want Long Word alignment. JetListCNT DS.L 1 ; Count of the number of items in ; the Jet List. EtaSign DS.L 1 ; Sign of the Trigger Tower Eta Index. ; 0 ---> Positive, 1 ---> Negative ; Access as a byte operand. EtaIndex DS.L 1 ; Trigger Tower Eta Index 0...20. ; Access as a byte operand. RawTEtList DCB.L 100,$00000000 ; 100 longwords to store the Raw un- ; ordered version of the TEt Jet List. EtIndexList DCB.L 50,$00000000 ; 50 longwords to store a list of the ; Et's of the "Jets" in the Raw Jet ; List and an Index number to order. ; ; Trigger Tower Phi Index Relative VAX Address Offset Table ; ----------------------------------------------------------- ; This table is the map between the Bit Number (i.e. 0...31) of a bit ; set in a TEt Jet Mask longword (i.e. the Phi "address" of the Trigger Tower) ; and the relative byte address offset of the EM Et data in VAX memory. RelPhiAdrs DC.L 0,2,4,6,8,10,12,14,1,3,5,7,9,11,13,15 DC.L 16,18,20,22,24,26,28,30,17,19,21,23,25,27,29,31 ; ; End of the Trigger Tower Phi Index Relative VAX Address Offset Table. ; ; ; Trigger Tower Phi Index Relative VME Address Offset Table ; ----------------------------------------------------------- ; This table is the map between the Bit Number (i.e. 0...31) of a bit ; set in a TEt Jet Mask longword (i.e. the Phi "address" of the Trigger Tower) ; and the relative byte address offset of the EM Et data in VME memory. DC.L 3,1,7,5,11,9,15,13,2,0,6,4,10,8,14,12 DC.L 19,17,23,21,27,25,31,29,18,16,22,20,26,24,30,28 ; ; End of the Trigger Tower Phi Index Relative VME Address Offset Table. ; EMHDEt DS.L 1 ; Storage location used to build ; EM Et + HD Et sum i.e. Total Et. MaxJLCNT EQU 16 ; Maximum number of entries in the ; ordered Final Form TEt Jet List. OffPosNeg EQU 80 ; Byte address offset between the ; Positive and Negative Eta CHTCR ; "Mask of Jet Patterns" data. END