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 27

Go to most recent revision | 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
wire                    status_local_fault;     // From sync_clk_wb0 of sync_clk_wb.v
133
wire                    status_local_fault_crx; // From fault_sm0 of fault_sm.v
134
wire                    status_local_fault_ctx; // From sync_clk_xgmii_tx0 of sync_clk_xgmii_tx.v
135
wire                    status_pause_frame_rx;  // From sync_clk_wb0 of sync_clk_wb.v
136
wire                    status_pause_frame_rx_tog;// From rx_eq0 of rx_enqueue.v
137
wire                    status_remote_fault;    // From sync_clk_wb0 of sync_clk_wb.v
138
wire                    status_remote_fault_crx;// From fault_sm0 of fault_sm.v
139
wire                    status_remote_fault_ctx;// From sync_clk_xgmii_tx0 of sync_clk_xgmii_tx.v
140
wire                    status_rxdfifo_ovflow;  // From sync_clk_wb0 of sync_clk_wb.v
141
wire                    status_rxdfifo_ovflow_tog;// From rx_eq0 of rx_enqueue.v
142
wire                    status_rxdfifo_udflow;  // From sync_clk_wb0 of sync_clk_wb.v
143
wire                    status_rxdfifo_udflow_tog;// From rx_dq0 of rx_dequeue.v
144
wire                    status_txdfifo_ovflow;  // From sync_clk_wb0 of sync_clk_wb.v
145
wire                    status_txdfifo_ovflow_tog;// From tx_eq0 of tx_enqueue.v
146
wire                    status_txdfifo_udflow;  // From sync_clk_wb0 of sync_clk_wb.v
147
wire                    status_txdfifo_udflow_tog;// From tx_dq0 of tx_dequeue.v
148
wire                    txdfifo_ralmost_empty;  // From tx_data_fifo0 of tx_data_fifo.v
149
wire [63:0]             txdfifo_rdata;          // From tx_data_fifo0 of tx_data_fifo.v
150
wire                    txdfifo_rempty;         // From tx_data_fifo0 of tx_data_fifo.v
151
wire                    txdfifo_ren;            // From tx_dq0 of tx_dequeue.v
152
wire [7:0]              txdfifo_rstatus;        // From tx_data_fifo0 of tx_data_fifo.v
153
wire                    txdfifo_walmost_full;   // From tx_data_fifo0 of tx_data_fifo.v
154
wire [63:0]             txdfifo_wdata;          // From tx_eq0 of tx_enqueue.v
155
wire                    txdfifo_wen;            // From tx_eq0 of tx_enqueue.v
156
wire                    txdfifo_wfull;          // From tx_data_fifo0 of tx_data_fifo.v
157
wire [7:0]              txdfifo_wstatus;        // From tx_eq0 of tx_enqueue.v
158
wire                    txhfifo_ralmost_empty;  // From tx_hold_fifo0 of tx_hold_fifo.v
159
wire [63:0]             txhfifo_rdata;          // From tx_hold_fifo0 of tx_hold_fifo.v
160
wire                    txhfifo_rempty;         // From tx_hold_fifo0 of tx_hold_fifo.v
161
wire                    txhfifo_ren;            // From tx_dq0 of tx_dequeue.v
162
wire [7:0]              txhfifo_rstatus;        // From tx_hold_fifo0 of tx_hold_fifo.v
163
wire                    txhfifo_walmost_full;   // From tx_hold_fifo0 of tx_hold_fifo.v
164
wire [63:0]             txhfifo_wdata;          // From tx_dq0 of tx_dequeue.v
165
wire                    txhfifo_wen;            // From tx_dq0 of tx_dequeue.v
166
wire                    txhfifo_wfull;          // From tx_hold_fifo0 of tx_hold_fifo.v
167
wire [7:0]              txhfifo_wstatus;        // From tx_dq0 of tx_dequeue.v
168 24 antanguay
wire [13:0]             txsfifo_wdata;          // From tx_dq0 of tx_dequeue.v
169
wire                    txsfifo_wen;            // From tx_dq0 of tx_dequeue.v
170 2 antanguay
// End of automatics
171
 
