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