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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [orpsocv2/] [rtl/] [verilog/] [ethmac/] [eth_top.v] - Blame information for rev 472

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

Line No. Rev Author Line
1 6 julius
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  eth_top.v                                                   ////
4
////                                                              ////
5
////  This file is part of the Ethernet IP core project           ////
6 409 julius
////  http://www.opencores.org/project,ethmac                   ////
7 6 julius
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Igor Mohor (igorM@opencores.org)                      ////
10
////                                                              ////
11
////  All additional information is available in the Readme.txt   ////
12
////  file.                                                       ////
13
////                                                              ////
14
//////////////////////////////////////////////////////////////////////
15
////                                                              ////
16
//// Copyright (C) 2001, 2002 Authors                             ////
17
////                                                              ////
18
//// This source file may be used and distributed without         ////
19
//// restriction provided that this copyright statement is not    ////
20
//// removed from the file and that any derivative work contains  ////
21
//// the original copyright notice and the associated disclaimer. ////
22
////                                                              ////
23
//// This source file is free software; you can redistribute it   ////
24
//// and/or modify it under the terms of the GNU Lesser General   ////
25
//// Public License as published by the Free Software Foundation; ////
26
//// either version 2.1 of the License, or (at your option) any   ////
27
//// later version.                                               ////
28
////                                                              ////
29
//// This source is distributed in the hope that it will be       ////
30
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
31
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
32
//// PURPOSE.  See the GNU Lesser General Public License for more ////
33
//// details.                                                     ////
34
////                                                              ////
35
//// You should have received a copy of the GNU Lesser General    ////
36
//// Public License along with this source; if not, download it   ////
37
//// from http://www.opencores.org/lgpl.shtml                     ////
38
////                                                              ////
39
//////////////////////////////////////////////////////////////////////
40
//
41
// CVS Revision History
42
//
43
// $Log: eth_top.v,v $
44
// Revision 1.52  2005/03/21 20:07:18  igorm
45
// Some small fixes + some troubles fixed.
46
//
47
// Revision 1.51  2005/02/21 11:13:17  igorm
48
// Defer indication fixed.
49
//
50
// Revision 1.50  2004/04/26 15:26:23  igorm
51
// - Bug connected to the TX_BD_NUM_Wr signal fixed (bug came in with the
52
//   previous update of the core.
53
// - TxBDAddress is set to 0 after the TX is enabled in the MODER register.
54
// - RxBDAddress is set to r_TxBDNum<<1 after the RX is enabled in the MODER
55
//   register. (thanks to Mathias and Torbjorn)
56
// - Multicast reception was fixed. Thanks to Ulrich Gries
57
//
58
// Revision 1.49  2003/11/12 18:24:59  tadejm
59
// WISHBONE slave changed and tested from only 32-bit accesss to byte access.
60
//
61
// Revision 1.48  2003/10/17 07:46:16  markom
62
// mbist signals updated according to newest convention
63
//
64
// Revision 1.47  2003/10/06 15:43:45  knguyen
65
// Update RxEnSync only when mrxdv_pad_i is inactive (LOW).
66
//
67
// Revision 1.46  2003/01/30 13:30:22  tadejm
68
// Defer indication changed.
69
//
70
// Revision 1.45  2003/01/22 13:49:26  tadejm
71
// When control packets were received, they were ignored in some cases.
72
//
73
// Revision 1.44  2003/01/21 12:09:40  mohor
74
// When receiving normal data frame and RxFlow control was switched on, RXB
75
// interrupt was not set.
76
//
77
// Revision 1.43  2002/11/22 01:57:06  mohor
78
// Rx Flow control fixed. CF flag added to the RX buffer descriptor. RxAbort
79
// synchronized.
80
//
81
// Revision 1.42  2002/11/21 00:09:19  mohor
82
// TPauseRq synchronized to tx_clk.
83
//
84
// Revision 1.41  2002/11/19 18:13:49  mohor
85
// r_MiiMRst is not used for resetting the MIIM module. wb_rst used instead.
86
//
87
// Revision 1.40  2002/11/19 17:34:25  mohor
88
// AddressMiss status is connecting to the Rx BD. AddressMiss is identifying
89
// that a frame was received because of the promiscous mode.
90
//
91
// Revision 1.39  2002/11/18 17:31:55  mohor
92
// wb_rst_i is used for MIIM reset.
93
//
94
// Revision 1.38  2002/11/14 18:37:20  mohor
95
// r_Rst signal does not reset any module any more and is removed from the design.
96
//
97
// Revision 1.37  2002/11/13 22:25:36  tadejm
98
// All modules are reset with wb_rst instead of the r_Rst. Exception is MII module.
99
//
100
// Revision 1.36  2002/10/18 17:04:20  tadejm
101
// Changed BIST scan signals.
102
//
103
// Revision 1.35  2002/10/11 13:36:58  mohor
104
// Typo error fixed. (When using Bist)
105
//
106
// Revision 1.34  2002/10/10 16:49:50  mohor
107
// Signals for WISHBONE B3 compliant interface added.
108
//
109
// Revision 1.33  2002/10/10 16:29:30  mohor
110
// BIST added.
111
//
112
// Revision 1.32  2002/09/20 17:12:58  mohor
113
// CsMiss added. When address between 0x800 and 0xfff is accessed within
114
// Ethernet Core, error acknowledge is generated.
115
//
116
// Revision 1.31  2002/09/12 14:50:17  mohor
117
// CarrierSenseLost bug fixed when operating in full duplex mode.
118
//
119
// Revision 1.30  2002/09/10 10:35:23  mohor
120
// Ethernet debug registers removed.
121
//
122
// Revision 1.29  2002/09/09 13:03:13  mohor
123
// Error acknowledge is generated when accessing BDs and RST bit in the
124
// MODER register (r_Rst) is set.
125
//
126
// Revision 1.28  2002/09/04 18:44:10  mohor
127
// Signals related to the control frames connected. Debug registers reg1, 2, 3, 4
128
// connected.
129
//
130
// Revision 1.27  2002/07/25 18:15:37  mohor
131
// RxAbort changed. Packets received with MRxErr (from PHY) are also
132
// aborted.
133
//
134
// Revision 1.26  2002/07/17 18:51:50  mohor
135
// EXTERNAL_DMA removed. External DMA not supported.
136
//
137
// Revision 1.25  2002/05/03 10:15:50  mohor
138
// Outputs registered. Reset changed for eth_wishbone module.
139
//
140
// Revision 1.24  2002/04/22 14:15:42  mohor
141
// Wishbone signals are registered when ETH_REGISTERED_OUTPUTS is
142 409 julius
// selected in ethmac_defines.v
143 6 julius
//
144
// Revision 1.23  2002/03/25 13:33:53  mohor
145
// md_padoen_o changed to md_padoe_o. Signal was always active high, just
146
// name was incorrect.
147
//
148
// Revision 1.22  2002/02/26 16:59:54  mohor
149
// Small fixes for external/internal DMA missmatches.
150
//
151
// Revision 1.21  2002/02/26 16:21:00  mohor
152
// Interrupts changed in the top file
153
//
154
// Revision 1.20  2002/02/18 10:40:17  mohor
155
// Small fixes.
156
//
157
// Revision 1.19  2002/02/16 14:03:44  mohor
158
// Registered trimmed. Unused registers removed.
159
//
160
// Revision 1.18  2002/02/16 13:06:33  mohor
161
// EXTERNAL_DMA used instead of WISHBONE_DMA.
162
//
163
// Revision 1.17  2002/02/16 07:15:27  mohor
164
// Testbench fixed, code simplified, unused signals removed.
165
//
166
// Revision 1.16  2002/02/15 13:49:39  mohor
167
// RxAbort is connected differently.
168
//
169
// Revision 1.15  2002/02/15 11:38:26  mohor
170
// Changes that were lost when updating from 1.11 to 1.14 fixed.
171
//
172
// Revision 1.14  2002/02/14 20:19:11  billditt
173
// Modified for Address Checking,
174
// addition of eth_addrcheck.v
175
//
176
// Revision 1.13  2002/02/12 17:03:03  mohor
177
// HASH0 and HASH1 registers added. Registers address width was
178
// changed to 8 bits.
179
//
180
// Revision 1.12  2002/02/11 09:18:22  mohor
181
// Tx status is written back to the BD.
182
//
183
// Revision 1.11  2002/02/08 16:21:54  mohor
184
// Rx status is written back to the BD.
185
//
186
// Revision 1.10  2002/02/06 14:10:21  mohor
187
// non-DMA host interface added. Select the right configutation in eth_defines.
188
//
189
// Revision 1.9  2002/01/23 10:28:16  mohor
190
// Link in the header changed.
191
//
192
// Revision 1.8  2001/12/05 15:00:16  mohor
193
// RX_BD_NUM changed to TX_BD_NUM (holds number of TX descriptors
194
// instead of the number of RX descriptors).
195
//
196
// Revision 1.7  2001/12/05 10:45:59  mohor
197
// ETH_RX_BD_ADR register deleted. ETH_RX_BD_NUM is used instead.
198
//
199
// Revision 1.6  2001/10/19 11:24:29  mohor
200
// Number of addresses (wb_adr_i) minimized.
201
//
202
// Revision 1.5  2001/10/19 08:43:51  mohor
203
// eth_timescale.v changed to timescale.v This is done because of the
204
// simulation of the few cores in a one joined project.
205
//
206
// Revision 1.4  2001/10/18 12:07:11  mohor
207
// Status signals changed, Adress decoding changed, interrupt controller
208
// added.
209
//
210
// Revision 1.3  2001/09/24 15:02:56  mohor
211
// Defines changed (All precede with ETH_). Small changes because some
212
// tools generate warnings when two operands are together. Synchronization
213
// between two clocks domains in eth_wishbonedma.v is changed (due to ASIC
214
// demands).
215
//
216
// Revision 1.2  2001/08/15 14:03:59  mohor
217
// Signal names changed on the top level for easier pad insertion (ASIC).
218
//
219
// Revision 1.1  2001/08/06 14:44:29  mohor
220
// A define FPGA added to select between Artisan RAM (for ASIC) and Block Ram (For Virtex).
221
// Include files fixed to contain no path.
222
// File names and module names changed ta have a eth_ prologue in the name.
223
// File eth_timescale.v is used to define timescale
224
// All pin names on the top module are changed to contain _I, _O or _OE at the end.
225
// Bidirectional signal MDIO is changed to three signals (Mdc_O, Mdi_I, Mdo_O
226
// and Mdo_OE. The bidirectional signal must be created on the top level. This
227
// is done due to the ASIC tools.
228
//
229
// Revision 1.2  2001/08/02 09:25:31  mohor
230
// Unconnected signals are now connected.
231
//
232
// Revision 1.1  2001/07/30 21:23:42  mohor
233
// Directory structure changed. Files checked and joind together.
234
//
235
//
236
//
237
// 
238
 
