| 1 |
34 |
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 avf_4_tile_1_outputs_class_pkg;
|
| 30 |
|
|
|
| 31 |
|
|
// --------------------------------------------------------------------
|
| 32 |
|
|
//
|
| 33 |
|
|
import axis_video_frame_bfm_pkg::*;
|
| 34 |
|
|
import avf_agent_class_pkg::*;
|
| 35 |
|
|
|
| 36 |
|
|
|
| 37 |
|
|
// --------------------------------------------------------------------
|
| 38 |
|
|
//
|
| 39 |
|
|
localparam TILES = 4;
|
| 40 |
|
|
localparam WIDTH = 32; // tile width
|
| 41 |
|
|
localparam HEIGHT = 16; // tile height
|
| 42 |
|
|
localparam OUTPUTS_PER_TILE = 1; // outputs per tile
|
| 43 |
|
|
localparam BYTES_PER_PIXEL = 2;
|
| 44 |
|
|
localparam BITS_PER_PIXEL = 16;
|
| 45 |
|
|
localparam VERTICAL_BLANKING = 20;
|
| 46 |
|
|
|
| 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 avf_4_tile_1_outputs_class
|
| 54 |
|
|
extends avf_agent_class #(BYTES_PER_PIXEL, OUTPUTS_PER_TILE, AVF_U);
|
| 55 |
|
|
|
| 56 |
|
|
avf_config_class c_h;
|
| 57 |
|
|
avf_tile_config_t tile_config[];
|
| 58 |
|
|
|
| 59 |
|
|
|
| 60 |
|
|
//--------------------------------------------------------------------
|
| 61 |
|
|
//
|
| 62 |
|
|
function new
|
| 63 |
|
|
(
|
| 64 |
|
|
virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_in_if[TILES],
|
| 65 |
|
|
virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_out_if[TILES]
|
| 66 |
|
|
);
|
| 67 |
|
|
|
| 68 |
|
|
super.new(avf_axis_in_if, avf_axis_out_if);
|
| 69 |
|
|
|
| 70 |
|
|
this.tile_config = new[TILES];
|
| 71 |
|
|
this.tile_config[0].direction = RIGHT_DOWN;
|
| 72 |
|
|
this.tile_config[1].direction = RIGHT_UP;
|
| 73 |
|
|
this.tile_config[2].direction = LEFT_DOWN;
|
| 74 |
|
|
this.tile_config[3].direction = LEFT_UP;
|
| 75 |
|
|
|
| 76 |
|
|
this.c_h = new
|
| 77 |
|
|
(
|
| 78 |
|
|
.width(WIDTH),
|
| 79 |
|
|
.height(HEIGHT),
|
| 80 |
|
|
.bytes_per_pixel(BYTES_PER_PIXEL),
|
| 81 |
|
|
.bits_per_pixel(BITS_PER_PIXEL),
|
| 82 |
|
|
.pixels_per_clk(OUTPUTS_PER_TILE),
|
| 83 |
|
|
.name("AVF_"),
|
| 84 |
|
|
.vertical_blanking(VERTICAL_BLANKING),
|
| 85 |
|
|
.tile(tile_config)
|
| 86 |
|
|
);
|
| 87 |
|
|
|
| 88 |
|
|
super.init(c_h);
|
| 89 |
|
|
|
| 90 |
|
|
endfunction: new
|
| 91 |
|
|
|
| 92 |
|
|
|
| 93 |
|
|
// --------------------------------------------------------------------
|
| 94 |
|
|
//
|
| 95 |
|
|
endclass: avf_4_tile_1_outputs_class
|
| 96 |
|
|
|
| 97 |
|
|
// --------------------------------------------------------------------
|
| 98 |
|
|
//
|
| 99 |
|
|
endpackage: avf_4_tile_1_outputs_class_pkg
|
| 100 |
|
|
|
| 101 |
|
|
|
| 102 |
|
|
|
| 103 |
|
|
|
| 104 |
|
|
|