TestBencher Pro and Reactive Test Bench Help

7.7 Randomizing Transaction Inputs

7.7 Randomizing Transaction Inputs

Previous topic Next topic  

7.7 Randomizing Transaction Inputs

Previous topic Next topic  

This topic describes how to automatically randomize data going into a transaction. If you want to randomly apply transactions to the model under test see Section 7.6: VHDL: TM fill from Random Generator. To call a specific transactor, but with randomized input data, use either ApplyRandom or PostRandom calls. You can define a subrange for the randomization of an input variable using the Classes and Variables dialog (by default, variables randomize over the entire legal value range  for the variable's type).

Using Insert Diagram Call dialog to Write Transaction Calls with Random Data:

To open the Insert Diagram Subroutine Calls dialog, put the cursor in the template file on the line to insert, and then right click and choose Insert Diagram Calls from the context menu.

Random_calls_dlg

Select the Randomize Parameter check box to change all of the Apply and Post calls to Random data calls.

Select one of the Apply or Post radio buttons and select a transaction to highlight it, then press the Insert button. Post calls are not supported in Verilog.

Constraining Random Data Generation:

By default each variable in the diagram will be randomized using the entire range of the type of the variable. To constrain the randomization or to stop randomizing a particular variable, use the Classes and Variables dialog as shown in Section 6.5 Random Number Generation and Constraints.

Master Transaction Manager Calls:

ApplyRandom_diagramName ( signal tb_Control : inout tb_Control_Type;

                 transactorBfmPath : in string );

ApplyRandom_diagramName_nowait ( signal tb_Control : inout tb_Control_Type;

                 transactorBfmPath : in string );

PostRandom_diagramName ( signal tb_Control : inout tb_Control_Type;

                 queuePath : in string;

                 transactorBfmPath : in string );

PostRandom_diagramName_nowait ( signal tb_Control : inout tb_Control_Type;

                 queuePath : in string;

                 transactorBfmPath : in string );

Slave Transaction Manager Apply Calls:

ApplyRandom_diagramName_looping ( signal tb_Control : inout tb_Control_Type;

                 transactorBfmPath : in string );

ApplyRandom_diagramName_looping_nowait( signal tb_Control : inout tb_Control_Type;

                                  transactorBfmPath : in string; );

PostRandom_diagramName_looping ( signal tb_Control : inout tb_Control_Type;

                 queuePath : in string;

                 transactorBfmPath : in string; );

PostRandom_diagramName_looping_nowait ( signal tb_Control : inout tb_Control_Type;

                 queuePath : in string;

                 transactorBfmPath : in string; );