Jump to content

How can all opposing objections be printed


Recommended Posts

hi,

yes you can do that. you need to iterate over all domains, all phase-nodes, then get the objection object of that phase node and then finally you can invoke <objection>.display_objections() to print the info. if you use a recent IUS you can use the tcl command "uvm_objection" to do that.

/uwe

Link to comment
Share on other sites

  • 2 months later...

hi,

yes you can do that. you need to iterate over all domains, all phase-nodes, then get the objection object of that phase node and then finally you can invoke <objection>.display_objections() to print the info. if you use a recent IUS you can use the tcl command "uvm_objection" to do that.

/uwe

How do you get a handle to a container of all the domains?

Link to comment
Share on other sites

Hello McPall,

Inside your test add the following piece of "debug code":

task apb_test_1::dbg_eot(uvm_phase phase);

forever begin : fe

#100;

phase.phase_done.display_objections();

end : fe

endtask : dbg_eot

And fork off this task from main_phase. In Questa on a sample hang scenario I get:

# The total objection count is 1

# ---------------------------------------------------------

# Source Total

# Count Count Object

# ---------------------------------------------------------

# 0 1 uvm_top

# 0 1 uvm_test_top

# 0 1 env_0

# 0 1 agent0

# 1 1 monitor

# ---------------------------------------------------------

HTH

Ajeetha, CVC

www.cvcblr.com/blog

Link to comment
Share on other sites

hi,

the simple

>task apb_test_1::dbg_eot(uvm_phase phase);

>forever begin : fe

>#100;

>phase.phase_done.display_objections();

>end : fe

>endtask : dbg_eot

doesnt really help since "phase" might not be the active phase anymore.

i did use the following solution which gives you all pending objections in all domains/phases (despite of the phase we are in) and the set of phases.

/uwe

692 uvm_domain domains[string];

693 uvm_phase phases[$];

694 uvm_domain::get_domains(domains);

695 foreach (domains) begin

696 domains.m_get_transitive_children(phases);

697 phases=phases.find(item) with (item.get_phase_type()==UVM_PHASE_NODE && item.get_domain()==domains);

698 phases=cdns_array_utils#(uvm_phase)::unique_(phases);

699

700 foreach(phases[j]) begin

701 uvm_objection o;

702 o = phases[j].get_objection();

703 if(!(doFilter==1 && o.get_objection_total()==0)) begin

704 $display($sformatf("objections to uvm_objection \"%s\"",o.get_full_name()));

705 o.display_objections(, 1);

706 end

707 end

708 end

709 end

Link to comment
Share on other sites

Hi,

I just came across this. I've never used it but it looks like this might provide the answer:

function void get_objectors( ref uvm_object list[$] )

Returns the current list of objecting objects (objects that raised an objection but have not dropped it).

You should then be able to run display_objection() on each element in the list.

Cheers

Gunther

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...