172
rx_enqueue rx_eq0(/*AUTOINST*/
173
                  // Outputs
174
                  .rxdfifo_wdata        (rxdfifo_wdata[63:0]),
175
                  .rxdfifo_wstatus      (rxdfifo_wstatus[7:0]),
176
                  .rxdfifo_wen          (rxdfifo_wen),
177
                  .rxhfifo_ren          (rxhfifo_ren),
178
                  .rxhfifo_wdata        (rxhfifo_wdata[63:0]),
179
                  .rxhfifo_wstatus      (rxhfifo_wstatus[7:0]),
180
                  .rxhfifo_wen          (rxhfifo_wen),
181
                  .local_fault_msg_det  (local_fault_msg_det[1:0]),
182
                  .remote_fault_msg_det (remote_fault_msg_det[1:0]),
183
                  .status_crc_error_tog (status_crc_error_tog),
184
                  .status_fragment_error_tog(status_fragment_error_tog),
185
                  .status_rxdfifo_ovflow_tog(status_rxdfifo_ovflow_tog),
186
                  .status_pause_frame_rx_tog(status_pause_frame_rx_tog),
187 24 antanguay
                  .rxsfifo_wen          (rxsfifo_wen),
188
                  .rxsfifo_wdata        (rxsfifo_wdata[13:0]),
189 2 antanguay
                  // Inputs
190
                  .clk_xgmii_rx         (clk_xgmii_rx),
191
                  .reset_xgmii_rx_n     (reset_xgmii_rx_n),
192
                  .xgmii_rxd            (xgmii_rxd[63:0]),
193
                  .xgmii_rxc            (xgmii_rxc[7:0]),
194
                  .rxdfifo_wfull        (rxdfifo_wfull),
195
                  .rxhfifo_rdata        (rxhfifo_rdata[63:0]),
196
                  .rxhfifo_rstatus      (rxhfifo_rstatus[7:0]),
197
                  .rxhfifo_rempty       (rxhfifo_rempty),
198
                  .rxhfifo_ralmost_empty(rxhfifo_ralmost_empty));
199
 
200
rx_dequeue rx_dq0(/*AUTOINST*/
201
                  // Outputs
202
                  .rxdfifo_ren          (rxdfifo_ren),
203
                  .pkt_rx_data          (pkt_rx_data[63:0]),
204
                  .pkt_rx_val           (pkt_rx_val),
205
                  .pkt_rx_sop           (pkt_rx_sop),
206 6 antanguay
                  .pkt_rx_eop           (pkt_rx_eop),
207 2 antanguay
                  .pkt_rx_err           (pkt_rx_err),
208 6 antanguay
                  .pkt_rx_mod           (pkt_rx_mod[2:0]),
209 2 antanguay
                  .pkt_rx_avail         (pkt_rx_avail),
210
                  .status_rxdfifo_udflow_tog(status_rxdfifo_udflow_tog),
211
                  // Inputs
212
                  .clk_156m25           (clk_156m25),
213
                  .reset_156m25_n       (reset_156m25_n),
214
                  .rxdfifo_rdata        (rxdfifo_rdata[63:0]),
215
                  .rxdfifo_rstatus      (rxdfifo_rstatus[7:0]),
216
                  .rxdfifo_rempty       (rxdfifo_rempty),
217
                  .rxdfifo_ralmost_empty(rxdfifo_ralmost_empty),
218
                  .pkt_rx_ren           (pkt_rx_ren));
219 20 antanguay
 
220 2 antanguay
rx_data_fifo rx_data_fifo0(/*AUTOINST*/
221
                           // Outputs
222 12 antanguay
                           .rxdfifo_wfull       (rxdfifo_wfull),
223
                           .rxdfifo_rdata       (rxdfifo_rdata[63:0]),
224
                           .rxdfifo_rstatus     (rxdfifo_rstatus[7:0]),
225
                           .rxdfifo_rempty      (rxdfifo_rempty),
226 2 antanguay
                           .rxdfifo_ralmost_empty(rxdfifo_ralmost_empty),
227
                           // Inputs
228 12 antanguay
                           .clk_xgmii_rx        (clk_xgmii_rx),
229
                           .clk_156m25          (clk_156m25),
230
                           .reset_xgmii_rx_n    (reset_xgmii_rx_n),
231
                           .reset_156m25_n      (reset_156m25_n),
232
                           .rxdfifo_wdata       (rxdfifo_wdata[63:0]),
233
                           .rxdfifo_wstatus     (rxdfifo_wstatus[7:0]),
234
                           .rxdfifo_wen         (rxdfifo_wen),
235
                           .rxdfifo_ren         (rxdfifo_ren));
236 2 antanguay
 
