Jump to content

Requirement of objections in UVM


Recommended Posts

Hi,

 

I have a doubt about requirement of raise/drop_objection.

 

Why does a compiler need objections in run_phase?

 

Why can it not just wait for time given like 100ns as following example?

 

Ex. 

task run_phase(uvm_phase phase);

  //phase.raise_objection(this);     

  #100ns;

  //phase.drop_objection(this);    

endtask 

 

   

Link to comment
Share on other sites

Some components may have a run-time phase which operates in a "Run forever and wake up when there's something to do" mode, like this simplistic driver:

virtual task run_phase(uvm_phase phase);
   forever begin
      seq_item_pull_port.get(req);
      
      phase.raise_objection(phase);
      drive_my_request(req);
      phase.drop_objection(phase);
   end
endtask : run_phase

When there are no objections remaining, all of the tasks spawned by all of the component's run phases are killed. This is a feature, not a bug.

 

It just wouldn't do to kill this task's run phase while it was driving a request. And UVM cannot implicitly know how long that will take. Therefore, the objection software pattern is used for all run-time phases.

Link to comment
Share on other sites

  • 7 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...