Add formal assertion for controller line 850 (#1010) - #1073
Open
avinashkollu-git wants to merge 1 commit into
Open
avinashkollu-git wants to merge 1 commit into
avinashkollu-git wants to merge 1 commit into
Conversation
Lines 850 and 852-887 of cv32e40p_controller.sv can never run (issue openhwfoundation#1010). Single-step can only be turned on by dret or by a CSR write. Both send the controller back to DECODE, and DECODE stops for the single step before it can enter DECODE_HWLOOP. The assertion only uses signals that cv32e40p_bind.sv already connects. Signed-off-by: Avinash Kollu <avinashkollu123@gmail.com>
avinashkollu-git
force-pushed
the
avinash_1010_assert_20260924
branch
from
September 24, 2026 06:02
7828aa9 to
912dd91
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds one assertion for issue #1010.
What it says
Lines 850 and 852-887 of
cv32e40p_controller.svcan never run. The assertion checks that the controller is never inDECODE_HWLOOPwhile single-step is on and the core is not in debug mode.Why it is true
Single-step can only be turned on by
dretor by a CSR write. Both send the controller back toDECODE. InDECODEthe core stops for the single step before it can enter
DECODE_HWLOOP.How I checked it
I do not have Questa, so I used open-source tools (Yosys and SymbiYosys). I used the same assumptions as
scripts/formal: no scan, the OBI rules on both buses, and no writes to the hardware-loop CSRs.DECODE_HWLOOP, and it can reach single-step outside debug mode.Please note
The controller bind connects
clk_iandrst_ni, which do not exist incv32e40p_controller. PR #1072 fixes this.Without it, the controller assertions, including this one, have no working clock.
Full report: https://github.com/Rivoryxa-Technologies/core-v-investigation-reports/blob/main/reports/rtl-triage-cv32e40p-1010.pdf