Skip to content

fix(obi-memory): abort post-reset drive loop when reset state changes - #2736

Open
adrianf0 wants to merge 1 commit into
openhwfoundation:masterfrom
HEP-SoC:fix_2734
Open

adrianf0 wants to merge 1 commit into
openhwfoundation:masterfrom
HEP-SoC:fix_2734

Conversation

@adrianf0

@adrianf0 adrianf0 commented May 8, 2026

Copy link
Copy Markdown

It follows AXI5 methodology.

  • Wrap post-reset request/response handling in fork/join_any
  • Exit driver task promptly when reset transitions out of POST_RESET
  • Prevent blocking on seq items or responses across reset events

Fixes: #2734

Copilot AI review requested due to automatic review settings May 8, 2026 18:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the OBI memory driver’s POST_RESET behavior to stop driving/processing promptly when the reset state changes, avoiding hangs across reset events (per the referenced AXI5 driver methodology).

Changes:

  • Wrap POST_RESET request/response handling in a fork/join_any so reset transitions can abort the driver loop.
  • Add a reset-state watcher to exit drv_post_reset() as soon as reset_state leaves POST_RESET.
  • Ensure slave mode continues to idle when no seq item is available, while allowing reset to interrupt that idling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +255 to +270
seq_item_port.get_next_item(req);
prep_req(req);
if (!$cast(mstr_req, req)) begin
`uvm_fatal("OBI_MEMORY_DRV", $sformatf("Could not cast 'req' (%s) to 'mstr_req' (%s)", $typename(req), $typename(mstr_req)))
end
`uvm_info("OBI_MEMORY_DRV", $sformatf("Got mstr_req:\n%s", mstr_req.sprint()), UVM_HIGH)
drv_mstr_req(mstr_req);

// 2. Wait for the monitor to send us the slv's rsp with the results of the req
wait_for_rsp(slv_rsp);
process_mstr_rsp(mstr_req, slv_rsp);
// 2. Wait for the monitor to send us the slv's rsp with the results of the req
wait_for_rsp(slv_rsp);
process_mstr_rsp(mstr_req, slv_rsp);

// 3. Send out to TLM and tell sequencer we're ready for the next sequence item
mstr_ap.write(mstr_req);
seq_item_port.item_done();
end
// 3. Send out to TLM and tell sequencer we're ready for the next sequence item
mstr_ap.write(mstr_req);
seq_item_port.item_done();
end

default: `uvm_fatal("OBI_MEMORY_DRV", $sformatf("Invalid drv_mode: %0d", cfg.drv_mode))
endcase
@(cntxt.reset_state != UVMA_OBI_MEMORY_RESET_STATE_POST_RESET);
- Wrap post-reset request/response handling in fork/join_any
- Exit driver task promptly when reset transitions out of POST_RESET
- Prevent blocking on seq items or responses across reset events

Fixes: openhwfoundation#2734
Signed-off-by: Adrian Fiergolski <Adrian.Fiergolski@cern.ch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uvma_obi_memory_drv (SLV mode) may still drive rvalid after reset asserted (cannot abort pending response)

2 participants