Jump to content
Sign in to follow this  
McPall

How can all opposing objections be printed

Recommended Posts

Is there a way to get all opposing phase objections ?

(So if a test doesn't end I could invoke this function from ucli to get the opposing objections)

I have tried running with +UVM_PHASE_TRACE but it's not exactly what I'm looking for.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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?

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×