mirror of
https://gitlab.com/brendanhaines/cpu.git
synced 2024-11-09 21:14:57 -07:00
add more extensive memory test
This commit is contained in:
parent
6d39c01740
commit
d58661e289
|
@ -55,7 +55,7 @@ initial begin
|
||||||
#10
|
#10
|
||||||
reset = 0;
|
reset = 0;
|
||||||
|
|
||||||
#2000
|
#5000
|
||||||
reset = 1;
|
reset = 1;
|
||||||
$stop;
|
$stop;
|
||||||
end
|
end
|
||||||
|
|
1280
sim/core_tb.wcfg
1280
sim/core_tb.wcfg
File diff suppressed because it is too large
Load Diff
34
test/test.S
34
test/test.S
|
@ -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:
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user