lowRISC / lowRISC/opentitan

[earlgrey,otp,bazel] OTP build fails with "invalid OTP address" after modifying top_earlgrey

Open
#29,007 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
SystemVerilog
Stars
3.6k
Forks
1.1k
Avg merge
2d 22h
Merged PRs (30d)
141

Description

Description

I am currently trying to run Earlgrey on an FPGA platform (KC705). Since KC705 cannot support the full Earlgrey configuration, I removed several peripheral modules, including:

spi_dev

spi_host1

usb_dev

uart1–3

i2c1–2

After running topgen.py, I noticed that the size of
OWNER_SW_CFG_ROM_ALERT_CLASSIFICATION in otp_ctrl.hjson was reduced from 80 to 56.

When I try to rebuild the OTP images using:

bazel build hw/top_earlgrey/data/otp:img_rma

in order to generate:

test_rom_fpga_cw310.32.vmem

otp_img_fpga_cw310.vmem

the build fails with the following error:

invalid OTP address OWNER_SW_CFG_ROM_ALERT_CLASSIFICATION + 0x0000e0

It seems that after removing some IPs, the OTP address map is no longer consistent with what opentitantool expects.

What would be the correct way to fix this issue?
Should I:

regenerate or adjust the OTP layout manually,

update the alert classification configuration,

or modify the related OTP / topgen configuration so that the address map remains valid for a reduced Earlgrey configuration?

Any guidance on the proper approach to resolve this mismatch would be appreciated.

Image

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.

Research direction

Start with otp_ctrl.hjson, the OWNER_SW_CFG_ROM_ALERT_CLASSIFICATION entry, and the topgen.py output; reproduce the failure with bazel build hw/top_earlgrey/data/otp:img_rma. Trace how the reduced configuration changes the OTP address map and how opentitantool validates it. Done means the reduced Earlgrey OTP images build without the invalid-address error and the generated addresses remain consistent.

Written by the indexing model from the issue text.

Assessment

Domain
build-system, embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.