Home > Community > Blogs > Functional Verification > an editor for ovm field registration macros
Login with a Cadence account.
Not a member yet?
Create a permanent login account to make interactions with Cadence more convenient.

Register | Membership benefits
Get email delivery of the Functional Verification blog (individual posts).


* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

Editor For OVM Field Registration Macros

Comments(0)Filed under: Functional Verification, OVM, SystemVerilog, eclipse, macros, AMIQ, uvm

The OVM SystemVerilog Class Library has built-in automation for many service routines that classes need for printing, copying, comparing and so on. OVM allows you to specify the automation needed for each field and to use a built-in, mature and consistent implementation of these routines. For each field you must use OVM field registration macros as in the example below:


     rand bit [15:0]           addr;

     rand xbus_read_write_enum read_write;

     rand int unsigned     size;

     rand bit [7:0]             data[];

     rand bit [3:0]             wait_state[];



         `ovm_field_int          (addr,             OVM_ALL_ON)

         `ovm_field_enum     (xbus_read_write_enum, read_write, OVM_ALL_ON)

         `ovm_field_int          (size,             OVM_ALL_ON)

         `ovm_field_array_int(data,             OVM_ALL_ON)

         `ovm_field_array_int(wait_state,     OVM_ALL_ON)


Inside a single dedicated `ovm_*_utils_begin...end block, you must use dedicated macros for each field type. For example `ovm_field_int for a simple int or `ovm_field_aa_int_byte_unsigned for an associative array of integral types indexed by the byte unsigned.

If you are hesitant and your head aches when matching the right macro with the right type, the OVM Field Editor of the already well known DVT (Design and Verification Tools) Eclipse Plug-in IDE comes to rescue:



You can quickly check whether you have unregistered fields or registration errors. The DVT OVM Field Editor allows you to click on a field and register it with the right macro or customize it's printing, copying, packing and other controls. Based on the enclosing class type (object, component or sequence), the right `ovm_*_utils_begin...end< enclosing block for the registration macros is also created.

From now on, just declare your fields, then open the OVM Field Editor, select all fields and click Register. That's it!

Just don't forget to read more about the DVT Eclipse Plug-in and get your free trial license from www.dvteclipse.com.



Leave a Comment

E-mail (will not be published)
 I have read and agree to the Terms of use and Community Guidelines.
Community Guidelines
The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.