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.
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);
HI All,
Can anybody answer this??? I have same question.
Regards,
Kartik
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.
Hi , richedelman
Can you pls tell me how to achieve this late randomization in SV-OVM.
----------
JigneshT
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);