OpenCores
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] - Blame information for rev 31

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 31 qaztronic
// --------------------------------------------------------------------
2
//
3
// --------------------------------------------------------------------
4
 
5
 
6
module tb_top();
7
 
8
  // --------------------------------------------------------------------
9
  // test bench clock & reset
10
  wire clk_200mhz;
11
  wire tb_clk   = clk_200mhz;
12
  wire tb_rst;
13
 
14
  tb_base #(.PERIOD(5_000)) tb(clk_200mhz, tb_rst);
15
 
16
 
17
  // --------------------------------------------------------------------
18
  //
19
  wire tb_rst_s;
20
  wire aclk     = tb_clk;
21
  wire aresetn  = ~tb_rst_s;
22
 
23
  sync_reset
24
    sync_reset_i(aclk, tb_rst, tb_rst_s);
25
 
26
 
27
  // --------------------------------------------------------------------
28
  //
29
  import tb_axi4_to_axis_basic_dma_pkg::*;
30
 
31
 
32
  // --------------------------------------------------------------------
33
  //
34
  axi4_if #(.A(A), .N(N), .I(I)) axi4_m(.*);
35
  axis_if #(.N(N), .I(I), .D(D), .U(U)) axis_out(.*);
36
 
37
 
38
  // --------------------------------------------------------------------
39
  //
40
  logic dma_enable = 0;
41
 
42
  axi4_to_axis_basic_dma
43
    #(
44
      .A(A),
45
      .N(N),
46
      .I(I),
47
      .BASE_ADDRESS(BASE_ADDRESS),
48
      .BUFFER_SIZE(BUFFER_SIZE),
49
      .BURST_LENGTH(BURST_LENGTH),
50
      .MAX_BURSTS(MAX_BURSTS),
51
      .BYTES_PER_TUSER(BYTES_PER_TUSER)
52
    )
53
    dut(.*);
54
 
55
 
56
  // --------------------------------------------------------------------
57
  // sim models
58
  //  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
59
  // \|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/-\|/
60
  //  '   '   '   '   '   '   '   '   '   '   '   '   '   '   '   '   '
61
 
62
  // --------------------------------------------------------------------
63
  //
64
  axi4_checker #(.A(A), .N(N), .MAXWAITS(64))
65
    axi4_checker_i(.axi4_in(axi4_m));
66
 
67
 
68
  // --------------------------------------------------------------------
69
  //
70
  axis_checker #(.N(N), .I(I), .D(D), .U(U))
71
    axis_checker_i(.axis_in(axis_out));
72
 
73
 
74
  // --------------------------------------------------------------------
75
  //
76
  tb_axi4_to_axis_basic_dma_class a_h;
77
 
78
  initial
79
    a_h = new(axi4_m, axis_out);
80
 
81
 
82
  // --------------------------------------------------------------------
83
  //
84
 
85
  //  '   '   '   '   '   '   '   '   '   '   '   '   '   '   '   '   '
86
  // /|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\-/|\
87
  //  |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |   |
88
  // sim models
89
  // --------------------------------------------------------------------
90
 
91
 
92
  // --------------------------------------------------------------------
93
  //  debug wires
94
 
95
 
96
  // --------------------------------------------------------------------
97
  // test
98
  the_test test(tb_clk, tb_rst);
99
 
100
  initial
101
    begin
102
 
103
      test.run_the_test();
104
 
105
      $display("^^^---------------------------------");
106
      $display("^^^ %16.t | Testbench done.", $time);
107
      $display("^^^---------------------------------");
108
 
109
      $display("^^^---------------------------------");
110
 
111
      $stop();
112
 
113
    end
114
 
115
endmodule

powered by: WebSVN 2.1.0

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