test: Drive OBI backend ports with native obi_sim_mem#139
Conversation
6331243 to
def7a8d
Compare
| // obi_sim_mem commits writes synchronously on the granted request, | ||
| // so memory is up to date once the iDMA rsp_valid fires (already | ||
| // awaited by ack_tf). No outstanding-write tracking needed; the | ||
| // backend does not necessarily drain every write response. |
There was a problem hiding this comment.
verbose comments, should be single line max
There was a problem hiding this comment.
Addressed in d3d3659 — condensed to a single line.
| // OBI dst writes commit synchronously in obi_sim_mem (no response | ||
| // tracking); other protocols wait for their outstanding writes |
There was a problem hiding this comment.
verbose comments, should be single line max
There was a problem hiding this comment.
Addressed in d3d3659 — condensed to a single line.
| // Native OBI: separate read/write obi_sim_mem (per-port response queue, | ||
| // no head-of-line coupling). Scoreboard seeds src in the read mem | ||
| // (i_obi_read_sim_mem) and checks dst in the write mem (i_obi_axi_sim_mem). |
There was a problem hiding this comment.
verbose comments, should be single line max
There was a problem hiding this comment.
Addressed in d3d3659 — condensed to a single line.
| // OBI native sim-memory config. UseRReady=1 so the mem honors the backend's | ||
| // rready (else auto-popped responses can be missed -> lost write tracking). |
There was a problem hiding this comment.
verbose comments, should be single line max
There was a problem hiding this comment.
Addressed in d3d3659 — condensed to a single line.
| // obi_sim_mem gates reads on the word-base address; seed partial-word | ||
| // pad bytes (0xff: defined, compare-omitted, model-agnostic) so reads | ||
| // of unaligned src words return the real in-range bytes instead of x |
There was a problem hiding this comment.
verbose comments, should be single line max
There was a problem hiding this comment.
Addressed in d3d3659 — condensed to a single line.
The OBI test path converted each backend OBI port to AXI via idma_obi2axi_bridge (per2axi), joined read+write with axi_rw_join, and shared one axi_sim_mem. The per2axi bridge wedges on rw-decoupled OBI transfers >512 B (stops accepting memory responses), hanging the vsim-sim-random OBI tests. The iDMA RTL is correct; the wedge is in the testbench bridge. Attach obi_sim_mem directly to the backend OBI ports (separate read/write mems, scoreboard seeds the read mem and checks the write mem), drop the per2axi bridges / axi_rw_join / AXI throttle+multicut for OBI, and repoint the OBI highlighters and watchdog to the native OBI handshakes. AXI path unchanged.
def7a8d to
d3d3659
Compare
|
Superseded by #140 — same fix from an upstream branch so the GitLab sims actually run in CI (fork PRs skip them). |
Problem
The
vsim-sim-randomOBI tests (rw_obi,r_obi_w_axi,r_axi_w_obi,snitch_*) hang on rw-decoupled transfers ≳512 B. Root cause is in the testbench, not the iDMA RTL: the OBI path converts each backend OBI port to AXI viaidma_obi2axi_bridge(the vendoredper2axiperipheral converter), joins read+write withaxi_rw_join, and shares oneaxi_sim_mem. Under rw-decoupled burst traffic the per2axi bridge stops accepting memory responses (b_ready=0/r_ready=0while the memory holdsb_valid/r_valid), so the transfer never completes and the OBI watchdog trips (e.g. rw_obi seed 1 at ~217710 ns). The backend's native OBI write is independently proven deadlock-free against a responsive memory.Fix
Drive the backend's OBI ports with a native
obi_sim_meminstead:obi_sim_memdirectly to the OBI read/write ports (separate read/write memories; scoreboard seeds the read mem and checks the write mem).idma_obi2axi_bridgepair,axi_rw_join, and the AXI throttle/multicut for OBI (kept for AXI).The AXI memory path is unchanged.
Validation (Questa)
rw_obiseed 1 (the case that hung at 217710 ns): completes,Errors: 0, data matches.rw_obi/r_obi_w_axi/r_axi_w_obicanonical job suites: all green.rw_axi(pure AXI) suites: green — AXI path unbroken.A standalone proof testbench (
test/idma_tb_native_obi.sv) drives the backend withobi_sim_memand replays the hanging geometry to confirm it completes.