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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [axi4_stream_lib/] [sim/] [tests/] [tb_axis_gear_box/] [tb_axis_gear_box_pkg.sv] - Blame information for rev 40

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 40 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2017 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
interface
29
  tb_dut_if
30
  #(
31
    IN_N = 1, // data bus width in bytes. axis_in.
32
    OUT_N = 1, // data bus width in bytes. axis_out.
33
    I = 1,  // TID width
34
    D = 1,  // TDEST width
35
    U = 1   // TUSER width
36
  )
37
  (
38
    input aclk,
39
    input aresetn
40
  );
41
 
42
  // --------------------------------------------------------------------
43
  //
44
  // wire aclk;
45
  // wire aresetn;
46
  axis_if #(.N(IN_N),   .I(I), .D(D), .U(U)) axis_in(.*);
47
  axis_if #(.N(OUT_N),  .I(I), .D(D), .U(U)) axis_out(.*);
48
 
49
// --------------------------------------------------------------------
50
//
51
endinterface: tb_dut_if
52
 
53
// --------------------------------------------------------------------
54
//
55
package tb_axis_gear_box_pkg;
56
 
57
  // --------------------------------------------------------------------
58
  //
59
  import uvm_pkg::*;
60
  `include "uvm_macros.svh"
61
  import axis_pkg::*;
62
 
63
  // --------------------------------------------------------------------
64
  //
65
  localparam IN_N = 1; // data bus width in bytes. axis_in.
66
  localparam OUT_N = 1; // data bus width in bytes. axis_out.
67
  localparam I = 1; // TID width
68
  localparam D = 1; // TDEST width
69
  localparam U = 1; // TUSER width
70
 
71
  // --------------------------------------------------------------------
72
  //
73
  class tb_env extends uvm_env;
74
    `uvm_component_utils(tb_env);
75
 
76
   // sequencer       sequencer_h;
77
   // coverage        coverage_h;
78
   // scoreboard      scoreboard_h;
79
   // driver          driver_h;
80
   // command_monitor command_monitor_h;
81
   // result_monitor  result_monitor_h;
82
 
83
    // --------------------------------------------------------------------
84
    //
85
    function new (string name, uvm_component parent);
86
      super.new(name,parent);
87
    endfunction : new
88
 
89
    // --------------------------------------------------------------------
90
    //
91
    function void build_phase(uvm_phase phase);
92
        // // stimulus
93
        // sequencer_h  = new("sequencer_h",this);
94
        // driver_h     = driver::type_id::create("driver_h",this);
95
        // // monitors
96
        // command_monitor_h    = command_monitor::type_id::create("command_monitor_h",this);
97
        // result_monitor_h = result_monitor::type_id::create("result_monitor",this);
98
        // // analysis
99
        // coverage_h    = coverage::type_id::create ("coverage_h",this);
100
        // scoreboard_h  = scoreboard::type_id::create("scoreboard",this);
101
    endfunction : build_phase
102
 
103
    // --------------------------------------------------------------------
104
    //
105
    function void connect_phase(uvm_phase phase);
106
 
107
        // driver_h.seq_item_port.connect(sequencer_h.seq_item_export);
108
 
109
        // command_monitor_h.ap.connect(coverage_h.analysis_export);
110
        // command_monitor_h.ap.connect(scoreboard_h.cmd_f.analysis_export);
111
        // result_monitor_h.ap.connect(scoreboard_h.analysis_export);
112
    endfunction : connect_phase
113
 
114
// --------------------------------------------------------------------
115
//
116
endclass : tb_env
117
 
118
// --------------------------------------------------------------------
119
//
120
endpackage: tb_axis_gear_box_pkg
121
 
122
 
123
 
124
 
125
 

powered by: WebSVN 2.1.0

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