Skip to content

Commit

Permalink
more X hunting
Browse files Browse the repository at this point in the history
  • Loading branch information
stevej committed Oct 30, 2024
1 parent d687f5e commit 8613062
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 27 deletions.
48 changes: 25 additions & 23 deletions src/jtag.v
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,33 @@ module jtag (
default: current_state <= ShiftIr;
endcase
end
ShiftDr: // 6
// in the Shift-DR state, this data is shifted out, least significant bit first
// Pretty sure this means connect a shift register to TDO and drain it
case (tms)
1: current_state <= Exit1Dr;
default: begin
case (current_ir_instruction)
IdCode: begin
// place the byte transmitter with the IDCODE register and start to shift it onto TDO.
r_output_selector_transmitter <= 0;
byte_transmitter_enable <= 1;
if (!idcode_out_done) begin
ShiftDr: begin // 6
tap_channel <= 0;
// in the Shift-DR state, this data is shifted out, least significant bit first
// Pretty sure this means connect a shift register to TDO and drain it
case (tms)
1: current_state <= Exit1Dr;
default: begin
case (current_ir_instruction)
IdCode: begin
// place the byte transmitter with the IDCODE register and start to shift it onto TDO.
r_output_selector_transmitter <= 0;
byte_transmitter_enable <= 1;
if (!idcode_out_done) begin
current_state <= ShiftDr;
end else begin
byte_transmitter_enable <= 0;
current_state <= Exit1Dr; // Not sure if this is correct.
end
end
default: begin
current_ir_instruction_broken <= 1;
current_state <= ShiftDr;
end else begin
byte_transmitter_enable <= 0;
current_state <= Exit1Dr; // Not sure if this is correct.
end
end
default: begin
current_ir_instruction_broken <= 1;
current_state <= ShiftDr;
end
endcase
end
endcase
endcase
end
endcase
end
ShiftIr: begin // 7
tap_channel <= 0;
case (tms)
Expand Down
4 changes: 0 additions & 4 deletions test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ async def test_tms_five_high_for_reset(dut):
await ClockCycles(dut.clk, 1)
assert dut.uo_out.value == 0x0

assert dut.uo_out.value == 0x0

# Drive TCK high/low enough times to see 0xFAF01

# Drive TMS high then low for five cycles to put us into reset.
dut._log.info("TMS high for five pulses to reset TAP controller")
dut.ui_in.value = 0b0000_1111
Expand Down

0 comments on commit 8613062

Please sign in to comment.