239
 
240 409 julius
`include "ethmac_defines.v"
241 6 julius
`include "timescale.v"
242
 
243
 
244
module eth_top
245
(
246
  // WISHBONE common
247
  wb_clk_i, wb_rst_i, wb_dat_i, wb_dat_o,
248
 
249
  // WISHBONE slave
250
  wb_adr_i, wb_sel_i, wb_we_i, wb_cyc_i, wb_stb_i, wb_ack_o, wb_err_o,
251
 
252
  // WISHBONE master
253
  m_wb_adr_o, m_wb_sel_o, m_wb_we_o,
254
  m_wb_dat_o, m_wb_dat_i, m_wb_cyc_o,
255
  m_wb_stb_o, m_wb_ack_i, m_wb_err_i,
256
 
257
`ifdef ETH_WISHBONE_B3
258
  m_wb_cti_o, m_wb_bte_o,
259
`endif
260
 
261
  //TX
262
  mtx_clk_pad_i, mtxd_pad_o, mtxen_pad_o, mtxerr_pad_o,
263
 
264
  //RX
265
  mrx_clk_pad_i, mrxd_pad_i, mrxdv_pad_i, mrxerr_pad_i, mcoll_pad_i, mcrs_pad_i,
266
 
267
  // MIIM
268
  mdc_pad_o, md_pad_i, md_pad_o, md_padoe_o,
269
 
270
  int_o
271
 
272
  // Bist
273
`ifdef ETH_BIST
274
  ,
275
  // debug chain signals
276
  mbist_si_i,       // bist scan serial in
277
  mbist_so_o,       // bist scan serial out
278
  mbist_ctrl_i        // bist chain shift control
279
`endif
280
 
281
);
282
 
283
 
284
parameter Tp = 1;
285
 
286
 
287
// WISHBONE common
288
input           wb_clk_i;     // WISHBONE clock
289
input           wb_rst_i;     // WISHBONE reset
290
input   [31:0]  wb_dat_i;     // WISHBONE data input
291
output  [31:0]  wb_dat_o;     // WISHBONE data output
292
output          wb_err_o;     // WISHBONE error output
293
 
294
// WISHBONE slave
295
input   [11:2]  wb_adr_i;     // WISHBONE address input
296
input    [3:0]  wb_sel_i;     // WISHBONE byte select input
297
input           wb_we_i;      // WISHBONE write enable input
298
input           wb_cyc_i;     // WISHBONE cycle input
299
input           wb_stb_i;     // WISHBONE strobe input
300
output          wb_ack_o;     // WISHBONE acknowledge output
301
 
302
// WISHBONE master
303
output  [31:0]  m_wb_adr_o;
304
output   [3:0]  m_wb_sel_o;
305
output          m_wb_we_o;
306
input   [31:0]  m_wb_dat_i;
307
output  [31:0]  m_wb_dat_o;
308
output          m_wb_cyc_o;
309
output          m_wb_stb_o;
310
input           m_wb_ack_i;
311
input           m_wb_err_i;
312
 
313
wire    [29:0]  m_wb_adr_tmp;
314
 
315
`ifdef ETH_WISHBONE_B3
316
output   [2:0]  m_wb_cti_o;   // Cycle Type Identifier
317
output   [1:0]  m_wb_bte_o;   // Burst Type Extension
318
`endif
319
 
320
// Tx
321
input           mtx_clk_pad_i; // Transmit clock (from PHY)
322
output   [3:0]  mtxd_pad_o;    // Transmit nibble (to PHY)
323
output          mtxen_pad_o;   // Transmit enable (to PHY)
324
output          mtxerr_pad_o;  // Transmit error (to PHY)
325
 
326
// Rx
327
input           mrx_clk_pad_i; // Receive clock (from PHY)
328
input    [3:0]  mrxd_pad_i;    // Receive nibble (from PHY)
329
input           mrxdv_pad_i;   // Receive data valid (from PHY)
330
input           mrxerr_pad_i;  // Receive data error (from PHY)
331
 
332
// Common Tx and Rx
333
input           mcoll_pad_i;   // Collision (from PHY)
334
input           mcrs_pad_i;    // Carrier sense (from PHY)
335
 
336
// MII Management interface
337
input           md_pad_i;      // MII data input (from I/O cell)
338
output          mdc_pad_o;     // MII Management data clock (to PHY)
339
output          md_pad_o;      // MII data output (to I/O cell)
340
output          md_padoe_o;    // MII data output enable (to I/O cell)
341
 
342
output          int_o;         // Interrupt output
343
 
