Skip to content

[NFC] Refine assertion to be robust to clk / rst event coincidence#33

Merged
micprog merged 1 commit intopulp-platform:mainfrom
mosaic-soc:pr-fix-reset-assertion-glitch
Apr 15, 2026
Merged

[NFC] Refine assertion to be robust to clk / rst event coincidence#33
micprog merged 1 commit intopulp-platform:mainfrom
mosaic-soc:pr-fix-reset-assertion-glitch

Conversation

@Scheremo
Copy link
Copy Markdown
Contributor

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 in any particular order, 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 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.
@Scheremo Scheremo requested a review from micprog as a code owner April 15, 2026 08:45
Copy link
Copy Markdown
Member

@micprog micprog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@micprog micprog merged commit ce0ed94 into pulp-platform:main Apr 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants