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

Subversion Repositories ethmac

[/] [ethmac/] [branches/] [unneback/] [rtl/] [verilog/] [eth_top.v] - Blame information for rev 302

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

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

powered by: WebSVN 2.1.0

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