Repository navigation
[rtl] Keep the CHERIoT enable assertions valid across a reset - #2602
Draft
henrikpedersen-oss wants to merge 1 commit into
Draft
henrikpedersen-oss wants to merge 1 commit into
henrikpedersen-oss wants to merge 1 commit into
Conversation
IbexCheriotEnableShadowLag_A and IbexCheriotEnableCmpEqual_A compared with $past and $stable. When a reset comes and goes while clk_i is stopped (a power glitch in sleep), the first edge after it compares with a value from before the reset and fails, though both enables are equal. Compare with flops that start valid only after the first edge since reset. AI-assisted (Claude Code) — reviewed and approved by author Co-Authored-By: Claude <claude@anthropic.com>
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.
IbexCheriotEnableShadowLag_AandIbexCheriotEnableCmpEqual_Ainibex_topuse$pastand$stable. If a reset is asserted and released whileclk_iis stopped, no clock edge sees it, so at the first edge afterwards$pastand$stablestill refer to the edge before the reset.Earl Grey 2 hits this in a chip test that glitches the main power while the core sleeps. The core clock stops at the WFI. The main-domain reset then sets both enables from On to Off. At the first edge after wake-up, the shadow enable (Off) is compared with
$past(cheriot_enable_i)(On, from before the sleep), and both assertions fail. Both enables are Off and equal, and the hardware comparison reports no mismatch.The change compares with the enables registered at the previous edge, and checks only after the first edge since reset. This also keeps the checks quiet in the first cycle for an integrator who ties the enables On from reset. The change is assertion-only: no RTL behaviour changes.
Testing
chip_sw_eg2_sleep_reset_68_cheriot, seed 1129 (main power glitch in normal sleep): fails on both assertions at the first clock edge after the glitch (6,541.67 µs) before the change. With the change, neither assertion fires, and the glitch step passes its 18 checks. The run continues to a later, unrelated step.This PR includes AI-assisted content generated with Claude Code. All changes have been reviewed and are the responsibility of the listed author(s).