Update JTAG TAP controller for Microwatt

Make a few changes to match what mw_debug expects:

- 6 byte instructions
- IDCODE at 001001
- microwatt debug at 000011

Also change IDCODE to be an IBM ID.

Signed-off-by: Anton Blanchard <anton@linux.ibm.com>
caravel-mpw5-20220322
Anton Blanchard 4 years ago committed by Anton Blanchard
parent 15bb4aa90a
commit d504ae63f6

@ -97,12 +97,8 @@


// Top module // Top module
module tap_top #(parameter module tap_top #(parameter
// 0001 version IDCODE_VALUE = 32'h14d57049,
// 0100100101010001 part number (IQ) IR_LENGTH = 6)
// 00011100001 manufacturer id (flextronics)
// 1 required by standard
IDCODE_VALUE = 32'h149511c3,
IR_LENGTH = 4)
( (
// JTAG pads // JTAG pads
tms_pad_i, tms_pad_i,
@ -163,12 +159,12 @@ input bs_chain_tdi_i; // from Boundary Scan Chain
input mbist_tdi_i; // from Mbist Chain input mbist_tdi_i; // from Mbist Chain


//Internal constants //Internal constants
localparam EXTEST = 4'b0000; localparam EXTEST = 6'b000000;
localparam SAMPLE_PRELOAD = 4'b0001; localparam SAMPLE_PRELOAD = 6'b000001;
localparam IDCODE = 4'b0010; localparam IDCODE = 6'b001001;
localparam DEBUG = 4'b1000; localparam DEBUG = 6'b000011;
localparam MBIST = 4'b1001; localparam MBIST = 6'b001010;
localparam BYPASS = 4'b1111; localparam BYPASS = 6'b111111;


// Registers // Registers
reg test_logic_reset; reg test_logic_reset;
@ -476,7 +472,7 @@ begin
if(trst_pad_i) if(trst_pad_i)
jtag_ir[IR_LENGTH-1:0] <= {IR_LENGTH{1'b0}}; jtag_ir[IR_LENGTH-1:0] <= {IR_LENGTH{1'b0}};
else if(capture_ir) else if(capture_ir)
jtag_ir <= 4'b0101; // This value is fixed for easier fault detection jtag_ir <= 6'b000101; // This value is fixed for easier fault detection
else if(shift_ir) else if(shift_ir)
jtag_ir[IR_LENGTH-1:0] <= {tdi_pad_i, jtag_ir[IR_LENGTH-1:1]}; jtag_ir[IR_LENGTH-1:0] <= {tdi_pad_i, jtag_ir[IR_LENGTH-1:1]};
end end

Loading…
Cancel
Save