Jump to content

what's the exact usage for set_drain_time(xx,xx)?


Recommended Posts

Hi ,

I have a question regarding set_drain_time(xx,xx).

As i saw in the UVM spec, "The drain time is the amount of time to wait once all objections have been dropped before calling the all_dropped callback and propagating the objection to the parent"

why we need set a drain time for the environment ? how to make sure how much time to set for drain_time?

Link to comment
Share on other sites

Hi ,

I have a question regarding set_drain_time(xx,xx).

As i saw in the UVM spec, "The drain time is the amount of time to wait once all objections have been dropped before calling the all_dropped callback and propagating the objection to the parent"

why we need set a drain time for the environment ? how to make sure how much time to set for drain_time?

hi,

the drain time is a 'grace' period after the objections have been dropped until the effect becomes visiible. the most prominent case is uvm_test_done. without a drain time your simulator would be stopped right with dropping the last objection however in most cases you still want to spend some simulation cycles to shitdown your whole system gracefully (no transfers going on anymore, no assertions running, ...)

the length of the drain time depends upon your device. it should be slightly larger then the maximum time your device needs to complete the remaining activities

Link to comment
Share on other sites

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...