Skip to content

Commit

Permalink
[tools,otp_images] Move the tools to generate otp images
Browse files Browse the repository at this point in the history
- Most of the OTP image generation tools are top-specific so they are
  moved to hw/top_earlgrey/data/otp. The few things that are generic
  move to util/design/data.
- Adjust paths to targets that moved.
- Merge hw/ip/otp_ctrl/data/README.md into util/design/README.md.
- Adjust some paths to README.md files.
- Change the path to the otp_ctrl_mmap.hjson in get-otp-mmap.py.

Part of #25019

Signed-off-by: Guillermo Maturana <[email protected]>
  • Loading branch information
matutem committed Dec 4, 2024
1 parent 56177d2 commit fab6d27
Show file tree
Hide file tree
Showing 73 changed files with 835 additions and 833 deletions.
26 changes: 13 additions & 13 deletions BLOCKFILE
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,19 @@ hw/ip/otbn/data/otbn.hjson
hw/ip/entropy_src/data/entropy_src.hjson
hw/ip/aes/data/aes.hjson
hw/ip/i2c/data/i2c.hjson
hw/ip/otp_ctrl/data/otp_ctrl.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_rma.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_dev.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_test_locked0.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_test_locked1.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_test_unlocked0.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_creator_sw_cfg.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_hw_cfg.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_raw.hjson
hw/ip/otp_ctrl/data/otp_ctrl_mmap.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_test_unlocked1.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_prod.hjson
hw/ip/otp_ctrl/data/otp_ctrl_img_test_unlocked2.hjson
hw/top_earlgrey/data/otp/otp_ctrl.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_rma.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_dev.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_test_locked0.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_test_locked1.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_test_unlocked0.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_creator_sw_cfg.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_hw_cfg.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_raw.hjson
hw/top_earlgrey/data/otp/otp_ctrl_mmap.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_test_unlocked1.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_prod.hjson
hw/top_earlgrey/data/otp/otp_ctrl_img_test_unlocked2.hjson
hw/ip/rv_core_ibex/data/rv_core_ibex.hjson
hw/ip/pwm/data/pwm.hjson
hw/ip/aon_timer/data/aon_timer.hjson
Expand Down
2 changes: 1 addition & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@
- [Device Software](./sw/device/README.md)
- [Build & Test Rules](./rules/opentitan/README.md)
- [FPGA Bitstreams](./hw/bitstream/README.md)
- [OTP Build and Test Infrastructure](./hw/ip/otp_ctrl/data/README.md)
- [OTP Preload Image Generator](./util/design/README.md#otp_preload_image_generator)
- [Device Libraries](./sw/device/lib/README.md)
- [DIF Library](./sw/device/lib/dif/README.md)
- [ADC Checklist](sw/device/lib/dif/dif_adc_ctrl.md)
Expand Down
4 changes: 2 additions & 2 deletions hw/bitstream/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ opentitan_test(
name = "individualize_sw_cfg_functest",
srcs = ["individualize_sw_cfg_functest.c"],
fpga = fpga_params(
otp = "//hw/ip/otp_ctrl/data/earlgrey_skus/sival:otp_img_test_unlocked0_manuf_initialized",
otp = "//hw/top_earlgrey/data/otp/sival_skus:otp_img_test_unlocked0_manuf_initialized",
tags = ["manuf"],
),
exec_env = {
Expand Down Expand Up @@ -98,4 +98,4 @@ opentitan_test(

## Read More

* [OTP Build and Test Infrastructure](../ip/otp_ctrl/data/README.md)
* [OTP Preload Image Generator](../../util/design/README.md#otp_preload_image_generator)
2 changes: 1 addition & 1 deletion hw/bitstream/vivado/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ _CW310_TESTROM = "//sw/device/lib/testing/test_rom:test_rom_fpga_cw310_scr_vmem"

_CW340_TESTROM = _CW310_TESTROM

_OTP_RMA = "//hw/ip/otp_ctrl/data:img_rma"
_OTP_RMA = "//hw/top_earlgrey/data/otp:img_rma"

_CW310_TESTROM_PATH = "{}/$(location {})".format(_PREFIX, _CW310_TESTROM)

Expand Down
8 changes: 4 additions & 4 deletions hw/dv/tools/dvsim/sim.mk
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ ifneq (${sw_images},)
echo "Building SW image \"$${bazel_label}\"."; \
bazel_airgapped_opts=""; \
bazel_opts="${sw_build_opts} --define DISABLE_VERILATOR_BUILD=true"; \
bazel_opts+=" --//hw/ip/otp_ctrl/data:img_seed=${seed}"; \
bazel_opts+=" --//util/design/data:img_seed=${seed}"; \
if [[ "${build_seed}" != "None" ]]; then \
bazel_opts+=" --//hw/ip/otp_ctrl/data:lc_seed=${build_seed}"; \
bazel_opts+=" --//hw/ip/otp_ctrl/data:otp_seed=${build_seed}"; \
bazel_opts+=" --//util/design/data:lc_seed=${build_seed}"; \
bazel_opts+=" --//util/design/data:otp_seed=${build_seed}"; \
fi; \
if [[ -n $${BAZEL_OTP_DATA_PERM_FLAG} ]]; then \
bazel_opts+=" --//hw/ip/otp_ctrl/data:data_perm=$${BAZEL_OTP_DATA_PERM_FLAG}"; \
bazel_opts+=" --//util/design/data:data_perm=$${BAZEL_OTP_DATA_PERM_FLAG}"; \
fi; \
if [[ $${OT_AIRGAPPED} != true ]]; then \
echo "Building \"$${bazel_label}\" on network connected machine."; \
Expand Down
Loading

0 comments on commit fab6d27

Please sign in to comment.