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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [BFM/] [sim/] [tests/] [tb_1_tile_4_outputs/] [avf_1_tile_4_outputs_class_pkg.sv] - Rev 34

Compare with Previous | Blame | View Log

//////////////////////////////////////////////////////////////////////
////                                                              ////
//// Copyright (C) 2015 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                     ////
////                                                              ////
//////////////////////////////////////////////////////////////////////


package avf_1_tile_4_outputs_class_pkg;

  // --------------------------------------------------------------------
  //
  import axis_video_frame_bfm_pkg::*;
  import avf_agent_class_pkg::*;


  // --------------------------------------------------------------------
  //
  localparam TILES              = 1;
  localparam WIDTH              = 32; // tile width
  localparam HEIGHT             = 16; // tile height
  localparam OUTPUTS_PER_TILE   = 4;  // outputs per tile
  localparam BYTES_PER_PIXEL    = 2;
  localparam BITS_PER_PIXEL     = 16;
  localparam VERTICAL_BLANKING  = 20;

  localparam AVF_N = BYTES_PER_PIXEL * OUTPUTS_PER_TILE;  // data bus width in bytes
  localparam AVF_U = 3;                                   // TUSER width


  // --------------------------------------------------------------------
  //
  class avf_1_tile_4_outputs_class
    extends avf_agent_class #(BYTES_PER_PIXEL, OUTPUTS_PER_TILE, AVF_U);

    avf_config_class c_h;
    avf_tile_config_t   tile_config[];


    //--------------------------------------------------------------------
    //
    function new
      (
        virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_in_if[TILES],
        virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_out_if[TILES]
      );

      super.new(avf_axis_in_if, avf_axis_out_if);

      this.tile_config              = new[TILES];
      this.tile_config[0].direction = RIGHT_DOWN;

      this.c_h = new
      (
        .width(WIDTH),
        .height(HEIGHT),
        .bytes_per_pixel(BYTES_PER_PIXEL),
        .bits_per_pixel(BITS_PER_PIXEL),
        .pixels_per_clk(OUTPUTS_PER_TILE),
        .name("AVF_"),
        .vertical_blanking(VERTICAL_BLANKING),
        .tile(tile_config)
      );

      super.init(c_h);

    endfunction: new


  // --------------------------------------------------------------------
  //
  endclass: avf_1_tile_4_outputs_class

// --------------------------------------------------------------------
//
endpackage: avf_1_tile_4_outputs_class_pkg





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.