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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [axi4_stream_lib/] [sim/] [src/] [tb_axis_upsizer_class_pkg.sv] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 31 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2015 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
 
29
package tb_axis_upsizer_class_pkg;
30
 
31
  // --------------------------------------------------------------------
32
  //
33
  import axis_video_frame_bfm_pkg::*;
34
  import tb_axis_upsizer_agent_class_pkg::*;
35
 
36
 
37
  // --------------------------------------------------------------------
38
  //
39
  localparam WIDTH              = 32; // tile width
40
  localparam HEIGHT             = 16; // tile height
41
  localparam OUTPUTS_PER_TILE   = 1;  // outputs per tile
42
  localparam BYTES_PER_PIXEL    = 2;
43
  localparam BITS_PER_PIXEL     = 16;
44
  localparam VERTICAL_BLANKING  = 20;
45
 
46
  localparam S = 4;                                       // tdata size multiplier
47
  localparam AVF_N = BYTES_PER_PIXEL * OUTPUTS_PER_TILE;  // data bus width in bytes
48
  localparam AVF_U = 3;                                   // TUSER width
49
 
50
 
51
  // --------------------------------------------------------------------
52
  //
53
  class tb_axis_upsizer_class
54
    extends tb_axis_upsizer_agent_class #(BYTES_PER_PIXEL, OUTPUTS_PER_TILE, AVF_N, AVF_U, S);
55
 
56
    avf_config_class in_c_h;
57
    avf_config_class out_c_h;
58
    avf_tile_config_t   tile_config[];
59
 
60
 
61
    //--------------------------------------------------------------------
62
    //
63
    function new
64
      (
65
        virtual axis_if #(.N(AVF_N * S), .U(AVF_U)) avf_axis_in_if,
66
        virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_out_if
67
      );
68
 
69
      super.new(avf_axis_in_if, avf_axis_out_if);
70
 
71
      this.tile_config              = new[1];
72
      this.tile_config[0].direction = RIGHT_DOWN;
73
 
74
      this.in_c_h = new
75
      (
76
        .width(WIDTH),
77
        .height(HEIGHT),
78
        .bytes_per_pixel(BYTES_PER_PIXEL),
79
        .bits_per_pixel(BITS_PER_PIXEL),
80
        .pixels_per_clk(OUTPUTS_PER_TILE * S),
81
        .name("IN_"),
82
        .vertical_blanking(VERTICAL_BLANKING),
83
        .tile(tile_config)
84
      );
85
 
86
      this.out_c_h = new
87
      (
88
        .width(WIDTH),
89
        .height(HEIGHT),
90
        .bytes_per_pixel(BYTES_PER_PIXEL),
91
        .bits_per_pixel(BITS_PER_PIXEL),
92
        .pixels_per_clk(OUTPUTS_PER_TILE),
93
        .name("OUT_"),
94
        .vertical_blanking(VERTICAL_BLANKING),
95
        .tile(tile_config)
96
      );
97
 
98
      super.init(in_c_h, out_c_h);
99
 
100
    endfunction: new
101
 
102
 
103
  // --------------------------------------------------------------------
104
  //
105
  endclass: tb_axis_upsizer_class
106
 
107
// --------------------------------------------------------------------
108
//
109
endpackage: tb_axis_upsizer_class_pkg
110
 
111
 
112
 
113
 
114
 

powered by: WebSVN 2.1.0

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