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] - Rev 40

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

//////////////////////////////////////////////////////////////////////
////                                                              ////
//// Copyright (C) 2017 Authors and OPENCORES.ORG                 ////
////                                                              ////
//// This source file may be used and distributed without         ////
//// restriction provided that this copyright statement is not    ////
//// removed from the file and that any derivative work contains  ////
//// the original copyright notice and the associated disclaimer. ////
////                                                              ////
//// This source file is free software; you can redistribute it   ////
//// and/or modify it under the terms of the GNU Lesser General   ////
//// Public License as published by the Free Software Foundation; ////
//// either version 2.1 of the License, or (at your option) any   ////
//// later version.                                               ////
////                                                              ////
//// This source is distributed in the hope that it will be       ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
//// PURPOSE.  See the GNU Lesser General Public License for more ////
//// details.                                                     ////
////                                                              ////
//// You should have received a copy of the GNU Lesser General    ////
//// Public License along with this source; if not, download it   ////
//// from http://www.opencores.org/lgpl.shtml                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////

interface
  tb_dut_if
  #(
    IN_N = 1, // data bus width in bytes. axis_in.
    OUT_N = 1, // data bus width in bytes. axis_out.
    I = 1,  // TID width
    D = 1,  // TDEST width
    U = 1   // TUSER width
  )
  (
    input aclk,
    input aresetn
  );

  // --------------------------------------------------------------------
  //
  // wire aclk;
  // wire aresetn;
  axis_if #(.N(IN_N),   .I(I), .D(D), .U(U)) axis_in(.*);
  axis_if #(.N(OUT_N),  .I(I), .D(D), .U(U)) axis_out(.*);

// --------------------------------------------------------------------
//
endinterface: tb_dut_if

// --------------------------------------------------------------------
//
package tb_axis_gear_box_pkg;

  // --------------------------------------------------------------------
  //
  import uvm_pkg::*;
  `include "uvm_macros.svh"
  import axis_pkg::*;

  // --------------------------------------------------------------------
  //
  localparam IN_N = 1; // data bus width in bytes. axis_in.
  localparam OUT_N = 1; // data bus width in bytes. axis_out.
  localparam I = 1; // TID width
  localparam D = 1; // TDEST width
  localparam U = 1; // TUSER width
  
  // --------------------------------------------------------------------
  //
  class tb_env extends uvm_env;
    `uvm_component_utils(tb_env);

   // sequencer       sequencer_h;
   // coverage        coverage_h;
   // scoreboard      scoreboard_h;
   // driver          driver_h;
   // command_monitor command_monitor_h;
   // result_monitor  result_monitor_h;

    // --------------------------------------------------------------------
    //
    function new (string name, uvm_component parent);
      super.new(name,parent);
    endfunction : new

    // --------------------------------------------------------------------
    //
    function void build_phase(uvm_phase phase);
        // // stimulus
        // sequencer_h  = new("sequencer_h",this);
        // driver_h     = driver::type_id::create("driver_h",this);
        // // monitors
        // command_monitor_h    = command_monitor::type_id::create("command_monitor_h",this);
        // result_monitor_h = result_monitor::type_id::create("result_monitor",this);
        // // analysis
        // coverage_h    = coverage::type_id::create ("coverage_h",this);
        // scoreboard_h  = scoreboard::type_id::create("scoreboard",this);
    endfunction : build_phase

    // --------------------------------------------------------------------
    //
    function void connect_phase(uvm_phase phase);

        // driver_h.seq_item_port.connect(sequencer_h.seq_item_export);

        // command_monitor_h.ap.connect(coverage_h.analysis_export);
        // command_monitor_h.ap.connect(scoreboard_h.cmd_f.analysis_export);
        // result_monitor_h.ap.connect(scoreboard_h.analysis_export);
    endfunction : connect_phase

// --------------------------------------------------------------------
//
endclass : tb_env

// --------------------------------------------------------------------
//
endpackage: tb_axis_gear_box_pkg





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

powered by: WebSVN 2.1.0

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