VFData IDNT ; Title of Verify Test Data Routine SECTION Verify_Data,4,C ; Declare a noncommon code section. ; Align to Longwords. ****************************************************************************** * * * Routine to Verify the Data from the ERPB Test Data Generator * * After It Has Moved Through the Full Readout Chain and into the MVME214 * * * * Rev. 22-MAR-1994 * * * * The Tot Et test data is increasing count from 0 through 255 (i.e. one * * byte). Both "racks" of Tot Et data are the same. The EM Et data has * * the high nibble of each byte set to $A and the low nibble is the bit * * inverse of the low nibble of the Tot Et test data at the corresponding * * eta,phi. Both "racks" of EM Et data are the same. * * * ****************************************************************************** Align 4 VerifyTD Move.L A0,-(A7) ; Store the contents of register A0. Move.L A1,-(A7) ; Store the contents of register A1. Move.L A2,-(A7) ; Store the contents of register A2. Move.L A3,-(A7) ; Store the contents of register A3. Move.L D0,-(A7) ; Store the contents of register D0. Move.L D1,-(A7) ; Store the contents of register D1. Move.L D2,-(A7) ; Store the contents of register D2. Move.L D3,-(A7) ; Store the contents of register D3. ; Load the Address Registers with ; pointers to the data in the ; MVME214 memory module. MoveA.L #$010027b8,A0 ; A0 points to first rack TotEt in B4 MoveA.L #$010028b8,A1 ; A1 points to second rack TotEt in B4 MoveA.L #$01002738,A2 ; A2 points to first rack EMEt in B4 MoveA.L #$01002838,A3 ; A3 points to second rack EMEt in B4 Clr.L D0 Clr.L D1 Clr.L D2 Clr.L D3 Move.L (A0),D0 ; Get the first byte from the first AndI.L #$000000FF,D0 ; rack Tot Et. This is the "Seed" ; that we start with. FOR.L D3 = #1 TO #32 DO.L ; Loop over the 32 longwords that ; need to be checked. Each loop ; check the first rack EM and Tot ; and the second rack EM and Tot. ; The "seed" for this loop arrives ; in the low byte of register D0. ; Calculate what the Tot Et ; Longword should be. Move.L D0,D1 ; The "seed" for this "loop" arrives AndI.L #$000000FF,D1 ; in the low byte of register D0. Work ; in register D1, build Tot Et longword ; in register D2. AddQ.L #3,D1 ; Make the highest byte of the Tot Et. Move.B D1,D2 ; Build Tot Et Longword in D2. LSL.L #8,D2 ; Shift it up, shift in zeros. SubQ.L #1,D1 ; Make the next to highest byte of Tot. Move.B D1,D2 ; Building the Tot Et Longword in D2. LSL.L #8,D2 ; Shift it up, shift in zeros. SubQ.L #1,D1 ; Make the next to lowest byte of Tot. Move.B D1,D2 ; Building the Tot Et Longword in D2. LSL.L #8,D2 ; Shift it up, shift in zeros. Move.B D0,D2 ; D2 should now be the Tot Et Longword. ; Calculate what the EM Et ; Longword should be. Move.L D2,D1 ; Get the expected Tot Et Longword ; from reg D2 and work in register D1. AndI.L #$0F0F0F0F,D1 ; Save only the low nibble of each byte. OrI.L #$50505050,D1 ; "Or" in the complement of the expected ; high nibble for each byte. Not.L D1 ; Complement the register to make the ; expected value of the EM Et in reg D1. IF.L D1 B1_minus_B4(A2) THEN.S ; Test first rack JSR Verify_Error ; EM Et in B1 ENDI IF.L D1 (A2)+ THEN.S ; Test first rack JSR Verify_Error ; EM Et in B4 ENDI IF.L D1 B3_minus_B4(A3) THEN.S ; Test second rack EM Et. JSR Verify_Error ; EM Et in B3 ENDI IF.L D1 (A3)+ THEN.S ; Test second rack JSR Verify_Error ; EM Et in B4 ENDI IF.L D2 B1_minus_B4(A0) THEN.S ; Test first rack JSR Verify_Error ; Tot Et in B1 ENDI IF.L D2 (A0)+ THEN.S ; Test first rack JSR Verify_Error ; Tot Et in B4 ENDI IF.L D2 B3_minus_B4(A1) THEN.S ; Test second rack JSR Verify_Error ; Tot Et in B3 ENDI IF.L D2 (A1)+ THEN.S ; Test second rack JSR Verify_Error ; Tot Et in B4 ENDI AddQ.L #4,D0 ; Make the "seed" for the next loop. ENDF ; End of the Loop. Restore and ; return Move.L (A7)+,D3 ; Restore the contents of register D3. Move.L (A7)+,D2 ; Restore the contents of register D2. Move.L (A7)+,D1 ; Restore the contents of register D1. Move.L (A7)+,D0 ; Restore the contents of register D0. Move.L (A7)+,A3 ; Restore the contents of register A3. Move.L (A7)+,A2 ; Restore the contents of register A2. Move.L (A7)+,A1 ; Restore the contents of register A1. Move.L (A7)+,A0 ; Restore the contents of register A0. RTS ; Return to the calling routine. Verify_Error NOP ; If there is an error then stall JMP Verify_Error ; out at this point. B1_Minus_B4 EQU 1080 B3_Minus_B4 EQU -1080 XDEF VerifyTD ; Export these symbols to other ; program modules.