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