Jump to content

having a sequence wait on a value in the driver

Recommended Posts

I'd like my sequence to not be created or not perform late randomization (either is fine) until a variable (int) in the driver has a certain value. How would you suggest doing this?

a) Should I set a variable in uvm_config_db and then poll it in the sequence? (Although sequences know no time as I recall, so I'd have to do it elsewhere. ? )

B) Is it possible to "wait" on a value in uvm_config_db?

c) other

As currently setup,

my sequence has:


//some late randomization here


my driver has:


send(req) //where pins are set


The value in the driver being waited for is akin to a stall.

Apologies for the terseness of this question. After just encountering it late today, I thought I'd throw it out here to see if anyone had any ideas before I reexamine the situation.

Link to comment
Share on other sites

If you use start_item(req) - finish_item(req) instead of using the macros, you can achieve exactly what you want.

You sequence will have

req = my_sequence_item::type_id::create(_);

start_item(req); // blocks until get_next_item() in driver

//some late randomization here

finish_item(req); // blocks until item_done() in driver.

So don't call get_next_item() until the value in your driver has what you want it to have.

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.

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