cva6 icon indicating copy to clipboard operation
cva6 copied to clipboard

Spike: FS field is not configurable [SSTATUS CSR is failing while verifying Access mode]

Open spidugu444 opened this issue 2 years ago • 4 comments

Is there an existing CVA6 bug for this?

  • [X] I have searched the existing bug issues

Bug Description

While verifying Access mode for SSTATUS CSR test is failing on RTL end due to FS field in CSR is always reading Zero.

please find the steps to replicate the issue.

  1. git clone https://github.com/spidugu444/core-v-verif.git
  2. git checkout csr_sstatus_issue
  3. set toolchain to RISCV variable
  4. Run SSTATUS test by using source cva6/regress/smoke-tests.sh
  5. output directory will generate inside cva6/sim
  6. SSTATUS test and Yaml file location: cva6/tests/custom/csr_access_tests

For quick reference please find spike and VCS log files as attached.

riscv_spike_sstatus_csr_test_0.log riscv_vcs_sstatus_csr_test_0.log

spidugu444 avatar Mar 28 '23 12:03 spidugu444

I found that in CVA6 RTL due to disable of Floating-point unit FS field in sstatus is always reading zero. so we need to configure spike to disable FS field.

spidugu444 avatar Apr 11 '23 02:04 spidugu444

This issue is linked to Spike configuration. mstatus.FS and sstatus.FS field should be configurable

ASintzoff avatar Nov 14 '23 13:11 ASintzoff

Is this specified somewhere in the User Manual?

MarioOpenHWGroup avatar Nov 21 '23 09:11 MarioOpenHWGroup

Two issues here, actually:

  • does the configuration under test support SSTATUS at all, knowing that the "embedded" config only has M mode?
  • here the FS field of STATUS is explicitly described as RW. However, the behavior of the FS filed in the absence of an FPU is not described.

Bottom line: the SSTATUS specification in the CVA6 User Manual needs to be clarified wrt. configurations and their properties, including the presence or not of the FPU in a given config.

zchamski avatar Nov 21 '23 10:11 zchamski