OpenCores
URL https://opencores.org/ocsvn/i2c_master_slave_core/i2c_master_slave_core/trunk

Subversion Repositories i2c_master_slave_core

[/] [i2c_master_slave_core/] [trunk/] [i2c_master_slave_core/] [i2c_master_slave_core/] [svtb/] [vmm_svtb/] [vmm_i2c_data_packet.sv] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 toomuch
//////////////////////////////////////////////////////////////////////////////////////////
2
//                                                                                                                                                                              //
3
//      Verification Engineer:  Atish Jaiswal                                                                                           //
4
//      Company Name             :      TooMuch Semiconductor Solutions Pvt Ltd.                                        //
5
//                                                                                                                                                                              //
6
//  Description of the Source File:                                                                                                             //
7
//  This file is the data packet class for Scenario Generator.                                                  //
8
//      The Packet Randomizes data_pkt whose size will be assigned in Scenario Generator.       //
9
//                                                                                                                                                                              //
10
//                                                                                                                                                                              //
11
//////////////////////////////////////////////////////////////////////////////////////////
12
 
13
`include "vmm.sv"
14
 
15
class i2c_data_packet extends vmm_data;
16
        vmm_log  log;
17
        rand bit [7:0] data_pkt[];   // data packets to be transfered
18
 
19
        function new();
20
                super.new(this.log);
21
                this.log = new("Data_packet", "class");
22
        endfunction
23
 
24
        function void display();
25
                int i;
26
                this.log.start_msg(vmm_log::NOTE_TYP);
27
                while( i < data_pkt.size)
28
                begin
29
                        void'(this.log.text($psprintf("Data_Byte[%0d] is %b", i, this.data_pkt[i])));
30
                        i++;
31
                end
32
                this.log.end_msg();
33
        endfunction
34
 
35
 
36
        function vmm_data copy(vmm_data to = null);
37
                copy = new this;
38
        endfunction
39
 
40
endclass : i2c_data_packet
41
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.