Run_phase in scoreboard

The run_phase function in my scoreboard is not executing. I just put a $display just to make sure there is no verbosity gotcha on my side.

Testbench topology shows that the scoreboard is instantiated and I also get messages from the write implementation.
Its only the run_phase that seems to have an issue.

Any thoughts how I can debug this?

In reply to verif_learner:

You should show your run_phase implementation, to give you an advice.

In reply to chr_sue:

It is a regular implementation. The following is the snippet from scoreboard code.

function void check_phase (uvm_phase phase);
  $display ("into check phase");
  check_1();
  check_2();
  check_3_rx();
  check_3_tx();
  check_4();
endfunction

I don’t see “into check phase” message.
Please note, check_phase is not called by any user code. This is expected to be called by uvm phasing logic.

In reply to verif_learner:

You didn’t see message in check_phase, maybe your run_phase hadn’t finished yet. Why don’t you print message in your run_phase? Did your simulation finish?

In reply to chris_le:

In reply to verif_learner:
You didn’t see message in check_phase, maybe your run_phase hadn’t finished yet. Why don’t you print message in your run_phase? Did your simulation finish?

Yes, simulation completed. Hence I assume that all the phasing is completed.

In reply to verif_learner:

Did you see the following line in your simulation log-file:
reporter [TEST_DONE] ‘run’ phase is ready to proceed to the ‘extract’ phase

This is an indication the run_phase has been completed.
Again could you please show your run_phase implementation.

In reply to chr_sue:

In reply to verif_learner:
Did you see the following line in your simulation log-file:
reporter [TEST_DONE] ‘run’ phase is ready to proceed to the ‘extract’ phase
This is an indication the run_phase has been completed.
Again could you please show your run_phase implementation.

No. I don’t see that.

This is what I see towards the end.

INT TST SEQ
$finish called from file “…/tb/dma_tb.sv”, line 312.

Looks like testbench is executing $finish and not allowing UVM to finish gracefully.
For my understanding, when $finish is executed, I assume simulation would end immediately irrespective of any other threads active

In reply to verif_learner:

You should lokk on line 312 of file …/tb/dma_tb.sv if there is a $finish coded.
In an UVM environment you should never code a $finish individually.
Unfortunately you did not show the run_phase of your scoreboard.

In reply to chr_sue:

In reply to verif_learner:
You should lokk on line 312 of file …/tb/dma_tb.sv if there is a $finish coded.
In an UVM environment you should never code a $finish individually.
Unfortunately you did not show the run_phase of your scoreboard.

Thanks. I think I am getting a hang of the issue. I will modify the code and handle this purely using objections.

On the run_phase, I don’t have a run_phase in the scoreboard (this was debated in another thread. So, I wont go into details) here.

In reply to verif_learner:

You should understand that performing the checking in the check_phase needs a lot of resources, slowing down your simulation.
The recommended way is to do the checking on the fly in the run_phase.

In reply to chr_sue:

Can you please elaborate on what kind of resources you are refering to? I want to understand why it slows down the simulation?

In reply to tpan:

I believe what chr_sue mentioned is about storing all transactions and checking them at check_phase. Basically, it will consume big simulation memory resources especially when you have a lot of data traffics. Your simulation may slow down or crash. Therefore, the best way to check is on-the-fly.

In reply to chris_le:

If you do your checking in the check_phase you have to store all values you want to compare. This might be several millions of complex data. This requires a lot of storage in your computer.

In reply to chr_sue:

Makes sense. Thanks.

In reply to verif_learner:

I am facing the same issue. can you provide your fix that what was causing the issue of not getting in run phase in scoreboard.

In reply to YasRuf:

How did you check the run_phase in the scoreboard was not executed?
If you are following the right way it is always executed.

In reply to chr_sue:

Thanks. You are correct. With help of debug prints I could figure out the issue that the If statement was always false, hence run_phase did not executed. Now I have corrected.