add more extensive memory test

This commit is contained in:
Brendan Haines 2020-11-14 23:36:23 -07:00
parent 6d39c01740
commit d58661e289
3 changed files with 1315 additions and 1 deletions

View File

@ -55,7 +55,7 @@ initial begin
#10 #10
reset = 0; reset = 0;
#2000 #5000
reset = 1; reset = 1;
$stop; $stop;
end end

File diff suppressed because it is too large Load Diff

View File

@ -239,6 +239,40 @@ test10:
nop nop
nop nop
test11:
addi x30, x0, 11 # x30 = 11
addi x5, x0, 0 # x5 = 0
addi x6, x0, 0x10 # x6 = 0x00000010 = 16
test11_loop:
nop
nop
nop
nop
nop
sw x10, 0(x9) # someint = 0x12345678
addi x10, x10, 1 # x10 = x10 + 1
addi x9, x9, 4 # x9 = x9 + 4
addi x5, x5, 1 # x5 = x5 + 1
blt x5, x6, test11_loop
test11_done:
test12:
addi x30, x0, 12
test12_loop:
# decrement values before load since they were incremented after final store
addi x10, x10, -1 # x10 = x10 - 1
addi x9, x9, -4 # x9 = x9 - 4
addi x5, x5, -1 # x5 = x5 - 1
nop
nop
nop
nop
nop
lw x11, 0(x9) # someint = 0x12345678
bne x11, x10, fail
bgt x5, x0, test12_loop
test12_done:
done: done: