Jump to content

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


bhunter1972

Recommended Posts

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?

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...