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

Subversion Repositories qaz_libs

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /qaz_libs
    from Rev 23 to Rev 24
    Reverse comparison

Rev 23 → Rev 24

/trunk/AXI/src/wb_axi4lite_read_fsm.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/AXI/src/register_file.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/AXI/src/reg_file_v1_0_S00_AXI.v
1,6 → 1,33
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`timescale 1 ns / 1 ps
 
 
module reg_file_v1_0_S00_AXI #
(
// Users to add parameters here
/trunk/AXI/src/wb_axi4lite_bridge.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/AXI/src/wb_master_fsm.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/AXI/src/wb_axi4lite_write_fsm.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/AXI/sim/tests/debug_unit_reg_file_v1_0_S00_AXI/the_test.sv
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`timescale 1ps/1ps
 
/trunk/AXI/sim/tests/debug_unit_wb_axi4lite_bridge/the_test.sv
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`timescale 1ps/1ps
 
/trunk/AXI/sim/src/tb_unit_reg_file_v1_0_S00_AXI.sv
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`ifndef AXI4PC_TYPES
`include "Axi4PC_ace_defs.v"
/trunk/AXI/sim/src/tb_axi4lite_bfm_if.sv
1,5 → 1,29
// --------------------------------------------------------------------
//
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
interface
/trunk/AXI/sim/src/tb_unit_debug_unit_wb_axi4lite_bridge.sv
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`ifndef AXI4PC_TYPES
`include "Axi4PC_ace_defs.v"
/trunk/AXI/sim/src/qaz_axi4_bfm_pkg.sv
1,5 → 1,29
// --------------------------------------------------------------------
//
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 qaz_axi4_bfm_pkg;
/trunk/tb_class/src/tb_base.sv
22,15 → 22,15
(
input time reset_assert
);
 
reset = 1;
$display( "-#- %16.t | %m | reset asserted!", $time );
 
#reset_assert;
 
reset = 0;
$display( "-#- %16.t | %m | reset deasserted!", $time );
 
endtask
 
 
40,13 → 40,13
(
input time timeout
);
 
$display("-#- %16.t | %m | timeout_stop at %t", $time, timeout);
 
fork
#(timeout) $stop;
join_none
 
endtask
 
 
57,26 → 57,25
assign clock = tb_clk_driver.clk;
time reset_assert = (PERIOD * 5) + (PERIOD / 3);
logic init_done = 0;
 
initial
begin
 
reset = 1;
 
tb_clk_c = new( tb_clk_driver );
 
if( PERIOD != 0 )
tb_clk_c.init_basic_clock( PERIOD );
 
if( ASSERT_TIME != 0 )
assert_reset( ASSERT_TIME );
else if( reset_assert != 0 )
assert_reset( reset_assert );
 
init_done = 1;
 
end
endmodule
 
 
trunk/axi4_lib Property changes : Added: svn:global-ignores ## -0,0 +1 ## +reference Index: trunk/misc/synchronizer.v =================================================================== --- trunk/misc/synchronizer.v (revision 23) +++ trunk/misc/synchronizer.v (revision 24) @@ -1,6 +1,29 @@ -// -------------------------------------------------------------------- -// -// -------------------------------------------------------------------- +////////////////////////////////////////////////////////////////////// +//// //// +//// 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 //// +//// //// +////////////////////////////////////////////////////////////////////// module
/trunk/misc/bit_connect_big_to_little.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/misc/bit_connect_little_to_big.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/misc/bit_swap_big_to_little.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/misc/bit_swap_little_to_big.v
1,6 → 1,29
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module
/trunk/video_frame_class/src/video_frame_pkg.sv
44,6 → 44,8
rand int lines_per_frame;
rand int bits_per_pixel;
line_s lines[];
string name = "";
string pattern = "";
 
constraint default_pixels_per_line
{
70,13 → 72,42
this.frame_id = 0;
endfunction: new
 
extern function void init
 
// --------------------------------------------------------------------
//
function void init
(
input int pixels_per_line,
input int lines_per_frame,
input int bits_per_pixel
input int pixels_per_line,
input int lines_per_frame,
input int bits_per_pixel,
string name = ""
);
 
$display("^^^ %16.t | %m", $time);
 
this.pixels_per_line = pixels_per_line;
this.lines_per_frame = lines_per_frame;
this.bits_per_pixel = bits_per_pixel;
this.name = name;
 
this.make_constant( 0 );
 
endfunction: init
 
 
// --------------------------------------------------------------------
//
extern virtual task write_pixel
(
input frame_coordinate_t coordinate,
input int pixel
);
 
extern virtual function int read_pixel
(
input frame_coordinate_t coordinate
);
 
extern virtual function void make_constant
(
input int pixel
84,19 → 115,25
 
extern virtual function void make_counting();
 
extern virtual function void make_horizontal();
 
extern virtual function void make_vertical();
 
extern virtual function void make_random();
 
extern virtual function void copy
(
ref video_frame_class to
ref video_frame_class from
);
 
extern virtual function video_frame_class clone();
 
extern virtual function int compare
(
input int max_mismatches,
ref video_frame_class to
);
 
extern virtual function void print_line
(
input int line,
104,29 → 141,37
input int count
);
 
extern virtual function void print_config();
 
endclass: video_frame_class
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::init
task
video_frame_class::write_pixel
(
input frame_coordinate_t coordinate,
input int pixel
);
 
this.lines[coordinate.y].pixel[coordinate.x] = pixel;
 
endtask: write_pixel
 
 
// --------------------------------------------------------------------
//
function int video_frame_class::read_pixel
(
input int pixels_per_line,
input int lines_per_frame,
input int bits_per_pixel
input frame_coordinate_t coordinate
);
$display("^^^ %16.t | %m", $time);
this.pixels_per_line = pixels_per_line;
this.lines_per_frame = lines_per_frame;
this.bits_per_pixel = bits_per_pixel;
this.make_constant( 0 );
endfunction: init
 
read_pixel = this.lines[coordinate.y].pixel[coordinate.x];
 
endfunction: read_pixel
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::make_constant
133,7 → 178,7
(
input int pixel
);
 
$display("^^^ %16.t | %m", $time);
 
this.lines = new[lines_per_frame];
148,6 → 193,8
 
end
 
pattern = "constant";
 
endfunction: make_constant
 
 
154,7 → 201,7
// --------------------------------------------------------------------
//
function void video_frame_class::make_counting();
 
$display("^^^ %16.t | %m", $time);
 
this.lines = new[lines_per_frame];
169,13 → 216,61
 
end
 
pattern = "counting";
 
endfunction: make_counting
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::make_horizontal();
 
$display("^^^ %16.t | %m", $time);
 
this.lines = new[lines_per_frame];
 
foreach( this.lines[l] )
begin
 
this.lines[l].pixel = new[pixels_per_line];
 
foreach( this.lines[l].pixel[p] )
this.lines[l].pixel[p] = p;
 
end
 
pattern = "horizontal";
 
endfunction: make_horizontal
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::make_vertical();
 
$display("^^^ %16.t | %m", $time);
 
this.lines = new[lines_per_frame];
 
foreach( this.lines[l] )
begin
 
this.lines[l].pixel = new[pixels_per_line];
 
foreach( this.lines[l].pixel[p] )
this.lines[l].pixel[p] = l;
 
end
 
pattern = "vertical";
 
endfunction: make_vertical
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::make_random();
 
$display("^^^ %16.t | %m", $time);
 
this.lines = new[lines_per_frame];
190,6 → 285,8
 
end
 
pattern = "random";
 
endfunction: make_random
 
 
197,26 → 294,24
//
function void video_frame_class::copy
(
ref video_frame_class to
ref video_frame_class from
);
 
$display("^^^ %16.t | %m", $time);
 
to.frame_id = this.frame_id;
to.pixels_per_line = this.pixels_per_line;
to.lines_per_frame = this.lines_per_frame;
to.bits_per_pixel =this.bits_per_pixel ;
this.frame_id = from.frame_id;
this.pixels_per_line = from.pixels_per_line;
this.lines_per_frame = from.lines_per_frame;
this.bits_per_pixel = from.bits_per_pixel;
this.name = from.name;
this.lines = new[lines_per_frame];
 
to.lines = new[lines_per_frame];
 
foreach( this.lines[l] )
begin
this.lines[l].pixel = new[pixels_per_line];
 
to.lines[l].pixel = new[pixels_per_line];
 
foreach( this.lines[l].pixel[p] )
to.lines[l].pixel[p] = this.lines[l].pixel[p];
 
this.lines[l].pixel[p] = from.lines[l].pixel[p];
end
endfunction: copy
 
223,6 → 318,18
 
// --------------------------------------------------------------------
//
function video_frame_class video_frame_class::clone();
 
$display("^^^ %16.t | %m", $time);
 
clone = new();
clone.copy(this);
 
endfunction: clone
 
 
// --------------------------------------------------------------------
//
function int video_frame_class::compare
(
input int max_mismatches,
230,24 → 337,24
);
 
int mismatch_count = 0;
 
$display("^^^ %16.t | %m", $time);
 
if( to.pixels_per_line != this.pixels_per_line )
begin
$display( "^^^ %16.t | to.pixels_per_line != this.pixels_per_line", $time );
$display( "^^^ %16.t | ERROR! to.pixels_per_line != this.pixels_per_line | %s", $time, name );
return( -1 );
end
 
if( to.lines_per_frame != this.lines_per_frame )
begin
$display( "^^^ %16.t | to.lines_per_frame != this.lines_per_frame", $time );
$display( "^^^ %16.t | ERROR! to.lines_per_frame != this.lines_per_frame | %s", $time, name );
return( -2 );
end
 
if( to.bits_per_pixel != this.bits_per_pixel )
begin
$display( "^^^ %16.t | to.bits_per_pixel != this.bits_per_pixel", $time );
$display( "^^^ %16.t | ERROR! to.bits_per_pixel != this.bits_per_pixel | %s", $time, name );
return( -3 );
end
 
260,7 → 367,7
if( max_mismatches > 0 )
mismatch_count++;
 
$display( "^^^ %16.t | mismatch @ frame[%4h][%4h] | to == %4h | this == %4h ", $time, l, p, to.lines[l].pixel[p], this.lines[l].pixel[p] );
$display( "^^^ %16.t | ERROR! mismatch @ frame[%4h][%4h] | to == %4h | this == %4h | %s", $time, l, p, to.lines[l].pixel[p], this.lines[l].pixel[p], name );
 
if( mismatch_count > max_mismatches )
return( mismatch_count );
283,12 → 390,25
);
 
$display("^^^ %16.t | %m", $time);
 
for( int i = 0; i < count; i++ )
$display( "^^^ %16.t | %4h @ frame[%4h][%4h]", $time, this.lines[line].pixel[(pixel + i)], line, (pixel + i) );
$display( "^^^ %16.t | %4h @ frame[%4h][%4h] | %s", $time, this.lines[line].pixel[(pixel + i)], line, (pixel + i), name );
 
endfunction: print_line
 
 
// --------------------------------------------------------------------
//
function void video_frame_class::print_config();
 
$display("^^^ %16.t | %m | frame_id = %06d | %s", $time, frame_id, name);
$display("^^^ %16.t | %m | pixels_per_line = %06d | %s", $time, pixels_per_line, name);
$display("^^^ %16.t | %m | lines_per_frame = %06d | %s", $time, lines_per_frame, name);
$display("^^^ %16.t | %m | bits_per_pixel = %06d | %s", $time, bits_per_pixel, name);
$display("^^^ %16.t | %m | pattern = %s | %s", $time, pattern, name);
 
endfunction: print_config
 
 
endpackage: video_frame_pkg
 
/trunk/cli/cli/sys_cmd.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include <stdio.h>
#include <stdlib.h>
/trunk/cli/cli/sys_cli.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include <stdio.h>
#include <stdlib.h>
/trunk/cli/cli/sys_cmd.h
1,8 → 1,33
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
#ifndef _SYS_CMD_H_
#define _SYS_CMD_H_
#ifndef _QAZ_SYS_CMD_H_
#define _QAZ_SYS_CMD_H_
 
#define INPUT_LINE_LENGTH 50
#define MAX_CMD_LENGTH 20
31,9 → 56,11
extern void sys_cli_task(void);
extern cli_cmd_tab_t *cli_find_command( cli_cmd_tab_t *cmd_to_check );
extern void cli_init( void );
extern char func_mw( const unsigned char argc, const char *argv[] );
extern char func_md( const unsigned char argc, const char *argv[] );
 
 
/*-----------------------------------------------------------*/
 
 
#endif // _SYS_CMD_H_
#endif // _QAZ_SYS_CMD_H_
/trunk/cli/cli/sys_error.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
void sys_error_fatal( unsigned int error )
{
/trunk/cli/cli/sys_error.h
1,7 → 1,32
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#ifndef _SYS_ERROR_H_
#define _SYS_ERROR_H_
#ifndef _QAZ_SYS_ERROR_H_
#define _QAZ_SYS_ERROR_H_
 
typedef enum
{
13,5 → 38,5
/*-----------------------------------------------------------*/
void sys_error_fatal( unsigned int error );
 
#endif // _SYS_ERROR_H_
#endif // _QAZ_SYS_ERROR_H_
 
/trunk/cli/cli/sys_cmd_table.h
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include "sys_cmd.h"
 
/trunk/cli/util/uboot_lib.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include "uboot_lib.h"
 
/trunk/cli/util/util_bits.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include "util_bits.h"
 
/trunk/cli/util/util_mem.h
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#ifndef _UTIL_MEM_H_
#define _UTIL_MEM_H_
/trunk/cli/util/uboot_lib.h
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#ifndef _UBOOT_LIB_H_
#define _UBOOT_LIB_H_
/trunk/cli/util/util_bits.h
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#ifndef _UTIL_BITS_H_
#define _UTIL_BITS_H_
/trunk/cli/util/util_mem.c
1,4 → 1,29
/*-----------------------------------------------------------*/
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
#include "util_mem.h"
 
/trunk/axis_video_frame_bfm_class/src/axis_video_frame_bfm_pkg.sv
0,0 → 1,459
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 axis_video_frame_bfm_pkg;
 
typedef enum
{
RIGHT_DOWN,
RIGHT_UP,
LEFT_DOWN,
LEFT_UP
} avf_direction_t;
 
// --------------------------------------------------------------------
//
import video_frame_pkg::*;
 
class axis_video_frame_bfm_class #(BYTES_PER_PIXEL = 2, AVF_OUTPUTS = 1);
 
localparam AVF_N = BYTES_PER_PIXEL * AVF_OUTPUTS; // data bus width in bytes
localparam AVF_U = 1; // TUSER width
localparam AVF_B = BYTES_PER_PIXEL * 8; // bits per pixel on TDATA
 
int avf_width = 16;
int avf_height = 16;
int avf_vertical_blanking = 0;
string avf_name = "";
string avf_type = "";
 
video_frame_class f_h;
 
virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_if;
 
 
//--------------------------------------------------------------------
function new
(
virtual axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis_if
);
 
f_h = new();
this.avf_axis_if = avf_axis_if;
 
endfunction: new
 
 
// --------------------------------------------------------------------
//
function void init
(
input int avf_width,
input int avf_height,
input int avf_bits_per_pixel,
input string avf_name,
input string avf_type
);
 
f_h.init
(
.pixels_per_line(avf_width),
.lines_per_frame(avf_height),
.bits_per_pixel(avf_bits_per_pixel),
.name(avf_name)
);
 
this.avf_width = avf_width;
this.avf_height = avf_height;
this.avf_name = avf_name;
this.avf_type = avf_type.toupper();
 
if(avf_type == "RX")
begin
avf_axis_if.cb_s.tready <= 1;
end
else if(avf_type == "TX")
begin
avf_axis_if.cb_m.tvalid <= 0;
avf_axis_if.cb_m.tdata <= 0;
avf_axis_if.cb_m.tlast <= 0;
avf_axis_if.cb_m.tuser <= 0;
end
else
begin
$display("^^^ %16.t | %m | ERROR! avf_type %s is invalid", $time, avf_type);
end
 
$display("^^^ %16.t | %m | initialization of %s for %s", $time, avf_name, avf_type);
 
endfunction: init
 
 
// --------------------------------------------------------------------
//
task automatic
set_tready
(
input tready
);
 
avf_axis_if.cb_s.tready <= tready;
 
endtask: set_tready
 
 
// --------------------------------------------------------------------
//
task automatic
avf_direction
(
input avf_direction_t direction,
output frame_coordinate_t inc
);
 
case(direction)
RIGHT_DOWN: inc = '{ 1, 1};
RIGHT_UP: inc = '{ 1, -1};
LEFT_DOWN: inc = '{-1, 1};
LEFT_UP: inc = '{-1, -1};
default: $display("^^^ %16.t | %m | ERROR!!! Incorrect AVF direction.", $time );
endcase
 
endtask: avf_direction
 
 
// --------------------------------------------------------------------
//
task automatic
avf_calculate
(
input avf_direction_t direction,
output frame_coordinate_t start,
output frame_coordinate_t inc,
output int x_end,
output int y_end,
output int x_eol
);
 
case(direction)
RIGHT_DOWN: start = '{0, 0 };
RIGHT_UP: start = '{0, avf_height - 1 };
LEFT_DOWN: start = '{avf_width - 1, 0 };
LEFT_UP: start = '{avf_width - 1, avf_height - 1 };
default: $display("^^^ %16.t | %m | [%04d, %04d] | ERROR!!! Incorrect AVF direction.", $time, start.x, start.y );
endcase
 
avf_direction(direction, inc);
 
x_end = (start.x + (avf_width * inc.x));
y_end = (start.y + (avf_height * inc.y));
 
inc.x *= AVF_OUTPUTS; // increment stride by number of outputs
x_eol = x_end - inc.x;
 
endtask: avf_calculate
 
 
// --------------------------------------------------------------------
//
task automatic
avf_rx
(
input avf_direction_t direction
);
frame_coordinate_t start;
frame_coordinate_t inc;
int x_end;
int y_end;
int x_eol;
int pixel_count = 0;
int l;
int p;
 
avf_calculate
(
.start(start),
.direction(direction),
.inc(inc),
.x_end(x_end),
.y_end(y_end),
.x_eol(x_eol)
);
 
wait(avf_axis_if.cb_s.tuser & avf_axis_if.cb_s.tvalid);
 
for(l = start.y; y_end != l; l = l + inc.y)
for(p = start.x; x_end != p; p = p + inc.x)
begin
 
wait(avf_axis_if.cb_s.tvalid);
 
for(int i = 0; i < AVF_OUTPUTS; i++)
f_h.lines[l].pixel[p + i] = avf_axis_if.cb_s.tdata[i*AVF_B +: AVF_B];
 
if(p == x_eol)
if(~avf_axis_if.cb_s.tlast)
$display("^^^ %16.t | %m | [%04d, %04d] | %s_%s | ERROR! x_eol without tlast | x_eol = %04d | 0x%06x", $time, p, l, avf_name, avf_type, x_eol, f_h.lines[l].pixel[p]);
 
if(avf_axis_if.cb_s.tlast)
if(p != x_eol)
$display("^^^ %16.t | %m | [%04d, %04d] | %s_%s | ERROR! tlast without x_eol | x_eol = %04d | 0x%06x", $time, p, l, avf_name, avf_type, x_eol, f_h.lines[l].pixel[p]);
 
@(avf_axis_if.cb_s);
 
end
 
endtask: avf_rx
 
 
// --------------------------------------------------------------------
//
task automatic
avf_fork_rx
(
input avf_direction_t direction
);
 
fork
avf_rx(direction);
join_none
 
#0;
 
endtask: avf_fork_rx
 
 
// --------------------------------------------------------------------
//
task automatic
output_pixels
(
input int l,
input int p
);
 
for(int i = 0; i < AVF_OUTPUTS; i++)
avf_axis_if.cb_m.tdata[i*AVF_B +: AVF_B] <= f_h.lines[l].pixel[p + i];
 
endtask: output_pixels
 
 
// --------------------------------------------------------------------
//
task automatic
avf_tx
(
input avf_direction_t direction,
input int unsigned avf_delay
);
frame_coordinate_t start;
frame_coordinate_t inc;
int x_end;
int y_end;
int x_eol;
int pixel_count = 0;
int l;
int p;
 
avf_calculate
(
.start(start),
.direction(direction),
.inc(inc),
.x_end(x_end),
.y_end(y_end),
.x_eol(x_eol)
);
 
@(avf_axis_if.cb_m);
 
repeat(avf_delay) @(avf_axis_if.cb_m);
 
avf_axis_if.cb_m.tvalid <= 1; // assert first pixel
avf_axis_if.cb_m.tuser <= 1;
 
output_pixels(start.y, start.x);
 
for(l = start.y; y_end != l; l = l + inc.y)
for(p = start.x; x_end != p; p = p + inc.x)
begin
 
if((l == start.y) & (p == start.x)) // first pixel already asserted
continue;
 
@(avf_axis_if.cb_m iff avf_axis_if.cb_m.tready)
begin
avf_axis_if.cb_m.tvalid <= 1;
output_pixels(l, p);
 
avf_axis_if.cb_m.tuser <= 0;
 
if(p == x_eol)
avf_axis_if.cb_m.tlast <= 1;
else
avf_axis_if.cb_m.tlast <= 0;
 
end
end
 
@(avf_axis_if.cb_m)
begin
avf_axis_if.cb_m.tlast <= 0;
avf_axis_if.cb_m.tvalid <= 0;
end
 
endtask: avf_tx
 
 
// --------------------------------------------------------------------
//
task
avf_fork_tx
(
input avf_direction_t direction,
input int unsigned avf_delay
);
 
fork
avf_tx(direction, avf_delay);
join_none
 
#0;
 
endtask: avf_fork_tx
 
 
// --------------------------------------------------------------------
//
mailbox #(video_frame_class) avf_q;
semaphore avf_q_semaphore = new(1);
 
 
// --------------------------------------------------------------------
//
event tx_frame_done;
 
task automatic
run_tx_q
(
input avf_direction_t direction,
input int unsigned avf_delay
);
 
if(avf_type != "TX")
begin
$display("^^^ %16.t | %m | ERROR! avf_type != TX |", $time);
return;
end
 
if(avf_q_semaphore.try_get() == 0)
begin
$display("^^^ %16.t | %m | ERROR! avf_q_semaphore.try_get() == 0 |", $time);
return;
end
 
$display("^^^ %16.t | %m is active |", $time);
 
this.avf_q = new();
 
run_tx_q_fork : fork
forever
begin
 
avf_q.get(f_h);
avf_fork_tx(direction, avf_delay);
 
wait fork;
 
->tx_frame_done;
repeat(avf_vertical_blanking) @(avf_axis_if.cb_m);
end
join_none
 
#0;
 
endtask: run_tx_q
 
 
// --------------------------------------------------------------------
//
video_frame_class avf_in_frame;
event rx_frame_done;
int compare_result;
int compare_errors = 0;
 
task automatic
run_rx_q
(
input avf_direction_t direction
);
 
if(avf_type != "RX")
begin
$display("^^^ %16.t | %m | ERROR! avf_type != RX |", $time);
return;
end
 
if(avf_q_semaphore.try_get() == 0)
begin
$display("^^^ %16.t | %m | ERROR! avf_q_semaphore.try_get() == 0 |", $time);
return;
end
 
$display("^^^ %16.t | %m is active |", $time);
 
this.avf_q = new();
avf_in_frame = f_h.clone();
 
run_rx_q_fork : fork
forever
begin
 
avf_q.get(avf_in_frame);
avf_fork_rx(direction);
 
wait fork;
 
compare_result = avf_in_frame.compare(8, f_h);
compare_errors += compare_result;
->rx_frame_done;
end
join_none
 
#0;
 
endtask: run_rx_q
 
 
// --------------------------------------------------------------------
//
 
endclass: axis_video_frame_bfm_class
 
endpackage: axis_video_frame_bfm_pkg
 
/trunk/axis_video_frame_bfm_class/src/avf_agent.sv
0,0 → 1,105
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
import axis_video_frame_bfm_pkg::*;
 
module
avf_agent
#(
BYTES_PER_PIXEL = 2,
AVF_OUTPUTS = 4,
AVF_TILES = 1,
AVF_WIDTH = 32,
AVF_HEIGHT = 16,
AVF_BITS_PER_PIXEL = 16
)
(
axis_if axis_out[AVF_TILES],
axis_if axis_in[AVF_TILES]
);
 
// --------------------------------------------------------------------
//
axis_video_frame_bfm_class #(BYTES_PER_PIXEL, AVF_OUTPUTS) f_tx_h[AVF_TILES];
 
for(genvar j = 0; j < AVF_TILES; j++)
initial
begin
f_tx_h[j] = new(axis_out[j]);
 
f_tx_h[j].init
(
.avf_width(AVF_WIDTH),
.avf_height(AVF_HEIGHT),
.avf_bits_per_pixel(AVF_BITS_PER_PIXEL),
.avf_name($psprintf("AVF_%0d", j)),
.avf_type("TX")
);
end
 
 
// --------------------------------------------------------------------
//
axis_video_frame_bfm_class #(BYTES_PER_PIXEL, AVF_OUTPUTS) f_rx_h[AVF_TILES];
 
for(genvar j = 0; j < AVF_TILES; j++)
initial
begin
f_rx_h[j] = new(axis_in[j]);
 
f_rx_h[j].init
(
.avf_width(AVF_WIDTH),
.avf_height(AVF_HEIGHT),
.avf_bits_per_pixel(AVF_BITS_PER_PIXEL),
.avf_name($psprintf("AVF_%0d", j)),
.avf_type("RX")
);
end
 
 
// --------------------------------------------------------------------
//
avf_tx #(BYTES_PER_PIXEL, AVF_OUTPUTS, AVF_TILES)
avf_tx_bfm(.*);
 
 
// --------------------------------------------------------------------
//
avf_rx #(BYTES_PER_PIXEL, AVF_OUTPUTS, AVF_TILES)
avf_rx_bfm(.*);
 
 
// --------------------------------------------------------------------
//
 
endmodule
 
 
 
 
/trunk/axis_video_frame_bfm_class/src/avf_rx.sv
0,0 → 1,134
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
import axis_video_frame_bfm_pkg::*;
 
module
avf_rx
#(
BYTES_PER_PIXEL = 2,
AVF_OUTPUTS = 4,
AVF_TILES = 1
)
(
ref axis_video_frame_bfm_class f_tx_h[AVF_TILES],
ref axis_video_frame_bfm_class f_rx_h[AVF_TILES]
);
 
// --------------------------------------------------------------------
//
localparam AVF_VERTICAL_BLANKING = 20;
 
task automatic
init_avf_rx;
 
f_rx_h[0].run_rx_q(RIGHT_DOWN);
f_rx_h[1].run_rx_q(RIGHT_UP);
f_rx_h[2].run_rx_q(LEFT_DOWN);
f_rx_h[3].run_rx_q(LEFT_UP);
 
endtask: init_avf_rx
 
 
// --------------------------------------------------------------------
//
task
wait_for_rx_frames
(
input int unsigned count
);
 
repeat(count)
@(f_rx_h[0].rx_frame_done);
 
endtask: wait_for_rx_frames
 
 
// --------------------------------------------------------------------
//
semaphore get_frame_semaphore = new(1);
logic get_frame_active = 0;
 
task automatic
get_frame;
 
if(get_frame_semaphore.try_get() == 0)
begin
$display("^^^ %16.t | %m | ERROR! Already getting a frame.", $time);
return;
end
 
$display("^^^ %16.t | %m | getting a frame.", $time);
get_frame_active = 1;
 
fork
begin
 
f_rx_h[0].avf_fork_rx(RIGHT_DOWN);
f_rx_h[1].avf_fork_rx(RIGHT_UP);
f_rx_h[2].avf_fork_rx(LEFT_DOWN);
f_rx_h[3].avf_fork_rx(LEFT_UP);
 
wait fork;
get_frame_active = 0;
$display("^^^ %16.t | %m | Got a frame.", $time);
get_frame_semaphore.put();
 
end
join_none
 
 
endtask: get_frame
 
 
// --------------------------------------------------------------------
//
import video_frame_pkg::*;
 
function automatic
int compare_frame;
 
int mismatch_count[AVF_TILES];
 
$display("^^^ %16.t | %m", $time);
 
foreach(f_rx_h[i])
mismatch_count[i] = f_rx_h[i].f_h.compare(8, f_tx_h[i].f_h);
 
 
endfunction: compare_frame
 
 
// --------------------------------------------------------------------
//
 
 
endmodule
 
 
 
 
/trunk/axis_video_frame_bfm_class/src/avf_tx.sv
0,0 → 1,171
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
import axis_video_frame_bfm_pkg::*;
 
module
avf_tx
#(
BYTES_PER_PIXEL = 2,
AVF_OUTPUTS = 4,
AVF_TILES = 1
)
(
ref axis_video_frame_bfm_class f_tx_h[AVF_TILES],
ref axis_video_frame_bfm_class f_rx_h[AVF_TILES]
);
 
// --------------------------------------------------------------------
//
localparam AVF_VERTICAL_BLANKING = 20;
 
task automatic
init_avf_tx;
 
foreach(f_tx_h[i])
f_tx_h[i].avf_vertical_blanking = AVF_VERTICAL_BLANKING;
 
f_tx_h[0].run_tx_q(RIGHT_DOWN, 0);
f_tx_h[1].run_tx_q(RIGHT_UP, 0);
f_tx_h[2].run_tx_q(LEFT_DOWN, 0);
f_tx_h[3].run_tx_q(LEFT_UP, 0);
 
endtask: init_avf_tx
 
 
// --------------------------------------------------------------------
//
import video_frame_pkg::*;
 
video_frame_class clone_h;
 
 
// --------------------------------------------------------------------
//
task automatic
make_frame
(
string pattern,
int pixel = 0
);
 
case(pattern.tolower)
"constant": foreach(f_tx_h[i]) f_tx_h[i].f_h.make_constant(pixel);
"counting": foreach(f_tx_h[i]) f_tx_h[i].f_h.make_counting();
"horizontal": foreach(f_tx_h[i]) f_tx_h[i].f_h.make_horizontal();
"vertical": foreach(f_tx_h[i]) f_tx_h[i].f_h.make_vertical();
"random": foreach(f_tx_h[i]) f_tx_h[i].f_h.make_random();
default: $display("^^^ %16.t | %m | ERROR! %s pattern not supported", $time, pattern);
endcase
 
endtask: make_frame
 
 
// --------------------------------------------------------------------
//
 
task automatic
queue_frame
(
string pattern = ""
);
 
if(pattern != "")
make_frame(pattern);
 
foreach(f_tx_h[i])
begin
clone_h = f_tx_h[i].f_h.clone();
f_tx_h[i].avf_q.put(clone_h);
f_rx_h[i].avf_q.put(clone_h);
end
 
$display("^^^ %16.t | %m | using %s pattern", $time, pattern);
 
endtask: queue_frame
 
 
// --------------------------------------------------------------------
//
task
wait_for_tx_frames
(
input int unsigned count
);
 
repeat(count)
@(f_tx_h[0].tx_frame_done);
 
endtask: wait_for_tx_frames
 
 
// --------------------------------------------------------------------
//
logic put_frame_active = 0;
semaphore put_frame_semaphore = new(1);
 
task automatic
put_frame;
 
if(put_frame_semaphore.try_get() == 0)
begin
$display("^^^ %16.t | %m | ERROR! Already put a frame.", $time);
return;
end
 
$display("^^^ %16.t | %m | Putting a frame.", $time);
put_frame_active = 1;
 
fork
begin
 
f_tx_h[0].avf_fork_tx(RIGHT_DOWN, 0);
f_tx_h[1].avf_fork_tx(RIGHT_UP, 0);
f_tx_h[2].avf_fork_tx(LEFT_DOWN, 0);
f_tx_h[3].avf_fork_tx(LEFT_UP, 0);
 
wait fork;
put_frame_active = 0;
$display("^^^ %16.t | %m | Put a frame.", $time);
put_frame_semaphore.put();
 
end
join_none
 
endtask: put_frame
 
 
// --------------------------------------------------------------------
//
 
 
endmodule
 
 
 
 
/trunk/axis_video_frame_bfm_class/sim/tests/tb_4_tile_1_outputs/wip.do
0,0 → 1,12
#
 
 
vlog -f ../../libs/sim_verilog/avf.f
 
# simulation $root
vlog ../../src/tb_4_tile_1_outputs.sv
 
# compile test last
vlog ./the_test.sv
 
/trunk/axis_video_frame_bfm_class/sim/tests/tb_4_tile_1_outputs/wave.do
0,0 → 1,52
onerror {resume}
quietly WaveActivateNextPane {} 0
add wave -noupdate -divider {New Divider}
add wave -noupdate -divider {New Divider}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/aclk}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/aresetn}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/tvalid}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/tready}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/tdata}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/tlast}
add wave -noupdate -expand -group {avf_axis[0]} {/tb_top/avf_axis[0]/tuser}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/aclk}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/aresetn}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/tvalid}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/tready}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/tdata}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/tlast}
add wave -noupdate -expand -group {avf_axis[1]} {/tb_top/avf_axis[1]/tuser}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/aclk}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/aresetn}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/tvalid}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/tready}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/tdata}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/tlast}
add wave -noupdate -expand -group {avf_axis[2]} {/tb_top/avf_axis[2]/tuser}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/aclk}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/aresetn}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/tvalid}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/tready}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/tdata}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/tlast}
add wave -noupdate -expand -group {avf_axis[3]} {/tb_top/avf_axis[3]/tuser}
add wave -noupdate -divider {New Divider}
add wave -noupdate -divider {New Divider}
TreeUpdate [SetDefaultTree]
WaveRestoreCursors {{Cursor 1} {542500 ps} 0}
quietly wave cursor active 1
configure wave -namecolwidth 164
configure wave -valuecolwidth 100
configure wave -justifyvalue left
configure wave -signalnamewidth 0
configure wave -snapdistance 10
configure wave -datasetprefix 0
configure wave -rowmargin 4
configure wave -childrowmargin 2
configure wave -gridoffset 0
configure wave -gridperiod 1
configure wave -griddelta 40
configure wave -timeline 0
configure wave -timelineunits ps
update
WaveRestoreZoom {0 ps} {12576375 ps}
/trunk/axis_video_frame_bfm_class/sim/tests/tb_4_tile_1_outputs/init_test.do
0,0 → 1,33
# ------------------------------------
#
# ------------------------------------
 
global env
 
set env(ROOT_DIR) ../../../../..
set env(PROJECT_DIR) ../../..
set env(SIM_TARGET) fpga
 
# load sim procedures
do $env(ROOT_DIR)/qaz_libs/scripts/sim_procs.do
 
radix -hexadecimal
 
make_lib work 1
 
# sim_compile_all FPGA
sim_compile_all sim
 
# simulation $root
vlog $env(PROJECT_DIR)/sim/src/tb_4_tile_1_outputs.sv
 
# compile test last
vlog ./the_test.sv
 
# vopt work.glbl tb_top -L secureip -L simprims_ver -L unisims_ver -f opt_tb_top.f -o opt_tb_top
 
# run the sim
sim_run_test
 
 
 
/trunk/axis_video_frame_bfm_class/sim/tests/tb_4_tile_1_outputs/the_test.sv
0,0 → 1,108
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
`timescale 1ps/1ps
 
 
module
the_test(
input tb_clk,
input tb_rst
);
 
