Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] : mip.MSIP and mie.MSIE are read-only zeros #2500

Open
1 task done
AyoubJalali opened this issue Sep 12, 2024 · 6 comments
Open
1 task done

[BUG] : mip.MSIP and mie.MSIE are read-only zeros #2500

AyoubJalali opened this issue Sep 12, 2024 · 6 comments
Assignees
Labels
CV32A65X Part: Embedded configuration Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@AyoubJalali
Copy link
Contributor

AyoubJalali commented Sep 12, 2024

Is there an existing CVA6 bug for this?

  • I have searched the existing bug issues

Bug Description

According to CV32A65X Spec, As the system has only one hart then mip.MSIP and mie.MSIE are read-only zeros.

So there's a bug on RTL, it allow modifying mip.MSIP and mie.MSIE

@AyoubJalali AyoubJalali added the Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system label Sep 12, 2024
@AyoubJalali AyoubJalali added the CV32A65X Part: Embedded configuration label Sep 12, 2024
@JeanRochCoulon JeanRochCoulon added the Component:SpikeTandem Issue that impacts Spike Tandem operation label Sep 13, 2024
@JeanRochCoulon
Copy link
Contributor

This issue has not been detected up-to-now, the reason is maybe linked to the fact that Spike get the same RTL behavior allowing to modify mip.MSIP and mie.MSIE. So, there' maybe a bug in Spike.

@AyoubJalali
Copy link
Contributor Author

AyoubJalali commented Sep 13, 2024

This issue has not been detected up-to-now, the reason is maybe linked to the fact that Spike get the same RTL behavior allowing to modify mip.MSIP and mie.MSIE. So, there' maybe a bug in Spike.

I opened an issue on core-v-verif related to the same bug in (openhwgroup/core-v-verif#2531)

@zchamski
Copy link
Contributor

When building the mask of modifiable mie bits at https://github.com/openhwgroup/cva6/blob/master/core/csr_regfile.sv#L1440, the mask for bit mie.MSIE should only be set if the configuration of the core supports multi-core setups.

@JeanRochCoulon JeanRochCoulon added the Component:SpikeTandem Issue that impacts Spike Tandem operation label Oct 2, 2024
@JeanRochCoulon
Copy link
Contributor

This issue is present in both Spike and RTL. It was hidden by SpikeTandem

@zchamski
Copy link
Contributor

The Spike side was fixed in #2523. The remaining action is to update the RTL and add an appropriate RTL configuration parameter, as pointed out by @AyoubJalali.

@AyoubJalali AyoubJalali removed the Component:SpikeTandem Issue that impacts Spike Tandem operation label Oct 16, 2024
@valentinThomazic
Copy link
Contributor

The CSR embedded regression test is failing because of this.
Mismatch example :

mismatch_description: 'CSR 304  Mismatch   [REF]: 0x880              [CORE]: 0x888             '
mismatches:
- 0: null
  core:
    insn: 0000000030419073
    insn_disasm: csrrw   zero, mie, gp
    mode: 3
    pc_rdata: 00000000800036ac
    pc_wdata: 0
    rd1_addr: 0
    rd1_rdata: 0
    rs1_addr: 3
    rs1_rdata: 0000000000000008
    rs2_addr: 4
    rs2_rdata: 196
    trap: 0
  reference_model:
    insn: 0000000030419073
    insn_disasm: csrrw   zero, mie, gp
    mode: 3
    pc_rdata: 00000000800036ac
    pc_wdata: 0
    rd1_addr: 0
    rd1_rdata: 0
    rs1_addr: 3
    rs1_rdata: 0000000000000008
    rs2_addr: 4
    rs2_rdata: 0000000080000000
    trap: 0

This should be resolved as soon as the RTL is aligned on Spike

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CV32A65X Part: Embedded configuration Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

5 participants