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

Subversion Repositories ethmac

[/] [ethmac/] [tags/] [rel_17/] [rtl/] [verilog/] [eth_top.v] - Blame information for rev 261

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

powered by: WebSVN 2.1.0

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