Home Methodologies OVM Tutorial Data Item
Main Menu
Home
System Verilog
Verilog
Methodologies
    - OVM Tutorial
        -- OVM Overview
        -- CRV in OVM
        -- OVM Based Env
        -- UVC in OVM
        -- Data Item
        -- Sequence Item Macros
        -- ovm-driver
        -- OVM sequencer
        -- OVM Monitor
        -- OVM Sequences
        -- OVM build in sequences
        -- OVM Do macros
        -- OVM Test
        -- Messaging utilities
    - OVM Example
    - UVM
    - VMM
    - VMM RAL
    - VMM Example
    - AVM Tutorial
Open Vera
Digital Concepts
Verification Basics
Protocols
Scripting
Articles
Videos
Interview Questions
Computer Architechture
C and C++
Blog/Article
AsicGuru Blog
Tags Cloud
Ads
Usefull Sites
Know Your IP/Location
Local Information India
Buy Car/Inverter Batteries
Real Estate India
Sports Accessories India
OVM Data item transaction
Share This Articale:

Data items
Represent the main transaction input to the DUT
Adhering to a protocol, consistent values are generated and sent
Examples include packets, transactions, instructions, and so on

Test environment randomizes data items (transactions)
A default distribution should be generated
Tests further steer generation by layering constraints or selecting from pre-defined scenarios
This makes test short, readable, easier to write and maintain

 

typedef enum {
                READ,
                WRITE
} mem_read_write_enum;

class mem_transfer extends ovm_sequence_item;
    rand mem_read_write_enum read_write;
    rand bit [`ADDR_SIZE-1:0] addr;
    rand bit [`DATA_SIZE-1:0] data;
    rand bit [`DATA_SIZE-1:0] write_enable;
    rand bit chip_enable;

constraint c_addr {
        addr <; 2**`ADDR_WIDTH;
 }
    constraint c_chip_enable {
        chip_enable == 0;
    }

    // Register fields with OVM
    `ovm_object_utils_begin (mem_transfer)
        `ovm_field_int      (addr,           OVM_ALL_ON)
        `ovm_field_int      (data,           OVM_ALL_ON)
`ovm_field_enum     (mem_read_write_enum, read_write,          OVM_ALL_ON)
    `ovm_object_utils_end

    // Class Constructor
    function new (string name="mem_transfer_inst") ;
        super.new (name);
    endfunction : new
endclass : mem_transfer

What kind of operations may be required for such a data item?

  1. Customized Randomization
  2. Customized Printing
  3. Customized Comparing
  4. Customized Copying
  5. Customized Packing
  6. Customized Waveform Dumping

Out of the above features the first feature randomization is provided by system verilog. Rest all the features ovm provides.

This Articles is written/submitted by puneet (Puneet Aggarwal). You can also contribute to Asicguru.com. Click here to start


Prev << UVC in OVM

Next >> Sequence Item Macros

 
Login/Register
Register
Sign In
Login with :-
gmail-yahoo-twitter-facebook
| | |  
  •  
  • Bookmark
    ADS