// --------------------------------------------------------------------
//
int mismatch_count = 0;
 
 
// --------------------------------------------------------------------
//
task run_the_test;
 
// --------------------------------------------------------------------
// insert test below
// --------------------------------------------------------------------
$display("^^^---------------------------------");
$display("^^^ %16.t | Testbench begun.\n", $time);
$display("^^^---------------------------------");
// --------------------------------------------------------------------
 
tb_top.tb.timeout_stop(20us);
 
inject_error : fork
begin
#(11us) tb_top.avf_agent_i.avf_rx_bfm.f_rx_h[0].f_h.write_pixel('{1,1}, 0);
end
join_none
 
 
// --------------------------------------------------------------------
wait(~tb_rst);
 
tb_top.avf_agent_i.avf_tx_bfm.init_avf_tx();
tb_top.avf_agent_i.avf_rx_bfm.init_avf_rx();
 
 
// --------------------------------------------------------------------
repeat(100) @(posedge tb_clk);
tb_top.avf_agent_i.avf_tx_bfm.make_frame("counting");
tb_top.avf_agent_i.avf_rx_bfm.get_frame();
tb_top.avf_agent_i.avf_tx_bfm.put_frame();
 
wait(~tb_top.avf_agent_i.avf_tx_bfm.put_frame_active);
wait(~tb_top.avf_agent_i.avf_rx_bfm.get_frame_active);
 
