Georgegg Posted March 25, 2022 Report Share Posted March 25, 2022 Hello, I wanted to ask why UVM does not always set tmp_parent_seq in uvm_reg_map: In the case where do_bus_write(..) is used, the tmp_parent_seq is not set and so the m_sequence_exiting(this) never gets called. task uvm_reg_map::do_write(uvm_reg_item rw); uvm_sequence_base tmp_parent_seq; uvm_reg_map system_map = get_root_map(); uvm_reg_adapter adapter = system_map.get_adapter(); uvm_sequencer_base sequencer = system_map.get_sequencer(); uvm_reg_seq_base parent_proxy; if (adapter != null && adapter.parent_sequence != null) begin uvm_object o; uvm_sequence_base seq; o = adapter.parent_sequence.clone(); if (o == null) `uvm_fatal("REG/CLONE", {"failed to clone adapter's parent sequence: '", adapter.parent_sequence.get_full_name(), "' (of type '", adapter.parent_sequence.get_type_name(), "')"}) if (!$cast(seq, o)) `uvm_fatal("REG/CAST", {"failed to cast: '", o.get_full_name(), "' (of type '", o.get_type_name(), "') to uvm_sequence_base!"}) seq.set_parent_sequence(rw.get_parent_sequence()); rw.set_parent_sequence(seq); tmp_parent_seq = seq; end if (rw.get_parent_sequence() == null) begin parent_proxy = new("default_parent_seq"); rw.set_parent_sequence(parent_proxy); tmp_parent_seq = parent_proxy; end if (adapter == null) begin uvm_event#(uvm_object) end_event ; uvm_event_pool ep; ep = rw.get_event_pool(); end_event = ep.get("end") ; rw.set_sequencer(sequencer); tmp_parent_seq = rw.get_parent_sequence(); tmp_parent_seq.start_item(rw,rw.get_priority()); tmp_parent_seq.finish_item(rw); end_event.wait_on(); end else begin do_bus_write(rw, sequencer, adapter); end if (tmp_parent_seq != null) sequencer.m_sequence_exiting(tmp_parent_seq); endtask I think it's a major flaw and can cause problems when the sequence doesn't get cleaned up. To be clear, This is the case where there is a parent sequence and an adapter but the adapter.parent_sequence is not set. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.