344
// Bist
345
`ifdef ETH_BIST
346
input   mbist_si_i;       // bist scan serial in
347
output  mbist_so_o;       // bist scan serial out
348
input [`ETH_MBIST_CTRL_WIDTH - 1:0] mbist_ctrl_i;       // bist chain shift control
349
`endif
350
 
351
wire     [7:0]  r_ClkDiv;
352
wire            r_MiiNoPre;
353
wire    [15:0]  r_CtrlData;
354
wire     [4:0]  r_FIAD;
355
wire     [4:0]  r_RGAD;
356
wire            r_WCtrlData;
357
wire            r_RStat;
358
wire            r_ScanStat;
359
wire            NValid_stat;
360
wire            Busy_stat;
361
wire            LinkFail;
362
wire    [15:0]  Prsd;             // Read Status Data (data read from the PHY)
363
wire            WCtrlDataStart;
364
wire            RStatStart;
365
wire            UpdateMIIRX_DATAReg;
366
 
367
wire            TxStartFrm;
368
wire            TxEndFrm;
369
wire            TxUsedData;
370
wire     [7:0]  TxData;
371
wire            TxRetry;
372
wire            TxAbort;
373
wire            TxUnderRun;
374
wire            TxDone;
375
 
376
 
377
reg             WillSendControlFrame_sync1;
378
reg             WillSendControlFrame_sync2;
379
reg             WillSendControlFrame_sync3;
380
reg             RstTxPauseRq;
381
 
382
reg             TxPauseRq_sync1;
383
reg             TxPauseRq_sync2;
384
reg             TxPauseRq_sync3;
385
reg             TPauseRq;
386
 
387
 
388
// Connecting Miim module
389
eth_miim miim1
390
(
391
  .Clk(wb_clk_i),                         .Reset(wb_rst_i),                   .Divider(r_ClkDiv),
392
  .NoPre(r_MiiNoPre),                     .CtrlData(r_CtrlData),              .Rgad(r_RGAD),
393
  .Fiad(r_FIAD),                          .WCtrlData(r_WCtrlData),            .RStat(r_RStat),
394
  .ScanStat(r_ScanStat),                  .Mdi(md_pad_i),                     .Mdo(md_pad_o),
395
  .MdoEn(md_padoe_o),                     .Mdc(mdc_pad_o),                    .Busy(Busy_stat),
396
  .Prsd(Prsd),                            .LinkFail(LinkFail),                .Nvalid(NValid_stat),
397
  .WCtrlDataStart(WCtrlDataStart),        .RStatStart(RStatStart),            .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg)
398
);
399
 
400
 
401
 
402
 
403
wire  [3:0] RegCs;          // Connected to registers
404
wire [31:0] RegDataOut;     // Multiplexed to wb_dat_o
405
wire        r_RecSmall;     // Receive small frames
406
wire        r_LoopBck;      // Loopback
407
wire        r_TxEn;         // Tx Enable
408
wire        r_RxEn;         // Rx Enable
409
 
410
wire        MRxDV_Lb;       // Muxed MII receive data valid
411
wire        MRxErr_Lb;      // Muxed MII Receive Error
412
wire  [3:0] MRxD_Lb;        // Muxed MII Receive Data
413
wire        Transmitting;   // Indication that TxEthMAC is transmitting
414
wire        r_HugEn;        // Huge packet enable
415
wire        r_DlyCrcEn;     // Delayed CRC enabled
416
wire [15:0] r_MaxFL;        // Maximum frame length
417
 
418
wire [15:0] r_MinFL;        // Minimum frame length
419
wire        ShortFrame;
420
wire        DribbleNibble;  // Extra nibble received
421
wire        ReceivedPacketTooBig; // Received packet is too big
422
wire [47:0] r_MAC;          // MAC address
423
wire        LoadRxStatus;   // Rx status was loaded
424
wire [31:0] r_HASH0;        // HASH table, lower 4 bytes
425
wire [31:0] r_HASH1;        // HASH table, upper 4 bytes
426
wire  [7:0] r_TxBDNum;      // Receive buffer descriptor number
427
wire  [6:0] r_IPGT;         // 
428
wire  [6:0] r_IPGR1;        // 
429
wire  [6:0] r_IPGR2;        // 
430
wire  [5:0] r_CollValid;    // 
431
wire [15:0] r_TxPauseTV;    // Transmit PAUSE value
432
wire        r_TxPauseRq;    // Transmit PAUSE request
433
 
434
wire  [3:0] r_MaxRet;       //
435
wire        r_NoBckof;      // 
436
wire        r_ExDfrEn;      // 
437
wire        r_TxFlow;       // Tx flow control enable
438
wire        r_IFG;          // Minimum interframe gap for incoming packets
439
 
440
wire        TxB_IRQ;        // Interrupt Tx Buffer
441
wire        TxE_IRQ;        // Interrupt Tx Error
442
wire        RxB_IRQ;        // Interrupt Rx Buffer
443
wire        RxE_IRQ;        // Interrupt Rx Error
444
wire        Busy_IRQ;       // Interrupt Busy (lack of buffers)
445
 
446
//wire        DWord;
447
wire        ByteSelected;
448
wire        BDAck;
449
wire [31:0] BD_WB_DAT_O;    // wb_dat_o that comes from the Wishbone module (for buffer descriptors read/write)
450
wire  [3:0] BDCs;           // Buffer descriptor CS
451
wire        CsMiss;         // When access to the address between 0x800 and 0xfff occurs, acknowledge is set
452
                            // but data is not valid.
453
wire        r_Pad;
454
wire        r_CrcEn;
455
wire        r_FullD;
456
wire        r_Pro;
457
wire        r_Bro;
458
wire        r_NoPre;
459
wire        r_RxFlow;
460
wire        r_PassAll;
461
wire        TxCtrlEndFrm;
462
wire        StartTxDone;
463
wire        SetPauseTimer;
464
wire        TxUsedDataIn;
465
wire        TxDoneIn;
466
wire        TxAbortIn;
467
wire        PerPacketPad;
468
wire        PadOut;
469
wire        PerPacketCrcEn;
470
wire        CrcEnOut;
471
wire        TxStartFrmOut;
472
wire        TxEndFrmOut;
473
wire        ReceivedPauseFrm;
474
wire        ControlFrmAddressOK;
475
wire        RxStatusWriteLatched_sync2;
476
wire        LateCollision;
477
wire        DeferIndication;
478
wire        LateCollLatched;
479
wire        DeferLatched;
480
wire        RstDeferLatched;
481
wire        CarrierSenseLost;
482
 
483
wire        temp_wb_ack_o;
484
wire [31:0] temp_wb_dat_o;
485
wire        temp_wb_err_o;
486
 
487
`ifdef ETH_REGISTERED_OUTPUTS
488
  reg         temp_wb_ack_o_reg;
489
  reg [31:0]  temp_wb_dat_o_reg;
490
  reg         temp_wb_err_o_reg;
491
`endif
492
 
493
//assign DWord = &wb_sel_i;
494
assign ByteSelected = |wb_sel_i;
495
assign RegCs[3] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[3];   // 0x0   - 0x3FF
496
assign RegCs[2] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[2];   // 0x0   - 0x3FF
497
assign RegCs[1] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[1];   // 0x0   - 0x3FF
498
assign RegCs[0] = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] & ~wb_adr_i[10] & wb_sel_i[0];   // 0x0   - 0x3FF
499
assign BDCs[3]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[3];   // 0x400 - 0x7FF
500
assign BDCs[2]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[2];   // 0x400 - 0x7FF
501
assign BDCs[1]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[1];   // 0x400 - 0x7FF
502
assign BDCs[0]  = wb_stb_i & wb_cyc_i & ByteSelected & ~wb_adr_i[11] &  wb_adr_i[10] & wb_sel_i[0];   // 0x400 - 0x7FF
503
assign CsMiss = wb_stb_i & wb_cyc_i & ByteSelected & wb_adr_i[11];                   // 0x800 - 0xfFF
504
assign temp_wb_dat_o = ((|RegCs) & ~wb_we_i)? RegDataOut : BD_WB_DAT_O;
505
assign temp_wb_err_o = wb_stb_i & wb_cyc_i & (~ByteSelected | CsMiss);
506
 
507
`ifdef ETH_REGISTERED_OUTPUTS
508
  assign wb_ack_o = temp_wb_ack_o_reg;
509
  assign wb_dat_o[31:0] = temp_wb_dat_o_reg;
510
  assign wb_err_o = temp_wb_err_o_reg;
511
`else
512
  assign wb_ack_o = temp_wb_ack_o;
513
  assign wb_dat_o[31:0] = temp_wb_dat_o;
514
  assign wb_err_o = temp_wb_err_o;
515
`endif
516
 
517
`ifdef ETH_AVALON_BUS
518
  // As Avalon has no corresponding "error" signal, I (erroneously) will
519
  // send an ack to Avalon, even when accessing undefined memory. This
520
  // is a grey area in Avalon vs. Wishbone specs: My understanding
521
  // is that Avalon expects all memory addressable by the addr bus feeding
522
  // a slave to be, at the very minimum, readable.
523
  assign temp_wb_ack_o = (|RegCs) | BDAck | CsMiss;
524
`else // WISHBONE
525
  assign temp_wb_ack_o = (|RegCs) | BDAck;
526
`endif
527
 
528
`ifdef ETH_REGISTERED_OUTPUTS
529
  always @ (posedge wb_clk_i or posedge wb_rst_i)
