Conversation
There was a problem hiding this comment.
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_anyso reset transitions can abort the driver loop. - Add a reset-state watcher to exit
drv_post_reset()as soon asreset_stateleavesPOST_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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
It follows AXI5 methodology.
Fixes: #2734