Sequence and Do Action Macros | |
Sequence Registration Macros | The sequence-specific macros perform the same function as the set of `ovm_object_*_utils macros, except they also set the default sequencer type the sequence will run on. |
`ovm_declare_p_sequencer | This macro is used to set up a specific sequencer type with the sequence type the macro is placed in. |
`ovm_sequence_utils_begin | |
`ovm_sequence_utils_end | |
`ovm_sequence_utils | The sequence macros can be used in non-parameterized <ovm_sequence> extensions to pre-register the sequence with a given <ovm_sequencer> type. |
Sequencer Registration Macros | The sequencer-specific macros perform the same function as the set of `ovm_componenent_*utils macros except that they also declare the plumbing necessary for creating the sequencer’s sequence library. |
`ovm_update_sequence_lib | This macro populates the instance-specific sequence library for a sequencer. |
`ovm_update_sequence_lib_and_item | This macro populates the instance specific sequence library for a sequencer, and it registers the given USER_ITEM as an instance override for the simple sequence’s item variable. |
`ovm_sequencer_utils | |
`ovm_sequencer_utils_begin | |
`ovm_sequencer_param_utils | |
`ovm_sequencer_param_utils_begin | |
`ovm_sequencer_utils_end | The sequencer macros are used in ovm_sequencer-based class declarations in one of four ways. |
Sequence Action Macros | These macros are used to start sequences and sequence items that were either registered with a <`ovm-sequence_utils> macro or whose associated sequencer was already set using the <set_sequencer> method. |
`ovm_create | This action creates the item or sequence using the factory. |
`ovm_do | This macro takes as an argument a ovm_sequence_item variable or object. |
`ovm_do_pri | This is the same as `ovm_do except that the sequene item or sequence is executed with the priority specified in the argument |
`ovm_do_with | This is the same as `ovm_do except that the constraint block in the 2nd argument is applied to the item or sequence in a randomize with statement before execution. |
`ovm_do_pri_with | This is the same as `ovm_do_pri except that the given constraint block is applied to the item or sequence in a randomize with statement before execution. |
`ovm_send | This macro processes the item or sequence that has been created using `ovm_create. |
`ovm_send_pri | This is the same as `ovm_send except that the sequene item or sequence is executed with the priority specified in the argument. |
`ovm_rand_send | This macro processes the item or sequence that has been already been allocated (possibly with `ovm_create). |
`ovm_rand_send_pri | This is the same as `ovm_rand_send except that the sequene item or sequence is executed with the priority specified in the argument. |
`ovm_rand_send_with | This is the same as `ovm_rand_send except that the given constraint block is applied to the item or sequence in a randomize with statement before execution. |
`ovm_rand_send_pri_with | This is the same as `ovm_rand_send_pri except that the given constraint block is applied to the item or sequence in a randomize with statement before execution. |
Sequence on Sequencer Action Macros | These macros are used to start sequences and sequence items on a specific sequencer, given in a macro argument. |
`ovm_create_on | This is the same as `ovm_create except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. |
`ovm_do_on | This is the same as `ovm_do except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. |
`ovm_do_on_pri | This is the same as `ovm_do_pri except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. |
`ovm_do_on_with | This is the same as `ovm_do_with except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. |
`ovm_do_on_pri_with | This is the same as `ovm_do_pri_with except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. |
The sequence-specific macros perform the same function as the set of `ovm_object_*_utils macros, except they also set the default sequencer type the sequence will run on.
This macro is used to set up a specific sequencer type with the sequence type the macro is placed in. This macro is implicit in the <ovm_sequence_utils> macro, but may be used directly in cases when the sequence is not to be registered in the sequencer’s library.
The example below shows using the the ovm_declare_p_sequencer macro along with the ovm_object_utils macros to set up the sequence but not register the sequence in the sequencer’s library.
class mysequence extends ovm_sequence#(mydata); `ovm_object_utils(mysequence) `ovm_declare_p_sequencer(some_seqr_type) task body; //Access some variable in the user's custom sequencer if(p_sequencer.some_variable) begin ... end endtask endclass
The sequence macros can be used in non-parameterized <ovm_sequence> extensions to pre-register the sequence with a given <ovm_sequencer> type.
`ovm_sequence_utils(TYPE_NAME,SQR_TYPE_NAME)
`ovm_sequence_utils_begin(TYPE_NAME,SQR_TYPE_NAME) `ovm_field_* macro invocations here `ovm_sequence_utils_end
The sequence-specific macros perform the same function as the set of `ovm_object_*_utils macros except that they also register the sequence’s type, TYPE_NAME, with the given sequencer type, SQR_TYPE_NAME, and define the p_sequencer variable and m_set_p_sequencer method.
Use `ovm_sequence_utils[_begin] for non-parameterized classes and `ovm_sequence_param_utils[_begin] for parameterized classes.
The sequencer-specific macros perform the same function as the set of `ovm_componenent_*utils macros except that they also declare the plumbing necessary for creating the sequencer’s sequence library.
This macro populates the instance-specific sequence library for a sequencer. It should be invoked inside the sequencer¿s constructor.
This macro populates the instance specific sequence library for a sequencer, and it registers the given USER_ITEM as an instance override for the simple sequence’s item variable.
The macro should be invoked inside the sequencer’s constructor.
The sequencer macros are used in ovm_sequencer-based class declarations in one of four ways.
For simple sequencers, no field macros
`ovm_sequencer_utils(SQR_TYPE_NAME)
For simple sequencers, with field macros
`ovm_sequencer_utils_begin(SQR_TYPE_NAME) `ovm_field_* macros here `ovm_sequencer_utils_end
For parameterized sequencers, no field macros
`ovm_sequencer_param_utils(SQR_TYPE_NAME)
For parameterized sequencers, with field macros
`ovm_sequencer_param_utils_begin(SQR_TYPE_NAME) `ovm_field_* macros here `ovm_sequencer_utils_end
The sequencer-specific macros perform the same function as the set of `ovm_componenent_*utils macros except that they also declare the plumbing necessary for creating the sequencer’s sequence library. This includes:
1. Declaring the type-based static queue of strings registered on the sequencer type.
2. Declaring the static function to add strings to item #1 above.
3. Declaring the static function to remove strings to item #1 above.
4. Declaring the function to populate the instance specific sequence library for a sequencer.
Use `ovm_sequencer_utils[_begin] for non-parameterized classes and `ovm_sequencer_param_utils[_begin] for parameterized classes.
These macros are used to start sequences and sequence items that were either registered with a <`ovm-sequence_utils> macro or whose associated sequencer was already set using the <set_sequencer> method.
This action creates the item or sequence using the factory. It intentionally does zero processing. After this action completes, the user can manually set values, manipulate rand_mode and constraint_mode, etc.
This macro takes as an argument a ovm_sequence_item variable or object. ovm_sequence_item’s are randomized at the time the sequencer grants the do request. This is called late-randomization or late-generation. In the case of a sequence a sub-sequence is spawned. In the case of an item, the item is sent to the driver through the associated sequencer.
This is the same as `ovm_do except that the sequene item or sequence is executed with the priority specified in the argument
This is the same as `ovm_do except that the constraint block in the 2nd argument is applied to the item or sequence in a randomize with statement before execution.
This is the same as `ovm_do_pri except that the given constraint block is applied to the item or sequence in a randomize with statement before execution.
This macro processes the item or sequence that has been created using `ovm_create. The processing is done without randomization. Essentially, an `ovm_do without the create or randomization.
This is the same as `ovm_send except that the sequene item or sequence is executed with the priority specified in the argument.
This macro processes the item or sequence that has been already been allocated (possibly with `ovm_create). The processing is done with randomization. Essentially, an `ovm_do without the create.
This is the same as `ovm_rand_send except that the sequene item or sequence is executed with the priority specified in the argument.
This is the same as `ovm_rand_send except that the given constraint block is applied to the item or sequence in a randomize with statement before execution.
This is the same as `ovm_rand_send_pri except that the given constraint block is applied to the item or sequence in a randomize with statement before execution.
These macros are used to start sequences and sequence items on a specific sequencer, given in a macro argument.
This is the same as `ovm_create except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument.
This is the same as `ovm_do except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument.
This is the same as `ovm_do_pri except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument.
This is the same as `ovm_do_with except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument. The user must supply brackets around the constraints.
This is the same as `ovm_do_pri_with except that it also sets the parent sequence to the sequence in which the macro is invoked, and it sets the sequencer to the specified SEQUENCER_REF argument.