lowRISC / lowRISC/opentitan

Re-generating `RndCnst` for each build

Open
#16,719 11 comments 0 reactions 1 assignee View on GitHub

@timothytrippel is already working on this.

Since Mar 25, 2024.

Component:DV Manufacturing SW:Build System
Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Similarly to the OTP images, we recently enabled re-generation of random netlist constants for the life cycle state and top-level `RndCnst` parameters.

For the latter, we ran into CI issues, since in-tree modifications made in the build phase do not persist into the run phase on all platforms, since the two phases can be scheduled as separate jobs. As explained in #16699, software tests relying on scrambled ROM images fail because the ROM scrambling step executed in the run phase through bazel is using the wrong `RndCnst` for the scrambling key.

In the short term, rerunning top-gen in the run phase with the correct `build_seed` would be a workaround to enable this flow. Long term, we should add a mechanism to pass the `build_seed` into the ROM generation step in bazel, similarly to how OTP images are generated.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.