237
rx_hold_fifo rx_hold_fifo0(/*AUTOINST*/
238
                           // Outputs
239 12 antanguay
                           .rxhfifo_rdata       (rxhfifo_rdata[63:0]),
240
                           .rxhfifo_rstatus     (rxhfifo_rstatus[7:0]),
241
                           .rxhfifo_rempty      (rxhfifo_rempty),
242 2 antanguay
                           .rxhfifo_ralmost_empty(rxhfifo_ralmost_empty),
243
                           // Inputs
244 12 antanguay
                           .clk_xgmii_rx        (clk_xgmii_rx),
245
                           .reset_xgmii_rx_n    (reset_xgmii_rx_n),
246
                           .rxhfifo_wdata       (rxhfifo_wdata[63:0]),
247
                           .rxhfifo_wstatus     (rxhfifo_wstatus[7:0]),
248
                           .rxhfifo_wen         (rxhfifo_wen),
249
                           .rxhfifo_ren         (rxhfifo_ren));
250 2 antanguay
 
251
tx_enqueue tx_eq0 (/*AUTOINST*/
252
                   // Outputs
253
                   .pkt_tx_full         (pkt_tx_full),
254
                   .txdfifo_wdata       (txdfifo_wdata[63:0]),
255
                   .txdfifo_wstatus     (txdfifo_wstatus[7:0]),
256
                   .txdfifo_wen         (txdfifo_wen),
257
                   .status_txdfifo_ovflow_tog(status_txdfifo_ovflow_tog),
258
                   // Inputs
259
                   .clk_156m25          (clk_156m25),
260
                   .reset_156m25_n      (reset_156m25_n),
261
                   .pkt_tx_data         (pkt_tx_data[63:0]),
262
                   .pkt_tx_val          (pkt_tx_val),
263
                   .pkt_tx_sop          (pkt_tx_sop),
264 6 antanguay
                   .pkt_tx_eop          (pkt_tx_eop),
265
                   .pkt_tx_mod          (pkt_tx_mod[2:0]),
266 2 antanguay
                   .txdfifo_wfull       (txdfifo_wfull),
267
                   .txdfifo_walmost_full(txdfifo_walmost_full));
268
 
269
tx_dequeue tx_dq0(/*AUTOINST*/
270
                  // Outputs
271
                  .txdfifo_ren          (txdfifo_ren),
272
                  .txhfifo_ren          (txhfifo_ren),
273
                  .txhfifo_wdata        (txhfifo_wdata[63:0]),
274
                  .txhfifo_wstatus      (txhfifo_wstatus[7:0]),
275
                  .txhfifo_wen          (txhfifo_wen),
276
                  .xgmii_txd            (xgmii_txd[63:0]),
277
                  .xgmii_txc            (xgmii_txc[7:0]),
278
                  .status_txdfifo_udflow_tog(status_txdfifo_udflow_tog),
279 24 antanguay
                  .txsfifo_wen          (txsfifo_wen),
280
                  .txsfifo_wdata        (txsfifo_wdata[13:0]),
281 2 antanguay
                  // Inputs
282
                  .clk_xgmii_tx         (clk_xgmii_tx),
283
                  .reset_xgmii_tx_n     (reset_xgmii_tx_n),
284
                  .ctrl_tx_enable_ctx   (ctrl_tx_enable_ctx),
285
                  .status_local_fault_ctx(status_local_fault_ctx),
286
                  .status_remote_fault_ctx(status_remote_fault_ctx),
287
                  .txdfifo_rdata        (txdfifo_rdata[63:0]),
288
                  .txdfifo_rstatus      (txdfifo_rstatus[7:0]),
289
                  .txdfifo_rempty       (txdfifo_rempty),
290
                  .txdfifo_ralmost_empty(txdfifo_ralmost_empty),
291
                  .txhfifo_rdata        (txhfifo_rdata[63:0]),
292
                  .txhfifo_rstatus      (txhfifo_rstatus[7:0]),
293
                  .txhfifo_rempty       (txhfifo_rempty),
294
                  .txhfifo_ralmost_empty(txhfifo_ralmost_empty),
295
                  .txhfifo_wfull        (txhfifo_wfull),
296
                  .txhfifo_walmost_full (txhfifo_walmost_full));
297
 
