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

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [rtl/] [gmac/] [mac/] [g_mac_core.v] - Blame information for rev 36

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

Line No. Rev Author Line
1 12 dinesha
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  Tubo 8051 cores MAC Interface Module                        ////
4
////                                                              ////
5
////  This file is part of the Turbo 8051 cores project           ////
6
////  http://www.opencores.org/cores/turbo8051/                   ////
7
////                                                              ////
8
////  Description                                                 ////
9
////  Turbo 8051 definitions.                                     ////
10
////                                                              ////
11
////  To Do:                                                      ////
12
////    nothing                                                   ////
13
////                                                              ////
14
////  Author(s):                                                  ////
15
////      - Dinesh Annayya, dinesha@opencores.org                 ////
16
////                                                              ////
17
//////////////////////////////////////////////////////////////////////
18
////                                                              ////
19
//// Copyright (C) 2000 Authors and OPENCORES.ORG                 ////
20
////                                                              ////
21
//// This source file may be used and distributed without         ////
22
//// restriction provided that this copyright statement is not    ////
23
//// removed from the file and that any derivative work contains  ////
24
//// the original copyright notice and the associated disclaimer. ////
25
////                                                              ////
26
//// This source file is free software; you can redistribute it   ////
27
//// and/or modify it under the terms of the GNU Lesser General   ////
28
//// Public License as published by the Free Software Foundation; ////
29
//// either version 2.1 of the License, or (at your option) any   ////
30
//// later version.                                               ////
31
////                                                              ////
32
//// This source is distributed in the hope that it will be       ////
33
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
34
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
35
//// PURPOSE.  See the GNU Lesser General Public License for more ////
36
//// details.                                                     ////
37
////                                                              ////
38
//// You should have received a copy of the GNU Lesser General    ////
39
//// Public License along with this source; if not, download it   ////
40
//// from http://www.opencores.org/lgpl.shtml                     ////
41
////                                                              ////
42
//////////////////////////////////////////////////////////////////////
43
//`timescale 1ns/100ps
44
  module  g_mac_core (
45
                    scan_mode,
46
                    s_reset_n,
47
                    tx_reset_n,
48
                    rx_reset_n,
49
                    reset_mdio_clk_n,
50
                    app_reset_n,
51
 
52
                    app_clk,
53
                    app_send_pause_i,
54
                    app_send_pause_active_o,
55
                    app_send_jam_i,
56
 
57
                 // Reg Bus Interface Signal
58
                    reg_cs,
59
                    reg_wr,
60
                    reg_addr,
61
                    reg_wdata,
62
                    reg_be,
63
 
64
                     // Outputs
65
                    reg_rdata,
66
                    reg_ack,
67
 
68
 
69
                  // RX FIFO Interface Signal
70
                    rx_fifo_full_i,
71
                    rx_fifo_wr_o,
72
                    rx_fifo_data_o,
73
                    rx_commit_wr_o,
74
                    rx_rewind_wr_o,
75
                    rx_commit_write_done_o,
76
                    clr_rx_error_from_rx_fsm_o,
77
                    rx_fifo_error_i,
78
 
79
                  // TX FIFO Interface Signal
80
                    tx_fifo_data_i,
81
                    tx_fifo_empty_i,
82
                    tx_fifo_rdy_i,
83
                    tx_fifo_rd_o,
84
                    tx_commit_read_o,
85
 
86
                    // Phy Signals 
87
 
88
                    // Line Side Interface TX Path
89
                    phy_tx_en,
90
                    phy_tx_er,
91
                    phy_txd,
92
                    phy_tx_clk,
93
 
94
                    // Line Side Interface RX Path
95
                    phy_rx_clk,
96
                    phy_rx_er,
97
                    phy_rx_dv,
98
                    phy_rxd,
99
                    phy_crs,
100
 
101
                    //MDIO interface
102
                    mdio_clk,
103
                    mdio_in,
104
                    mdio_out_en,
105 36 dinesha
                    mdio_out,
106
 
107
                    // configuration output
108
                    cf_mac_sa,
109
                    cfg_ip_sa,
110
                    cfg_mac_filter
111
 
112 12 dinesha
       );
