Skip to content

firechip: add direct JTAG bridge - #2359

Open
tamzidrazzaque wants to merge 3 commits into
ucb-bar:mainfrom
tamzidrazzaque:firechip-direct-jtag
Open

firechip: add direct JTAG bridge#2359
tamzidrazzaque wants to merge 3 commits into
ucb-bar:mainfrom
tamzidrazzaque:firechip-direct-jtag

Conversation

@tamzidrazzaque

Copy link
Copy Markdown

Summary

  • Add an opt-in FireChip bridge that exposes target JTAG through the OpenOCD remote-bitbang protocol.
  • Add the host bridge driver and shared Berkeley remote-bitbang server support.
  • Add a repository-native bridge test that resets the TAP and reads the IDCODE twice.

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 WithJTAGBridge and the provided direct-JTAG FireSim configuration. Default FireChip configurations remain unchanged.

Testing

  • FireChip Scala and test compilation
  • Direct-JTAG and default configuration elaboration
  • C++ bridge-driver compile and link
  • Repository-native Verilator bridge test
  • Two successful 0x00000001 IDCODE reads
  • OpenOCD 0.12.0 remote-bitbang TAP detection was validated before the final non-protocol cleanup
  • Clean default-config regression

The F1 test registration follows the existing upstream BridgeSuite pattern; functional metasim validation was run on the locally supported platform.

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
jimfangx self-requested a review July 23, 2026 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant