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

HWLoop count not updated when last instruction is a CSR access with pipeline flush #975

Closed
pascalgouedo opened this issue Apr 9, 2024 · 1 comment
Assignees
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system

Comments

@pascalgouedo
Copy link

Issue description

When the last instruction of an Hardware Loop is a CSR access (MSTATUS, MEPC, MTVEC, MCAUSE, any counter) leading to a pipeline flush, lpcount is not decremented.

Component

Component:RTL: For issues in the RTL (e.g. for files in the rtl directory)

Steps to Reproduce

  1. cv32e40p git tag cv32e40p_v1.7.0
  2. core-v-verif git hash 6d973dda74bb666697f93d8ba0ba6131933ca4ad
  3. command with ISS: makeuvmt test TEST=pulp_hardware_loop CFG=pulp_fpu USE_ISS=1
    # Info (IDV) Instruction executed prior to mismatch '0x404(startZ_7+10): 30002373 csrr x6,mstatus'
    # Error (IDV) CSR register value mismatch (HartId:0, PC:0x00000404 startZ_7+10):
    # Error (IDV) Mismatch 0> CSR cc2 (lpcount0)
    # Error (IDV) . dut:0x0000000a (not updated)
    # Error (IDV) . ref:0x00000009
    # UVM_ERROR @ 35034.300 ns : idvPkg.sv(55) reporter [] uvmt_cv32e40p_tb.imperas_dv.trace2api.state_compare @ 35034.000 ns: MISMATCH
  4. command without ISS: makeuvmt test TEST=pulp_hardware_loop CFG=pulp_fpu USE_ISS=0
    Never ending as inner loop lpcount is never decremented.
@pascalgouedo pascalgouedo added Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system Component:RTL For issues in the RTL (e.g. for files in the rtl directory) labels Apr 9, 2024
@pascalgouedo pascalgouedo self-assigned this Apr 9, 2024
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 9, 2024
Signed-off-by: Pascal Gouedo <[email protected]>
pascalgouedo pushed a commit that referenced this issue Apr 9, 2024
@pascalgouedo
Copy link
Author

Corrected with PR #977

@pascalgouedo pascalgouedo added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Apr 10, 2024
@pascalgouedo pascalgouedo reopened this Apr 10, 2024
@pascalgouedo pascalgouedo removed the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Apr 10, 2024
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 10, 2024
pascalgouedo pushed a commit to pascalgouedo/cv32e40p that referenced this issue Apr 10, 2024
pascalgouedo pushed a commit that referenced this issue Apr 10, 2024
@pascalgouedo pascalgouedo added the Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation label Apr 18, 2024
@pascalgouedo pascalgouedo added the PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component:RTL For issues in the RTL (e.g. for files in the rtl directory) PARAM:PULP_XPULP Issue depends on the PULP_XPULP parameter Status:Resolved Issue has been resolved, but closure is pending on git merge and/or issuer confirmation Type:Bug For bugs in the RTL, Documentation, Verification environment or Tool and Build system
Projects
None yet
Development

No branches or pull requests

1 participant