113
 
114
parameter mac_mdio_en = 1'b1;
115
 
116
//-----------------------------------------------------------------------
117
// INPUT/OUTPUT DECLARATIONS
118
//-----------------------------------------------------------------------
119
input                    scan_mode;
120
input                    s_reset_n;
121
input                    tx_reset_n;
122
input                    rx_reset_n;
123
input                    reset_mdio_clk_n;
124
input                    app_reset_n;
125
 
126
//-----------------------------------------------------------------------
127
// Application Clock Related Declaration
128
//-----------------------------------------------------------------------
129
input        app_clk;
130
input        app_send_pause_i;
131
output       app_send_pause_active_o;
132
input        app_send_jam_i;
133
 
134
// Conntrol Bus Sync with Application Clock
135
//---------------------------------
136
// Reg Bus Interface Signal
137
//---------------------------------
138
   input             reg_cs         ;
139
   input             reg_wr         ;
140
   input [3:0]       reg_addr       ;
141
   input [31:0]      reg_wdata      ;
142
   input [3:0]       reg_be         ;
143
 
144
   // Outputs
145
   output [31:0]     reg_rdata      ;
146
   output            reg_ack        ;
147
 
148
 
149
 
150
// RX FIFO Interface Signal
151
output       clr_rx_error_from_rx_fsm_o;
152
input        rx_fifo_full_i;
153
output       rx_fifo_wr_o;
154
output [8:0] rx_fifo_data_o;
155
output       rx_commit_wr_o;
156
output       rx_commit_write_done_o;
157
output       rx_rewind_wr_o;
158
input        rx_fifo_error_i;
159
 
160
//-----------------------------------------------------------------------
161
// TX-Clock Domain Status Signal
162
//-----------------------------------------------------------------------
163
output       tx_commit_read_o;
164
output       tx_fifo_rd_o;
165
 
166
input [8:0]  tx_fifo_data_i;
167
input        tx_fifo_empty_i;
168
input        tx_fifo_rdy_i;
169
 
170
 
171
//-----------------------------------------------------------------------
172
// Line-Tx Signal
173
//-----------------------------------------------------------------------
174
output       phy_tx_en;
175
output       phy_tx_er;
176
output [7:0] phy_txd;
177
input        phy_tx_clk;
178
 
179
//-----------------------------------------------------------------------
180
// Line-Rx Signal
181
//-----------------------------------------------------------------------
182
input        phy_rx_clk;
183
input        phy_rx_er;
184
input        phy_rx_dv;
185
input [7:0]  phy_rxd;
186
input        phy_crs;
187
 
188
 
189
//-----------------------------------------------------------------------
190
// MDIO Signal
191
//-----------------------------------------------------------------------
192
input        mdio_clk;
193
input        mdio_in;
194
output       mdio_out_en;
195
output       mdio_out;
196
 
197 36 dinesha
output [47:0]   cf_mac_sa;
198
output [31:0]   cfg_ip_sa;
199
output [31:0]   cfg_mac_filter;
200 12 dinesha
//-----------------------------------------------------------------------
201
// RX-Clock Domain Status Signal
202
//-----------------------------------------------------------------------
203
wire        rx_sts_vld_o;
204
wire [15:0] rx_sts_bytes_rcvd_o;
205
wire        rx_sts_large_pkt_o;
206
wire        rx_sts_lengthfield_err_o;
207
wire        rx_sts_len_mismatch_o;
208
wire        rx_sts_crc_err_o;
209
wire        rx_sts_runt_pkt_rcvd_o;
210
wire        rx_sts_rx_overrun_o;
211
wire        rx_sts_frm_length_err_o;
212
wire        rx_sts_rx_er_o;
213
 
214
 
215
//-----------------------------------------------------------------------
216
// TX-Clock Domain Status Signal
217
//-----------------------------------------------------------------------
218
wire         tx_sts_vld_o          ;
219
wire   [15:0]tx_sts_byte_cntr_o    ;
220
wire         tx_sts_fifo_underrun_o;
221
// TX Interface Status Signal
222
wire         tx_set_fifo_undrn_o   ;// Description: At GMII Interface ,
223
                                    // abug after a transmit fifo underun was found.
