UVM Sequence Item¶
Summary¶
The UVM Sequence Item is the base class for user-defined transactions that leverage the stimulus generation and control capabilities of the sequence-sequencer mechanism.
Coding Guidelines¶
This coding guidelines are directly taken form Easier UVM Coding Guidelines. We encourage users to follow these recommendations so that the code becomes more readable and easier to maintain. By doing so, you will also benefit from better performance and simpler integration.
Tips
- Use conditional compilation guards to avoid compiling the same include file more than once.
- Create user-defined transaction classes by extending the class
uvm_sequence_item. - Try to minimize the number of distinct transaction classes
- Register the transaction class with the factory using the macro
`uvm_object_utilsas the first line within the class. - Do not use field macros. (This comes at a heavy cost in terms of performance)
- After the factory registration macro, declare any member variables (using the prefix
m_as a naming convention). - Use the
randqualifier in front of any class member variables that might need to be randomized, now or in the future. - After any member variables, define a constructor that includes a single string name argument with a default value of the empty string, a call to
super.new(), and is otherwise empty. - After the constructor, always override the
convert2string,do_copy,do_compare,do_print, anddo_recordmethods. - Always instantiate transaction objects using the factory.
- In general, the string name of the transaction should be the same as the variable name.
Code Example¶
| gpio_uvc_sequence_item.sv | |
|---|---|
Reference Material¶
Accellera
Verification Methodology Cookbooks
- UVM Cookbook PDF
- UVM Cookbook Webpage
- UVM Sequences
- Sequences
- UVM Sequence Items
- Transaction Methods
Source Code
Articles