Add support for Digilent Basys3 board#130
Open
FrancescoConti wants to merge 5 commits into
Open
Conversation
This exposes JTAG through a PMOD, which is unfortunate.
Replace dmi_jtag_tap with dmi_bscane_tap so RISC-V debug uses the FPGA's built-in config JTAG instead of four PMOD JA I/Os. External JTAG ports are removed from croc_xilinx for TARGET_BASYS3; internal dummy wires satisfy croc_soc's port list (ignored by dmi_bscane_tap). XDC constraints for PMOD JA and the CLOCK_DEDICATED_ROUTE workaround are dropped. An OpenOCD script is added that connects via the on-board FTDI adapter and remaps DTMCS/DMI to USER3/USER4 IR codes (0x22/0x23).
…targets add_sources.basys3.tcl is autogenerated by bender; without the 'xilinx' and 'bscane' targets the riscv-dbg Bender.yml condition all(xilinx,bscane) evaluates false and dmi_jtag_tap.sv is selected, overwriting the BSCANE2 intent on every --flist/--all run. Pass both extra targets for basys3 so the generated file consistently picks dmi_bscane_tap.sv. Also restore the current add_sources.basys3.tcl to match.
…p Debugger 0.12.0+dev-04404-geb01c632a (2025-10-09-10:08)
FrancescoConti
commented
Jun 26, 2026
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.
This pull request adds support for building and running the CROC SoC on the Digilent Basys3 FPGA board (https://digilent.com/reference/programmable-logic/basys-3/reference-manual), in addition to the previously supported Genesys2 board. The changes include updates to the build system, hardware description, and scripts to handle board-specific differences such as clocking, reset, and JTAG/debug interfaces. The scripts and hardware now automatically adapt to the selected target board, and a new OpenOCD script is provided for debugging via the Basys3's internal JTAG.
Basys3 FPGA support
Bender.yml,run_xilinx.sh,add_sources.basys3.tcl,common.tcl). [1] [2] [3] [4] [5]run_xilinx.shto accept a--targetargument for board selection, generate board-specific file lists, and create separate build directories/logs per target. [1] [2] [3] [4] [5]Hardware description updates
croc_xilinx.svto support both Genesys2 and Basys3: added board-specificdefines, conditional differential/single-ended clock buffer instantiation, and conditional JTAG/BSCANE2 debug logic. [1] [2] [3] [4] [5] [6] [7] [8]Board-specific scripts and configuration
xilinx/scripts/add_sources.basys3.tclfor Basys3 Vivado project sources, and updatedxilinx/scripts/common.tclwith Basys3 part numbers and configuration. [1] [2]impl_ip.tcl).Debug and development tools
xilinx/scripts/openocd.basys3.tcl, an OpenOCD script for debugging the SoC on Basys3 using the FPGA's internal JTAG (BSCANE2), eliminating the need for external JTAG cables.Other improvements
run_xilinx.shfor better maintainability, including improved help output and removal of hardcoded directory creation. [1] [2]These changes make it straightforward to build, implement, and debug the CROC SoC on both Genesys2 and Basys3 boards, with board-specific configuration handled automatically.