224
                                    // The packet after a packet that 
225
                                    // underran has 1 too few bytes .
226
 
227 36 dinesha
wire[7:0]        mi2rx_rx_byte,tx2mi_tx_byte;
228
wire [7:0]  cf2df_dfl_single_rx;
229
wire [15:0] cf2rx_max_pkt_sz;
230 12 dinesha
 
231
     g_rx_top   u_rx_top(
232
                //application
233
                    .app_clk                      (app_clk),
234
                    .app_reset_n                    (s_reset_n),      // Condor Change
235
                    .rx_reset_n                     (rx_reset_n),
236
                    .scan_mode                    (scan_mode),
237
 
238
                    .rx_sts_vld                   (rx_sts_vld_o),
239
                    .rx_sts_bytes_rcvd            (rx_sts_bytes_rcvd_o),
240
                    .rx_sts_large_pkt             (rx_sts_large_pkt_o),
241
                    .rx_sts_lengthfield_err       (rx_sts_lengthfield_err_o),
242
                    .rx_sts_len_mismatch          (rx_sts_len_mismatch_o),
243
                    .rx_sts_crc_err               (rx_sts_crc_err_o),
244
                    .rx_sts_runt_pkt_rcvd         (rx_sts_runt_pkt_rcvd_o),
245
                    .rx_sts_rx_overrun            (rx_sts_rx_overrun_o),
246
                    .rx_sts_frm_length_err        (rx_sts_frm_length_err_o),
247
                    .clr_rx_error_from_rx_fsm     (clr_rx_error_from_rx_fsm_o),
248
                    .rx_fifo_full                 (rx_fifo_full_i),
249
                    .rx_dt_wrt                    (rx_fifo_wr_o),
250
                    .rx_dt_out                    (rx_fifo_data_o),
251
                    .rx_commit_wr                 (rx_commit_wr_o),
252
                    .commit_write_done            (rx_commit_write_done_o),
253
                    .rx_rewind_wr                 (rx_rewind_wr_o),
254
                    //transistor interface
255
                    .rx2tx_pause_tx               (rx2tx_pause_o),
256
                    //mii interface
257
                    .phy_rx_clk                   (phy_rx_clk),
258
                    .mi2rx_strt_rcv               (mi2rx_strt_rcv),
259
                    .mi2rx_rcv_vld                (mi2rx_rcv_vld),
260
                    .mi2rx_rx_byte                (mi2rx_rx_byte),
261
                    .mi2rx_end_rcv                (mi2rx_end_rcv),
262
                    .mi2rx_extend                 (mi2rx_extend),
263
                    .mi2rx_frame_err              (mi2rx_frame_err),
264
                    .mi2rx_end_frame              (mi2rx_end_frame),
265
                    .mi2rx_crs                    (mi2rx_crs),
266
                    .df2rx_dfl_dn                 (df2rx_dfl_dn),
267
                    //PHY Signals
268
                    .phy_rx_dv                    (phy_rx_dv),
269
                    //Config interface
270
                    .cf2rx_max_pkt_sz             (cf2rx_max_pkt_sz),
271
                    .cf2rx_rx_ch_en               (cf2rx_ch_en),
272
                    .cf2rx_strp_pad_en            (cf2rx_strp_pad_en),
273
                    .cf2rx_snd_crc                (cf2rx_snd_crc),
274
                    .cf2rx_pause_en               (cf2rx_pause_en),
275
                    .cf2rx_rcv_runt_pkt_en        (cf2rx_runt_pkt_en),
276
                    .cf_macmode                   (cf_mac_mode_o),
277
                    .cf2df_dfl_single_rx          (cf2df_dfl_single_rx),
278
                    .ap2rx_rx_fifo_err            (rx_fifo_error_i),
279
                    //A200 change Port added for crs based flow control
280
                    .phy_crs                      (phy_crs),
281
                    //A200 change crs flow control enable signal
282
                    .crs_flow_control_enable      (cfg_crs_flow_ctrl_enb_i),
283
                    //A200 change pause detected pulse for counter
284
                    .pause_frame_detected         ()
285
               );
