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

Subversion Repositories ssbcc

[/] [ssbcc/] [trunk/] [core/] [9x8/] [tb/] [arch/] [arch-2r2m.s] - Blame information for rev 7

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 sinclairrf
 
2
; Copyright 2013, Sinclair R.F., Inc.
3
;
4
; Test memory I/O
5
 
6
.memory RAM ram_a
7
.variable a 0*${size['ram_a']}
8
 
9
.memory RAM ram_b
10
.variable b 0*${size['ram_b']}
11
 
12
.include init.s
13
 
14
.main
15
 
16
  ;
17
  ; Write to memory a, then memory b, then memory a again (to help detect write
18
  ; errors for any memory configuration).
19
  ;
20
 
21
  ${size['ram_a']/2} :loop_write_a0 0xA5 over ^ over .store(ram_a) drop .jumpc(loop_write_a0,0>>) drop
22
  ${size['ram_b']/2} :loop_write_b0 0x96 over ^ over .store(ram_b) drop .jumpc(loop_write_b0,0>>) drop
23
  ${size['ram_a']/2} :loop_write_a1 0x5A over ^ over .store(ram_a) drop .jumpc(loop_write_a1,0>>) drop
24
 
25
  ; Read the final memory values.
26
  ${size['ram_a']/2} :loop_read_a dup .fetch(ram_a) drop .jumpc(loop_read_a,0>>) drop
27
  ${size['ram_b']/2} :loop_read_b dup .fetch(ram_b) drop .jumpc(loop_read_b,0>>) drop
28
  ${size['rom_z']-1} :loop_read_z dup .fetch(rom_z) drop .jumpc(loop_read_z,1-)  drop
29
  ${size['rom_y']-1} :loop_read_y dup .fetch(rom_y) drop .jumpc(loop_read_y,1-)  drop
30
 
31
  ; Terminate the simulation.
32
  .outstrobe(O_DONE_STROBE)
33
 
34
  ; Sit in an infinite loop.
35
  :infinite .jump(infinite)

powered by: WebSVN 2.1.0

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