530
  begin
531
    if(wb_rst_i)
532
      begin
533
        temp_wb_ack_o_reg <=#Tp 1'b0;
534
        temp_wb_dat_o_reg <=#Tp 32'h0;
535
        temp_wb_err_o_reg <=#Tp 1'b0;
536
      end
537
    else
538
      begin
539
        temp_wb_ack_o_reg <=#Tp temp_wb_ack_o & ~temp_wb_ack_o_reg;
540
        temp_wb_dat_o_reg <=#Tp temp_wb_dat_o;
541
        temp_wb_err_o_reg <=#Tp temp_wb_err_o & ~temp_wb_err_o_reg;
542
      end
543
  end
544
`endif
545
 
546
 
547
// Connecting Ethernet registers
548
eth_registers ethreg1
549
(
550
  .DataIn(wb_dat_i),                      .Address(wb_adr_i[9:2]),                    .Rw(wb_we_i),
551
  .Cs(RegCs),                             .Clk(wb_clk_i),                             .Reset(wb_rst_i),
552
  .DataOut(RegDataOut),                   .r_RecSmall(r_RecSmall),
553
  .r_Pad(r_Pad),                          .r_HugEn(r_HugEn),                          .r_CrcEn(r_CrcEn),
554
  .r_DlyCrcEn(r_DlyCrcEn),                .r_FullD(r_FullD),
555
  .r_ExDfrEn(r_ExDfrEn),                  .r_NoBckof(r_NoBckof),                      .r_LoopBck(r_LoopBck),
556
  .r_IFG(r_IFG),                          .r_Pro(r_Pro),                              .r_Iam(),
557
  .r_Bro(r_Bro),                          .r_NoPre(r_NoPre),                          .r_TxEn(r_TxEn),
558
  .r_RxEn(r_RxEn),                        .Busy_IRQ(Busy_IRQ),                        .RxE_IRQ(RxE_IRQ),
559
  .RxB_IRQ(RxB_IRQ),                      .TxE_IRQ(TxE_IRQ),                          .TxB_IRQ(TxB_IRQ),
560
  .r_IPGT(r_IPGT),
561
  .r_IPGR1(r_IPGR1),                      .r_IPGR2(r_IPGR2),                          .r_MinFL(r_MinFL),
562
  .r_MaxFL(r_MaxFL),                      .r_MaxRet(r_MaxRet),                        .r_CollValid(r_CollValid),
563
  .r_TxFlow(r_TxFlow),                    .r_RxFlow(r_RxFlow),                        .r_PassAll(r_PassAll),
564
  .r_MiiNoPre(r_MiiNoPre),                .r_ClkDiv(r_ClkDiv),
565
  .r_WCtrlData(r_WCtrlData),              .r_RStat(r_RStat),                          .r_ScanStat(r_ScanStat),
566
  .r_RGAD(r_RGAD),                        .r_FIAD(r_FIAD),                            .r_CtrlData(r_CtrlData),
567
  .NValid_stat(NValid_stat),              .Busy_stat(Busy_stat),
568
  .LinkFail(LinkFail),                    .r_MAC(r_MAC),                              .WCtrlDataStart(WCtrlDataStart),
569
  .RStatStart(RStatStart),                .UpdateMIIRX_DATAReg(UpdateMIIRX_DATAReg),  .Prsd(Prsd),
570
  .r_TxBDNum(r_TxBDNum),                  .int_o(int_o),
571
  .r_HASH0(r_HASH0),                      .r_HASH1(r_HASH1),                          .r_TxPauseRq(r_TxPauseRq),
572
  .r_TxPauseTV(r_TxPauseTV),              .RstTxPauseRq(RstTxPauseRq),                .TxCtrlEndFrm(TxCtrlEndFrm),
573
  .StartTxDone(StartTxDone),              .TxClk(mtx_clk_pad_i),                      .RxClk(mrx_clk_pad_i),
574
  .SetPauseTimer(SetPauseTimer)
575
 
576
);
577
 
578
 
579
 
580
wire  [7:0] RxData;
581
wire        RxValid;
582
wire        RxStartFrm;
583
wire        RxEndFrm;
584
wire        RxAbort;
585
 
586
wire        WillTransmit;            // Will transmit (to RxEthMAC)
587
wire        ResetCollision;          // Reset Collision (for synchronizing collision)
588
wire  [7:0] TxDataOut;               // Transmit Packet Data (to TxEthMAC)
589
wire        WillSendControlFrame;
590
wire        ReceiveEnd;
591
wire        ReceivedPacketGood;
592
wire        ReceivedLengthOK;
593
wire        InvalidSymbol;
594
wire        LatchedCrcError;
595
wire        RxLateCollision;
596
wire  [3:0] RetryCntLatched;
597
wire  [3:0] RetryCnt;
598
wire        StartTxAbort;
599
wire        MaxCollisionOccured;
600
wire        RetryLimit;
601
wire        StatePreamble;
602
wire  [1:0] StateData;
603
 
604
// Connecting MACControl
605
eth_maccontrol maccontrol1
606
(
607
  .MTxClk(mtx_clk_pad_i),                       .TPauseRq(TPauseRq),
608
  .TxPauseTV(r_TxPauseTV),                      .TxDataIn(TxData),
609
  .TxStartFrmIn(TxStartFrm),                    .TxEndFrmIn(TxEndFrm),
610
  .TxUsedDataIn(TxUsedDataIn),                  .TxDoneIn(TxDoneIn),
611
  .TxAbortIn(TxAbortIn),                        .MRxClk(mrx_clk_pad_i),
612
  .RxData(RxData),                              .RxValid(RxValid),
613
  .RxStartFrm(RxStartFrm),                      .RxEndFrm(RxEndFrm),
614
  .ReceiveEnd(ReceiveEnd),                      .ReceivedPacketGood(ReceivedPacketGood),
615
  .TxFlow(r_TxFlow),
616
  .RxFlow(r_RxFlow),                            .DlyCrcEn(r_DlyCrcEn),
617
  .MAC(r_MAC),                                  .PadIn(r_Pad | PerPacketPad),
618
  .PadOut(PadOut),                              .CrcEnIn(r_CrcEn | PerPacketCrcEn),
619
  .CrcEnOut(CrcEnOut),                          .TxReset(wb_rst_i),
620
  .RxReset(wb_rst_i),                           .ReceivedLengthOK(ReceivedLengthOK),
621
  .TxDataOut(TxDataOut),                        .TxStartFrmOut(TxStartFrmOut),
622
  .TxEndFrmOut(TxEndFrmOut),                    .TxUsedDataOut(TxUsedData),
623
  .TxDoneOut(TxDone),                           .TxAbortOut(TxAbort),
624
  .WillSendControlFrame(WillSendControlFrame),  .TxCtrlEndFrm(TxCtrlEndFrm),
625
  .ReceivedPauseFrm(ReceivedPauseFrm),          .ControlFrmAddressOK(ControlFrmAddressOK),
626
  .SetPauseTimer(SetPauseTimer),
627
  .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),                .r_PassAll(r_PassAll)
628
);
629
 
630
 
631
 
632
wire TxCarrierSense;          // Synchronized CarrierSense (to Tx clock)
633
wire Collision;               // Synchronized Collision
634
 
635
reg CarrierSense_Tx1;
636
reg CarrierSense_Tx2;
637
reg Collision_Tx1;
638
reg Collision_Tx2;
639
 
640
reg RxEnSync;                 // Synchronized Receive Enable
641
reg WillTransmit_q;
642
reg WillTransmit_q2;
643
 
644
 
645
 
646
// Muxed MII receive data valid
647
assign MRxDV_Lb = r_LoopBck? mtxen_pad_o : mrxdv_pad_i & RxEnSync;
648
 
649
// Muxed MII Receive Error
650
assign MRxErr_Lb = r_LoopBck? mtxerr_pad_o : mrxerr_pad_i & RxEnSync;
651
 
652
// Muxed MII Receive Data
653
assign MRxD_Lb[3:0] = r_LoopBck? mtxd_pad_o[3:0] : mrxd_pad_i[3:0];
654
 
655
 
656
 
657
// Connecting TxEthMAC
658
eth_txethmac txethmac1
659
(
660
  .MTxClk(mtx_clk_pad_i),             .Reset(wb_rst_i),                   .CarrierSense(TxCarrierSense),
661
  .Collision(Collision),              .TxData(TxDataOut),                 .TxStartFrm(TxStartFrmOut),
662
  .TxUnderRun(TxUnderRun),            .TxEndFrm(TxEndFrmOut),             .Pad(PadOut),
663
  .MinFL(r_MinFL),                    .CrcEn(CrcEnOut),                   .FullD(r_FullD),
664
  .HugEn(r_HugEn),                    .DlyCrcEn(r_DlyCrcEn),              .IPGT(r_IPGT),
665
  .IPGR1(r_IPGR1),                    .IPGR2(r_IPGR2),                    .CollValid(r_CollValid),
666
  .MaxRet(r_MaxRet),                  .NoBckof(r_NoBckof),                .ExDfrEn(r_ExDfrEn),
667
  .MaxFL(r_MaxFL),                    .MTxEn(mtxen_pad_o),                .MTxD(mtxd_pad_o),
668
  .MTxErr(mtxerr_pad_o),              .TxUsedData(TxUsedDataIn),          .TxDone(TxDoneIn),
669
  .TxRetry(TxRetry),                  .TxAbort(TxAbortIn),                .WillTransmit(WillTransmit),
670
  .ResetCollision(ResetCollision),    .RetryCnt(RetryCnt),                .StartTxDone(StartTxDone),
671
  .StartTxAbort(StartTxAbort),        .MaxCollisionOccured(MaxCollisionOccured), .LateCollision(LateCollision),
672
  .DeferIndication(DeferIndication),  .StatePreamble(StatePreamble),      .StateData(StateData)
673
);
674
 
675
 
676
 
677
 
678
wire  [15:0]  RxByteCnt;
679
wire          RxByteCntEq0;
680
wire          RxByteCntGreat2;
681
wire          RxByteCntMaxFrame;
682
wire          RxCrcError;
683
wire          RxStateIdle;
684
wire          RxStatePreamble;
685
wire          RxStateSFD;
686
wire   [1:0]  RxStateData;
687
wire          AddressMiss;
688
 
689
 
690
 
691
// Connecting RxEthMAC
692
eth_rxethmac rxethmac1
693
(
694
  .MRxClk(mrx_clk_pad_i),               .MRxDV(MRxDV_Lb),                     .MRxD(MRxD_Lb),
695
  .Transmitting(Transmitting),          .HugEn(r_HugEn),                      .DlyCrcEn(r_DlyCrcEn),
696
  .MaxFL(r_MaxFL),                      .r_IFG(r_IFG),                        .Reset(wb_rst_i),
697
  .RxData(RxData),                      .RxValid(RxValid),                    .RxStartFrm(RxStartFrm),
698
  .RxEndFrm(RxEndFrm),                  .ByteCnt(RxByteCnt),
699
  .ByteCntEq0(RxByteCntEq0),            .ByteCntGreat2(RxByteCntGreat2),      .ByteCntMaxFrame(RxByteCntMaxFrame),
700
  .CrcError(RxCrcError),                .StateIdle(RxStateIdle),              .StatePreamble(RxStatePreamble),
701
  .StateSFD(RxStateSFD),                .StateData(RxStateData),
702
  .MAC(r_MAC),                          .r_Pro(r_Pro),                        .r_Bro(r_Bro),
703
  .r_HASH0(r_HASH0),                    .r_HASH1(r_HASH1),                    .RxAbort(RxAbort),
704
  .AddressMiss(AddressMiss),            .PassAll(r_PassAll),                  .ControlFrmAddressOK(ControlFrmAddressOK)
705
);
706
 
707
 
708
// MII Carrier Sense Synchronization
709
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
710
begin
711
  if(wb_rst_i)
712
    begin
713
      CarrierSense_Tx1 <= #Tp 1'b0;
714
      CarrierSense_Tx2 <= #Tp 1'b0;
715
    end
716
  else
717
    begin
718
      CarrierSense_Tx1 <= #Tp mcrs_pad_i;
719
      CarrierSense_Tx2 <= #Tp CarrierSense_Tx1;
720
    end
721
end
722
 
723
assign TxCarrierSense = ~r_FullD & CarrierSense_Tx2;
724
 
725
 
726
// MII Collision Synchronization
727
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
728
begin
729
  if(wb_rst_i)
730
    begin
731
      Collision_Tx1 <= #Tp 1'b0;
732
      Collision_Tx2 <= #Tp 1'b0;
733
    end
734
  else
735
    begin
736
      Collision_Tx1 <= #Tp mcoll_pad_i;
737
      if(ResetCollision)
738
        Collision_Tx2 <= #Tp 1'b0;
739
      else
740
      if(Collision_Tx1)
741
        Collision_Tx2 <= #Tp 1'b1;
742
    end
743
end
744
 
745
 
746
// Synchronized Collision
747
assign Collision = ~r_FullD & Collision_Tx2;
748
 
749
 
750
 
751
// Delayed WillTransmit
752
always @ (posedge mrx_clk_pad_i)
753
begin
754
  WillTransmit_q <= #Tp WillTransmit;
755
  WillTransmit_q2 <= #Tp WillTransmit_q;
756
end
757
 
758
 
759
assign Transmitting = ~r_FullD & WillTransmit_q2;
760
 
761
 
762
 
763
// Synchronized Receive Enable
764
always @ (posedge mrx_clk_pad_i or posedge wb_rst_i)
765
begin
766
  if(wb_rst_i)
767
    RxEnSync <= #Tp 1'b0;
768
  else
769
  if(~mrxdv_pad_i)
770
    RxEnSync <= #Tp r_RxEn;
771
end
772
 
773
 
774
 
775
// Synchronizing WillSendControlFrame to WB_CLK;
776
always @ (posedge wb_clk_i or posedge wb_rst_i)
777
begin
778
  if(wb_rst_i)
779
    WillSendControlFrame_sync1 <= 1'b0;
780
  else
781
    WillSendControlFrame_sync1 <=#Tp WillSendControlFrame;
782
end
783
 
784
always @ (posedge wb_clk_i or posedge wb_rst_i)
785
begin
786
  if(wb_rst_i)
787
    WillSendControlFrame_sync2 <= 1'b0;
788
  else
789
    WillSendControlFrame_sync2 <=#Tp WillSendControlFrame_sync1;
790
end
791
 
792
always @ (posedge wb_clk_i or posedge wb_rst_i)
793
begin
794
  if(wb_rst_i)
795
    WillSendControlFrame_sync3 <= 1'b0;
796
  else
797
    WillSendControlFrame_sync3 <=#Tp WillSendControlFrame_sync2;
798
end
799
 
800
always @ (posedge wb_clk_i or posedge wb_rst_i)
801
begin
802
  if(wb_rst_i)
803
    RstTxPauseRq <= 1'b0;
804
  else
805
    RstTxPauseRq <=#Tp WillSendControlFrame_sync2 & ~WillSendControlFrame_sync3;
806
end
807
 
808
 
809
 
810
 
811
// TX Pause request Synchronization
812
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
813
begin
814
  if(wb_rst_i)
815
    begin
816
      TxPauseRq_sync1 <= #Tp 1'b0;
817
      TxPauseRq_sync2 <= #Tp 1'b0;
818
      TxPauseRq_sync3 <= #Tp 1'b0;
819
    end
820
  else
821
    begin
822
      TxPauseRq_sync1 <= #Tp (r_TxPauseRq & r_TxFlow);
823
      TxPauseRq_sync2 <= #Tp TxPauseRq_sync1;
824
      TxPauseRq_sync3 <= #Tp TxPauseRq_sync2;
825
    end
826
end
827
 
828
 
829
always @ (posedge mtx_clk_pad_i or posedge wb_rst_i)
830
begin
831
  if(wb_rst_i)
832
    TPauseRq <= #Tp 1'b0;
833
  else
834
    TPauseRq <= #Tp TxPauseRq_sync2 & (~TxPauseRq_sync3);
835
end
836
 
837
 
838
wire LatchedMRxErr;
839
reg RxAbort_latch;
840
reg RxAbort_sync1;
841
reg RxAbort_wb;
842
reg RxAbortRst_sync1;
843
reg RxAbortRst;
844
 
845
// Synchronizing RxAbort to the WISHBONE clock
846
always @ (posedge mrx_clk_pad_i or posedge wb_rst_i)
847
begin
848
  if(wb_rst_i)
849
    RxAbort_latch <= #Tp 1'b0;
850
  else if(RxAbort | (ShortFrame & ~r_RecSmall) | LatchedMRxErr & ~InvalidSymbol | (ReceivedPauseFrm & (~r_PassAll)))
851
    RxAbort_latch <= #Tp 1'b1;
852
  else if(RxAbortRst)
853
    RxAbort_latch <= #Tp 1'b0;
854
end
855
 
856
always @ (posedge wb_clk_i or posedge wb_rst_i)
857
begin
858
  if(wb_rst_i)
859
    begin
860
      RxAbort_sync1 <= #Tp 1'b0;
861
      RxAbort_wb    <= #Tp 1'b0;
862
      RxAbort_wb    <= #Tp 1'b0;
863
    end
864
  else
865
    begin
866
      RxAbort_sync1 <= #Tp RxAbort_latch;
867
      RxAbort_wb    <= #Tp RxAbort_sync1;
868
    end
869
end
870
 
871
always @ (posedge mrx_clk_pad_i or posedge wb_rst_i)
872
begin
873
  if(wb_rst_i)
874
    begin
875
      RxAbortRst_sync1 <= #Tp 1'b0;
876
      RxAbortRst       <= #Tp 1'b0;
877
    end
878
  else
879
    begin
880
      RxAbortRst_sync1 <= #Tp RxAbort_wb;
881
      RxAbortRst       <= #Tp RxAbortRst_sync1;
882
    end
883
end
884
 
885
 
886
 
887
// Connecting Wishbone module
888
eth_wishbone wishbone
889
(
890
  .WB_CLK_I(wb_clk_i),                .WB_DAT_I(wb_dat_i),
891
  .WB_DAT_O(BD_WB_DAT_O),
892
 
893
  // WISHBONE slave
894
  .WB_ADR_I(wb_adr_i[9:2]),           .WB_WE_I(wb_we_i),
895
  .BDCs(BDCs),                        .WB_ACK_O(BDAck),
896
 
897
  .Reset(wb_rst_i),
898
 
899
  // WISHBONE master
900
  .m_wb_adr_o(m_wb_adr_tmp),          .m_wb_sel_o(m_wb_sel_o),                  .m_wb_we_o(m_wb_we_o),
901
  .m_wb_dat_i(m_wb_dat_i),            .m_wb_dat_o(m_wb_dat_o),                  .m_wb_cyc_o(m_wb_cyc_o),
902
  .m_wb_stb_o(m_wb_stb_o),            .m_wb_ack_i(m_wb_ack_i),                  .m_wb_err_i(m_wb_err_i),
903
 
904
`ifdef ETH_WISHBONE_B3
905
  .m_wb_cti_o(m_wb_cti_o),            .m_wb_bte_o(m_wb_bte_o),
