Hi,
So, I have continued poking around since my last issue, and I found an interesting memory re-ordering scenario that should not be allowed.
Observed behaviour
This is the scenario, which happens at in the ELF file attached.
hart0 instructions:
core 0: 0x80002540 (0x00a5b023) sd a0, 0(a1) -----> stores value 0x8006decc
core 0: 0x80002544 (0x3ee56663) bltu a0, a4, pc + 1004
core 0: 0x80002548 (0x00058903) lb s2, 0(a1) -----> loads value 0xffffffffffffffcc
core 0: 0x8000254c (0x01294933) xor s2, s2, s2
core 0: 0x80002550 (0x0005ca83) lbu s5, 0(a1) -----> loads 0x0 (VIOLATION)
core 0: 0x80002554 (0x020abab3) mulhu s5, s5, zero
core 0: 0x80002558 (0x81291d63) bne s2, s2, pc - 4070
core 0: 0x8000255c (0x0088b023) sd s0, 0(a7) (different address, ignore)
core 0: 0x80002560 (0x0005e103) lwu sp, 0(a1) -----> loads value 0x8006decc
hart1 instructions:
Execute some stores (only 0) and loads to the same address a a1
Expected Behaviour
So, the problem is the following:
- the store at
PC=0x80002540 has performed, because the loads at PC=0x80002548 read its value.
- The load at address
PC=0x80002550 reads 0, which is a stale value
This violates the RVWMO CoRR
Extras
Command used:
sbt "runMain naxriscv.platform.tilelinkdemo.SocSim --withFloat --withDouble --withRvc --xlen 64 --no-rvls --nax-count 3 --trace --pass-symbol pass"
I hope this is clear and correct. I am unsure of how reproducible this is, so I have attached the trace, elf and log.
Thank you for the help!
Best,
Quentin :)
mem_issue.zip
Hi,
So, I have continued poking around since my last issue, and I found an interesting memory re-ordering scenario that should not be allowed.
Observed behaviour
This is the scenario, which happens at in the ELF file attached.
hart0 instructions:
hart1 instructions:
Execute some stores (only 0) and loads to the same address a
a1Expected Behaviour
So, the problem is the following:
PC=0x80002540has performed, because the loads atPC=0x80002548read its value.PC=0x80002550reads 0, which is a stale valueThis violates the RVWMO CoRR
Extras
Command used:
sbt "runMain naxriscv.platform.tilelinkdemo.SocSim --withFloat --withDouble --withRvc --xlen 64 --no-rvls --nax-count 3 --trace --pass-symbol pass"I hope this is clear and correct. I am unsure of how reproducible this is, so I have attached the trace, elf and log.
Thank you for the help!
Best,
Quentin :)
mem_issue.zip