Sign in to follow this  
Followers 0
bhunter1972

UVM1.2 can report that run is not a task-based phase

1 post in this topic

Under the right circumstances, UVM 1.2 can report an error such as this one:

'uvm_test_top.some_sequence' attempted to raise on 'run', however 'run' is not a task-based phase node! (This is a UVM_PHASE_IMP, you have to query the schedule to find the UVM_PHASE_NODE)

This is perplexing because obviously, run is a task-based phase, and one might think that UVM is off its rocker. But the real issue is what is found in the parentheses.

 

This came up while migrating a codebase to 1.2 (not the funnest of tasks, thank you very much). The user had this code working in 1.1d:

   some_sequence.set_starting_phase(uvm_run_phase::get());

Now, however, that get() call returns a UVM_PHASE_IMP and not the NODE itself. Most users probably don't care about the difference between these, as it has nothing to do with finding RTL bugs.

 

In any case, the above code must be replaced with something like this so that the NODE is used instead:

some_sequence.set_starting_phase(uvm_domain::get_common_domain().find(uvm_run_phase::get()));

This is not exactly the prettiest solution, but it seemed to work for me.

 

Can anyone suggest a better solution?

 

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  
Followers 0