Skip to content

csrrw mcause discrepancy between gem5 and nemu #757

@HaoyuanLiuHZPH

Description

@HaoyuanLiuHZPH

Describe the bug
When executing the instruction csrrw zero, mstatus, sx, a discrepancy is observed in the XS[1:0], MBE, and SBE fields of the mcause CSR between XIANGSHAN NEMU and GEM5. In XIANGSHAN NEMU, these fields are read only zero, whereas in GEM5, they are not.
To Reproduce
bin file path:/nfs/home/liuhaoyuan/GEM5/img_file/seeds_999_.img or any bin file contains "csrrw zero, mstatus, sx"

Expected behavior
difftest fail
Image

Necessary information on versions

  • XS-GEM5 version: [newest ]
  • NEMU version used as reference design: ["/nfs/home/share/gem5_ci/ref/normal/riscv64-nemu-interpreter-so"]

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