286
 
287
    wire [4:0]   cf2md_regad,cf2md_phyad;
288
    wire [15:0]  cf2md_datain,md2cf_data;
289
 
290
 
291
 
292
    wire        md2cf_status;
293
    wire        md2cf_cmd_done;
294
    wire        cf2md_op;
295
    wire        cf2md_go;
296
    wire        mdc;
297
 
298
    wire        int_s_reset_n;
299
    wire [4:0]  int_cf2md_regad;
300
    wire [4:0]  int_cf2md_phyad;
301
    wire        int_cf2md_op;
302
    wire        int_cf2md_go;
303
    wire [15:0] int_cf2md_datain;
304
 
305
    wire        int_md2cf_status;
306
    wire [15:0] int_md2cf_data;
307
    wire        int_md2cf_cmd_done;
308
 
309
    wire        int_mdio_clk;
310
    wire        int_mdio_out_en;
311
    wire        int_mdio_out;
312
    wire        int_mdc;
313
    wire        int_mdio_in;
314
 
315
// ------------------------------------------------------------------------
316
// CONDOR CHANGE
317
// MDIO Enable/disable Mux
318
// MDIO is used only in the WAN MAC block. The MDIO block has to be disabled
319
// in all other places. When MDIO is enabled the MDIO block signals will be
320
// connected to core module appriprotately. If MDIO is disabled, all inputs
321
// to the MDIO module is made zero and all outputs from this module to other
322
// modules is made zero. The enable/disable is controlled by the parameter
323
// mac_mdio_en.
324
// ------------------------------------------------------------------------
325
 
326
// ------------------------------------------------------------------------
327
// Inputs to the MDIO module
328
// ------------------------------------------------------------------------
329
 
