Skip to content

Commit

Permalink
[jtag,dv] Avoid driving to test-logic-reset in jtag_driver.sv
Browse files Browse the repository at this point in the history
This code was supposed to run immediately after trst_n went high. That
is rather silly: we *know* we're going to be in that FSM state
already!

It turns out to really matter for rv_dm testing, where the JTAG
interface might not be connected immediately. The end result is that
it gets connected halfway through executing
drive_jtag_test_logic_reset, which leaves the driver and the TAP
out of sync.

Getting rid of this fixes things: the jtag driver will no longer start
driving signals until it is stimulated with an item to tell it to do
so.

Signed-off-by: Rupert Swarbrick <rswarbrick@lowrisc.org>
  • Loading branch information
rswarbrick committed May 30, 2024
1 parent 54106c8 commit a76b261
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions hw/dv/sv/jtag_agent/jtag_driver.sv
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ class jtag_driver extends dv_base_driver #(jtag_item, jtag_agent_cfg);

if (!cfg.vif.trst_n) begin
`DV_WAIT(cfg.vif.trst_n)
cfg.vif.wait_tck(1);
drive_jtag_test_logic_reset();
end else begin
// Since trst_n is not 0, the get_next_item() task must have completed and has written the
// request to req
Expand Down

0 comments on commit a76b261

Please sign in to comment.