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

Subversion Repositories ha1588

[/] [ha1588/] [trunk/] [sim/] [tsu/] [tsu_queue_tb.v] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 ash_riple
`timescale 1ns/1ns
2
 
3
module tsu_queue_tb;
4
 
5 5 ash_riple
reg         rst;
6
wire        gmii_rxclk;
7
wire        gmii_rxctrl;
8
wire [ 7:0] gmii_rxdata;
9
wire        gmii_txclk;
10
wire        gmii_txctrl;
11
wire [ 7:0] gmii_txdata;
12
reg         rtc_timer_clk;
13
reg  [79:0] rtc_timer_in;
14
reg         q_rd_clk;
15
reg         q_rd_en;
16
wire [ 7:0] q_rd_stat;
17
wire [91:0] q_rd_data;
18 4 ash_riple
 
19
initial begin
20
  DUT_RX.ts_ack = 1'b0;
21
 
22
      rst = 1'b0;
23
  #10 rst = 1'b1;
24
  #20 rst = 1'b0;
25
end
26
 
27
initial begin
28 5 ash_riple
             q_rd_clk = 1'b0;
29
  forever #5 q_rd_clk = !q_rd_clk;
30
end
31
 
32
initial begin
33 4 ash_riple
             rtc_timer_clk = 1'b0;
34
  forever #4 rtc_timer_clk = !rtc_timer_clk;
35
end
36
 
37
initial begin
38
                                   rtc_timer_in = 80'd0;
39
  forever @(posedge rtc_timer_clk) rtc_timer_in = rtc_timer_in +1;
40
end
41
 
42
tsu_queue DUT_RX
43
  (
44
    .rst(rst),
45
 
46
    .gmii_clk(gmii_rxclk),
47
    .gmii_ctrl(gmii_rxctrl),
48
    .gmii_data(gmii_rxdata),
49
 
50
    .rtc_timer_clk(rtc_timer_clk),
51 5 ash_riple
    .rtc_timer_in(rtc_timer_in),
52
 
53
    .q_rst(rst),
54
    .q_rd_clk(q_rd_clk),
55
    .q_rd_en(q_rd_en),
56
    .q_rd_stat(q_rd_stat),
57
    .q_rd_data(q_rd_data)
58 4 ash_riple
  );
59
 
60
gmii_rx_bfm BFM_RX
61
  (
62
    .gmii_rxclk(gmii_rxclk),
63
    .gmii_rxctrl(gmii_rxctrl),
64
    .gmii_rxdata(gmii_rxdata)
65
  );
66
 
67
tsu_queue DUT_TX
68
  (
69
    .rst(rst),
70
 
71
    .gmii_clk(gmii_txclk),
72
    .gmii_ctrl(gmii_txctrl),
73
    .gmii_data(gmii_txdata),
74
 
75
    .rtc_timer_clk(rtc_timer_clk),
76 5 ash_riple
    .rtc_timer_in(rtc_timer_in),
77
 
78
    .q_rst(rst),
79
    .q_rd_clk(q_rd_clk),
80
    .q_rd_en(),
81
    .q_rd_stat(),
82
    .q_rd_data()
83 4 ash_riple
  );
84
 
85
gmii_tx_bfm BFM_TX
86
  (
87
    .gmii_txclk(gmii_txclk),
88
    .gmii_txctrl(gmii_txctrl),
89
    .gmii_txdata(gmii_txdata)
90
  );
91
 
92
endmodule
93
 

powered by: WebSVN 2.1.0

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