Hang between run and extract phase

Hi all,

I am doing following things in run_phase of my test case.

  • raise the objection
  • start the sequencer
  • wait for completion of all the traffic
  • drop the objection

Now, the run_phase is going to be completed after dropping the objection and the pointer should move into extract_phase as per the uvm phases.


UVM_INFO @10514945000 run_phase, After drop_objection  // Display at the end of run_phase
UVM_INFO @10514945000 TEST_DONE, 'run' phase is ready to proceed to the 'extract' phase
UVM_INFO @10514945000 extract_phase, Entered...  // Display at the start of the extract_phase

In above display, The test case is hanging before entering to extract phase, after couple of hours I got the third display mentioning that entering into the extract_phase. The simulation time is same displaying. The test case will completed after 2 to 3 hours after hanging at TEST_DONE display.

I looked the same issue in forums, few of the forums mentioning about the raise and drop objection issue but in my test I have only used the objection in run_phase not any where else like in main_phase.

I haven’t found any single clue for a last 24+hrs.


Regards

In reply to electron:

I debug in it and found, it is hanging (taking too much time, around 2-3 hrs) in uvm_phase.svh file on below line,

LINE No. 1368 of uvm 1.1d m_phase_proc.kill();

I don’t know why it is taking this much of time.

Does anyone have any idea?

In reply to electron:

Without knowing how you generate your traffic, and test for its completion, it will be very difficult to help you.

The only thing I can suggest is shorting your test to a single item, and then see if the test ends normally.

In reply to dave_59:

Hi Dave,

Thanks for replying. I have a test case extended from base test. Now in my test, I’ve generate the traffic as following way,



class base_test extends uvm_test;
  ...
  task run_phase(uvm_phase phase);
    super.run_phase();
    phase.raise_objection(this);
    ...
    // Created the sequence and start the sequencer
    // For initial traffic generation 
    // Wait for completion of the traffic on the lanes
    ...
    phase.drop_objection(this);
  endtask : run_phase
  ...
endclass : base_test

class my_test extends base_test;
  ...
  ...
  task run_phase(uvm_phase phase);
    super.run_phase();
    phase.raise_objection(this);
    ...
    // Created the sequence and start the sequencer 
    // Wait for completion of the traffic on the lanes
    ...
    phase.drop_objection(this);
  endtask : run_phase
  ...
endclass : my_test

I don’t know this is enough or not. The test case is hanging in uvm_phase.svh file as I mentioned earlier.


//OUTPUT
The total objection count is 1
---------------------------------------------------------
Source  Total   
Count   Count   Object
---------------------------------------------------------
0       1       uvm_top
1       1         uvm_test_top
---------------------------------------------------------

UVM_INFO @5805485000 run_phase, after drop the objection in my_test

The total objection count is 1
---------------------------------------------------------
Source  Total   
Count   Count   Object
---------------------------------------------------------
0       1       uvm_top
---------------------------------------------------------

UVM_INFO @5805485000 TEST_DONE, 'run' phase is ready to proceed to the 'extract' phase
UVM_INFO @5805485000 PH/TRC/EXE/ALLDROP, Phase 'common.run' (id=121) PHASE EXIT ALL_DROPPED
UVM_INFO @5805485000 PH_READY_TO_END, Phase 'uvm.uvm_sched.post_shutdown' (id=332) PHASE READY TO END
UVM_INFO @5805485000 PH_READY_TO_END, Phase 'common.run' (id=121) PHASE READY TO END


I think uvm_top have one objection remains to drop as per the Total Count displaying in the log file. I don’t know what is this and how to drop that one, but the test is hanging 2-3 hrs after above display.

I have enabled the UVM_PHASE_TRACK verbosity in above log file.


Regards

In reply to electron:

One comment I have is about calling super.run_phase() in your test. You are calling super.run_phase() at the beginning of your test, which will in turn raise and lower an objection, resulting in your test ending prematurely. Also, you aren’t passing ‘phase’ in the call, which might be causing issues.

I would recommend NOT calling super.run_phase() in your test and making each test’s run_phase() standalone. If you want to define common tasks that each test can call, define them in the base test and call them from the test as required (not using super.xxx().

In reply to cgales:

It was an attached bus VIP’s issue. It is hanging also with its back to back connection with the 20k+ transaction.

Reported bug to client.

In reply to electron:

electron, have you solved this issue? I met the same issue as you ,and I also generate a lot of transactions, the more transactions I generated, the more time I spent to finish.