Repository navigation
[VAL] Tighten KV, PV, soc_ifc and MLDSA zeroize checks - #1565
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block approval of these testbench and assertion-enable updates.
No open issues 🎉
What changed in this PR
This follow-up to #1560 strengthens testbench checks for zeroization, bus responses, and reset behavior. It makes no design logic changes; the top-level RTL changes only assertion enables.
Changes:
- Verify KV data erasure after write collisions and make monitor wait helpers reentrant.
- Predict PV AHB responses independently and add the soc_ifc HMAC key-lock register to the testbench model.
- Tighten MLDSA scan-zeroize completion and warm-reset checks, and suppress IMEM error assertions during firmware-update bus-idle windows.
| File | Description |
|---|---|
src/soc_ifc/tb/soc_ifc_tb_pkg.sv |
Models the HMAC key-lock address, mask, and write-one-to-set behavior. |
src/pcrvault/uvmf_pv/uvmf_template_output/verification_ip/environment_packages/pv_env_pkg/src/pv_scoreboard.svh |
Updates comments to describe independent response prediction. |
src/pcrvault/uvmf_pv/uvmf_template_output/verification_ip/environment_packages/pv_env_pkg/src/pv_predictor.svh |
Sets expected AHB responses to AHB_OKAY. |
src/keyvault/uvmf_kv/uvmf_template_output/verification_ip/interface_packages/kv_write_pkg/src/kv_write_monitor_bfm.sv |
Makes the write-monitor clock wait task automatic. |
src/keyvault/uvmf_kv/uvmf_template_output/verification_ip/interface_packages/kv_rst_pkg/src/kv_rst_monitor_bfm.sv |
Makes the reset-monitor clock wait task automatic. |
src/keyvault/uvmf_kv/uvmf_template_output/verification_ip/interface_packages/kv_read_pkg/src/kv_read_monitor_bfm.sv |
Makes the read-monitor clock wait task automatic. |
src/keyvault/uvmf_kv/uvmf_template_output/verification_ip/environment_packages/kv_env_pkg/src/kv_multi_write_collision_sequence.svh |
Restores read permission with a probe write to verify actual data erasure. |
src/integration/test_suites/smoke_test_mldsa_zeroize/smoke_test_mldsa_zeroize.c |
Requires active-scrub readback, clean completion, and the expected warm-reset boot. |
src/integration/rtl/caliptra_top.sv |
Disables IMEM error-sequence assertions during firmware-update reset windows. |
Review effort: Balanced
Follow-up to #1560 for review comments that were not addressed before merge. - caliptra_top: disable the IMEM AHB error-response assertions while fw_update_rst_window is asserted. The IMEM 2:1 mux forces the bus idle in that window and masks hresp/hreadyout, so the two-cycle ERROR handshake is not observable there. - KV collision sequence: a denied read is masked to zero, so it only proved dest_valid was cleared. After each collision, write a probe word to restore read permission and re-read word 0 to prove the key data itself was erased. - KV monitor BFMs: declare wait_for_num_clocks as automatic. The loop counter was static and shared between concurrent callers (predictor polling and sequence waits), which could shorten or lengthen waits. - PV predictor: force the expected AHB response to OKAY instead of copying it from the observed transaction, so the scoreboard compare checks the response independently. The PV register block never returns an AHB error. - soc_ifc TB: add INTERNAL_CSR_HMAC_KEY_LOCK to the register model with its 1-bit write-one-to-set mask, so the register sweep, reset and invalid-access tests cover it.
smoke_test_mldsa_zeroize could pass without exercising the scan-mode path it targets. - The readback loop runs only while MLDSA_STATUS is zero. If the scrub had already finished, the loop checked no words and the test still passed. In the scan path, fail when no word was read back while the scrub was active, and log the number of words checked. - Scan zeroize completion only waited for READY. Also require VALID and ERROR to be clear, since the zeroize clears both. - Every boot after the first passed unconditionally, so an unexpected reset in boot 1 could hide a failure. Set a persistent marker once the scan checks pass and, after the warm reset, require the second boot, the marker and CPTRA_RESET_REASON.WARM_RESET.
mojtaba-bisheh
force-pushed
the
user/mojtabab/pr1560-copilot-followup
branch
from
November 30, 2026 14:30
5dea66a to
4bbfdf9
Compare
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The instantiated abr_top/MLDSA implementation is absent, so confirming active-scrub observation by the readback guard and the expected warm-reset boot after scan exit requires simulator traces from the affected test.
No open issues 🎉
Review effort: Balanced
…lowup' with updated timestamp and hash after successful run
Nitsirks
approved these changes
Nov 30, 2026
upadhyayulakiran
approved these changes
Nov 30, 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.
Summary
Follow-up to #1560 that tightens several testbench checks raised in review. There are no design logic changes. In
caliptra_top.sv, only assertion enables change.INTERNAL_CSR_HMAC_KEY_LOCK.Verification