lint: clean up a couple of width fixes in JTAG DTM, and add missing

default case to DM acmd state machine. Also remove unnecessary clear
of JTAG DR shifter on TAP reset state, which saves a bit of logic. Two
width mismatches are left unfixed in the DTM (the ones with shifts)
because they bizarrely increase area by 100 LUT4s when fixed.
This commit is contained in:
Luke Wren 2024-05-27 13:12:04 +01:00
parent 141da55507
commit 8b9503c804
2 changed files with 11 additions and 7 deletions

View File

@ -718,6 +718,11 @@ always @ (*) begin
acmd_state_nxt = S_IDLE;
end
end
default: begin
// Unreachable
end
endcase
end

View File

@ -134,8 +134,6 @@ wire [W_DR_SHIFT-1:0] core_dr_rdata;
always @ (posedge tck or negedge trst_n) begin
if (!trst_n) begin
dr_shift <= {W_DR_SHIFT{1'b0}};
end else if (tap_state == S_RESET) begin
dr_shift <= {W_DR_SHIFT{1'b0}};
end else if (tap_state == S_SHIFT_DR) begin
dr_shift <= {tdi, dr_shift} >> 1;
// Shorten DR shift chain according to IR
@ -146,12 +144,13 @@ always @ (posedge tck or negedge trst_n) begin
else // BYPASS
dr_shift[0] <= tdi;
end else if (tap_state == S_CAPTURE_DR) begin
if (ir == IR_DMI || ir == IR_DTMCS)
if (ir == IR_DMI || ir == IR_DTMCS) begin
dr_shift <= core_dr_rdata;
else if (ir == IR_IDCODE)
dr_shift <= {10'h0, IDCODE};
else // BYPASS
dr_shift <= 42'h0;
end else if (ir == IR_IDCODE) begin
dr_shift <= {{W_DR_SHIFT-32{1'b0}}, IDCODE};
end else begin // BYPASS
dr_shift <= {W_DR_SHIFT{1'b0}};
end
end
end