firechip: add direct JTAG bridge - #2359
Open
tamzidrazzaque wants to merge 3 commits into
Open
Conversation
Add a generic OpenOCD-compatible remote_bitbang JTAG server derived from
rocket-chip's src/main/resources/csrc/remote_bitbang.{cc,h} (originally from
the Berkeley/Spike riscv-isa-sim project; see LICENSE.Berkeley). accept() and
execute_command() are made non-blocking to fit the FireSim bridge tick model;
the server is otherwise protocol-only and target-agnostic.
Expose the target's JTAG DTM pins (TCK/TMS/TDI/TDO) to the host through a Golden Gate widget and host driver. The driver runs the shared remote_bitbang server so an external client such as OpenOCD can drive the target TAP. The bridge is opt-in via WithJTAGBridge and FireSimDirectJTAGRocketConfig; default configurations are unchanged. The stock Rocket JTAG TAP uses negedge-clocked logic, which Golden Gate's FAME-1 transform lowers to enable-gated posedge logic, so no rocket-chip changes are required.
Add a BridgeSuite test (JTAGModule) following the existing UART/BlockDev pattern. The DUT wires the bridge pins to a Rocket-Chip JTAG TAP whose only data register is IDCODE (0x00000001). The embedded remote_bitbang client resets the TAP, reads the IDCODE twice, and checks the value. The test picks a free TCP port at runtime and passes it via +jtag_rbb_port so parallel jobs do not collide on the default port.
jimfangx
self-requested a review
July 23, 2026 22:46
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
Implementation
The bridge connects the target TCK, TMS, TDI, and TDO pins to a Golden Gate widget. The host driver consumes one remote-bitbang command per bridge tick and advances one target token for each pin update or TDO sample. A complete JTAG bit therefore uses multiple bridge operations.
The bridge is enabled by
WithJTAGBridgeand the provided direct-JTAG FireSim configuration. Default FireChip configurations remain unchanged.Testing
0x00000001IDCODE readsThe F1 test registration follows the existing upstream BridgeSuite pattern; functional metasim validation was run on the locally supported platform.