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

Subversion Repositories Aquarius

[/] [Aquarius/] [trunk/] [verification/] [sha_testsource/] [testmulconf.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
testmulconf.src
5
 
6
Feb.03 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
.org _rom0
36
.long _rom0 + _init - _rom0
37
.long _ram0 + 0x02000
38
 
39
.org 0x0400
40
 
41
/**************
42
 Initialization
43
 **************/
44
_init:
45
_start:
46
 mov    #0, r14
47
_test:
48
 mov.l  _pfail, r13 !fail address
49
 bra    _testgo
50
 nop
51
_pfail: .long _fail
52
_testgo:
53
 
54
/**********************************
55
 Conflict Combinations
56
 ----------------------------------
57
     before : LDS.L(H) 1  done
58
              LDS.L(L) 2  done
59
              STS.L(H) 3  done
60
              STS.L(L) 4  done
61
              MAC.W    5
62
              MAC.L    6
63
              DMULS.L  7
64
              DMULU.L  8
65
              MUL.L    9
66
              MULS.W   A
67
              MULU.W   B
68
 ---------------before=123456789AB
69
     after  : STS      vvvvv
70
              STS.L    vvvvv
71
              CLRMAC   vvvv
72
              LDS      vvvv
73
              LDS.L    vvvv
74
              MAC.W    vvvv
75
              MAC.L    vvvv
76
              DMULS.L  vvvv
77
              DMULU.L  vvvv
78
              MUL.L    vvvv
79
              MULS.W   vvvv
80
              MULU.W   vvvv
81
 **********************************/
82
 
83
!---------------------
84
!===[5]===============
85
!---------------------
86
 mov.l  _pram20, r4
87
 mov.l  _pram21, r5
88
 mov    #3, r0
89
 mov.w  r0, @r4
90
 add    #2, r4
91
 mov    #6, r0
92
 mov.w  r0, @r4
93
 add    #-2, r4
94
 clrmac
95
 mov    #0xff, r0
96
 lds    r0, mach   ! MAC=FFFFFFFF 00000000
97
 mac.w  @r4+, @r4+ ! <--------
98
 sts.l  mach, @-r5 ! <--------
99
 mov.l  @r5, r0
100
 cmp/eq #0xff,  r0
101
 bt     .+6
102
 jmp    @r13
103
 nop
104
 sts    macl, r0
105
 cmp/eq #18, r0
106
 bt     .+6
107
 jmp    @r13
108
 nop
109
!----
110
 mov.l  _pram20, r4
111
 mov.l  _pram21, r5
112
 mov    #4, r0
113
 mov.w  r0, @r4
114
 add    #2, r4
115
 mov    #8, r0
116
 mov.w  r0, @r4
117
 add    #-2, r4
118
 clrmac
119
 mov    #0xff, r0
120
 lds    r0, mach   ! MAC=FFFFFFFF 00000000
121
 mac.w  @r4+, @r4+ ! <--------
122
 sts.l  macl, @-r5 ! <--------
123
 mov.l  @r5, r0
124
 cmp/eq #32,  r0
125
 bt     .+6
126
 jmp    @r13
127
 nop
128
 sts    mach, r0
129
 cmp/eq #0xff, r0
130
 bt     .+6
131
 jmp    @r13
132
 nop
133
!---------------------
134
 mov.l  _pram20, r4
135
 mov    #4, r0
136
 mov.w  r0, @r4
137
 add    #2, r4
138
 mov    #6, r0
139
 mov.w  r0, @r4
140
 add    #-2, r4
141
 clrmac
142
 mac.w  @r4+, @r4+ ! <--------
143
 sts    mach, r0   ! <--------
144
 cmp/eq #0,  r0
145
 bt     .+6
146
 jmp    @r13
147
 nop
148
 sts    macl, r0
149
 cmp/eq #24, r0
150
 bt     .+6
151
 jmp    @r13
152
 nop
153
!----
154
 mov.l  _pram20, r4
155
 mov    #7, r0
156
 mov.w  r0, @r4
157
 add    #2, r4
158
 mov    #8, r0
159
 mov.w  r0, @r4
160
 add    #-2, r4
161
 clrmac
162
 mac.w  @r4+, @r4+ ! <--------
163
 sts    macl, r0   ! <--------
164
 cmp/eq #56,  r0
165
 bt     .+6
166
 jmp    @r13
167
 nop
168
 sts    mach, r0
169
 cmp/eq #0, r0
170
 bt     .+6
171
 jmp    @r13
172
 nop
173
!---------------------
174
 bra    skip3
175
 nop
176
 .align 4
177
_pram20:   .long _ram0
178
_pram21:   .long _ram0+0x10
179
skip3:
180
!---------------------
181
!===[4]===============
182
!---------------------
183
 mov    #0x55,  r0
184
 mov.l  _pram10, r4
185
 add    #4,  r4
186
 mov    #8,  r1
187
 mov    #9,  r2
188
 lds    r0,   mach
189
 lds    r0,   macl
190
 sts.l  macl, @-r4 ! <--------
191
 mulu.w r2, r1     ! <--------
192
 sts    mach, r0
193
 cmp/eq #0x55,  r0
194
 bt     .+6
195
 jmp    @r13
196
 nop
197
 sts    macl, r0
198
 cmp/eq #72,  r0
199
 bt     .+6
200
 jmp    @r13
201
 nop
202
!---------------------
203
 mov    #0xaa,  r0
204
 mov.l  _pram10, r4
205
 add    #4,  r4
206
 mov    #7,  r1
207
 mov    #-8,  r2
208
 lds    r0,   mach
209
 lds    r0,   macl
210
 sts.l  macl, @-r4 ! <--------
211
 muls.w r2, r1     ! <--------
212
 sts    mach, r0
213
 cmp/eq #0xaa,  r0
214
 bt     .+6
215
 jmp    @r13
216
 nop
217
 sts    macl, r0
218
 cmp/eq #-56,  r0
219
 bt     .+6
220
 jmp    @r13
221
 nop
222
!---------------------
223
 mov    #0x55,  r0
224
 mov.l  _pram10, r4
225
 add    #4,  r4
226
 mov    #6,  r1
227
 mov    #7,  r2
228
 lds    r0,   mach
229
 lds    r0,   macl
230
 sts.l  macl, @-r4 ! <--------
231
 mul.l  r2, r1     ! <--------
232
 sts    mach, r0
233
 cmp/eq #0x55,  r0
234
 bt     .+6
235
 jmp    @r13
236
 nop
237
 sts    macl, r0
238
 cmp/eq #42,  r0
239
 bt     .+6
240
 jmp    @r13
241
 nop
242
!---------------------
243
 mov    #0xaa,  r0
244
 mov.l  _pram10, r4
245
 mov    #5,  r1
246
 mov    #6,  r2
247
 lds    r0,   mach
248
 lds    r0,   macl
249
 sts.l  macl, @-r4 ! <--------
250
 dmulu.l r2, r1    ! <--------
251
 sts    mach, r0
252
 cmp/eq #0x00,  r0
253
 bt     .+6
254
 jmp    @r13
255
 nop
256
 sts    macl, r0
257
 cmp/eq #30,  r0
258
 bt     .+6
259
 jmp    @r13
260
 nop
261
!---------------------
262
 mov    #0xaa,  r0
263
 mov.l  _pram10, r4
264
 mov    #5,  r1
265
 mov    #-6,  r2
266
 lds    r0,   mach
267
 lds    r0,   macl
268
 sts.l  macl, @-r4 ! <--------
269
 dmuls.l r2, r1    ! <--------
270
 sts    mach, r0
271
 cmp/eq #0xff,  r0
272
 bt     .+6
273
 jmp    @r13
274
 nop
275
 sts    macl, r0
276
 cmp/eq #-30,  r0
277
 bt     .+6
278
 jmp    @r13
279
 nop
280
!---------------------
281
 mov    #0xff,  r1
282
 mov.l  _pram10, r4
283
 add    #4, r4
284
 mov.l  r1, @r4
285
 lds    r1, mach
286
 mov    #0, r0     ! S=0
287
 ldc    r0, sr
288
 lds    r1, macl   ! MAC=ffffffff ffffffff
289
 sts.l  macl, @-r4 ! <--------
290
 mac.l  @r4+, @r4+ ! <--------
291
 sts    mach, r0   ! MAC=00000000 00000000
292
 cmp/eq #0x00,  r0
293
 bt     .+6
294
 jmp    @r13
295
 nop
296
 sts    macl, r0
297
 cmp/eq #0x00,  r0
298
 bt     .+6
299
 jmp    @r13
300
 nop
301
!---------------------
302
 mov    #0xff,  r1
303
 mov.l  _pram10, r4
304
 add    #4,  r4
305
 lds    r1, mach
306
 mov    #0, r0     ! S=0
307
 ldc    r0, sr
308
 lds    r1, macl   ! MAC=ffffffff ffffffff
309
 sts.l  macl, @-r4 ! <--------
310
 mac.w  @r4+, @r4+ ! <--------
311
 sts    mach, r0   ! MAC=00000000 00000000
312
 cmp/eq #0x00,  r0
313
 bt     .+6
314
 jmp    @r13
315
 nop
316
 sts    macl, r0
317
 cmp/eq #0x00,  r0
318
 bt     .+6
319
 jmp    @r13
320
 nop
321
!---------------------
322
 mov    #0xaa,   r0
323
 mov.l  _pram10, r4
324
 add    #4,   r4
325
 lds    r0,   macl
326
 mov    r4,   r5
327
 mov    #0x55, r1
328
 mov.l  r1,   @r5
329
 sts.l  macl, @-r4 ! <--------
330
 lds.l  @r5+, macl ! <--------
331
 sts    macl,  r0
332
 cmp/eq #0x55, r0
333
 bt     .+6
334
 jmp    @r13
335
 nop
336
 mov.l  @r4+,  r0
337
 cmp/eq #0xaa, r0
338
 bt     .+6
339
 jmp    @r13
340
 nop
341
 mov.l  @r4+,  r0
342
 cmp/eq #0x55, r0
343
 bt     .+6
344
 jmp    @r13
345
 nop
346
!---------------------
347
 mov    #0xaa,   r0
348
 mov    #0x55,   r1
349
 mov.l  _pram10, r4
350
 add    #4,   r4
351
 lds    r0,   macl
352
 sts.l  macl, @-r4 ! <--------
353
 lds    r1,   macl ! <--------
354
 sts    macl, r0
355
 cmp/eq #0x55, r0
356
 bt     .+6
357
 jmp    @r13
358
 nop
359
 mov.l  @r4+,  r0
360
 cmp/eq #0xaa, r0
361
 bt     .+6
362
 jmp    @r13
363
 nop
364
!---------------------
365
 mov    #0x55,   r0
366
 mov.l  _pram10, r4
367
 add    #4,   r4
368
 lds    r0,   macl
369
 sts.l  macl, @-r4 ! <--------
370
 clrmac            ! <--------
371
 sts    macl,  r0
372
 cmp/eq #0x00, r0
373
 bt     .+6
374
 jmp    @r13
375
 nop
376
 mov.l  @r4+,  r0
377
 cmp/eq #0x55, r0
378
 bt     .+6
379
 jmp    @r13
380
 nop
381
!---------------------
382
 mov    #0xaa,   r0
383
 mov.l  _pram10, r4
384
 add    #8,   r4
385
 lds    r0,   macl
386
 sts.l  macl, @-r4 ! <--------
387
 sts.l  macl, @-r4 ! <--------
388
 sts    macl, r1
389
 cmp/eq r1, r0
390
 bt     .+6
391
 jmp    @r13
392
 nop
393
 mov.l  @r4+, r2
394
 cmp/eq r2, r0
395
 bt     .+6
396
 jmp    @r13
397
 nop
398
 mov.l  @r4+, r3
399
 cmp/eq r3, r0
400
 bt     .+6
401
 jmp    @r13
402
 nop
403
!---------------------
404
 mov    #0xaa,   r0
405
 mov.l  _pram10, r4
406
 add    #4,   r4
407
 lds    r0,   macl
408
 sts.l  macl, @-r4 ! <--------
409
 sts    macl, r1   ! <--------
410
 cmp/eq r1, r0
411
 bt     .+6
412
 jmp    @r13
413
 nop
414
 mov.l  @r4,  r2
415
 cmp/eq r2, r0
416
 bt     .+6
417
 jmp    @r13
418
 nop
419
!---------------------
420
!===[3]===============
421
!---------------------
422
 mov    #0x55,  r0
423
 mov.l  _pram10, r4
424
 add    #4,  r4
425
 mov    #8,  r1
426
 mov    #9,  r2
427
 lds    r0,   mach
428
 sts.l  mach, @-r4 ! <--------
429
 mulu.w r2, r1     ! <--------
430
 sts    mach, r0
431
 cmp/eq #0x55,  r0
432
 bt     .+6
433
 jmp    @r13
434
 nop
435
 sts    macl, r0
436
 cmp/eq #72,  r0
437
 bt     .+6
438
 jmp    @r13
439
 nop
440
!---------------------
441
 mov    #0xaa,  r0
442
 mov.l  _pram10, r4
443
 add    #4,  r4
444
 mov    #7,  r1
445
 mov    #-8,  r2
446
 lds    r0,   mach
447
 sts.l  mach, @-r4 ! <--------
448
 muls.w r2, r1     ! <--------
449
 sts    mach, r0
450
 cmp/eq #0xaa,  r0
451
 bt     .+6
452
 jmp    @r13
453
 nop
454
 sts    macl, r0
455
 cmp/eq #-56,  r0
456
 bt     .+6
457
 jmp    @r13
458
 nop
459
!---------------------
460
 mov    #0x55,  r0
461
 mov.l  _pram10, r4
462
 add    #4,  r4
463
 mov    #6,  r1
464
 mov    #7,  r2
465
 lds    r0,   mach
466
 sts.l  mach, @-r4 ! <--------
467
 mul.l  r2, r1     ! <--------
468
 sts    mach, r0
469
 cmp/eq #0x55,  r0
470
 bt     .+6
471
 jmp    @r13
472
 nop
473
 sts    macl, r0
474
 cmp/eq #42,  r0
475
 bt     .+6
476
 jmp    @r13
477
 nop
478
!---------------------
479
 mov    #0xaa,  r0
480
 mov.l  _pram10, r4
481
 mov    #5,  r1
482
 mov    #6,  r2
483
 lds    r0,   mach
484
 sts.l  mach, @-r4 ! <--------
485
 dmulu.l r2, r1    ! <--------
486
 sts    mach, r0
487
 cmp/eq #0x00,  r0
488
 bt     .+6
489
 jmp    @r13
490
 nop
491
 sts    macl, r0
492
 cmp/eq #30,  r0
493
 bt     .+6
494
 jmp    @r13
495
 nop
496
!---------------------
497
 mov    #0xaa,  r0
498
 mov.l  _pram10, r4
499
 mov    #5,  r1
500
 mov    #-6,  r2
501
 lds    r0,   mach
502
 sts.l  mach, @-r4 ! <--------
503
 dmuls.l r2, r1    ! <--------
504
 sts    mach, r0
505
 cmp/eq #0xff,  r0
506
 bt     .+6
507
 jmp    @r13
508
 nop
509
 sts    macl, r0
510
 cmp/eq #-30,  r0
511
 bt     .+6
512
 jmp    @r13
513
 nop
514
!---------------------
515
 mov    #0xff,  r1
516
 mov.l  _pram10, r4
517
 add    #4, r4
518
 mov.l  r1, @r4
519
 lds    r1, mach
520
 mov    #0, r0     ! S=0
521
 ldc    r0, sr
522
 lds    r0, macl   ! MAC=ffffffff 00000000
523
 sts.l  mach, @-r4 ! <--------
524
 mac.l  @r4+, @r4+ ! <--------
525
 sts    mach, r0   ! MAC=ffffffff 00000001
526
 cmp/eq #0xff,  r0
527
 bt     .+6
528
 jmp    @r13
529
 nop
530
 sts    macl, r0
531
 cmp/eq #0x01,  r0
532
 bt     .+6
533
 jmp    @r13
534
 nop
535
!---------------------
536
 mov    #0xff,  r1
537
 mov.l  _pram10, r4
538
 add    #4,  r4
539
 lds    r1, mach
540
 mov    #0, r0     ! S=0
541
 ldc    r0, sr
542
 lds    r0, macl   ! MAC=ffffffff 00000000
543
 sts.l  mach, @-r4 ! <--------
544
 mac.w  @r4+, @r4+ ! <--------
545
 sts    mach, r0   ! MAC=ffffffff 00000001
546
 cmp/eq #0xff,  r0
547
 bt     .+6
548
 jmp    @r13
549
 nop
550
 sts    macl, r0
551
 cmp/eq #0x01,  r0
552
 bt     .+6
553
 jmp    @r13
554
 nop
555
!---------------------
556
 mov    #0xaa,   r0
557
 mov.l  _pram10, r4
558
 add    #4,   r4
559
 lds    r0,   mach
560
 mov    r4,   r5
561
 mov    #0x55, r1
562
 mov.l  r1,   @r5
563
 sts.l  mach, @-r4 ! <--------
564
 lds.l  @r5+, mach ! <--------
565
 sts    mach,  r0
566
 cmp/eq #0x55, r0
567
 bt     .+6
568
 jmp    @r13
569
 nop
570
 mov.l  @r4+,  r0
571
 cmp/eq #0xaa, r0
572
 bt     .+6
573
 jmp    @r13
574
 nop
575
 mov.l  @r4+,  r0
576
 cmp/eq #0x55, r0
577
 bt     .+6
578
 jmp    @r13
579
 nop
580
!---------------------
581
 mov    #0xaa,   r0
582
 mov    #0x55,   r1
583
 mov.l  _pram10, r4
584
 add    #4,   r4
585
 lds    r0,   mach
586
 sts.l  mach, @-r4 ! <--------
587
 lds    r1,   mach ! <--------
588
 sts    mach, r0
589
 cmp/eq #0x55, r0
590
 bt     .+6
591
 jmp    @r13
592
 nop
593
 mov.l  @r4+,  r0
594
 cmp/eq #0xaa, r0
595
 bt     .+6
596
 jmp    @r13
597
 nop
598
!---------------------
599
 mov    #0x55,   r0
600
 mov.l  _pram10, r4
601
 add    #4,   r4
602
 lds    r0,   mach
603
 sts.l  mach, @-r4 ! <--------
604
 clrmac            ! <--------
605
 sts    mach,  r0
606
 cmp/eq #0x00, r0
607
 bt     .+6
608
 jmp    @r13
609
 nop
610
 mov.l  @r4+,  r0
611
 cmp/eq #0x55, r0
612
 bt     .+6
613
 jmp    @r13
614
 nop
615
!---------------------
616
 mov    #0xaa,   r0
617
 mov.l  _pram10, r4
618
 add    #8,   r4
619
 lds    r0,   mach
620
 sts.l  mach, @-r4 ! <--------
621
 sts.l  mach, @-r4 ! <--------
622
 sts    mach, r1
623
 cmp/eq r1, r0
624
 bt     .+6
625
 jmp    @r13
626
 nop
627
 mov.l  @r4+, r2
628
 cmp/eq r2, r0
629
 bt     .+6
630
 jmp    @r13
631
 nop
632
 mov.l  @r4+, r3
633
 cmp/eq r3, r0
634
 bt     .+6
635
 jmp    @r13
636
 nop
637
!---------------------
638
 mov    #0xaa,   r0
639
 mov.l  _pram10, r4
640
 add    #4,   r4
641
 lds    r0,   mach
642
 sts.l  mach, @-r4 ! <--------
643
 sts    mach, r1   ! <--------
644
 cmp/eq r1, r0
645
 bt     .+6
646
 jmp    @r13
647
 nop
648
 mov.l  @r4,  r2
649
 cmp/eq r2, r0
650
 bt     .+6
651
 jmp    @r13
652
 nop
653
!---------------------
654
!---------------------
655
 bra    skip2
656
 nop
657
 .align 4
658
_pram10:   .long _ram0
659
_pram11:   .long _ram0+0x10
660
skip2:
661
!---------------------
662
!===[2]===============
663
!---------------------
664
 mov    #0x55,  r0
665
 mov.l  _pram00, r4
666
 mov.l  r0,  @r4
667
 mov    #8,  r1
668
 mov    #9,  r2
669
 lds    r0,   mach
670
 lds.l  @r4+, macl ! <--------
671
 mulu.w r2, r1     ! <--------
672
 sts    mach, r0
673
 cmp/eq #0x55,  r0
674
 bt     .+6
675
 jmp    @r13
676
 nop
677
 sts    macl, r0
678
 cmp/eq #72,  r0
679
 bt     .+6
680
 jmp    @r13
681
 nop
682
!---------------------
683
 mov    #0xaa,  r0
684
 mov.l  _pram00, r4
685
 mov.l  r0,  @r4
686
 mov    #7,  r1
687
 mov    #-8,  r2
688
 lds    r0,   mach
689
 lds.l  @r4+, macl ! <--------
690
 muls.w r2, r1     ! <--------
691
 sts    mach, r0
692
 cmp/eq #0xaa,  r0
693
 bt     .+6
694
 jmp    @r13
695
 nop
696
 sts    macl, r0
697
 cmp/eq #-56,  r0
698
 bt     .+6
699
 jmp    @r13
700
 nop
701
!---------------------
702
 mov    #0x55,  r0
703
 mov.l  _pram00, r4
704
 mov.l  r0,  @r4
705
 mov    #6,  r1
706
 mov    #7,  r2
707
 lds    r0,   mach
708
 lds.l  @r4+, macl ! <--------
709
 mul.l  r2, r1     ! <--------
710
 sts    mach, r0
711
 cmp/eq #0x55,  r0
712
 bt     .+6
713
 jmp    @r13
714
 nop
715
 sts    macl, r0
716
 cmp/eq #42,  r0
717
 bt     .+6
718
 jmp    @r13
719
 nop
720
!---------------------
721
 mov    #0xaa,  r0
722
 mov.l  _pram00, r4
723
 mov.l  r0,  @r4
724
 mov    #5,  r1
725
 mov    #6,  r2
726
 lds    r0,   mach
727
 lds.l  @r4+, macl ! <--------
728
 dmulu.l r2, r1    ! <--------
729
 sts    mach, r0
730
 cmp/eq #0,  r0
731
 bt     .+6
732
 jmp    @r13
733
 nop
734
 sts    macl, r0
735
 cmp/eq #30,  r0
736
 bt     .+6
737
 jmp    @r13
738
 nop
739
!---------------------
740
 mov    #0xaa,  r0
741
 mov.l  _pram00, r4
742
 mov.l  r0,  @r4
743
 mov    #5,  r1
744
 mov    #-6,  r2
745
 lds    r0,   mach
746
 lds.l  @r4+, macl ! <--------
747
 dmuls.l r2, r1    ! <--------
748
 sts    mach, r0
749
 cmp/eq #0xff,  r0
750
 bt     .+6
751
 jmp    @r13
752
 nop
753
 sts    macl, r0
754
 cmp/eq #-30,  r0
755
 bt     .+6
756
 jmp    @r13
757
 nop
758
!---------------------
759
 mov    #0,  r0
760
 mov    #4,  r1
761
 mov    #5,  r2
762
 mov.l  _pram00, r4
763
 mov.l  r0,  @r4
764
 add    #4,  r4
765
 mov.l  r1,  @r4
766
 add    #4,  r4
767
 mov.l  r2,  @r4
768
 mov.l  _pram00, r4
769
 lds    r0, mach   ! R0=0
770
 ldc    r0, sr     ! S=0
771
 lds.l  @r4+, macl ! <--------
772
 mac.l  @r4+, @r4+ ! <--------
773
 sts    mach, r0
774
 cmp/eq #0,  r0
775
 bt     .+6
776
 jmp    @r13
777
 nop
778
 sts    macl, r0
779
 cmp/eq #20,  r0
780
 bt     .+6
781
 jmp    @r13
782
 nop
783
!---------------------
784
 mov    #0,  r0
785
 mov    #4,  r1
786
 mov    #5,  r2
787
 mov.l  _pram00, r4
788
 mov.l  r0,  @r4
789
 add    #4,  r4
790
 mov.w  r1,  @r4
791
 add    #2,  r4
792
 mov.w  r2,  @r4
793
 mov.l  _pram00, r4
794
 lds    r0, mach   ! R0=0
795
 ldc    r0, sr     ! S=0
796
 lds.l  @r4+, macl ! <--------
797
 mac.w  @r4+, @r4+ ! <--------
798
 sts    mach, r0
799
 cmp/eq #0,  r0
800
 bt     .+6
801
 jmp    @r13
802
 nop
803
 sts    macl, r0
804
 cmp/eq #20,  r0
805
 bt     .+6
806
 jmp    @r13
807
 nop
808
!---------------------
809
 mov.l  _pram00, r4
810
 mov    #0xaa,   r0
811
 mov.l  r0,  @r4
812
 mov    r4,  r5
813
 add    #4,  r5
814
 mov    #0x55,   r0
815
 mov.l  r0,  @r5
816
 lds.l  @r4+, macl ! <--------
817
 lds.l  @r5+, macl ! <--------
818
 sts    macl,  r0
819
 cmp/eq #0x55, r0
820
 bt     .+6
821
 jmp    @r13
822
 nop
823
!---------------------
824
 mov.l  _pram00, r4
825
 mov    #0x55,   r0
826
 mov.l  r0,  @r4
827
 mov    #0xaa,   r1
828
 lds.l  @r4+, macl ! <--------
829
 lds    r1,   macl ! <--------
830
 sts    macl, r2
831
 cmp/eq r2, r1
832
 bt     .+6
833
 jmp    @r13
834
 nop
835
!---------------------
836
 mov.l  _pram00, r4
837
 mov    #0x55,   r0
838
 mov.l  r0,  @r4
839
 mov    #0x00,   r1
840
 lds.l  @r4+, macl
841
 clrmac          ! <--------
842
 sts    macl, r2 ! <--------
843
 cmp/eq r2, r1
844
 bt     .+6
845
 jmp    @r13
846
 nop
847
!---------------------
848
 mov.l  _pram00, r4
849
 mov    #0x55, r0
850
 mov.l  r0,  @r4
851
 mov.l  _pram01, r5
852
 lds.l  @r4+, macl ! <--------
853
 sts.l  macl, @-r5 ! <--------
854
 mov.l  @r5+, r0
855
 cmp/eq #0x55, r0
856
 bt     .+6
857
 jmp    @r13
858
 nop
859
!---------------------
860
 mov.l  _pram00, r4
861
 mov    #0xaa, r0
862
 mov.l  r0,  @r4
863
 lds.l  @r4+, macl ! <--------
864
 sts    macl, r0   ! <--------
865
 cmp/eq #0xaa, r0
866
 bt     .+6
867
 jmp    @r13
868
 nop
869
!---------------------
870
!===[1]===============
871
!---------------------
872
 mov    #0x55,  r0
873
 mov.l  _pram00, r4
874
 mov.l  r0,  @r4
875
 mov    #8,  r1
876
 mov    #9,  r2
877
 lds.l  @r4+, mach ! <--------
878
 mulu.w r2, r1     ! <--------
879
 sts    mach, r0
880
 cmp/eq #0x55,  r0
881
 bt     .+6
882
 jmp    @r13
883
 nop
884
 sts    macl, r0
885
 cmp/eq #72,  r0
886
 bt     .+6
887
 jmp    @r13
888
 nop
889
!---------------------
890
 mov    #0xaa,  r0
891
 mov.l  _pram00, r4
892
 mov.l  r0,  @r4
893
 mov    #7,  r1
894
 mov    #-8,  r2
895
 lds.l  @r4+, mach ! <--------
896
 muls.w r2, r1     ! <--------
897
 sts    mach, r0
898
 cmp/eq #0xaa,  r0
899
 bt     .+6
900
 jmp    @r13
901
 nop
902
 sts    macl, r0
903
 cmp/eq #-56,  r0
904
 bt     .+6
905
 jmp    @r13
906
 nop
907
!---------------------
908
 mov    #0x55,  r0
909
 mov.l  _pram00, r4
910
 mov.l  r0,  @r4
911
 mov    #6,  r1
912
 mov    #7,  r2
913
 lds.l  @r4+, mach ! <--------
914
 mul.l  r2, r1     ! <--------
915
 sts    mach, r0
916
 cmp/eq #0x55,  r0
917
 bt     .+6
918
 jmp    @r13
919
 nop
920
 sts    macl, r0
921
 cmp/eq #42,  r0
922
 bt     .+6
923
 jmp    @r13
924
 nop
925
!---------------------
926
 mov    #0xaa,  r0
927
 mov.l  _pram00, r4
928
 mov.l  r0,  @r4
929
 mov    #5,  r1
930
 mov    #6,  r2
931
 lds.l  @r4+, mach ! <--------
932
 dmulu.l r2, r1    ! <--------
933
 sts    mach, r0
934
 cmp/eq #0,  r0
935
 bt     .+6
936
 jmp    @r13
937
 nop
938
 sts    macl, r0
939
 cmp/eq #30,  r0
940
 bt     .+6
941
 jmp    @r13
942
 nop
943
!---------------------
944
 mov    #0xaa,  r0
945
 mov.l  _pram00, r4
946
 mov.l  r0,  @r4
947
 mov    #5,  r1
948
 mov    #-6,  r2
949
 lds.l  @r4+, mach ! <--------
950
 dmuls.l r2, r1    ! <--------
951
 sts    mach, r0
952
 cmp/eq #0xff,  r0
953
 bt     .+6
954
 jmp    @r13
955
 nop
956
 sts    macl, r0
957
 cmp/eq #-30,  r0
958
 bt     .+6
959
 jmp    @r13
960
 nop
961
!---------------------
962
 mov    #0,  r0
963
 mov    #4,  r1
964
 mov    #5,  r2
965
 mov.l  _pram00, r4
966
 mov.l  r0,  @r4
967
 add    #4,  r4
968
 mov.l  r1,  @r4
969
 add    #4,  r4
970
 mov.l  r2,  @r4
971
 mov.l  _pram00, r4
972
 lds    r0, macl   ! R0=0
973
 ldc    r0, sr     ! S=0
974
 lds.l  @r4+, mach ! <--------
975
 mac.l  @r4+, @r4+ ! <--------
976
 sts    mach, r0
977
 cmp/eq #0,  r0
978
 bt     .+6
979
 jmp    @r13
980
 nop
981
 sts    macl, r0
982
 cmp/eq #20,  r0
983
 bt     .+6
984
 jmp    @r13
985
 nop
986
!---------------------
987
 mov    #0,  r0
988
 mov    #4,  r1
989
 mov    #5,  r2
990
 mov.l  _pram00, r4
991
 mov.l  r0,  @r4
992
 add    #4,  r4
993
 mov.w  r1,  @r4
994
 add    #2,  r4
995
 mov.w  r2,  @r4
996
 mov.l  _pram00, r4
997
 lds    r0, macl   ! R0=0
998
 ldc    r0, sr     ! S=0
999
 lds.l  @r4+, mach ! <--------
1000
 mac.w  @r4+, @r4+ ! <--------
1001
 sts    mach, r0
1002
 cmp/eq #0,  r0
1003
 bt     .+6
1004
 jmp    @r13
1005
 nop
1006
 sts    macl, r0
1007
 cmp/eq #20,  r0
1008
 bt     .+6
1009
 jmp    @r13
1010
 nop
1011
!---------------------
1012
 mov.l  _pram00, r4
1013
 mov    #0xaa,   r0
1014
 mov.l  r0,  @r4
1015
 mov    r4,  r5
1016
 add    #4,  r5
1017
 mov    #0x55,   r0
1018
 mov.l  r0,  @r5
1019
 lds.l  @r4+, mach ! <--------
1020
 lds.l  @r5+, mach ! <--------
1021
 sts    mach,  r0
1022
 cmp/eq #0x55, r0
1023
 bt     .+6
1024
 jmp    @r13
1025
 nop
1026
!---------------------
1027
 mov.l  _pram00, r4
1028
 mov    #0x55,   r0
1029
 mov.l  r0,  @r4
1030
 mov    #0xaa,   r1
1031
 lds.l  @r4+, mach ! <--------
1032
 lds    r1,   mach ! <--------
1033
 sts    mach, r2
1034
 cmp/eq r2, r1
1035
 bt     .+6
1036
 jmp    @r13
1037
 nop
1038
!---------------------
1039
 mov.l  _pram00, r4
1040
 mov    #0x55,   r0
1041
 mov.l  r0,  @r4
1042
 mov    #0x00,   r1
1043
 lds.l  @r4+, mach
1044
 clrmac          ! <--------
1045
 sts    mach, r2 ! <--------
1046
 cmp/eq r2, r1
1047
 bt     .+6
1048
 jmp    @r13
1049
 nop
1050
!---------------------
1051
 mov.l  _pram00, r4
1052
 mov    #0x55, r0
1053
 mov.l  r0,  @r4
1054
 mov.l  _pram01, r5
1055
 lds.l  @r4+, mach ! <--------
1056
 sts.l  mach, @-r5 ! <--------
1057
 mov.l  @r5+, r0
1058
 cmp/eq #0x55, r0
1059
 bt     .+6
1060
 jmp    @r13
1061
 nop
1062
!---------------------
1063
 mov.l  _pram00, r4
1064
 mov    #0xaa, r0
1065
 mov.l  r0,  @r4
1066
 lds.l  @r4+, mach ! <--------
1067
 sts    mach, r0   ! <--------
1068
 cmp/eq #0xaa, r0
1069
 bt     .+6
1070
 jmp    @r13
1071
 nop
1072
!---------------------
1073
!-----------------------------
1074
 bra    _testfinish
1075
 nop
1076
!-----------------------------
1077
 .align 4
1078
_pram00:   .long _ram0
1079
_pram01:   .long _ram0+0x10
1080
!-----------------------------
1081
_testfinish:
1082
/*********************************************************
1083
 Move to another Next ROM area to check hardware operation
1084
 *********************************************************/
1085
 mov.l _pbranch_table, r13
1086
 add r14, r13
1087
 mov.l @r13, r12
1088
 jmp @r12
1089
 add #4, r14
1090
.align 4
1091
_pbranch_table: .long _branch_table
1092
_branch_table:
1093
 .long _rom1+_test
1094
 .long _rom2+_test
1095
 .long _rom3+_test
1096
 .long _rom0+_pass
1097
 
1098
/**************
1099
 Congraturation
1100
 **************/
1101
_pass:
1102
 mov.l _ppass_value, r0
1103
 mov.l _ppass_value, r1
1104
 mov.l r0, @r1
1105
 bra   _pass
1106
 nop
1107
.align 4
1108
_ppass_value: .long 0x12345678
1109
 
1110
/**********
1111
 You Failed
1112
 **********/
1113
_fail:
1114
 mov.l _pfail_value, r0
1115
 mov.l _pfail_value, r1
1116
 bra   _fail
1117
 nop
1118
.align 4
1119
_pfail_value: .long 0x88888888
1120
 
1121
.end

powered by: WebSVN 2.1.0

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