| 1 |
#mach: crisv10 crisv32 |
| 2 |
#sim(crisv10): --hw-device "/rv/trace? true" |
| 3 |
#sim(crisv32): --hw-device "/rv/trace? true" |
| 4 |
#output: /rv: WD\n |
| 5 |
#output: /rv: REG R 0xd0000036\n |
| 6 |
#output: /rv: := 0x76543210\n |
| 7 |
#output: /rv: DMA W 0x20020..0x20043\n |
| 8 |
#output: /rv: 0x20020: 12 23 34 56\n |
| 9 |
#output: /rv: 0x20024: 79 8a bd de\n |
| 10 |
#output: /rv: 0x20028: fb ad ba db\n |
| 11 |
#output: /rv: 0x2002c: ad 56 78 9a\n |
| 12 |
#output: /rv: 0x20030: fd e1 23 45\n |
| 13 |
#output: /rv: 0x20034: 66 54 32 1a\n |
| 14 |
#output: /rv: 0x20038: ac cb be ed\n |
| 15 |
#output: /rv: 0x2003c: db ed aa da\n |
| 16 |
#output: /rv: 0x20040: 00 aa bb cc\n |
| 17 |
#output: /rv: REG R 0xd0000038\n |
| 18 |
#output: /rv: := 0x76543211\n |
| 19 |
#output: /rv: DMA R 0x20000..0x20023\n |
| 20 |
#output: /rv: 0x20000: aa 55 12 23\n |
| 21 |
#output: /rv: 0x20004: 34 56 79 8a\n |
| 22 |
#output: /rv: 0x20008: bd de fb ad\n |
| 23 |
#output: /rv: 0x2000c: ba db ad 56\n |
| 24 |
#output: /rv: 0x20010: 78 9a fd e1\n |
| 25 |
#output: /rv: 0x20014: 23 45 66 54\n |
| 26 |
#output: /rv: 0x20018: 32 1a ac cb\n |
| 27 |
#output: /rv: 0x2001c: be ed db ed\n |
| 28 |
#output: /rv: 0x20020: aa da 00 aa\n |
| 29 |
#output: /rv: IRQ 0x8\n |
| 30 |
#output: /rv: REG R 0xd0000038\n |
| 31 |
#output: /rv: := 0x76543212\n |
| 32 |
#output: pass\n |
| 33 |
|
| 34 |
# This is a slight variation of mem1.ms just to trig the "buffer needs |
| 35 |
# to be malloced for large request size" for the DMA request. |
| 36 |
|
| 37 |
# Locations of IRQ notifiers above depend on when the simulator is |
| 38 |
# polled; adjustments may be needed (after checking that no poll is |
| 39 |
# gone due to a bug!) |
| 40 |
|
| 41 |
#r W, |
| 42 |
#r r,a8836,76543210 |
| 43 |
#r s,e020,12233456798abddefbadbadbad56789afde123456654321aaccbbeeddbedaada00aabbcc |
| 44 |
#r r,a8838,76543211 |
| 45 |
#r l,e000,aa5512233456798abddefbadbadbad56789afde123456654321aaccbbeeddbedaada00aa |
| 46 |
#r I,8 |
| 47 |
#r r,a8838,76543212 |
| 48 |
|
| 49 |
.include "testutils.inc" |
| 50 |
start |
| 51 |
test_h_mem 0x76543210 0xd0000036 |
| 52 |
|
| 53 |
move.d 0x2003f,$r1 |
| 54 |
move.d 0x10000,$r3 |
| 55 |
0: |
| 56 |
test.b [$r1] |
| 57 |
bne 1f |
| 58 |
subq 1,$r3 |
| 59 |
bne 0b |
| 60 |
nop |
| 61 |
|
| 62 |
1: |
| 63 |
test_h_mem 0x56342312 0x20020 |
| 64 |
test_h_mem 0xdebd8a79 0x20024 |
| 65 |
test_h_mem 0xdbbaadfb 0x20028 |
| 66 |
test_h_mem 0x9a7856ad 0x2002c |
| 67 |
test_h_mem 0x4523e1fd 0x20030 |
| 68 |
test_h_mem 0x1a325466 0x20034 |
| 69 |
test_h_mem 0xedbecbac 0x20038 |
| 70 |
test_h_mem 0xdaaaeddb 0x2003c |
| 71 |
test_h_mem 0xccbbaa00 0x20040 |
| 72 |
|
| 73 |
move.d 0x20020,$r0 |
| 74 |
move.d 0x20000,$r1 |
| 75 |
move.w 0x55aa,$r2 |
| 76 |
move.w $r2,[r1+] |
| 77 |
.rept 9 |
| 78 |
move.d [$r0+],$r2 |
| 79 |
move.d $r2,[$r1+] |
| 80 |
.endr |
| 81 |
|
| 82 |
test_h_mem 0x76543211 0xd0000038 |
| 83 |
|
| 84 |
.if ..asm.arch.cris.v32 |
| 85 |
move irqvec1,$ebp |
| 86 |
.else |
| 87 |
move irqvec1,$ibr |
| 88 |
.endif |
| 89 |
ei |
| 90 |
move.d 0x100000,$r9 |
| 91 |
0: |
| 92 |
subq 1,$r9 |
| 93 |
bne 0b |
| 94 |
nop |
| 95 |
killme: |
| 96 |
fail |
| 97 |
|
| 98 |
irq0x34: |
| 99 |
test_h_mem 0x76543212 0xd0000038 |
| 100 |
pass |
| 101 |
|
| 102 |
.fill 65536*2+128,1,0 |
| 103 |
|
| 104 |
singlevec irqvec1,0x34,irq0x34 |