Skip to content

LSU issue #147

Description

@bantierr

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:

  1. the store at PC=0x80002540 has performed, because the loads at PC=0x80002548 read its value.
  2. 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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions