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

Subversion Repositories Aquarius

[/] [Aquarius/] [trunk/] [verification/] [sha_testsource/] [testslp.src] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 thorn_aitc
/*
2
===================
3
test source program
4
testslp.src
5
 
6
Apr.30 2003
7
===================
8
 
9
address           size wait width device
10
00000000-00001FFF  8K  0    32    ROM
11
00010000-00011FFF  8K  3    32    ROM
12
00020000-00021FFF  8K  0    16    ROM
13
00030000-00031FFF  8K  3    16    ROM
14
ABCD0000-ABCD0003   4  3    32    PIO
15
ABCD0100-ABCD0103   4  3    32    UART
16
ABCD0200-ABCD0207   8  3    32    SYS
17
FFFCE000-FFFCFFFF  8K  0    32    RAM
18
FFFDE000-FFFDFFFF  8K  3    32    RAM
19
FFFEE000-FFFEFFFF  8K  0    16    RAM
20
FFFFE000-FFFFFFFF  8K  3    16    RAM
21
*/
22
 
23
.equ _rom0, 0x00000000
24
.equ _rom1, 0x00010000
25
.equ _rom2, 0x00020000
26
.equ _rom3, 0x00030000
27
.equ _pio,  0xabcd0000
28
.equ _uart, 0xabcd0100
29
.equ _sys,  0xabcd0200
30
.equ _ram0, 0xfffce000
31
.equ _ram1, 0xfffde000
32
.equ _ram2, 0xfffee000
33
.equ _ram3, 0xffffe000
34
 
35
/************
36
 Vector Table
37
 ************/
38
.org _rom0
39
.long _power_on_reset
40
.long _ram0 + 0x02000
41
.long _manual_reset
42
.long _ram0 + 0x02000
43
.long _gnrl_ilgl
44
.long 0
45
.long _slot_ilgl
46
.long 0
47
.long 0
48
.long _cpuerr
49
.long _dmaerr
50
.long _nmi
51
.long 0
52
.org _rom0 + 0x0080
53
.long _trap32
54
.org _rom0 + 0x0090
55
.long _trap36
56
.org _rom0 + 0x00a0
57
.long _trap40
58
.org _rom0 + 0x00b0
59
.long _trap44
60
.org _rom0 + 0x00c0
61
.long _trap48
62
.org _rom0 + 0x00d0
63
.long _trap52
64
.org _rom0 + 0x00e0
65
.long _trap56
66
.org _rom0 + 0x00f0
67
.long _trap60
68
.org _rom0 + 0x0100
69
.long _irq0
70
.long _irq1
71
.long _irq2
72
.long _irq3
73
.long _irq4
74
.long _irq5
75
.long _irq6
76
.long _irq7
77
 
78
.org 0x0400
79
 
80
/**************
81
 Power On Reset
82
 **************/
83
_power_on_reset:
84
_manual_reset:
85
 mov    #0, r14
86
_test:
87
 mov.l  _pfail, r13 !fail address
88
 bra    _main_test
89
 nop
90
.align 4
91
_pfail: .long _fail
92
 
93
_main_test:
94
 
95
/*****
96
 SLEEP
97
 *****/
98
 sleep
99
 mov #0xab, r0
100
 nop
101
 nop
102
 nop
103
 cmp/eq #0xab, r0
104
 bt  .+6
105
 jmp @r13
106
 nop
107
 
108
/************************/
109
 bra _next
110
 nop
111
 
112
/*===================================================*/
113
/************
114
 TRAP Handler
115
 ************/
116
_trap32:
117
_trap36:
118
_trap40:
119
_trap44:
120
_trap48:
121
_trap52:
122
_trap56:
123
_trap60:
124
 mov    #0xff, r2
125
 ldc    r2, sr
126
 
127
 rte
128
 mov    #0x66, r0
129
 
130
/***********************
131
 General Illegal Handler
132
 ***********************/
