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

Subversion Repositories xge_mac

[/] [xge_mac/] [trunk/] [rtl/] [verilog/] [xge_mac.v] - Blame information for rev 28

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 antanguay
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  File name "xge_mac.v"                                       ////
4
////                                                              ////
5
////  This file is part of the "10GE MAC" project                 ////
6
////  http://www.opencores.org/cores/xge_mac/                     ////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - A. Tanguay (antanguay@opencores.org)                  ////
10
////                                                              ////
11
//////////////////////////////////////////////////////////////////////
12
////                                                              ////
13
//// Copyright (C) 2008 AUTHORS. All rights reserved.             ////
14
////                                                              ////
15
//// This source file may be used and distributed without         ////
16
//// restriction provided that this copyright statement is not    ////
17
//// removed from the file and that any derivative work contains  ////
18
//// the original copyright notice and the associated disclaimer. ////
19
////                                                              ////
20
//// This source file is free software; you can redistribute it   ////
21
//// and/or modify it under the terms of the GNU Lesser General   ////
22
//// Public License as published by the Free Software Foundation; ////
23
//// either version 2.1 of the License, or (at your option) any   ////
24
//// later version.                                               ////
25
////                                                              ////
26
//// This source is distributed in the hope that it will be       ////
27
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
28
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
29
//// PURPOSE.  See the GNU Lesser General Public License for more ////
30
//// details.                                                     ////
31
////                                                              ////
32
//// You should have received a copy of the GNU Lesser General    ////
33
//// Public License along with this source; if not, download it   ////
34
//// from http://www.opencores.org/lgpl.shtml                     ////
35
////                                                              ////
36
//////////////////////////////////////////////////////////////////////
37
 
38
 
