OpenCores
URL https://opencores.org/ocsvn/t400/t400/trunk

Subversion Repositories t400

[/] [t400/] [trunk/] [sw/] [verif/] [black_box/] [ld/] [test.asm] - Blame information for rev 179

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 arniml
        ;; *******************************************************************
2 179 arniml
        ;; $Id: test.asm 179 2009-04-01 19:48:38Z arniml $
3 2 arniml
        ;;
4
        ;; Checks the LD instruction.
5
        ;; Br can't be observed directly via XABR on COP41x.
6
        ;; Therefore, Br address os observed indirectly via memory content.
7
        ;;
8
 
9
        ;; the cpu type is defined on asl's command line
10
 
11
        org     0x00
12
        clra
13
 
14
        ;; preload for digit of each data register
15
        ;; Br = 0 -> data = 0x1
16
        lbi     0x0, 0x0
17
        stii    0x1
18
        ;; Br = 1 -> data = 0x2
19
        lbi     0x1, 0x0
20
        stii    0x2
21
        ;; Br = 2 -> data = 0x3
22
        lbi     0x2, 0x0
23
        stii    0x3
24
        ;; Br = 3 -> data = 0x4
25
        lbi     0x3, 0x0
26
        stii    0x4
27
 
28
        ;; *******************************************************************
29
        ;; XOR 0
30
        ;;
31
        ;; Br(0) xor 0
32
        lbi     0x0, 0x0
33
        ld      0x0
34
        ske                     ; expect no change of Br
35
        jmp     fail
36
 
37
        ;; Br(1) xor 0
38
        lbi     0x1, 0x0
39
        ld      0x0
40
        ske                     ; expect no change of Br
41
        jmp     fail
42
 
43
        ;; Br(2) xor 0
44
        lbi     0x2, 0x0
45
        ld      0x0
46
        ske                     ; expect no change of Br
47
        jmp     fail
48
 
49
        ;; Br(3) xor 0
50
        lbi     0x3, 0x0
51
        ld      0x0
52
        ske                     ; expect no change of Br
53
        jmp     fail
54
 
55
 
56
        ;; *******************************************************************
57
        ;; XOR 1
58
        ;;
59
        ;; Br(0) xor 1
60
        lbi     0x0, 0x0
61
        ld      0x1
62
        xad     3, 15           ; save load data
63
        ;; expect 0x2 at current Br
64
        clra
65
        aisc    0x2
66
        ske
67
        jmp     fail
68
        ;; expect 0x1 in accumulator
69
        xad     3, 15           ; restore load data
70
        aisc    0x1
71
        ske
72
        jmp     fail
73
 
74
        ;; Br(1) xor 1
75
        lbi     0x1, 0x0
76
        ld      0x1
77
        xad     3, 15           ; save load data
78
        ;; expect 0x1 at current Br
79
        clra
80
        aisc    0x1
81
        ske
82
        jmp     fail
83
        ;; expect 0x2 in accumulator
84
        xad     3, 15           ; restore load data
85
        aisc    0xf
86
        nop
87
        ske
88
        jmp     fail
89
 
90
        ;; Br(2) xor 1
91
        lbi     0x2, 0x0
92
        ld      0x1
93
        xad     3, 15           ; save load data
94
        ;; expect 0x4 at current Br
95
        clra
96
        aisc    0x4
97
        ske
98
        jmp     fail
99
        ;; expect 0x3 in accumulator
100
        xad     3, 15           ; restore load data
101
        aisc    0x1
102
        nop
103
        ske
104
        jmp     fail
105
 
106
        ;; Br(3) xor 1
107
        lbi     0x3, 0x0
108
        ld      0x1
109
        xad     3, 15           ; save load data
110
        ;; expect 0x3 at current Br
111
        clra
112
        aisc    0x3
113
        ske
114
        jmp     fail
115
        ;; expect 0x4 in accumulator
116
        xad     3, 15           ; restore load data
117
        aisc    0xf
118
        nop