133
_gnrl_ilgl:
134
 mov.l  @r15, r0
135
 add    #2, r0
136
 mov.l  r0, @r15
137
 
138
 mov    #0xff, r2
139
 ldc    r2, sr
140
 
141
 rte
142
 mov    #0x11, r0
143
 
144
/********************
145
 Slot Illegal Handler
146
 ********************/
147
_slot_ilgl:
148
 mov    #0xff, r2
149
 ldc    r2, sr
150
 
151
 rte
152
 mov    #0x22, r0
153
 
154
/*************************
155
 CPU Address Error Handler
156
 *************************/
157
_cpuerr:
158
 mov    #0xff, r2
159
 ldc    r2, sr
160
 
161
 rte
162
 mov    #0x33, r0
163
 
164
/*************************
165
 DMA Address Error Handler
166
 *************************/
167
_dmaerr:
168
 mov    #0xff, r2
169
 ldc    r2, sr
170
 
171
 rte
172
 mov    #0x44, r0
173
 
174
/************************************
175
 NMI (Non Maskable Interrupt) Handler
176
 ************************************/
177
_nmi:
178
 mov.l  _psys, r3
179
 mov.l  _p40a44fff, r0
180
 mov.l  r0, @r3 ! Emulate IRQ4/level 10, pending
181
 
182
 stc    sr, r2
183
 rte
184
 mov    #0x55, r0
185
 
186
/*******************************
187
 IRQ (Interrupt Request) Handler
188
 *******************************/
189
_irq0:
190
_irq1:
191
_irq2:
192
_irq3:
193
_irq5:
194
_irq6:
195
_irq7:
196
 stc    sr, r2
197
 rte
198
 mov    #0x77, r0
199
 
200
_irq4:
201
 rte
202
 nop
203
 
204
 
205
/**************
206
 Constant Table
207
 **************/
208
.align 4
209
_pram0     : .long _ram0
210
_psys      : .long _sys
211
_p80000fff : .long 0x80000fff
212
_p40a40fff : .long 0x40a40fff
213
_p40f40fff : .long 0x40f40fff
214
_p40f44fff : .long 0x40f44fff
215
_p40a44fff : .long 0x40a44fff
216
_p40147fff : .long 0x40147fff
217
_p20000fff : .long 0x20000fff
218
_p10000fff : .long 0x10000fff
219
_p08000fff : .long 0x08000fff
220
 
221
/*********************************************************
222
 Move to another Next ROM area to check hardware operation
223
 *********************************************************/
224
.align 2
225
_next:
226
 
227
 mov.l _pbranch_table, r0
228
 mov.l @(r0, r14), r12
229
 
230
 add #4, r14
231
 
232
 mov.l _pvector_top_table, r0
233
 mov.l @(r0, r14), r1
234
 ldc   r1, vbr
235
 
236
 jmp @r12
237
 nop
238
 
239
.align 4
240
_pbranch_table:     .long _branch_table
241
_pvector_top_table: .long _vector_top_table
242
_branch_table:
243
 .long _rom1+_test
244
 .long _rom2+_test
245
 .long _rom3+_test
246
 .long _rom0+_pass
247
_vector_top_table:
248
 .long _rom0
249
 .long _rom1
250
 .long _rom2
251
 .long _rom3
252
 .long _rom0
253
 
254
/**************
255
 Congraturation
256
 **************/
257
_pass:
258
 mov.l _ppass_value, r0
259
 mov.l _ppass_value, r1
260
 mov.l r0, @r1
261
 bra   _pass
262
 nop
263
.align 4
264
_ppass_value: .long 0x12345678
265
 
266
/**********
267
 You Failed
268
 **********/
269
_fail:
270
 mov.l _pfail_value, r0
271
 mov.l _pfail_value, r1
272
 bra   _fail
273
 nop
274
.align 4
275
_pfail_value: .long 0x88888888
276
 
277
.end
278
 
279
 

powered by: WebSVN 2.1.0

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