39
`include "defines.v"
40
 
41
module xge_mac(/*AUTOARG*/
42
  // Outputs
43 12 antanguay
  xgmii_txd, xgmii_txc, wb_int_o, wb_dat_o, wb_ack_o, pkt_tx_full,
44
  pkt_rx_val, pkt_rx_sop, pkt_rx_mod, pkt_rx_err, pkt_rx_eop,
45
  pkt_rx_data, pkt_rx_avail,
46 2 antanguay
  // Inputs
47 12 antanguay
  xgmii_rxd, xgmii_rxc, wb_we_i, wb_stb_i, wb_rst_i, wb_dat_i,
48
  wb_cyc_i, wb_clk_i, wb_adr_i, reset_xgmii_tx_n, reset_xgmii_rx_n,
49
  reset_156m25_n, pkt_tx_val, pkt_tx_sop, pkt_tx_mod, pkt_tx_eop,
50 6 antanguay
  pkt_tx_data, pkt_rx_ren, clk_xgmii_tx, clk_xgmii_rx, clk_156m25
51 2 antanguay
  );
52
 
53
/*AUTOINPUT*/
54
// Beginning of automatic inputs (from unused autoinst inputs)
55
input                   clk_156m25;             // To rx_dq0 of rx_dequeue.v, ...
56
input                   clk_xgmii_rx;           // To rx_eq0 of rx_enqueue.v, ...
57
input                   clk_xgmii_tx;           // To tx_dq0 of tx_dequeue.v, ...
58
input                   pkt_rx_ren;             // To rx_dq0 of rx_dequeue.v
59
input [63:0]            pkt_tx_data;            // To tx_eq0 of tx_enqueue.v
60 6 antanguay
input                   pkt_tx_eop;             // To tx_eq0 of tx_enqueue.v
61
input [2:0]             pkt_tx_mod;             // To tx_eq0 of tx_enqueue.v
62 2 antanguay
input                   pkt_tx_sop;             // To tx_eq0 of tx_enqueue.v
63
input                   pkt_tx_val;             // To tx_eq0 of tx_enqueue.v
64
input                   reset_156m25_n;         // To rx_dq0 of rx_dequeue.v, ...
65
input                   reset_xgmii_rx_n;       // To rx_eq0 of rx_enqueue.v, ...
66
input                   reset_xgmii_tx_n;       // To tx_dq0 of tx_dequeue.v, ...
67
input [7:0]             wb_adr_i;               // To wishbone_if0 of wishbone_if.v
68
input                   wb_clk_i;               // To sync_clk_wb0 of sync_clk_wb.v, ...
69
input                   wb_cyc_i;               // To wishbone_if0 of wishbone_if.v
70
input [31:0]            wb_dat_i;               // To wishbone_if0 of wishbone_if.v
71
input                   wb_rst_i;               // To sync_clk_wb0 of sync_clk_wb.v, ...
72
input                   wb_stb_i;               // To wishbone_if0 of wishbone_if.v
73
input                   wb_we_i;                // To wishbone_if0 of wishbone_if.v
74
input [7:0]             xgmii_rxc;              // To rx_eq0 of rx_enqueue.v
75
input [63:0]            xgmii_rxd;              // To rx_eq0 of rx_enqueue.v
76
// End of automatics
77
 
78
/*AUTOOUTPUT*/
79
// Beginning of automatic outputs (from unused autoinst outputs)
80
output                  pkt_rx_avail;           // From rx_dq0 of rx_dequeue.v
81
output [63:0]           pkt_rx_data;            // From rx_dq0 of rx_dequeue.v
82 6 antanguay
output                  pkt_rx_eop;             // From rx_dq0 of rx_dequeue.v
83 2 antanguay
output                  pkt_rx_err;             // From rx_dq0 of rx_dequeue.v
84 6 antanguay
output [2:0]            pkt_rx_mod;             // From rx_dq0 of rx_dequeue.v
85 2 antanguay
output                  pkt_rx_sop;             // From rx_dq0 of rx_dequeue.v
86
output                  pkt_rx_val;             // From rx_dq0 of rx_dequeue.v
87
output                  pkt_tx_full;            // From tx_eq0 of tx_enqueue.v
88
output                  wb_ack_o;               // From wishbone_if0 of wishbone_if.v
89
output [31:0]           wb_dat_o;               // From wishbone_if0 of wishbone_if.v
90
output                  wb_int_o;               // From wishbone_if0 of wishbone_if.v
91
output [7:0]            xgmii_txc;              // From tx_dq0 of tx_dequeue.v
92
output [63:0]           xgmii_txd;              // From tx_dq0 of tx_dequeue.v
93
// End of automatics
94
 
95
/*AUTOWIRE*/
96
// Beginning of automatic wires (for undeclared instantiated-module outputs)
97 27 antanguay
wire                    clear_stats_rx_octets;  // From wishbone_if0 of wishbone_if.v
98
wire                    clear_stats_rx_pkts;    // From wishbone_if0 of wishbone_if.v
99
wire                    clear_stats_tx_octets;  // From wishbone_if0 of wishbone_if.v
100
wire                    clear_stats_tx_pkts;    // From wishbone_if0 of wishbone_if.v
101 2 antanguay
wire                    ctrl_tx_enable;         // From wishbone_if0 of wishbone_if.v
102
wire                    ctrl_tx_enable_ctx;     // From sync_clk_xgmii_tx0 of sync_clk_xgmii_tx.v
103
wire [1:0]              local_fault_msg_det;    // From rx_eq0 of rx_enqueue.v
104
wire [1:0]              remote_fault_msg_det;   // From rx_eq0 of rx_enqueue.v
105
wire                    rxdfifo_ralmost_empty;  // From rx_data_fifo0 of rx_data_fifo.v
106
wire [63:0]             rxdfifo_rdata;          // From rx_data_fifo0 of rx_data_fifo.v
107
wire                    rxdfifo_rempty;         // From rx_data_fifo0 of rx_data_fifo.v
108
wire                    rxdfifo_ren;            // From rx_dq0 of rx_dequeue.v
109
wire [7:0]              rxdfifo_rstatus;        // From rx_data_fifo0 of rx_data_fifo.v
110
wire [63:0]             rxdfifo_wdata;          // From rx_eq0 of rx_enqueue.v
111
wire                    rxdfifo_wen;            // From rx_eq0 of rx_enqueue.v
112
wire                    rxdfifo_wfull;          // From rx_data_fifo0 of rx_data_fifo.v
113
wire [7:0]              rxdfifo_wstatus;        // From rx_eq0 of rx_enqueue.v
114
wire                    rxhfifo_ralmost_empty;  // From rx_hold_fifo0 of rx_hold_fifo.v
115
wire [63:0]             rxhfifo_rdata;          // From rx_hold_fifo0 of rx_hold_fifo.v
116
wire                    rxhfifo_rempty;         // From rx_hold_fifo0 of rx_hold_fifo.v
117
wire                    rxhfifo_ren;            // From rx_eq0 of rx_enqueue.v
118
wire [7:0]              rxhfifo_rstatus;        // From rx_hold_fifo0 of rx_hold_fifo.v
119
wire [63:0]             rxhfifo_wdata;          // From rx_eq0 of rx_enqueue.v
120
wire                    rxhfifo_wen;            // From rx_eq0 of rx_enqueue.v
121
wire [7:0]              rxhfifo_wstatus;        // From rx_eq0 of rx_enqueue.v
122 24 antanguay
wire [13:0]             rxsfifo_wdata;          // From rx_eq0 of rx_enqueue.v
123
wire                    rxsfifo_wen;            // From rx_eq0 of rx_enqueue.v
124
wire [31:0]             stats_rx_octets;        // From stats0 of stats.v
125 23 antanguay
wire [31:0]             stats_rx_pkts;          // From stats0 of stats.v
126 24 antanguay
wire [31:0]             stats_tx_octets;        // From stats0 of stats.v
127 23 antanguay
wire [31:0]             stats_tx_pkts;          // From stats0 of stats.v
128 2 antanguay
wire                    status_crc_error;       // From sync_clk_wb0 of sync_clk_wb.v
129
wire                    status_crc_error_tog;   // From rx_eq0 of rx_enqueue.v
130
wire                    status_fragment_error;  // From sync_clk_wb0 of sync_clk_wb.v
131
wire                    status_fragment_error_tog;// From rx_eq0 of rx_enqueue.v
132 28 antanguay
wire                    status_lenght_error;    // From sync_clk_wb0 of sync_clk_wb.v
133
wire                    status_lenght_error_tog;// From rx_eq0 of rx_enqueue.v
134 2 antanguay
wire                    status_local_fault;     // From sync_clk_wb0 of sync_clk_wb.v
135
wire                    status_local_fault_crx; // From fault_sm0 of fault_sm.v
136
wire                    status_local_fault_ctx; // From sync_clk_xgmii_tx0 of sync_clk_xgmii_tx.v
137
wire                    status_pause_frame_rx;  // From sync_clk_wb0 of sync_clk_wb.v
138
wire                    status_pause_frame_rx_tog;// From rx_eq0 of rx_enqueue.v
139
wire                    status_remote_fault;    // From sync_clk_wb0 of sync_clk_wb.v
140
wire                    status_remote_fault_crx;// From fault_sm0 of fault_sm.v
141
wire                    status_remote_fault_ctx;// From sync_clk_xgmii_tx0 of sync_clk_xgmii_tx.v
142
wire                    status_rxdfifo_ovflow;  // From sync_clk_wb0 of sync_clk_wb.v
143
wire                    status_rxdfifo_ovflow_tog;// From rx_eq0 of rx_enqueue.v
144
wire                    status_rxdfifo_udflow;  // From sync_clk_wb0 of sync_clk_wb.v
145
wire                    status_rxdfifo_udflow_tog;// From rx_dq0 of rx_dequeue.v
146
wire                    status_txdfifo_ovflow;  // From sync_clk_wb0 of sync_clk_wb.v
147
wire                    status_txdfifo_ovflow_tog;// From tx_eq0 of tx_enqueue.v
148
wire                    status_txdfifo_udflow;  // From sync_clk_wb0 of sync_clk_wb.v
149
wire                    status_txdfifo_udflow_tog;// From tx_dq0 of tx_dequeue.v
150
wire                    txdfifo_ralmost_empty;  // From tx_data_fifo0 of tx_data_fifo.v
151
wire [63:0]             txdfifo_rdata;          // From tx_data_fifo0 of tx_data_fifo.v
152
wire                    txdfifo_rempty;         // From tx_data_fifo0 of tx_data_fifo.v
153
wire                    txdfifo_ren;            // From tx_dq0 of tx_dequeue.v
154
wire [7:0]              txdfifo_rstatus;        // From tx_data_fifo0 of tx_data_fifo.v
155
wire                    txdfifo_walmost_full;   // From tx_data_fifo0 of tx_data_fifo.v
156
wire [63:0]             txdfifo_wdata;          // From tx_eq0 of tx_enqueue.v
157
wire                    txdfifo_wen;            // From tx_eq0 of tx_enqueue.v
158
wire                    txdfifo_wfull;          // From tx_data_fifo0 of tx_data_fifo.v
159
wire [7:0]              txdfifo_wstatus;        // From tx_eq0 of tx_enqueue.v
160
wire                    txhfifo_ralmost_empty;  // From tx_hold_fifo0 of tx_hold_fifo.v
161
wire [63:0]             txhfifo_rdata;          // From tx_hold_fifo0 of tx_hold_fifo.v
162
wire                    txhfifo_rempty;         // From tx_hold_fifo0 of tx_hold_fifo.v
163
wire                    txhfifo_ren;            // From tx_dq0 of tx_dequeue.v
164
wire [7:0]              txhfifo_rstatus;        // From tx_hold_fifo0 of tx_hold_fifo.v
165
wire                    txhfifo_walmost_full;   // From tx_hold_fifo0 of tx_hold_fifo.v
166
wire [63:0]             txhfifo_wdata;          // From tx_dq0 of tx_dequeue.v
167
wire                    txhfifo_wen;            // From tx_dq0 of tx_dequeue.v
168
wire                    txhfifo_wfull;          // From tx_hold_fifo0 of tx_hold_fifo.v
169
wire [7:0]              txhfifo_wstatus;        // From tx_dq0 of tx_dequeue.v
170 24 antanguay
wire [13:0]             txsfifo_wdata;          // From tx_dq0 of tx_dequeue.v
171
wire                    txsfifo_wen;            // From tx_dq0 of tx_dequeue.v
172 2 antanguay
// End of automatics
173
 
174
rx_enqueue rx_eq0(/*AUTOINST*/
175
                  // Outputs
176
                  .rxdfifo_wdata        (rxdfifo_wdata[63:0]),
177
                  .rxdfifo_wstatus      (rxdfifo_wstatus[7:0]),
178
                  .rxdfifo_wen          (rxdfifo_wen),
179
                  .rxhfifo_ren          (rxhfifo_ren),
180
                  .rxhfifo_wdata        (rxhfifo_wdata[63:0]),
181
                  .rxhfifo_wstatus      (rxhfifo_wstatus[7:0]),
182
                  .rxhfifo_wen          (rxhfifo_wen),
183
                  .local_fault_msg_det  (local_fault_msg_det[1:0]),
184
                  .remote_fault_msg_det (remote_fault_msg_det[1:0]),
185
                  .status_crc_error_tog (status_crc_error_tog),
186
                  .status_fragment_error_tog(status_fragment_error_tog),
187 28 antanguay
                  .status_lenght_error_tog(status_lenght_error_tog),
188 2 antanguay
                  .status_rxdfifo_ovflow_tog(status_rxdfifo_ovflow_tog),
189
                  .status_pause_frame_rx_tog(status_pause_frame_rx_tog),
190 24 antanguay
                  .rxsfifo_wen          (rxsfifo_wen),
191
                  .rxsfifo_wdata        (rxsfifo_wdata[13:0]),
192 2 antanguay
                  // Inputs
193
                  .clk_xgmii_rx         (clk_xgmii_rx),
194
                  .reset_xgmii_rx_n     (reset_xgmii_rx_n),
195
                  .xgmii_rxd            (xgmii_rxd[63:0]),
196
                  .xgmii_rxc            (xgmii_rxc[7:0]),
197
                  .rxdfifo_wfull        (rxdfifo_wfull),
198
                  .rxhfifo_rdata        (rxhfifo_rdata[63:0]),
199
                  .rxhfifo_rstatus      (rxhfifo_rstatus[7:0]),
200
                  .rxhfifo_rempty       (rxhfifo_rempty),
201
                  .rxhfifo_ralmost_empty(rxhfifo_ralmost_empty));
202
 
203
rx_dequeue rx_dq0(/*AUTOINST*/
204
                  // Outputs
205
                  .rxdfifo_ren          (rxdfifo_ren),
206
                  .pkt_rx_data          (pkt_rx_data[63:0]),
207
                  .pkt_rx_val           (pkt_rx_val),
208
                  .pkt_rx_sop           (pkt_rx_sop),
209 6 antanguay
                  .pkt_rx_eop           (pkt_rx_eop),
210 2 antanguay
                  .pkt_rx_err           (pkt_rx_err),
211 6 antanguay
                  .pkt_rx_mod           (pkt_rx_mod[2:0]),
212 2 antanguay
                  .pkt_rx_avail         (pkt_rx_avail),
213
                  .status_rxdfifo_udflow_tog(status_rxdfifo_udflow_tog),
214
                  // Inputs
215
                  .clk_156m25           (clk_156m25),
216
                  .reset_156m25_n       (reset_156m25_n),
217
                  .rxdfifo_rdata        (rxdfifo_rdata[63:0]),
218
                  .rxdfifo_rstatus      (rxdfifo_rstatus[7:0]),
219
                  .rxdfifo_rempty       (rxdfifo_rempty),
220
                  .rxdfifo_ralmost_empty(rxdfifo_ralmost_empty),
221
                  .pkt_rx_ren           (pkt_rx_ren));
222 20 antanguay
 
223 2 antanguay
rx_data_fifo rx_data_fifo0(/*AUTOINST*/
224
                           // Outputs
225 12 antanguay
                           .rxdfifo_wfull       (rxdfifo_wfull),
226
                           .rxdfifo_rdata       (rxdfifo_rdata[63:0]),
227
                           .rxdfifo_rstatus     (rxdfifo_rstatus[7:0]),
228
                           .rxdfifo_rempty      (rxdfifo_rempty),
229 2 antanguay
                           .rxdfifo_ralmost_empty(rxdfifo_ralmost_empty),
230
                           // Inputs
231 12 antanguay
                           .clk_xgmii_rx        (clk_xgmii_rx),
232
                           .clk_156m25          (clk_156m25),
233
                           .reset_xgmii_rx_n    (reset_xgmii_rx_n),
234
                           .reset_156m25_n      (reset_156m25_n),
235
                           .rxdfifo_wdata       (rxdfifo_wdata[63:0]),
236
                           .rxdfifo_wstatus     (rxdfifo_wstatus[7:0]),
237
                           .rxdfifo_wen         (rxdfifo_wen),
238
                           .rxdfifo_ren         (rxdfifo_ren));
239 2 antanguay
 
240
rx_hold_fifo rx_hold_fifo0(/*AUTOINST*/
241
                           // Outputs
242 12 antanguay
                           .rxhfifo_rdata       (rxhfifo_rdata[63:0]),
243
                           .rxhfifo_rstatus     (rxhfifo_rstatus[7:0]),
244
                           .rxhfifo_rempty      (rxhfifo_rempty),
245 2 antanguay
                           .rxhfifo_ralmost_empty(rxhfifo_ralmost_empty),
246
                           // Inputs
247 12 antanguay
                           .clk_xgmii_rx        (clk_xgmii_rx),
248
                           .reset_xgmii_rx_n    (reset_xgmii_rx_n),
249
                           .rxhfifo_wdata       (rxhfifo_wdata[63:0]),
250
                           .rxhfifo_wstatus     (rxhfifo_wstatus[7:0]),
251
                           .rxhfifo_wen         (rxhfifo_wen),
252
                           .rxhfifo_ren         (rxhfifo_ren));
253 2 antanguay
 
254
tx_enqueue tx_eq0 (/*AUTOINST*/
255
                   // Outputs
256
                   .pkt_tx_full         (pkt_tx_full),
257
                   .txdfifo_wdata       (txdfifo_wdata[63:0]),
258
                   .txdfifo_wstatus     (txdfifo_wstatus[7:0]),
259
                   .txdfifo_wen         (txdfifo_wen),
260
                   .status_txdfifo_ovflow_tog(status_txdfifo_ovflow_tog),
261
                   // Inputs
262
                   .clk_156m25          (clk_156m25),
263
                   .reset_156m25_n      (reset_156m25_n),
264
                   .pkt_tx_data         (pkt_tx_data[63:0]),
265
                   .pkt_tx_val          (pkt_tx_val),
266
                   .pkt_tx_sop          (pkt_tx_sop),
267 6 antanguay
                   .pkt_tx_eop          (pkt_tx_eop),
268
                   .pkt_tx_mod          (pkt_tx_mod[2:0]),
269 2 antanguay
                   .txdfifo_wfull       (txdfifo_wfull),
270
                   .txdfifo_walmost_full(txdfifo_walmost_full));
271
 
272
tx_dequeue tx_dq0(/*AUTOINST*/
273
                  // Outputs
274
                  .txdfifo_ren          (txdfifo_ren),
275
                  .txhfifo_ren          (txhfifo_ren),
276
                  .txhfifo_wdata        (txhfifo_wdata[63:0]),
277
                  .txhfifo_wstatus      (txhfifo_wstatus[7:0]),
278
                  .txhfifo_wen          (txhfifo_wen),
279
                  .xgmii_txd            (xgmii_txd[63:0]),
280
                  .xgmii_txc            (xgmii_txc[7:0]),
281
                  .status_txdfifo_udflow_tog(status_txdfifo_udflow_tog),
282 24 antanguay
                  .txsfifo_wen          (txsfifo_wen),
283
                  .txsfifo_wdata        (txsfifo_wdata[13:0]),
284 2 antanguay
                  // Inputs
285
                  .clk_xgmii_tx         (clk_xgmii_tx),
286
                  .reset_xgmii_tx_n     (reset_xgmii_tx_n),
287
                  .ctrl_tx_enable_ctx   (ctrl_tx_enable_ctx),
288
                  .status_local_fault_ctx(status_local_fault_ctx),
289
                  .status_remote_fault_ctx(status_remote_fault_ctx),
290
                  .txdfifo_rdata        (txdfifo_rdata[63:0]),
291
                  .txdfifo_rstatus      (txdfifo_rstatus[7:0]),
292
                  .txdfifo_rempty       (txdfifo_rempty),
293
                  .txdfifo_ralmost_empty(txdfifo_ralmost_empty),
294
                  .txhfifo_rdata        (txhfifo_rdata[63:0]),
295
                  .txhfifo_rstatus      (txhfifo_rstatus[7:0]),
296
                  .txhfifo_rempty       (txhfifo_rempty),
297
                  .txhfifo_ralmost_empty(txhfifo_ralmost_empty),
298
                  .txhfifo_wfull        (txhfifo_wfull),
299
                  .txhfifo_walmost_full (txhfifo_walmost_full));
300
 
301
tx_data_fifo tx_data_fifo0(/*AUTOINST*/
302
                           // Outputs
303 12 antanguay
                           .txdfifo_wfull       (txdfifo_wfull),
304 2 antanguay
                           .txdfifo_walmost_full(txdfifo_walmost_full),
305 12 antanguay
                           .txdfifo_rdata       (txdfifo_rdata[63:0]),
306
                           .txdfifo_rstatus     (txdfifo_rstatus[7:0]),
307
                           .txdfifo_rempty      (txdfifo_rempty),
308 2 antanguay
                           .txdfifo_ralmost_empty(txdfifo_ralmost_empty),
309
                           // Inputs
310 12 antanguay
                           .clk_xgmii_tx        (clk_xgmii_tx),
311
                           .clk_156m25          (clk_156m25),
312
                           .reset_xgmii_tx_n    (reset_xgmii_tx_n),
313
                           .reset_156m25_n      (reset_156m25_n),
314
                           .txdfifo_wdata       (txdfifo_wdata[63:0]),
315
                           .txdfifo_wstatus     (txdfifo_wstatus[7:0]),
316
                           .txdfifo_wen         (txdfifo_wen),
317
                           .txdfifo_ren         (txdfifo_ren));
318 2 antanguay
 
319
tx_hold_fifo tx_hold_fifo0(/*AUTOINST*/
320
                           // Outputs
321 12 antanguay
                           .txhfifo_wfull       (txhfifo_wfull),
322 2 antanguay
                           .txhfifo_walmost_full(txhfifo_walmost_full),
323 12 antanguay
                           .txhfifo_rdata       (txhfifo_rdata[63:0]),
324
                           .txhfifo_rstatus     (txhfifo_rstatus[7:0]),
325
                           .txhfifo_rempty      (txhfifo_rempty),
326 2 antanguay
                           .txhfifo_ralmost_empty(txhfifo_ralmost_empty),
327
                           // Inputs
328 12 antanguay
                           .clk_xgmii_tx        (clk_xgmii_tx),
329
                           .reset_xgmii_tx_n    (reset_xgmii_tx_n),
330
                           .txhfifo_wdata       (txhfifo_wdata[63:0]),
331
                           .txhfifo_wstatus     (txhfifo_wstatus[7:0]),
332
                           .txhfifo_wen         (txhfifo_wen),
333
                           .txhfifo_ren         (txhfifo_ren));
334 2 antanguay
 
335
fault_sm fault_sm0(/*AUTOINST*/
336
                   // Outputs
337
                   .status_local_fault_crx(status_local_fault_crx),
338
                   .status_remote_fault_crx(status_remote_fault_crx),
339
                   // Inputs
340
                   .clk_xgmii_rx        (clk_xgmii_rx),
341
                   .reset_xgmii_rx_n    (reset_xgmii_rx_n),
342
                   .local_fault_msg_det (local_fault_msg_det[1:0]),
343
                   .remote_fault_msg_det(remote_fault_msg_det[1:0]));
344
 
345
sync_clk_wb sync_clk_wb0(/*AUTOINST*/
346
                         // Outputs
347 12 antanguay
                         .status_crc_error      (status_crc_error),
348
                         .status_fragment_error (status_fragment_error),
349 28 antanguay
                         .status_lenght_error   (status_lenght_error),
350 12 antanguay
                         .status_txdfifo_ovflow (status_txdfifo_ovflow),
351
                         .status_txdfifo_udflow (status_txdfifo_udflow),
352
                         .status_rxdfifo_ovflow (status_rxdfifo_ovflow),
353
                         .status_rxdfifo_udflow (status_rxdfifo_udflow),
354
                         .status_pause_frame_rx (status_pause_frame_rx),
355
                         .status_local_fault    (status_local_fault),
356
                         .status_remote_fault   (status_remote_fault),
357 2 antanguay
                         // Inputs
358 12 antanguay
                         .wb_clk_i              (wb_clk_i),
359
                         .wb_rst_i              (wb_rst_i),
360
                         .status_crc_error_tog  (status_crc_error_tog),
361 2 antanguay
                         .status_fragment_error_tog(status_fragment_error_tog),
362 28 antanguay
                         .status_lenght_error_tog(status_lenght_error_tog),
363 2 antanguay
                         .status_txdfifo_ovflow_tog(status_txdfifo_ovflow_tog),
364
                         .status_txdfifo_udflow_tog(status_txdfifo_udflow_tog),
365
                         .status_rxdfifo_ovflow_tog(status_rxdfifo_ovflow_tog),
366
                         .status_rxdfifo_udflow_tog(status_rxdfifo_udflow_tog),
367
                         .status_pause_frame_rx_tog(status_pause_frame_rx_tog),
368
                         .status_local_fault_crx(status_local_fault_crx),
369
                         .status_remote_fault_crx(status_remote_fault_crx));
370
 
371
sync_clk_xgmii_tx sync_clk_xgmii_tx0(/*AUTOINST*/
372
                                     // Outputs
373
                                     .ctrl_tx_enable_ctx(ctrl_tx_enable_ctx),
374
                                     .status_local_fault_ctx(status_local_fault_ctx),
375
                                     .status_remote_fault_ctx(status_remote_fault_ctx),
376
                                     // Inputs
377 12 antanguay
                                     .clk_xgmii_tx      (clk_xgmii_tx),
378
                                     .reset_xgmii_tx_n  (reset_xgmii_tx_n),
379
                                     .ctrl_tx_enable    (ctrl_tx_enable),
380 2 antanguay
                                     .status_local_fault_crx(status_local_fault_crx),
381
                                     .status_remote_fault_crx(status_remote_fault_crx));
382
 
383 23 antanguay
stats stats0(/*AUTOINST*/
384
             // Outputs
385 24 antanguay
             .stats_rx_octets           (stats_rx_octets[31:0]),
386
             .stats_rx_pkts             (stats_rx_pkts[31:0]),
387
             .stats_tx_octets           (stats_tx_octets[31:0]),
388 23 antanguay
             .stats_tx_pkts             (stats_tx_pkts[31:0]),
389
             // Inputs
390 27 antanguay
             .clear_stats_rx_octets     (clear_stats_rx_octets),
391
             .clear_stats_rx_pkts       (clear_stats_rx_pkts),
392
             .clear_stats_tx_octets     (clear_stats_tx_octets),
393
             .clear_stats_tx_pkts       (clear_stats_tx_pkts),
394 24 antanguay
             .clk_xgmii_rx              (clk_xgmii_rx),
395
             .clk_xgmii_tx              (clk_xgmii_tx),
396
             .reset_xgmii_rx_n          (reset_xgmii_rx_n),
397
             .reset_xgmii_tx_n          (reset_xgmii_tx_n),
398
             .rxsfifo_wdata             (rxsfifo_wdata[13:0]),
399
             .rxsfifo_wen               (rxsfifo_wen),
400
             .txsfifo_wdata             (txsfifo_wdata[13:0]),
401
             .txsfifo_wen               (txsfifo_wen),
402 23 antanguay
             .wb_clk_i                  (wb_clk_i),
403 24 antanguay
             .wb_rst_i                  (wb_rst_i));
404 23 antanguay
 
405 20 antanguay
//sync_clk_core sync_clk_core0(/*AUTOINST*/
406
//                             // Inputs
407
//                             .clk_xgmii_tx      (clk_xgmii_tx),
408
//                             .reset_xgmii_tx_n  (reset_xgmii_tx_n));
409 2 antanguay
 
410
wishbone_if wishbone_if0(/*AUTOINST*/
411
                         // Outputs
412 12 antanguay
                         .wb_dat_o              (wb_dat_o[31:0]),
413
                         .wb_ack_o              (wb_ack_o),
414
                         .wb_int_o              (wb_int_o),
415
                         .ctrl_tx_enable        (ctrl_tx_enable),
416 27 antanguay
                         .clear_stats_tx_octets (clear_stats_tx_octets),
417
                         .clear_stats_tx_pkts   (clear_stats_tx_pkts),
418
                         .clear_stats_rx_octets (clear_stats_rx_octets),
419
                         .clear_stats_rx_pkts   (clear_stats_rx_pkts),
420 2 antanguay
                         // Inputs
421 12 antanguay
                         .wb_clk_i              (wb_clk_i),
422
                         .wb_rst_i              (wb_rst_i),
423
                         .wb_adr_i              (wb_adr_i[7:0]),
424
                         .wb_dat_i              (wb_dat_i[31:0]),
425
                         .wb_we_i               (wb_we_i),
426
                         .wb_stb_i              (wb_stb_i),
427
                         .wb_cyc_i              (wb_cyc_i),
428
                         .status_crc_error      (status_crc_error),
429
                         .status_fragment_error (status_fragment_error),
430 28 antanguay
                         .status_lenght_error   (status_lenght_error),
431 12 antanguay
                         .status_txdfifo_ovflow (status_txdfifo_ovflow),
432
                         .status_txdfifo_udflow (status_txdfifo_udflow),
433
                         .status_rxdfifo_ovflow (status_rxdfifo_ovflow),
434
                         .status_rxdfifo_udflow (status_rxdfifo_udflow),
435
                         .status_pause_frame_rx (status_pause_frame_rx),
436
                         .status_local_fault    (status_local_fault),
437 23 antanguay
                         .status_remote_fault   (status_remote_fault),
438 24 antanguay
                         .stats_tx_octets       (stats_tx_octets[31:0]),
439 23 antanguay
                         .stats_tx_pkts         (stats_tx_pkts[31:0]),
440 24 antanguay
                         .stats_rx_octets       (stats_rx_octets[31:0]),
441 23 antanguay
                         .stats_rx_pkts         (stats_rx_pkts[31:0]));
442 2 antanguay
 
443
endmodule

powered by: WebSVN 2.1.0

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