119
        ske
120
        jmp     fail
121
 
122
        ;; *******************************************************************
123
        ;; XOR 2
124
        ;;
125
        ;; Br(0) xor 2
126
        lbi     0x0, 0x0
127
        ld      0x2
128
        xad     3, 15           ; save load data
129
        ;; expect 0x3 at current Br
130
        clra
131
        aisc    0x3
132
        ske
133
        jmp     fail
134
        ;; expect 0x1 in accumulator
135
        xad     3, 15           ; restore load data
136
        aisc    0x2
137
        ske
138
        jmp     fail
139
 
140
        ;; Br(1) xor 2
141
        lbi     0x1, 0x0
142
        ld      0x2
143
        xad     3, 15           ; save load data
144
        ;; expect 0x4 at current Br
145
        clra
146
        aisc    0x4
147
        ske
148
        jmp     fail
149
        ;; expect 0x2 in accumulator
150
        xad     3, 15           ; restore load data
151
        aisc    0x2
152
        ske
153
        jmp     fail
154
 
155
        ;; Br(2) xor 2
156
        lbi     0x2, 0x0
157
        ld      0x2
158
        xad     3, 15           ; save load data
159
        ;; expect 0x1 at current Br
160
        clra
161
        aisc    0x1
162
        ske
163
        jmp     fail
164
        ;; expect 0x3 in accumulator
165
        xad     3, 15           ; restore load data
166
        aisc    0xe
167
        nop
168
        ske
169
        jmp     fail
170
 
171
        ;; Br(3) xor 2
172
        lbi     0x3, 0x0
173
        ld      0x2
174
        xad     3, 15           ; save load data
175
        ;; expect 0x2 at current Br
176
        clra
177
        aisc    0x2
178
        ske
179
        jmp     fail
180
        ;; expect 0x4 in accumulator
181
        xad     3, 15           ; restore load data
182
        aisc    0xe
183
        nop
184
        ske
185
        jmp     fail
186
 
187
        ;; *******************************************************************
188
        ;; XOR 3
189
        ;;
190
        ;; Br(0) xor 3
191
        lbi     0x0, 0x0
192
        ld      0x3
193
        xad     3, 15           ; save load data
194
        ;; expect 0x4 at current Br
195
        clra
196
        aisc    0x4
197
        ske
198
        jmp     fail
199
        ;; expect 0x1 in accumulator
200
        xad     3, 15           ; restore load data
201
        aisc    0x3
202
        ske
203
        jmp     fail
204
 
205
        ;; Br(1) xor 3
206
        lbi     0x1, 0x0
207
        ld      0x3
208
        xad     3, 15           ; save load data
209
        ;; expect 0x3 at current Br
210
        clra
211
        aisc    0x3
212
        ske
213
        jmp     fail
214
        ;; expect 0x2 in accumulator
215
        xad     3, 15           ; restore load data
216
        aisc    0x1
217
        ske
218
        jmp     fail
219
 
220
        ;; Br(2) xor 3
221
        lbi     0x2, 0x0
222
        ld      0x3
223
        xad     3, 15           ; save load data
224
        ;; expect 0x2 at current Br
225
        clra
226
        aisc    0x2
227
        ske
228
        jmp     fail
229
        ;; expect 0x3 in accumulator
230
        xad     3, 15           ; restore load data
231
        aisc    0xf
232
        nop
233
        ske
234
        jmp     fail
235
 
236
        ;; Br(3) xor 3
237
        lbi     0x3, 0x0
238
        ld      0x3
239
        xad     3, 15           ; save load data
240
        ;; expect 0x1 at current Br
241
        clra
242
        aisc    0x1
243
        ske
244
        jmp     fail
245
        ;; expect 0x4 in accumulator
246
        xad     3, 15           ; restore load data
247
        aisc    0xd
248
        nop
249
        ske
250
        jmp     fail
251
 
252
 
253
        jmp     pass
254
 
255
        org     0x100
256
        include "pass_fail.asm"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.