Looking at results from the nightlies, the FSM coverage is low. But it turns out that the missing coverage is not possible! The two main areas are:
The tlul_lc_gate instance that gates SBA connections. This is not hitting the StFlush state. Getting to that state requires a flush request (through flush_req_i). But that port is tied to zero in rv_dm.
In dmi_jtag, we're not seeing the DMIOpFailed state. Looking at the code, this is entered when there is a DTM_ERR response in the connection between the dap and dm_top. It turns out that the riscv debug module never generates DTM_ERR (the string isn't even in the code!), so this FSM state is presumably used if you happen to be connecting dmi_jtag to some other debug module. But we're not!
In both cases, I'd expect UNR to mark the states as unreachable.
There are two edges which I believe are possible (state_q going from Read or Write to Idle). I think this happens if we get a trst_n reset on the JTAG bus when the FSM is in the Read or Write state. That remains to be addressed, but won't be affected by a UNR report.
Note that the FSM coverage is currently reported as 75%, which is below the threshold needed for V2. Assuming my diagnosis is correct, the UNR report will jump the number well over the threshold.
Description
Looking at results from the nightlies, the FSM coverage is low. But it turns out that the missing coverage is not possible! The two main areas are:
tlul_lc_gate
instance that gates SBA connections. This is not hitting theStFlush
state. Getting to that state requires a flush request (throughflush_req_i
). But that port is tied to zero inrv_dm
.dmi_jtag
, we're not seeing theDMIOpFailed
state. Looking at the code, this is entered when there is aDTM_ERR
response in the connection between the dap anddm_top
. It turns out that the riscv debug module never generatesDTM_ERR
(the string isn't even in the code!), so this FSM state is presumably used if you happen to be connectingdmi_jtag
to some other debug module. But we're not!In both cases, I'd expect UNR to mark the states as unreachable.
There are two edges which I believe are possible (
state_q
going fromRead
orWrite
toIdle
). I think this happens if we get atrst_n
reset on the JTAG bus when the FSM is in theRead
orWrite
state. That remains to be addressed, but won't be affected by a UNR report.Note that the FSM coverage is currently reported as 75%, which is below the threshold needed for V2. Assuming my diagnosis is correct, the UNR report will jump the number well over the threshold.