906
`endif
907
 
908
 
909
    //TX
910
  .MTxClk(mtx_clk_pad_i),             .TxStartFrm(TxStartFrm),                  .TxEndFrm(TxEndFrm),
911
  .TxUsedData(TxUsedData),            .TxData(TxData),
912
  .TxRetry(TxRetry),                  .TxAbort(TxAbort),                        .TxUnderRun(TxUnderRun),
913
  .TxDone(TxDone),
914
  .PerPacketCrcEn(PerPacketCrcEn),    .PerPacketPad(PerPacketPad),
915
 
916
  // Register
917
  .r_TxEn(r_TxEn),                    .r_RxEn(r_RxEn),                          .r_TxBDNum(r_TxBDNum),
918
  .r_RxFlow(r_RxFlow),                      .r_PassAll(r_PassAll),
919
 
920
  //RX
921
  .MRxClk(mrx_clk_pad_i),             .RxData(RxData),                          .RxValid(RxValid),
922
  .RxStartFrm(RxStartFrm),            .RxEndFrm(RxEndFrm),
923
  .Busy_IRQ(Busy_IRQ),                .RxE_IRQ(RxE_IRQ),                        .RxB_IRQ(RxB_IRQ),
924
  .TxE_IRQ(TxE_IRQ),                  .TxB_IRQ(TxB_IRQ),
925
 
926
  .RxAbort(RxAbort_wb),               .RxStatusWriteLatched_sync2(RxStatusWriteLatched_sync2),
927
 
928
  .InvalidSymbol(InvalidSymbol),      .LatchedCrcError(LatchedCrcError),        .RxLength(RxByteCnt),
929
  .RxLateCollision(RxLateCollision),  .ShortFrame(ShortFrame),                  .DribbleNibble(DribbleNibble),
930
  .ReceivedPacketTooBig(ReceivedPacketTooBig), .LoadRxStatus(LoadRxStatus),     .RetryCntLatched(RetryCntLatched),
931
  .RetryLimit(RetryLimit),            .LateCollLatched(LateCollLatched),        .DeferLatched(DeferLatched),
932
  .RstDeferLatched(RstDeferLatched),
933
  .CarrierSenseLost(CarrierSenseLost),.ReceivedPacketGood(ReceivedPacketGood),  .AddressMiss(AddressMiss),
934
  .ReceivedPauseFrm(ReceivedPauseFrm)
935
 
936
`ifdef ETH_BIST
937
  ,