298
tx_data_fifo tx_data_fifo0(/*AUTOINST*/
299
                           // Outputs
300 12 antanguay
                           .txdfifo_wfull       (txdfifo_wfull),
301 2 antanguay
                           .txdfifo_walmost_full(txdfifo_walmost_full),
302 12 antanguay
                           .txdfifo_rdata       (txdfifo_rdata[63:0]),
303
                           .txdfifo_rstatus     (txdfifo_rstatus[7:0]),
304
                           .txdfifo_rempty      (txdfifo_rempty),
305 2 antanguay
                           .txdfifo_ralmost_empty(txdfifo_ralmost_empty),
306
                           // Inputs
307 12 antanguay
                           .clk_xgmii_tx        (clk_xgmii_tx),
308
                           .clk_156m25          (clk_156m25),
309
                           .reset_xgmii_tx_n    (reset_xgmii_tx_n),
310
                           .reset_156m25_n      (reset_156m25_n),
311
                           .txdfifo_wdata       (txdfifo_wdata[63:0]),
312
                           .txdfifo_wstatus     (txdfifo_wstatus[7:0]),
313
                           .txdfifo_wen         (txdfifo_wen),
314
                           .txdfifo_ren         (txdfifo_ren));
315 2 antanguay
 
316
tx_hold_fifo tx_hold_fifo0(/*AUTOINST*/
317
                           // Outputs
318 12 antanguay
                           .txhfifo_wfull       (txhfifo_wfull),
319 2 antanguay
                           .txhfifo_walmost_full(txhfifo_walmost_full),
320 12 antanguay
                           .txhfifo_rdata       (txhfifo_rdata[63:0]),
321
                           .txhfifo_rstatus     (txhfifo_rstatus[7:0]),
322
                           .txhfifo_rempty      (txhfifo_rempty),
323 2 antanguay
                           .txhfifo_ralmost_empty(txhfifo_ralmost_empty),
324
                           // Inputs
325 12 antanguay
                           .clk_xgmii_tx        (clk_xgmii_tx),
326
                           .reset_xgmii_tx_n    (reset_xgmii_tx_n),
327
                           .txhfifo_wdata       (txhfifo_wdata[63:0]),
328
                           .txhfifo_wstatus     (txhfifo_wstatus[7:0]),
329
                           .txhfifo_wen         (txhfifo_wen),
330
                           .txhfifo_ren         (txhfifo_ren));
331 2 antanguay
 
332
fault_sm fault_sm0(/*AUTOINST*/
333
                   // Outputs
334
                   .status_local_fault_crx(status_local_fault_crx),
335
                   .status_remote_fault_crx(status_remote_fault_crx),
336
                   // Inputs
337
                   .clk_xgmii_rx        (clk_xgmii_rx),
338
                   .reset_xgmii_rx_n    (reset_xgmii_rx_n),
339
                   .local_fault_msg_det (local_fault_msg_det[1:0]),
340
                   .remote_fault_msg_det(remote_fault_msg_det[1:0]));
341
 
342
sync_clk_wb sync_clk_wb0(/*AUTOINST*/
343
                         // Outputs
344 12 antanguay
                         .status_crc_error      (status_crc_error),
345
                         .status_fragment_error (status_fragment_error),
346
                         .status_txdfifo_ovflow (status_txdfifo_ovflow),
347
                         .status_txdfifo_udflow (status_txdfifo_udflow),
348
                         .status_rxdfifo_ovflow (status_rxdfifo_ovflow),
349
                         .status_rxdfifo_udflow (status_rxdfifo_udflow),
350
                         .status_pause_frame_rx (status_pause_frame_rx),
351
                         .status_local_fault    (status_local_fault),
352
                         .status_remote_fault   (status_remote_fault),
353 2 antanguay
                         // Inputs
354 12 antanguay
                         .wb_clk_i              (wb_clk_i),
355
                         .wb_rst_i              (wb_rst_i),
356
                         .status_crc_error_tog  (status_crc_error_tog),
357 2 antanguay
                         .status_fragment_error_tog(status_fragment_error_tog),
358
                         .status_txdfifo_ovflow_tog(status_txdfifo_ovflow_tog),
359
                         .status_txdfifo_udflow_tog(status_txdfifo_udflow_tog),
360
                         .status_rxdfifo_ovflow_tog(status_rxdfifo_ovflow_tog),
361
                         .status_rxdfifo_udflow_tog(status_rxdfifo_udflow_tog),
362
                         .status_pause_frame_rx_tog(status_pause_frame_rx_tog),
363
                         .status_local_fault_crx(status_local_fault_crx),
364
                         .status_remote_fault_crx(status_remote_fault_crx));
365
 
366
sync_clk_xgmii_tx sync_clk_xgmii_tx0(/*AUTOINST*/
367
                                     // Outputs
368
                                     .ctrl_tx_enable_ctx(ctrl_tx_enable_ctx),
369
                                     .status_local_fault_ctx(status_local_fault_ctx),
370
                                     .status_remote_fault_ctx(status_remote_fault_ctx),
371
                                     // Inputs
372 12 antanguay
                                     .clk_xgmii_tx      (clk_xgmii_tx),
373
                                     .reset_xgmii_tx_n  (reset_xgmii_tx_n),
374
                                     .ctrl_tx_enable    (ctrl_tx_enable),
375 2 antanguay
                                     .status_local_fault_crx(status_local_fault_crx),
376
                                     .status_remote_fault_crx(status_remote_fault_crx));
