Home Methodologies OVM Example OVM Sequence
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 Sequence Example
Share This Articale:

OVM Sequence Examples :

 

`ifndef __MEM_MASTER_SEQ_LIB__
`define __MEM_MASTER_SEQ_LIB__

class mem_boundry_val_seq extends ovm_sequence #(mem_transfer);

    rand int address;
    rand int data;

    mem_transfer req;
    function new(string name="mem_boundry_val_seq");
        super.new(name);
    endfunction

    constraint c_addr {
        address < `ADDR_WIDTH'h10;
    }

    `ovm_sequence_utils_begin(mem_boundry_val_seq, mem_master_sequencer)    
    `ovm_field_int(address, OVM_ALL_ON)
    `ovm_field_int(data, OVM_ALL_ON)
    `ovm_sequence_utils_end

    virtual task body();
        ovm_report_info(get_type_name(),"STARTING mem_boundry_val_seq : PUNEET ", OVM_LOW);
        while (1) begin
            $display("%0t : mem_boundry_val_seq body() starting...", $time);
            //`ovm_do(req)
            `ovm_do_with(req , { req.addr < `ADDR_WIDTH'h10; req.data == data; } )
            `ovm_do_with(req , { req.addr > 2**`ADDR_WIDTH - 'h10; req.data == data; } )
            $display("%0t : mem_boundry_val_seq item done!", $time);
        end
    endtask

endclass : mem_boundry_val_seq

class simple_seq extends ovm_sequence #(mem_transfer);

    rand int address;
    rand int data;

    //mem_transfer req;
    function new(string name="simple_seq");
        super.new(name);
    endfunction

    `ovm_sequence_utils_begin(simple_seq, mem_master_sequencer)    
    `ovm_field_int(address, OVM_ALL_ON)
    `ovm_field_int(data, OVM_ALL_ON)
    `ovm_sequence_utils_end

    virtual task body();
        ovm_report_info(get_type_name(),"STARTING simple_seq : PUNEET ", OVM_LOW);
        while (1) begin
            $display("%0t : simple_seq body() starting...", $time);
            `ovm_do(req);
            $display("%0t : simple_seq item done!", $time);
        end
    endtask

endclass : simple_seq

`endif //__MEM_MASTER_SEQ_LIB__



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


Prev << OVM Test

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