Skip to content

[rtl,fpga] Implement JTAG-based memory preload backdoor#30123

Merged
nasahlpa merged 1 commit into
lowRISC:masterfrom
thommythomaso:tbenz/fsl
Jun 4, 2026
Merged

[rtl,fpga] Implement JTAG-based memory preload backdoor#30123
nasahlpa merged 1 commit into
lowRISC:masterfrom
thommythomaso:tbenz/fsl

Conversation

@thommythomaso

@thommythomaso thommythomaso commented May 15, 2026

Copy link
Copy Markdown
Contributor

Bkdr Loader

Addresses #28188.
Continues work of @a-will (fpga-bkdr-load).

Overview

This PR introduces a FPGA-only memory backdoor IP called bkdr loader to OpenTitan. We currently still rely on bitstream splicing in CI until the appropriate SW and infrastructure changes are merged. The bkdr loader HW is not fully functional yet: the ROM target cannot be loaded/read.

TODOs:

  • Show on the FPGA the bkdr loader works openocd.tcl
  • Remove FPGA info register from rv_core_ibex wrapper
  • Reduce DMI address width from 32 to 9
  • Update README and doc
  • Add bkdr IP to hw/Makefile

@thommythomaso thommythomaso force-pushed the tbenz/fsl branch 5 times, most recently from da6072b to fe9c49f Compare May 15, 2026 14:13
Comment thread hw/ip/bkdr_loader/data/bkdr_loader.hjson Outdated
@thommythomaso thommythomaso force-pushed the tbenz/fsl branch 3 times, most recently from e6d626e to e2bf16f Compare May 18, 2026 15:12
@thommythomaso thommythomaso self-assigned this May 20, 2026
@thommythomaso thommythomaso added the Component:FPGA FPGA related issues label May 20, 2026
@thommythomaso thommythomaso force-pushed the tbenz/fsl branch 11 times, most recently from b00503f to abe891e Compare June 1, 2026 11:14
@thommythomaso thommythomaso marked this pull request as ready for review June 1, 2026 11:18
@thommythomaso thommythomaso requested a review from cfrantz as a code owner June 1, 2026 11:18

@gautschimi gautschimi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in general, just a few comments.

Is the idea to merge this as is and then revert the last commit? Or will we wait for the changes and merge this without the last commit?

Comment thread hw/ip/bkdr_loader/data/bkdr_loader.hjson
Comment thread hw/ip/bkdr_loader/data/bkdr_loader.hjson
Comment thread hw/ip/bkdr_loader/data/bkdr_loader.hjson
Comment thread hw/ip/bkdr_loader/doc/interfaces.md
Comment thread hw/ip/bkdr_loader/rtl/bkdr_loader.sv Outdated
Comment thread hw/ip/prim_xilinx/rtl/prim_ram_1p.sv
Comment thread hw/top_earlgrey/data/clocks.xdc
Comment thread hw/top_earlgrey/util/vivado_hook_opt_design_post.tcl
Comment thread hw/ip/prim_xilinx/rtl/prim_rom.sv Outdated
Comment thread hw/ip/prim_xilinx/rtl/prim_rom.sv Outdated
@thommythomaso

Copy link
Copy Markdown
Contributor Author

Looks good in general, just a few comments.

Is the idea to merge this as is and then revert the last commit? Or will we wait for the changes and merge this without the last commit?

I currently would opt to squash the last three commits together cleanly merging the HW. But then we loose some of the work required to get the IP to run in the end.

@thommythomaso

Copy link
Copy Markdown
Contributor Author

Looks good in general, just a few comments.

Is the idea to merge this as is and then revert the last commit? Or will we wait for the changes and merge this without the last commit?

Thanks @gautschimi for reviewing the bkdr_loader.

@vogelpi

vogelpi commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

CHANGE AUTHORIZED: hw/ip/prim_xilinx/rtl/prim_ram_1p.sv
CHANGE AUTHORIZED: hw/ip/prim_xilinx/rtl/prim_rom.sv
CHANGE AUTHORIZED: hw/ip/prim_xilinx/rtl/prim_xilinx_rom.sv
CHANGE AUTHORIZED: hw/top_earlgrey/rtl/autogen/chip_earlgrey_cw340.sv

FPGA-only changes to implement backdoor memory loading

@andreaskurth

Copy link
Copy Markdown
Contributor

And I'm wondering which commits you're planning to squash, so that the repo remains functional commit-by-commit after this has been merged, @thommythomaso?

I will squash it before marking it as ready to be merged.

All commits?

Commits 2-4 only introduced the changes required to remove the FPGA_INFO register in Ibex. This change has to be done once the SW and infrastructure is ready. I dropped all commits regarding the removal of the FPGA INFO register and merged the patches required to run the CI into the first commit. I still have the non-squashed state on my private fork for later use.

OK great, thanks

@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso force-pushed the tbenz/fsl branch 2 times, most recently from 4a3b22a to a53574e Compare June 3, 2026 16:33
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 3, 2026
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 4, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 4, 2026
The `bkdr_loader` IP is used to preload different ROM and OTP contents when running FPGA tests.
It poses a technology-independent replacement for the currently used bitstream splicing flow.

Co-authored-by: Alex Williams <awill@opentitan.org>
Signed-off-by: Alex Williams <awill@opentitan.org>
Signed-off-by: Thomas Benz <tbenz@lowrisc.org>
@andreaskurth andreaskurth linked an issue Jun 4, 2026 that may be closed by this pull request
@thommythomaso thommythomaso added the CI:Rerun Rerun failed CI jobs label Jun 4, 2026
@github-actions github-actions Bot removed the CI:Rerun Rerun failed CI jobs label Jun 4, 2026
@nasahlpa nasahlpa added this pull request to the merge queue Jun 4, 2026
Merged via the queue into lowRISC:master with commit 74f13dc Jun 4, 2026
82 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component:FPGA FPGA related issues Status:Ready to merge PR is ready to be merged by a committer.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fpga] in-field programming of ROM and OTP memories on the FPGA

6 participants