URL
https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk
Subversion Repositories qaz_libs
[/] [qaz_libs/] [trunk/] [axi4_lib/] [sim/] [tests/] [tb_axi4_to_axis_basic_dma/] [tb_axi4_to_axis_basic_dma.sv] - Rev 31
Compare with Previous | Blame | View Log
// --------------------------------------------------------------------
//
// --------------------------------------------------------------------
module tb_top();
// --------------------------------------------------------------------
// test bench clock & reset
wire clk_200mhz;
wire tb_clk = clk_200mhz;
wire tb_rst;
tb_base #(.PERIOD(5_000)) tb(clk_200mhz, tb_rst);
// --------------------------------------------------------------------
//
wire tb_rst_s;
wire aclk = tb_clk;
wire aresetn = ~tb_rst_s;
sync_reset
sync_reset_i(aclk, tb_rst, tb_rst_s);
// --------------------------------------------------------------------
//
import tb_axi4_to_axis_basic_dma_pkg::*;
// --------------------------------------------------------------------
//
axi4_if #(.A(A), .N(N), .I(I)) axi4_m(.*);
axis_if #(.N(N), .I(I), .D(D), .U(U)) axis_out(.*);
// --------------------------------------------------------------------
//
logic dma_enable = 0;
axi4_to_axis_basic_dma
#(
.A(A),
.N(N),
.I(I),
.BASE_ADDRESS(BASE_ADDRESS),
.BUFFER_SIZE(BUFFER_SIZE),
.BURST_LENGTH(BURST_LENGTH),
.MAX_BURSTS(MAX_BURSTS),
.BYTES_PER_TUSER(BYTES_PER_TUSER)
)
dut(.*);
// --------------------------------------------------------------------
// sim models
// | | | | | | | | | | | | | | | | |
// \|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
// ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
// --------------------------------------------------------------------
//
axi4_checker #(.A(A), .N(N), .MAXWAITS(64))
axi4_checker_i(.axi4_in(axi4_m));
// --------------------------------------------------------------------
//
axis_checker #(.N(N), .I(I), .D(D), .U(U))
axis_checker_i(.axis_in(axis_out));
// --------------------------------------------------------------------
//
tb_axi4_to_axis_basic_dma_class a_h;
initial
a_h = new(axi4_m, axis_out);
// --------------------------------------------------------------------
//
// ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' ' '
// /|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\
// | | | | | | | | | | | | | | | | |
// sim models
// --------------------------------------------------------------------
// --------------------------------------------------------------------
// debug wires
// --------------------------------------------------------------------
// 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