330
assign int_s_reset_n     = (mac_mdio_en == 1'b1) ? reset_mdio_clk_n  : 1'b1;
331
assign int_cf2md_regad   = (mac_mdio_en == 1'b1) ? cf2md_regad     : 5'b0;
332
assign int_cf2md_phyad   = (mac_mdio_en == 1'b1) ? cf2md_phyad     : 5'b0;
333
assign int_cf2md_op      = (mac_mdio_en == 1'b1) ? cf2md_op        : 1'b0;
334
assign int_cf2md_go      = (mac_mdio_en == 1'b1) ? cf2md_go        : 1'b0;
335
assign int_cf2md_datain  = (mac_mdio_en == 1'b1) ? cf2md_datain    : 16'b0;
336
 
337
// ------------------------------------------------------------------------
338
// Outputs from the MDIO module used locally
339
// ------------------------------------------------------------------------
340
 
341
assign md2cf_status      = (mac_mdio_en == 1'b1) ? int_md2cf_status   : 1'b0;
342
assign md2cf_data        = (mac_mdio_en == 1'b1) ? int_md2cf_data     : 16'b0;
343
//assign md2cf_cmd_done    = (mac_mdio_en == 1'b1) ? int_md2cf_cmd_done : 1'b0;
344
 
345
// ------------------------------------------------------------------------
346
// Outputs from the MDIO module driven out of this module
347
// ------------------------------------------------------------------------
348
 
349
assign mdio_out_en       = (mac_mdio_en == 1'b1) ? int_mdio_out_en : 1'b0;
350
assign mdio_out          = (mac_mdio_en == 1'b1) ? int_mdio_out    : 1'b0;
351
assign mdc               = (mac_mdio_en == 1'b1) ? int_mdc         : 1'b0;
352
 
353
assign int_mdio_clk      = (mac_mdio_en == 1'b1) ? mdio_clk        : 1'b0;
354
assign int_mdio_in       = (mac_mdio_en == 1'b1) ? mdio_in         : 1'b0;
355
 
356
// ------------------------------------------------------------------------
357
// MDIO module connected with 'int_' signals
358
// ------------------------------------------------------------------------
359
 
360
 
361
    g_md_intf u_md_intf(
362
                  //apllication interface
363
                    .scan_mode                    (scan_mode), // A200 change
364
                    .reset_n                      (int_s_reset_n),      // Condor Change
365
 
366
                    .mdio_clk                     (int_mdio_clk),
367
                    .mdio_in                      (int_mdio_in),
368
                    .mdio_outen_reg               (int_mdio_out_en),
369
                    .mdio_out_reg                 (int_mdio_out),
370
                    //Config interface
371
                    .mdio_regad                   (int_cf2md_regad),
372
                    .mdio_phyad                   (int_cf2md_phyad),
373
                    .mdio_op                      (int_cf2md_op),
374
                    .go_mdio                      (int_cf2md_go),
375
                    .mdio_datain                  (int_cf2md_datain),
376
                    .mdio_dataout                 (int_md2cf_data),
377
                    .mdio_cmd_done                (md2cf_cmd_done),
378
                    .mdio_stat                    (int_md2cf_status),
379
                    .mdc                          (int_mdc)
380
                    );
381
 
382
 
383
  wire [7:0]  cf2df_dfl_single;
384
  wire [47:0] cf_mac_sa;
385
  wire [15:0] cf2tx_pause_quanta;
386
  wire        cf2tx_force_bad_fcs;
387
  wire        cf2tx_tstate_mode;
388
  wire        set_fifo_undrn;
389
 
390
    g_tx_top U_tx_top                    (
391
                    .app_clk                      (app_clk) ,
392
                    .send_pause_active            (app_send_pause_active_o),
393
                    .set_fifo_undrn               (tx_set_fifo_undrn_o),
394
 
395
                    //Outputs
396
                    //TX FIFO management
397
                    .tx_commit_read               (tx_commit_read_o),
398
                    .tx_dt_rd                     (tx_fifo_rd_o),
399
 
400
                    //MII interface
401
                    .tx2mi_strt_preamble          (tx2mi_strt_preamble),
402
                    .tx2mi_byte_valid             (tx2mi_byte_valid),
403
                    .tx2mi_byte                   (tx2mi_tx_byte),
404
                    .tx2mi_end_transmit           (tx2mi_end_transmit),
405
                    .tx_ch_en                     (tx_ch_en),
406
 
407
                    //Status to application
408
                    .tx_sts_vld                   (tx_sts_vld_o),
409
                    .tx_sts_byte_cntr             (tx_sts_byte_cntr_o),
410
                    .tx_sts_fifo_underrun         (tx_sts_fifo_underrun_o),
411
 
412
                    //Inputs
413
                    //MII interface
414
                    .phy_tx_en                    (phy_tx_en),
415
                    .phy_tx_er                    (phy_tx_er),
416
 
417
                    //application
418
                    .app_send_pause               (app_send_pause_i),
419
 
420
                    //rx_top
421
                    .rx2tx_pause                  (rx2tx_pause_o),
422
 
423
                    //configuration
424
                    .cf2tx_tstate_mode            (cf2tx_tstate_mode),
425
                    .cf2tx_ch_en                  (cf2tx_ch_en),
426
                    .cf2df_dfl_single             (cf2df_dfl_single),
427
                    .cf2tx_pad_enable             (cf2tx_pad_enable),
428
                    .cf2tx_append_fcs             (cf2tx_append_fcs),
429
                    .cf_mac_mode                  (cf_mac_mode_o),
430
                    .cf_mac_sa                    (cf_mac_sa),
431
                    .cf2tx_pause_quanta           (cf2tx_pause_quanta),
432
                    .cf2tx_force_bad_fcs          (cf2tx_force_bad_fcs),
433
 
434
                    //FIFO data
435
                    .app_tx_dt_in                 (tx_fifo_data_i),
436
                    .app_tx_fifo_empty            (tx_fifo_empty_i),
437
                    .app_tx_rdy                   (tx_fifo_rdy_i),
438
 
439
                    //MII
440
                    .mi2tx_byte_ack               (mi2tx_byte_ack),
441
 
442
                    .app_reset_n                    (s_reset_n), // Condor Change
443
                    .tx_reset_n                     (tx_reset_n),
444
                    .tx_clk                       (phy_tx_clk)
445
              );
446
 
447
    toggle_sync u_rx_sts_sync (
448
                    . in_clk    (phy_rx_clk    ),
449
                    . in_rst_n  (rx_reset_n    ),
450
                    . in        (rx_sts_vld_o  ),
451
                    . out_clk   (app_clk       ),
452
                    . out_rst_n (app_reset_n   ),
453
                    . out_req   (rx_sts_vld_ss ),
454
                    . out_ack   (rx_sts_vld_ss )
455
                    );
456
 
457
 
458
    toggle_sync u_tx_sts_sync (
459
                    . in_clk    (phy_tx_clk    ),
460
                    . in_rst_n  (tx_reset_n    ),
461
                    . in        (tx_sts_vld_o  ),
462
                    . out_clk   (app_clk       ),
463
                    . out_rst_n (app_reset_n   ),
464
                    . out_req   (tx_sts_vld_ss ),
465
                    . out_ack   (tx_sts_vld_ss )
466
                    );
467
 
468
 
469
 
470
    g_cfg_mgmt #(mac_mdio_en) u_cfg_mgmt (
471
 
472
                 // Reg Bus Interface Signal
473
                      . reg_cs   (reg_cs),
474
                      . reg_wr   (reg_wr),
475
                      . reg_addr (reg_addr),
476
                      . reg_wdata (reg_wdata),
477
                      . reg_be    (reg_be),
478
 
479
                     // Outputs
480
                     . reg_rdata (reg_rdata),
481
                     . reg_ack   (reg_ack),
482
 
483
                     // Rx Status
484
                     . rx_sts_vld(rx_sts_vld_ss),
485
                     . rx_sts    ({rx_sts_large_pkt_o,
486
                                   rx_sts_lengthfield_err_o,
487
                                   rx_sts_len_mismatch_o,
488
                                   rx_sts_crc_err_o,
489
                                   rx_sts_runt_pkt_rcvd_o,
490
                                   rx_sts_rx_overrun_o,
491
                                   rx_sts_frm_length_err_o,
492
                                   rx_sts_rx_er_o
493
                                  }),
494
 
495
                     // Tx Status
496
                     . tx_sts_vld(tx_sts_vld_ss),
497
                     . tx_sts    (tx_sts_fifo_underrun_o),
498
 
499
                    // MDIO READ DATA FROM PHY
500
                    // CONDOR CHANGE
501
                    // Since MDIO is not required for the half duplex
502
                    // MACs the done is always tied to 1'b1
503
                    .md2cf_cmd_done               (md2cf_cmd_done),
504
                    .md2cf_status                 (md2cf_status),
505
                    .md2cf_data                   (md2cf_data),
506
 
507
                    .app_clk                      (app_clk),
508
                    .app_reset_n                    (app_reset_n),
509
 
510
                    //List of Outputs
511
                    // MII Control
512
                    .cf2mi_loopback_en            (cf2mi_loopback_en),
513
                    .cf_mac_mode                  (cf_mac_mode_o),
514
                    .cf_chk_rx_dfl                (cf_chk_rx_dfl),
515
                    .cf_silent_mode               (cf_silent_mode),
516
                    .cf2mi_rmii_en                (cf2mi_rmii_en_o),
517
 
518
                  // Config In
519
                    .cfg_uni_mac_mode_change_i    (cfg_uni_mac_mode_change_i),
520
                    .cfg_crs_flow_ctrl_enb_i      (cfg_crs_flow_ctrl_enb_i),
521
 
522
                    //CHANNEL enable
523
                    .cf2tx_tstate_mode            (cf2tx_tstate_mode),
524
                    .cf2tx_ch_en                  (cf2tx_ch_en),
525
                    //CHANNEL CONTROL TX
526
                    .cf2df_dfl_single             (cf2df_dfl_single),
527
                    .cf2df_dfl_single_rx          (cf2df_dfl_single_rx),
528
                    .cf2tx_pad_enable             (cf2tx_pad_enable),
529
                    .cf2tx_append_fcs             (cf2tx_append_fcs),
530
                    //CHANNEL CONTROL RX
531
                    .cf2rx_max_pkt_sz             (cf2rx_max_pkt_sz),
532
                    .cf2rx_ch_en                  (cf2rx_ch_en),
533
                    .cf2rx_strp_pad_en            (cf2rx_strp_pad_en),
534
                    .cf2rx_snd_crc                (cf2rx_snd_crc),
535
                    .cf2rx_pause_en               (cf2rx_pause_en),
536
                    .cf2rx_addrchk_en             (),
537
                    .cf2rx_runt_pkt_en            (cf2rx_runt_pkt_en),
538
                    .cf2af_broadcast_disable      (cf2af_broadcast_disable),
539
                    .cf_mac_sa                    (cf_mac_sa),
540 36 dinesha
                    .cfg_ip_sa                    (cfg_ip_sa),
541
                    .cfg_mac_filter               (cfg_mac_filter),
542 12 dinesha
                    .cf2tx_pause_quanta           (cf2tx_pause_quanta),
543
                    .cf2tx_force_bad_fcs          (cf2tx_force_bad_fcs),
544
                    //MDIO CONTROL & DATA
545
                    .cf2md_datain                 (cf2md_datain),
546
                    .cf2md_regad                  (cf2md_regad),
547
                    .cf2md_phyad                  (cf2md_phyad),
548
                    .cf2md_op                     (cf2md_op),
549
                    .cf2md_go                     (cf2md_go)
550
                 );
551
 
552
    g_mii_intf u_mii_intf(
553
                  // Data and Control Signals to tx_fsm and rx_fsm
554
                    .mi2rx_strt_rcv               (mi2rx_strt_rcv),
555
                    .mi2rx_rcv_vld                (mi2rx_rcv_vld),
556
                    .mi2rx_rx_byte                (mi2rx_rx_byte),
557
                    .mi2rx_end_rcv                (mi2rx_end_rcv),
558
                    .mi2rx_extend                 (mi2rx_extend),
559
                    .mi2rx_frame_err              (mi2rx_frame_err),
560
                    .mi2rx_end_frame              (mi2rx_end_frame),
561
                    .mi2rx_crs                    (mi2rx_crs),
562
                    .mi2tx_byte_ack               (mi2tx_byte_ack),
563
                    .cfg_uni_mac_mode_change      (cfg_uni_mac_mode_change_i),
564
 
565
                    // Phy Signals 
566
                    .phy_tx_en                    (phy_tx_en),
567
                    .phy_tx_er                    (phy_tx_er),
568
                    .phy_txd                      (phy_txd),
569
                    .phy_tx_clk                   (phy_tx_clk),
570
                    .phy_rx_clk                   (phy_rx_clk),
571
                    .tx_reset_n                   (tx_reset_n),
572
                    .rx_reset_n                     (rx_reset_n),
573
                    .phy_rx_er                    (phy_rx_er),
574
                    .phy_rx_dv                    (phy_rx_dv),
575
                    .phy_rxd                      (phy_rxd),
576
                    .phy_crs                      (phy_crs),
577
 
578
                    // Reset signal
579
                    // .app_reset                 (app_reset), 
580
                    .rx_sts_rx_er_reg             (rx_sts_rx_er),
581
                    .app_reset_n                    (s_reset_n),
582
 
583
                    // Signals from Config Management
584
                    .cf2mi_loopback_en            (cf2mi_loopback_en),
585
                    .cf2mi_rmii_en                (cf2mi_rmii_en_o),
586
                    .cf_mac_mode                  (cf_mac_mode_o),
587
                    .cf_chk_rx_dfl                (cf_chk_rx_dfl),
588
                    .cf_silent_mode               (cf_silent_mode),
589
 
590
                    // Signal from Application to transmit JAM
591
                    .df2rx_dfl_dn                 (df2rx_dfl_dn),
592
                    .app_send_jam                 (app_send_jam_i),
593
 
594
                    // Inputs from Transmit FSM
595
                    .tx2mi_strt_preamble          (tx2mi_strt_preamble),
596
                    .tx2mi_end_transmit           (tx2mi_end_transmit),
597
                    .tx2mi_tx_byte                (tx2mi_tx_byte),
598
                    .tx_ch_en                     (tx_ch_en),
599
                    .mi2tx_slot_vld               ()
600
                    );
601
endmodule

powered by: WebSVN 2.1.0

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