ljepson74 Posted March 21, 2015 Report Posted March 21, 2015 *, Is one of these ways to have a sequence wait on an event preferred? If so, why? The following are code snippets from inside a sequence. 1) Create transaction and engage w/ driver, then wait for event. `uvm_create(req) start_item(req); m_state.wait_on_smthg(); // <--- wait here 2) Wait for event, then proceed m_state.wait_on_smthg(); // <--- wait here `uvm_create(req) start_item(req); In this case, the event being waited for is that data of a certain type is available. Quote
David Black Posted March 21, 2015 Report Posted March 21, 2015 There are two premises you need to consider: Sequences are supposed to generate transactions in a manner that allows for late randomization. This allows randomization to use current state of the system to guide/constrain the randomization. When you return from start_item(), the driver wants it's transaction request to be honored ASAP. Drivers are typically slaved to hardware. If your sequence blocks (waits), then the driver needs to be written in a manner that doesn't block the way seq_item_port.get_next_item() does. In other words, sequences with waits have implications on the driver. GIven the above, I would say #2 is preferable because the wait doesn't come after start_item() returns and cause delays in the randomization. In either case, since you have a wait in the sequence, you should be certain to design the driver to be tolerant of those waits. Often this means using seq_item_port.try_next_item(). . Quote
xzcdream Posted May 8, 2015 Report Posted May 8, 2015 i wanna to know that how to control the timing between two transactions,and can i send a transaction with non-random data? thanks Quote
Recommended Posts
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.