[NFC] Refine assertion to be robust to clk / rst event coincidence#33
Merged
micprog merged 1 commit intopulp-platform:mainfrom Apr 15, 2026
Merged
Conversation
This patch fixes a reset glitch in the `lock_req` assertion. Previously, the assertion used `lock_d` as an antecedant of the assertion in the next cycle. Since IEEE 1800 does not guarantee the resolution of zero-delay updates, whenever the clock edge of `clk_i` coincides with the deassertion of `rst_ni` `lock_d` might be in any state, since it combinationally depends on inputs of the cache. This can lead to the assertion wrongfully triggering a cycle after reset. To fix this, this patch uses the latched `lock_q` an assumes the antecedant to hold in the same cycle instead. This leads to no functional changes, but avoids the zero-delay issue.
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 patch fixes a reset glitch in the
lock_reqassertion. Previously, the assertion usedlock_das an antecedant of the assertion in the next cycle. Since IEEE 1800 does not guarantee the resolution of zero-delay updates in any particular order, whenever the clock edge ofclk_icoincides with the deassertion ofrst_nilock_dmight be in any state, since it combinationally depends on inputs of the cache. This can lead to the assertion wrongfully triggering a cycle after reset.To fix this, this patch uses the latched
lock_qan assumes the antecedant to hold in the same cycle instead. This leads to no functional changes, but avoids the zero-delay issue.