[keymgr_dpe] Replace keymgr in EG - PR1 otp_ctrl#30615
Open
rroth-lowrisc wants to merge 3 commits into
Open
Conversation
333929f to
072a07e
Compare
andreaskurth
reviewed
Jul 3, 2026
andreaskurth
left a comment
Contributor
There was a problem hiding this comment.
Thanks @rroth-lowrisc! The RTL changes look correct to me, but otp_ctrl's block-level DV needs to be updated because it now references things that no longer exist and will thus not build:
- hw/ip_templates/otp_ctrl/dv/tb.sv.tpl:144 connects .otp_keymgr_key_o(otp_ctrl_if.keymgr_key_o) — that port was deleted from the module.
- hw/ip_templates/otp_ctrl/dv/env/otp_ctrl_scoreboard.sv.tpl:156 uses otp_ctrl_pkg::KeyMgrKeyWidth — that parameter was removed from otp_ctrl_pkg (now keymgr_dpe_pkg::KeyMgrKeyWidth).
- otp_ctrl_if.sv.tpl (keymgr_key_o + its stability/data assertions), otp_ctrl_env_cov.sv.tpl, and README.md.tpl still model the old single interface.
Also the docs could use a further small update:
- hw/ip_templates/otp_ctrl/doc/interfaces.md.tpl:118,121 (and the two generated interfaces.md) still say the key manager interface outputs "via otp_keymgr_key_o" and to synchronize "the otp_keymgr_key_o signals." That signal no longer exists; it should describe keymgr_creator_root_key_o / keymgr_creator_seed_o / keymgr_owner_seed_o.
andreaskurth
reviewed
Jul 3, 2026
072a07e to
09ff60e
Compare
Split the otp_keymgr_key interface into its respective components. Future version of the keymgr(_dpe) may receive the information from different IP's rather than combined from the otp_ctrl. To avoid a circular dependencies the DevIdWidth instantiated in keymgr_dpe_pkg replaces the otp_ctrl_pkg::DeviceIdWidth. As the keymgr still expects the combined message the earlgrey top manually combines the key material. This fix will be removed when the keymgr is replaced by the keymgr_dpe. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit updates the `otp_ctrl` dv to reflect the new interface between the `keymgr` and the `otp_ctrl`. The secret / seed verification inside the otp_ctrl scoreboard template are no longer dynamically generated. The reason is that the previously shared port signal has been split into its respective components, which does not interacts well with the dynamic generation anymore. However, adding a secret to the otp now results in a port-list change anyways the resulting overhead is deemed acceptable. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
This commit removes all otp_ctrl dependency in the keymgr_dpe dv. This change ensures that the dv architecture accurately reflects the dependency in the RTL implementation. Signed-off-by: Raphael Roth <rroth@lowrisc.org>
09ff60e to
ea4d1ec
Compare
Author
|
To avoid introducing breaking commits all three commits should be squashed together before this PR is merged. |
This was referenced Jul 6, 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.
PR1 - otp_ctrl
This PR is the first in a series which will replace the keymgr with the kemgr_dpe in earlgrey. The replacement was approved by this RFC.
Merge-Dependencies
None
Description
Currently, the
creator_root_key,creator_seedandowner_seedare provided in a single struct from theotp_ctrl. Going forward, we want the top-level to decide which IP should provide which seed, therefore the ports of thekeymgr_dpeand theotp_ctrlhave been changed. Now each secret material can be provided from a independent IP. Additionally, the dependency betweenkeymgr_dpeandotp_ctrlis reversed. Theotp_ctrldepends now on thekeymgr_dpeand not vice versa.To avoid breaking the current earlgrey implementation with the
keymgr, a fix is introduced on the top level to concatenate the signals back together for the originalkeymgr. The reason for not touching the keymgr's port list itself is to avoid unnecessary work as thekeymgrwill be deprecated after integrating thekeymgr_dpe.This PR also addresses issue #25159