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 50

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

powered by: WebSVN 2.1.0

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