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

Subversion Repositories ha1588

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

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 9 edn_walter
wire [55:0] q_rd_data;
18 4 ash_riple
 
19
initial begin
20 8 edn_walter
  // emulate the hardware behavior when power-up
21 4 ash_riple
  DUT_RX.ts_ack = 1'b0;
22 13 edn_walter
  DUT_TX.ts_ack = 1'b0;
23 4 ash_riple
 
24
      rst = 1'b0;
25
  #10 rst = 1'b1;
26
  #20 rst = 1'b0;
27 13 edn_walter
 
28
  fork
29
    @(posedge BFM_RX.eof_rx);
30
    @(posedge BFM_TX.eof_tx);
31
  join
32
  #100 $stop;
33 4 ash_riple
end
34
 
35
initial begin
36 5 ash_riple
             q_rd_clk = 1'b0;
37
  forever #5 q_rd_clk = !q_rd_clk;
38
end
39
 
40
initial begin
41 4 ash_riple
             rtc_timer_clk = 1'b0;
42
  forever #4 rtc_timer_clk = !rtc_timer_clk;
43
end
44
 
45
initial begin
46
                                   rtc_timer_in = 80'd0;
47
  forever @(posedge rtc_timer_clk) rtc_timer_in = rtc_timer_in +1;
48
end
49
 
50 15 edn_walter
tsu DUT_RX
51 4 ash_riple
  (
52
    .rst(rst),
53
 
54
    .gmii_clk(gmii_rxclk),
55
    .gmii_ctrl(gmii_rxctrl),
56
    .gmii_data(gmii_rxdata),
57
 
58
    .rtc_timer_clk(rtc_timer_clk),
59 9 edn_walter
    .rtc_timer_in(rtc_timer_in[31:0]),
60 5 ash_riple
 
61
    .q_rst(rst),
62
    .q_rd_clk(q_rd_clk),
63
    .q_rd_en(q_rd_en),
64
    .q_rd_stat(q_rd_stat),
65
    .q_rd_data(q_rd_data)
66 4 ash_riple
  );
67
 
68
gmii_rx_bfm BFM_RX
69
  (
70
    .gmii_rxclk(gmii_rxclk),
71
    .gmii_rxctrl(gmii_rxctrl),
72
    .gmii_rxdata(gmii_rxdata)
73
  );
74
 
75 13 edn_walter
 
76 15 edn_walter
tsu DUT_TX
77 4 ash_riple
  (
78
    .rst(rst),
79
 
80
    .gmii_clk(gmii_txclk),
81
    .gmii_ctrl(gmii_txctrl),
82
    .gmii_data(gmii_txdata),
83
 
84
    .rtc_timer_clk(rtc_timer_clk),
85 9 edn_walter
    .rtc_timer_in(rtc_timer_in[31:0]),
86 5 ash_riple
 
87
    .q_rst(rst),
88
    .q_rd_clk(q_rd_clk),
89
    .q_rd_en(),
90
    .q_rd_stat(),
91
    .q_rd_data()
92 4 ash_riple
  );
93
 
94
gmii_tx_bfm BFM_TX
95
  (
96
    .gmii_txclk(gmii_txclk),
97
    .gmii_txctrl(gmii_txctrl),
98
    .gmii_txdata(gmii_txdata)
99
  );
100
 
101 13 edn_walter
 
102 4 ash_riple
endmodule
103
 

powered by: WebSVN 2.1.0

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