mismatch_count = tb_top.avf_agent_i.avf_rx_bfm.compare_frame();
 
tb_top.avf_agent_i.avf_rx_bfm.f_rx_h[0].f_h.write_pixel('{1,1}, 0);
 
mismatch_count = tb_top.avf_agent_i.avf_rx_bfm.compare_frame();
 
 
// --------------------------------------------------------------------
repeat(100) @(posedge tb_clk);
 
tb_top.avf_agent_i.avf_tx_bfm.make_frame("constant", 16'habba);
tb_top.avf_agent_i.avf_tx_bfm.queue_frame();
 
tb_top.avf_agent_i.avf_tx_bfm.queue_frame("random");
tb_top.avf_agent_i.avf_tx_bfm.queue_frame("counting");
 
tb_top.avf_agent_i.avf_tx_bfm.wait_for_tx_frames(3);
 
repeat(100) @(posedge tb_clk);
 
 
// --------------------------------------------------------------------
// insert test above
// --------------------------------------------------------------------
 
endtask
 
 
endmodule
 
/trunk/axis_video_frame_bfm_class/sim/tests/tb_4_tile_1_outputs/sim.do
0,0 → 1,21
#
#
 
 
quit -sim
 
# vsim opt_tb_top
 
vsim -novopt work.tb_top
# vsim -novopt -L secureip -L simprims_ver -L unisims_ver work.glbl work.tb_top
 
# vsim -voptargs="+acc=rn+/tb_top/dut" -L secureip -L simprims_ver -L unisims_ver work.glbl work.tb_top
# vsim -pli "C:/Xilinx/Vivado/2015.4/lib/win64.o/libxil_vsim.dll" -novopt -L secureip -L simprims_ver -L unisims_ver work.glbl work.tb_top
 
 
# # log all signals
# log -r *
 
# run -all
 
 
/trunk/axis_video_frame_bfm_class/sim/src/tb_4_tile_1_outputs.sv
0,0 → 1,119
//////////////////////////////////////////////////////////////////////
//// ////
//// 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 ////
//// ////
//////////////////////////////////////////////////////////////////////
 
 
module tb_top();
 
// --------------------------------------------------------------------
// test bench clock & reset
wire clk_200mhz;
wire tb_clk = clk_200mhz;
wire tb_rst;
wire aclk = tb_clk;
wire aresetn = ~tb_rst;
 
tb_base #( .PERIOD(5_000) ) tb( clk_200mhz, tb_rst );
 
 
// --------------------------------------------------------------------
//
import axis_video_frame_bfm_pkg::*;
 
localparam BYTES_PER_PIXEL = 2;
localparam AVF_OUTPUTS = 1; // outputs per tile
localparam AVF_TILES = 4;
localparam AVF_N = BYTES_PER_PIXEL * AVF_OUTPUTS; // data bus width in bytes
localparam AVF_U = 1; // TUSER width
localparam AVF_WIDTH = 32; // tile width
localparam AVF_HEIGHT = 16; // tile height
localparam AVF_BITS_PER_PIXEL = 16;
 
 
// --------------------------------------------------------------------
//
axis_if #(.N(AVF_N), .U(AVF_U)) avf_axis[AVF_TILES](.*);
 
for(genvar j = 0; j < AVF_TILES; j++)
assign avf_axis[j].tready = 1;
 
 
// --------------------------------------------------------------------
//
avf_agent #(BYTES_PER_PIXEL, AVF_OUTPUTS, AVF_TILES, AVF_WIDTH, AVF_HEIGHT, AVF_BITS_PER_PIXEL)
avf_agent_i
(
.axis_out(avf_axis),
.axis_in(avf_axis)
);
 
 
// --------------------------------------------------------------------
// sim models
// | | | | | | | | | | | | | | | | |
// \|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
// ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
 
// --------------------------------------------------------------------
//
 
 
// ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
// /|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\
// | | | | | | | | | | | | | | | | |
// sim models
// --------------------------------------------------------------------
 
 
// --------------------------------------------------------------------
// debug wires
for(genvar j = 0; j < AVF_TILES; j++)
axis_video_debug #(BYTES_PER_PIXEL, AVF_OUTPUTS) avf_debug(avf_axis[j]);
 
 
// --------------------------------------------------------------------
// test
the_test test( tb_clk, tb_rst );
 
initial
begin
 
test.run_the_test();
 
$display("^^^---------------------------------");
$display("^^^ %16.t | Testbench done.", $time);
$display("^^^---------------------------------");
 
$display("^^^---------------------------------");
 
$stop();
 
end
 
endmodule
 
 
 
/trunk/axis_video_frame_bfm_class/sim/libs/sim_verilog/tb_lib.f
0,0 → 1,16
#
 
-mfcu
 
${ROOT_DIR}/qaz_libs/tb_class/src/tb_clk_class.sv
 
${ROOT_DIR}/qaz_libs/tb_class/src/tb_clk.sv
${ROOT_DIR}/qaz_libs/tb_class/src/tb_base.sv
 
 
 
 
 
 
 
 
/trunk/axis_video_frame_bfm_class/sim/libs/sim_verilog/avf.f
0,0 → 1,11
#
 
-mfcu
 
${ROOT_DIR}/qaz_libs/video_frame_class/src/video_frame_pkg.sv
${ROOT_DIR}/qaz_libs/axis_video_frame_bfm_class/src/axis_video_frame_bfm_pkg.sv
 
${ROOT_DIR}/qaz_libs/axis_video_frame_bfm_class/src/avf_agent.sv
${ROOT_DIR}/qaz_libs/axis_video_frame_bfm_class/src/avf_tx.sv
${ROOT_DIR}/qaz_libs/axis_video_frame_bfm_class/src/avf_rx.sv
 
/trunk/axis_video_frame_bfm_class/sim/libs/sim_verilog/axis.f
0,0 → 1,8
#
 
-mfcu
 
${ROOT_DIR}/qaz_libs/axi4_stream_lib/src/axis_if.sv
${ROOT_DIR}/qaz_libs/axi4_stream_lib/src/axis_video_debug.sv
${ROOT_DIR}/qaz_libs/axi4_stream_lib/src/data_to_axis_fsm.sv
 
trunk Property changes : Added: svn:global-ignores ## -0,0 +1 ## +__tmp

powered by: WebSVN 2.1.0

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