Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

JTAG interface #5

Open
aviator00 opened this issue Jun 22, 2022 · 2 comments
Open

JTAG interface #5

aviator00 opened this issue Jun 22, 2022 · 2 comments

Comments

@aviator00
Copy link

I want to test the project on a ZedBoard. How can work if the JTAG signals are all 0? where is defined DMIDirectTAP? How can I modify the code making JTAG external?

@GregAC
Copy link
Owner

GregAC commented Jun 24, 2022

Currently it uses the Xilinx BSCANE2 primitive, see https://github.com/GregAC/ibex_super_system/blob/main/vendor/pulp_riscv_dbg/src/dmi_bscane_tap.sv

To use an external JTAG probe you need to switch to using the normal JTAG tap (https://github.com/GregAC/ibex_super_system/blob/main/vendor/pulp_riscv_dbg/src/dmi_jtag_tap.sv). To do this alter the https://github.com/GregAC/ibex_super_system/blob/main/pulp_riscv_dbg.core fusesoc core file to use dmi_jtag_tap.sv rather than dmi_bscane_tap.sv.

This is the line to alter:

- vendor/pulp_riscv_dbg/src/dmi_bscane_tap.sv

Then the TAP instantiation in dm_top:

dmi_jtag #(
.IdcodeValue (IdcodeValue)
) dap (
.clk_i (clk_i),
.rst_ni (rst_ni),
.testmode_i (testmode_i),
.dmi_rst_no (dmi_rst_n),
.dmi_req_o (dmi_req),
.dmi_req_valid_o (dmi_req_valid),
.dmi_req_ready_i (dmi_req_ready),
.dmi_resp_i (dmi_rsp ),
.dmi_resp_ready_o (dmi_rsp_ready),
.dmi_resp_valid_i (dmi_rsp_valid),
//JTAG
.tck_i (1'b0),
.tms_i (1'b0),
.trst_ni (1'b0),
.td_i (1'b0),
.td_o (),
.tdo_oe_o ()
);

needs it's JTAG signals wiring out to the top level so they can be connected up appropriately (don't forget synchronizers for external inputs).

I don't think DMIDirectTAP is defined anywhere. It's just a left over bit of code as I copied the DM setup out of OpenTitan.

@aviator00
Copy link
Author

Thank you, very clear. I tried successfully with Xilinx BSCANE2 primitive present also on the Zedboard at the moment, because it's easier, copying some openocd configurations from others.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants