Welcome ! This website will help YOU (recent graduates/professionals) learn verification languages like SystemVerilog and UVM. Register for free and access more content !
  1. Nayan Naware
  2. UVM
  3. Monday, 27 March 2017
What is the difference between `uvm_do and start_item() finish_item() methods ?
Accepted Answer
Accepted Answer Pending Moderation
`uvm_do is a macro for a sequence item to start on a sequencer. we can use `uvm_do instead of start_item() & finish_item() but not recommended. It directly call the body() method of the sequence but does not call pre_body and post_body methods. It will take so much time to execute so that simulator will slow, that's why we avoid the use of `uvm_do. It calls pre_do and post_do methods and internally completes all the process from create_item to till item_done(). If we call `uvm_do within a task body() method in sequence, following is the process how it works....

`uvm_create(item) --> task sequencer.wait_for_grant --> task this.pre_do --> item.randomize() --> function this.mid_do(item) --> function sequencer.send_request(item) --> task sequencer.wait_for_item_done() --> function this.post_do(item)
  1. more than a month ago
  2. UVM
  3. # Permalink
Accepted Answer Pending Moderation
Thanks Admin...links are very helpful...
  1. more than a month ago
  2. UVM
  3. # 1
Accepted Answer Pending Moderation
Just to point you to a couple of links that has a better representation of when the pre_body and post_body methods are called.
References
  1. http://chipverify.com/uvm/how-to-execute-sequences-via-start-method
  2. http://chipverify.com/uvm/how-to-execute-sequences-via-uvm-do-macros
  1. more than a month ago
  2. UVM
  3. # 2
Accepted Answer Pending Moderation
Both are used to operate on a sequence_item and `uvm_do is just an automated way that calls start_item and finish_item under the hood. Check link below. However, the difference would be that the macros also create, and randomize the object while the methods only use an existing object on a sequencer.
References
  1. http://chipverify.com/uvm/how-to-use-sequence-macro
  1. more than a month ago
  2. UVM
  3. # 3
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. You consent to our cookies if you continue to use our website. To find out more about the cookies we use and how to delete them, see our privacy policy.

  I accept cookies from this site.
Agree
EU Cookie Directive plugin by www.channeldigital.co.uk