Assembler for MIMD-TRAP2/3 (c) V.Angelov, v3.6, Dec 2007 SVN Revision 0, SVN Date 2007-12-27 Please send any comments to: angelov@kip.uni-heidelberg.de 17:58:30 / 21 Apr 2008 Source code file: src/DBKtst.asm Memory initialisation file: Log file: wrk/cpu3.log Program memory size in words: 4096 Default constants, read from /cad/tools/bin/asm_mimd.inc 1 CPU3 = 2 CC_SIGNED = 0X14 3 CC_NSIGNED = 0X04 4 CC_ZERO = 0X11 5 CC_NZERO = 0X01 6 CC_OVERFL = 0X13 7 CC_NOVERFL = 0X03 8 CC_NEG = 0X12 9 CC_NNEG = 0X02 10 CC_CARRY = 0X10 11 CC_NCARRY = 0X00 12 CC_BUSY = 0X17 13 CC_NBUSY = 0X07 14 CC_DIVB = 0X15 15 CC_NDIVB = 0X05 16 CC_ERRDIV = 0X16 17 CC_NERRDIV = 0X06 18 CC_UNCOND = 0X0F 19 CC_EQ = 0X11 20 CC_NEQ = 0X01 21 CC_NEG = 0X12 22 CC_POS0 = 0X02 23 CC_LTS = 0X14 24 CC_GES = 0X04 25 CC_LTU = 0X10 26 CC_GEU = 0X00 27 CC_LES = 0X19 28 CC_GTS = 0X09 29 CC_LEU = 0X18 30 CC_GTU = 0X08 31 RR_BYTE = 3 32 RR_WORD = 1 33 RR_DWORD = 0 34 LRA1 = LRA 3, 35 LRA2 = LRA 1, 36 LRA4 = LRA 0, 37 LRA4+ = LRA+ 0, 38 XOR = EOR 39 NOT = COM 40 SHLT = SHL 41 ANDT = AND 42 R0 = PRF[0] 43 R1 = PRF[1] 44 R2 = PRF[2] 45 R3 = PRF[3] 46 R4 = PRF[4] 47 R5 = PRF[5] 48 R6 = PRF[6] 49 R7 = PRF[7] 50 R8 = PRF[8] 51 R9 = PRF[9] 52 R10 = PRF[10] 53 R11 = PRF[11] 54 R12 = PRF[12] 55 R13 = PRF[13] 56 R14 = PRF[14] 57 R15 = PRF[15] 58 G0 = GRF[0] 59 G1 = GRF[1] 60 G2 = GRF[2] 61 G3 = GRF[3] 62 G4 = GRF[4] 63 G5 = GRF[5] 64 G6 = GRF[6] 65 G7 = GRF[7] 66 G8 = GRF[8] 67 G9 = GRF[9] 68 G10 = GRF[10] 69 G11 = GRF[11] 70 G12 = GRF[12] 71 G13 = GRF[13] 72 G14 = GRF[14] 73 G15 = GRF[15] 74 F0 = FIT[0] 75 F1 = FIT[1] 76 F2 = FIT[2] 77 F3 = FIT[3] 78 F4 = FIT[4] 79 F5 = FIT[5] 80 F6 = FIT[6] 81 F7 = FIT[7] 82 F8 = FIT[8] 83 F9 = FIT[9] 84 F10 = FIT[10] 85 F11 = FIT[11] 86 F12 = FIT[12] 87 F13 = FIT[13] 88 F14 = FIT[14] 89 F15 = FIT[15] 90 C0 = CON[0] 91 C1 = CON[1] 92 C2 = CON[2] 93 C3 = CON[3] 94 C4 = CON[4] 95 C5 = CON[5] 96 C6 = CON[6] 97 C7 = CON[7] 98 C8 = CON[8] 99 C9 = CON[9] 100 C10 = CON[10] 101 C11 = CON[11] 102 C12 = CON[12] 103 C13 = CON[13] 104 C14 = CON[14] 105 C15 = CON[15] 106 ASM_SVN_REV = 0 1: ; Test program for D-bank memory 2: ; CPU0 performs full test of the all D-bank locati 3: ; The number of the errors is stored in CONST8 - a 4: 5: ; DEFINITIONS, USED IN THE PROGRAM CODE: 6: 7: #def work=PRF[1] ; register for current opera 8: #def rdata=PRF[2] ; data red by test_programs 9: #def tdata=PRF[3] ; test_vector to be writen 10: #def errnum=PRF[4] ; contains the number of err 11: #def return1=PRF[5] ; return address (at first l 12: #def return2=PRF[6] ; return address (at second 13: #def return3=PRF[7] ; return address (at third l 14: #def tdgen=PRF[8] ; test data generator code l 15: #def itdgen=PRF[9] ; init tdgen code label 16: #def psrmask=PRF[10] ; mask for test_vector 17: #def bitnum=PRF[12] ; =32 minus the number of bi 18: ; prf11 and prf13 are used inside the testing rout 19: 20: #def ioaddr=PRF[14] ; contains the autoincrement 21: #def errstore=PRF[15] ; autoincrement address for 22: 23: #def firstaddress=grf[1] ; first address of the t 24: #def lastaddress=grf[2] ; last address of the te 25: 26: #def MEMRW=0xD000 ; the address of the registe 27: #def IAFIRST=0xE000 ; first address of IMEM 28: #def IADEND =0xEFFF ; last address of IMEM 29: #def DAFRSTG=0xE000 ; first address of DMEM via 30: #def DADENDG=0xE3FF ; last address of DMEM via G 31: #def DAFIRST=0x0000 ; first address of DMEM as R 32: #def DADEND =0x0FFC ; last address of DMEM as RA 33: #def DBFST=0xF000 ; first address of DBANK (tr 34: #def DBEND=0xF0FF ; last address of DBANK (tra 35: 36: ; masks of certain length 37: #def BITMASK24=0x0FFFFFF 38: #def BITMASK32=0xFFFFFFFF 39: #def BITMASK12=0x00000FFF 40: #def BITMASK13=0x00001FFF 41: 42: start: nop 0000 : 0000_0000_0000_0000_0000_0000 43: #ifdef cpu0 44: mov c0 errnum ; clear t 45: 46: ;#ifdef trap3 47: ; DBANK test here 48: iext DBFST 49: mov DBFST firstaddress 50: iext DBEND 51: mov DBEND lastaddress 52: mov c0 bitnum 53: iext BITMASK32 54: mov BITMASK32 psrmask 55: mvpcr +2, return1 56: jmp cc_uncond cltst 57: 58: ;#endif 59: 60: jmpr cc_busy 0 61: sgio errnum 0xC00 ; store the 62: 63: lp: jmpr cc_busy, 0 ; ... tra 64: iext 0x0A20 65: mov 0x0A20, work 66: shl +1, c5, rdata 67: add work, rdata, work 68: mov b0_0111, rdata 69: sgio rdata, work 70: jmpr cc_busy, 0 71: sgio rdata 0xA20 72: mov 0x012, work 73: sgio work, 0xA04 ; ... low p 74: end: jmp cc_uncond, end ; END OF TH 75: 76: #inc "TST.asm" 77: 78: 79: #endif Source file read, 0 error(s), 0 warning(s).