Repository navigation
[dv,clk_mgr] Vendor in clk_mgr DV environment from OT - #698
Open
tchilikov-semify wants to merge 9 commits into
Open
tchilikov-semify wants to merge 9 commits into
tchilikov-semify wants to merge 9 commits into
Conversation
Collaborator
Author
|
This PR will close issue #432 |
Collaborator
Author
|
Results of running the regression: Test Results
|
tchilikov-semify
force-pushed
the
clk_mgr
branch
10 times, most recently
from
October 19, 2026 17:16
de79146 to
fce7f42
Compare
The DV templates hardcode earlgrey's four hint clocks (aes, hmac, kmac, otbn) and build signal names from them. Mocha has one hint clock, clk_main_hint, so the generated environment referred to signals that don't exist and wouldn't compile.
tchilikov-semify
force-pushed
the
clk_mgr
branch
from
October 20, 2026 13:11
fce7f42 to
503fd89
Compare
Clock measurement is disabled in mocha, so the hardware holds its config lock open instead of letting software clear it. The randomized CSR tests write to the lock, read back a different value, and fail. Exclude it from the tests that write to it.
clk_mgr has no interrupts, but the testplan still imported the shared interrupt testplan. This added an interrupt test to the V2 regression that doesn't exist, so every dvsim run logged an error about it and the report carried testpoints that could never be covered.
tchilikov-semify
force-pushed
the
clk_mgr
branch
2 times, most recently
from
October 20, 2026 13:48
f96e956 to
b6901c4
Compare
Clock measurement is disabled in mocha, so any test that tries to exercise it can't pass. Drop the two measurement tests and their testpoints, and skip the measurement checks inside the tests that also cover other things. In place of the dropped checks, the regwen test now tries to enable measurement and confirms the hardware refuses.
Apply two commits from OpenTitan (lowRISC/opentitan#31175) which allows the driver to resume when it encounters items during a reset, instead of getting stuck forever.
Add the upstream fix from OpenTitan (lowRISC/opentitan#31207) which widens the sec_cm alert window from 7 to 8 cycles in cip_lib, since the alert crosses a clock domain and can arrive a cycle late due to metastability.
…it is not built Gate the CLK_CTRL.CONFIG.REGWEN countermeasure, its RTL annotation and its testpoint on ext_clk_bypass, since the register it protects isn't built without it.
tchilikov-semify
force-pushed
the
clk_mgr
branch
from
October 20, 2026 13:53
b6901c4 to
f42df81
Compare
martin-velay
left a comment
Contributor
There was a problem hiding this comment.
I believe this PR is good to go now. Thanks @tchilikov-semify !
martin-velay
approved these changes
Oct 20, 2026
martin-velay
enabled auto-merge
October 20, 2026 13:57
martin-velay
disabled auto-merge
October 23, 2026 08:34
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Oct 23, 2026
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 makes the clk_mgr DV environment build and pass on mocha's configuration. The environment was already generated in the tree; what was missing was adapting it to a single hint clock and to ext_clk_bypass being false.
The regression can be ran with:
dvsim hw/top_chip/ip_autogen/clkmgr/dv/clkmgr_sim_cfg.hjson -i allIt currently passes 610/610.
This PR disables the clock manager measurement tests, since measurement is disabled in mocha.
The DV templates hardcoded earlgrey's four hint clocks, so the generated environment referred to signals that don't exist in mocha and wouldn't compile. Hint clock names are now generated from the config.
Two shared DV bugs were hit along the way, and both were fixed by vendoring in the upstream OpenTitan fixes.
Lastly, the clkmgr register description declared a countermeasure for the external clock regwen, a register that is not built when ext_clk_bypass is false. That countermeasure, its RTL annotation and its testpoint are now gated on ext_clk_bypass.