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

Subversion Repositories ethmac

[/] [ethmac/] [tags/] [rel_22/] [rtl/] [verilog/] [eth_top.v] - Blame information for rev 301

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

powered by: WebSVN 2.1.0

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