Late randomization

5 posts / 0 new
Last post
suleeshr
Offline
Academy Total Access User
Joined: 12/27/2011
Posts: 7
Late randomization

Hi,

Can somebody tell me a practical application of the concept of "late randomization"? If possible, try to give an example.

Thanks
Suleesh

kartik.jivani
Offline
Academy Total Access User
Joined: 10/12/2011
Posts: 2
Re: Late randomization

HI All,

Can anybody answer this??? I have same question.

Regards,
Kartik

richedelman
Offline
Verification Forum Moderator
Joined: 03/15/2010
Posts: 28
Re: Late randomization

Rather than calling it "late randomization", sometimes I call it "just-in-time randomization".
The idea is that randomization should be performed at exactly the time that the transaction is to be used. If it is done too early, then the transaction won't have the latest information about the environment, the DUT, the register model, etc.

As an example, suppose the DUT is a stove burner. The transactions can either turn the heat up or turn the heat down. The amount of up or down is relative to the current temperature on the stove burner. The current stove burner temperature is always available within the testbench.
The transaction should be randomized as late as possible (at exactly the time when it is to be executed). This way the transaction can get the current stove burner temperature and adjust the burner temperature appropriately. If the transaction had "old" information (like a temperature from 5 minutes ago), then the randomization of the up/down and the amount could cause the temperature to be too high or too low.

jignesh
Offline
Academy Forum User
Joined: 01/29/2008
Posts: 11
Re: Late randomization

Hi , richedelman

Can you pls tell me how to achieve this late randomization in SV-OVM.

__________________

----------
JigneshT

mperyer
Offline
Verification Forum Moderator
Joined: 07/24/2010
Posts: 146
Re: Late randomization

In the OVM/UVM, late randomization takes place in a sequence just before you send a sequence item.

Inside your sequence:

start_item(request_item);
// Late randomization:
request_item.randomize() with {constraints sensitive to last minute changes in DUT/env};
finish_item(request_item);