Code debug help

Hi all,

I am trying to run the following code: EDA Playground

I expect to see 10 packets printed with UVM_INFO, but seeing only 2 printed. I am also not seeing prints related to raising and dropping objections even though I used the run time option +UVM_OBJECTION_TRACE.

Can someone help point out what is missing in my code?

Your main issue is that you are attempting to use the default_sequence mechanism to run a sequence which is not recommended.

Instead, you should execute all required sequences in the run_phase() of your test. Your test’s run_phase() should look something like:

task run_phase( uvm_phase phase);
  phase.raise_objection( this );
  test_seq.start( m_sequencer );
  phase.drop_objection( this );
endtask

You should only raise/drop objections in your test’s run_phase(). Do not use objections in any sequence/agent.

If you need to delay the end of a phase, the UVM Cookbook discusses End of Test mechanisms.

Thanks for the help. This resolved my problem!