Home Methodologies OVM Example OVM Driver
Main Menu
Home
System Verilog
Verilog
Methodologies
    - OVM Tutorial
    - OVM Example
        -- Sample DUT
        -- Sequence Item
        -- OVM Driver
        -- OVM Monitor
        -- OVM Sequencer
        -- OVM Scoreboard
        -- OVM Env
        -- OVM Env
        -- Dut Interface
        -- Top Level
        -- OVM Test
        -- OVM Sequence
    - 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 Driver Example
Share This Articale:

MEM Driver for the sample DUT :

 

`ifndef __MEM_TRANSFER__
`define __MEM_TRANSFER__

// mem read write enum

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;

    rand int unsigned size;

    constraint c_size {
        size inside {1, 2, 4, 8};
    }

    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_int      (size,           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 

`endif //__MEM_TRANSFER__


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


Prev << Sequence Item

Next >> OVM Monitor

Posted By : zied - Aug. 12, 2009, 10:31 a.m.

Hi, The code writen above is not describing a MEM Driver.

Posted By : Puneet - Aug. 13, 2009, 5:04 a.m.

ohh Sorry. I will fix it and also add the example as a tar file. ~Puneet

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