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 76

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

powered by: WebSVN 2.1.0

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