938
  .mbist_si_i       (mbist_si_i),
939
  .mbist_so_o       (mbist_so_o),
940
  .mbist_ctrl_i       (mbist_ctrl_i)
941
`endif
942
);
943
 
944
assign m_wb_adr_o = {m_wb_adr_tmp, 2'h0};
945
 
946
// Connecting MacStatus module
947
eth_macstatus macstatus1
948
(
949
  .MRxClk(mrx_clk_pad_i),             .Reset(wb_rst_i),
950
  .ReceiveEnd(ReceiveEnd),            .ReceivedPacketGood(ReceivedPacketGood),     .ReceivedLengthOK(ReceivedLengthOK),
951
  .RxCrcError(RxCrcError),            .MRxErr(MRxErr_Lb),                          .MRxDV(MRxDV_Lb),
952
  .RxStateSFD(RxStateSFD),            .RxStateData(RxStateData),                   .RxStatePreamble(RxStatePreamble),
953
  .RxStateIdle(RxStateIdle),          .Transmitting(Transmitting),                 .RxByteCnt(RxByteCnt),
954
  .RxByteCntEq0(RxByteCntEq0),        .RxByteCntGreat2(RxByteCntGreat2),           .RxByteCntMaxFrame(RxByteCntMaxFrame),
955
  .InvalidSymbol(InvalidSymbol),
956
  .MRxD(MRxD_Lb),                     .LatchedCrcError(LatchedCrcError),           .Collision(mcoll_pad_i),
957
  .CollValid(r_CollValid),            .RxLateCollision(RxLateCollision),           .r_RecSmall(r_RecSmall),
958
  .r_MinFL(r_MinFL),                  .r_MaxFL(r_MaxFL),                           .ShortFrame(ShortFrame),
959
  .DribbleNibble(DribbleNibble),      .ReceivedPacketTooBig(ReceivedPacketTooBig), .r_HugEn(r_HugEn),
960
  .LoadRxStatus(LoadRxStatus),        .RetryCnt(RetryCnt),                         .StartTxDone(StartTxDone),
961
  .StartTxAbort(StartTxAbort),        .RetryCntLatched(RetryCntLatched),           .MTxClk(mtx_clk_pad_i),
962
  .MaxCollisionOccured(MaxCollisionOccured), .RetryLimit(RetryLimit),              .LateCollision(LateCollision),
963
  .LateCollLatched(LateCollLatched),  .DeferIndication(DeferIndication),           .DeferLatched(DeferLatched),
964
  .RstDeferLatched(RstDeferLatched),
965
  .TxStartFrm(TxStartFrmOut),         .StatePreamble(StatePreamble),               .StateData(StateData),
966
  .CarrierSense(CarrierSense_Tx2),    .CarrierSenseLost(CarrierSenseLost),         .TxUsedData(TxUsedDataIn),
967
  .LatchedMRxErr(LatchedMRxErr),      .Loopback(r_LoopBck),                        .r_FullD(r_FullD)
968
);
969
 
970
 
971
endmodule

powered by: WebSVN 2.1.0

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