377
 
378 23 antanguay
stats stats0(/*AUTOINST*/
379
             // Outputs
380 24 antanguay
             .stats_rx_octets           (stats_rx_octets[31:0]),
381
             .stats_rx_pkts             (stats_rx_pkts[31:0]),
382
             .stats_tx_octets           (stats_tx_octets[31:0]),
383 23 antanguay
             .stats_tx_pkts             (stats_tx_pkts[31:0]),
384
             // Inputs
385 27 antanguay
             .clear_stats_rx_octets     (clear_stats_rx_octets),
386
             .clear_stats_rx_pkts       (clear_stats_rx_pkts),
387
             .clear_stats_tx_octets     (clear_stats_tx_octets),
388
             .clear_stats_tx_pkts       (clear_stats_tx_pkts),
389 24 antanguay
             .clk_xgmii_rx              (clk_xgmii_rx),
390
             .clk_xgmii_tx              (clk_xgmii_tx),
391
             .reset_xgmii_rx_n          (reset_xgmii_rx_n),
392
             .reset_xgmii_tx_n          (reset_xgmii_tx_n),
393
             .rxsfifo_wdata             (rxsfifo_wdata[13:0]),
394
             .rxsfifo_wen               (rxsfifo_wen),
395
             .txsfifo_wdata             (txsfifo_wdata[13:0]),
396
             .txsfifo_wen               (txsfifo_wen),
397 23 antanguay
             .wb_clk_i                  (wb_clk_i),
398 24 antanguay
             .wb_rst_i                  (wb_rst_i));
399 23 antanguay
 
400 20 antanguay
//sync_clk_core sync_clk_core0(/*AUTOINST*/
401
//                             // Inputs
402
//                             .clk_xgmii_tx      (clk_xgmii_tx),
403
//                             .reset_xgmii_tx_n  (reset_xgmii_tx_n));
404 2 antanguay
 
405
wishbone_if wishbone_if0(/*AUTOINST*/
406
                         // Outputs
407 12 antanguay
                         .wb_dat_o              (wb_dat_o[31:0]),
408
                         .wb_ack_o              (wb_ack_o),
409
                         .wb_int_o              (wb_int_o),
410
                         .ctrl_tx_enable        (ctrl_tx_enable),
411 27 antanguay
                         .clear_stats_tx_octets (clear_stats_tx_octets),
412
                         .clear_stats_tx_pkts   (clear_stats_tx_pkts),
413
                         .clear_stats_rx_octets (clear_stats_rx_octets),
414
                         .clear_stats_rx_pkts   (clear_stats_rx_pkts),
415 2 antanguay
                         // Inputs
416 12 antanguay
                         .wb_clk_i              (wb_clk_i),
417
                         .wb_rst_i              (wb_rst_i),
418
                         .wb_adr_i              (wb_adr_i[7:0]),
419
                         .wb_dat_i              (wb_dat_i[31:0]),
420
                         .wb_we_i               (wb_we_i),
421
                         .wb_stb_i              (wb_stb_i),
422
                         .wb_cyc_i              (wb_cyc_i),
423
                         .status_crc_error      (status_crc_error),
424
                         .status_fragment_error (status_fragment_error),
425
                         .status_txdfifo_ovflow (status_txdfifo_ovflow),
426
                         .status_txdfifo_udflow (status_txdfifo_udflow),
427
                         .status_rxdfifo_ovflow (status_rxdfifo_ovflow),
428
                         .status_rxdfifo_udflow (status_rxdfifo_udflow),
429
                         .status_pause_frame_rx (status_pause_frame_rx),
430
                         .status_local_fault    (status_local_fault),
431 23 antanguay
                         .status_remote_fault   (status_remote_fault),
432 24 antanguay
                         .stats_tx_octets       (stats_tx_octets[31:0]),
433 23 antanguay
                         .stats_tx_pkts         (stats_tx_pkts[31:0]),
434 24 antanguay
                         .stats_rx_octets       (stats_rx_octets[31:0]),
435 23 antanguay
                         .stats_rx_pkts         (stats_rx_pkts[31:0]));
436 2 antanguay
 
437
endmodule

powered by: WebSVN 2.1.0

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