Late randomization

What’s late randomization?
What’s the application of late randomization in verification process?

In reply to bachan21:

You need to put this into perspective of all the ways you could generate constrained random stimulus. At one extreme, you could generate all your random stimulus before the simulation starts as a pattern file. Each pattern gets applied unresponsive to the activity of your DUT.

In the middle is the interactive stimulus. This is where your testbench emulates the normal protocol of your design interface by generating constrained random stimulus, sending it through a bus-functional model (BFM driver), waiting for a response or another request before generating the next set of stimulus. The key point here is randomization occurs before the DUT is ready to accept it.

Late randomization (or just-in-time might have been a better description) is when the randomization happens at the last possible moment when the driver is able to accept it. This means a request is broken up into a number of steps; a request to send something to the driver without letting the driver know what it is, waiting for the driver to read the request, and only generating the random stimulus at the point when the driver is reading the request. In the UVM this is represent by the start_item/finish/item in a sequence. This lets randomization us the current state of the design/testbench as constraints for generating stimulus at the last possible moment.