mats+.s
897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/************************************************************************
This RSP program implements the improved Modified Algorithmic Test
Sequence (MATS) memory test procedure for DMEM with wired-OR
construction.
************************************************************************/
.base 0x04001000
nor $31, $0, $0
ori $30, $0, 1
ori $1, $0, 0x0FF8
Step1: sw $0, 0 ($1)
bgtz $1, Step1
addi $1, $1, 0xFFFC
ori $30, $0, 2
ori $1, $0, 0x0FFC
sw $31, 0 ($1)
ori $1, $0, 0x0FF8
Step2: lw $2, 0 ($1)
sw $31, 0 ($1)
bne $2, $0, Fail
nop
bgtz $1, Step2
addi $1, $1, 0xFFFC
ori $30, $0, 3
ori $1, $0, 0x0FFC
Step3: lw $3, 0 ($1)
sw $0, 0 ($1)
bne $3, $31, Fail
addi $1, $1, 0xFFFC
bgtz $1, Step3
nop
lw $3, 0 ($1)
bne $3, $31, Fail
ori $1, $0, 0x0FFC
lw $2, 0 ($1)
bne $2, $0, Fail
nop
ori $1, $0, 0xFEED
Fail: break