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 77

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 77 dinesha
wire         tx_set_fifo_undrn_o   ;
245 12 dinesha
 
246 36 dinesha
wire[7:0]        mi2rx_rx_byte,tx2mi_tx_byte;
247
wire [7:0]  cf2df_dfl_single_rx;
248
wire [15:0] cf2rx_max_pkt_sz;
249 12 dinesha
 
250
     g_rx_top   u_rx_top(
251
                //application
252
                    .app_clk                      (app_clk),
253 77 dinesha
                    .app_reset_n                    (s_reset_n),
254 12 dinesha
                    .rx_reset_n                     (rx_reset_n),
255
                    .scan_mode                    (scan_mode),
256
 
257
                    .rx_sts_vld                   (rx_sts_vld_o),
258
                    .rx_sts_bytes_rcvd            (rx_sts_bytes_rcvd_o),
259
                    .rx_sts_large_pkt             (rx_sts_large_pkt_o),
260
                    .rx_sts_lengthfield_err       (rx_sts_lengthfield_err_o),
261
                    .rx_sts_len_mismatch          (rx_sts_len_mismatch_o),
262
                    .rx_sts_crc_err               (rx_sts_crc_err_o),
263
                    .rx_sts_runt_pkt_rcvd         (rx_sts_runt_pkt_rcvd_o),
264
                    .rx_sts_rx_overrun            (rx_sts_rx_overrun_o),
265
                    .rx_sts_frm_length_err        (rx_sts_frm_length_err_o),
266
                    .clr_rx_error_from_rx_fsm     (clr_rx_error_from_rx_fsm_o),
267
                    .rx_fifo_full                 (rx_fifo_full_i),
268
                    .rx_dt_wrt                    (rx_fifo_wr_o),
269
                    .rx_dt_out                    (rx_fifo_data_o),
270
                    .rx_commit_wr                 (rx_commit_wr_o),
271
                    .commit_write_done            (rx_commit_write_done_o),
272
                    .rx_rewind_wr                 (rx_rewind_wr_o),
273
                    //mii interface
274
                    .phy_rx_clk                   (phy_rx_clk),
275
                    .mi2rx_strt_rcv               (mi2rx_strt_rcv),
276
                    .mi2rx_rcv_vld                (mi2rx_rcv_vld),
277
                    .mi2rx_rx_byte                (mi2rx_rx_byte),
278
                    .mi2rx_end_rcv                (mi2rx_end_rcv),
279
                    .mi2rx_extend                 (mi2rx_extend),
280
                    .mi2rx_frame_err              (mi2rx_frame_err),
281
                    .mi2rx_end_frame              (mi2rx_end_frame),
282
                    .mi2rx_crs                    (mi2rx_crs),
283
                    .df2rx_dfl_dn                 (df2rx_dfl_dn),
284
                    //PHY Signals
285
                    .phy_rx_dv                    (phy_rx_dv),
286
                    //Config interface
287
                    .cf2rx_max_pkt_sz             (cf2rx_max_pkt_sz),
288
                    .cf2rx_rx_ch_en               (cf2rx_ch_en),
289
                    .cf2rx_strp_pad_en            (cf2rx_strp_pad_en),
290
                    .cf2rx_snd_crc                (cf2rx_snd_crc),
291
                    .cf2rx_rcv_runt_pkt_en        (cf2rx_runt_pkt_en),
292
                    .cf_macmode                   (cf_mac_mode_o),
293
                    .cf2df_dfl_single_rx          (cf2df_dfl_single_rx),
294
                    .ap2rx_rx_fifo_err            (rx_fifo_error_i),
295 77 dinesha
                    //for crs based flow control
296 37 dinesha
                    .phy_crs                      (phy_crs)
297 12 dinesha
               );
298
 
299
    wire [4:0]   cf2md_regad,cf2md_phyad;
300
    wire [15:0]  cf2md_datain,md2cf_data;
301
 
302
 
303
 
304
    wire        md2cf_status;
305
    wire        md2cf_cmd_done;
306
    wire        cf2md_op;
307
    wire        cf2md_go;
308
    wire        mdc;
309
 
310
    wire        int_s_reset_n;
311
    wire [4:0]  int_cf2md_regad;
312
    wire [4:0]  int_cf2md_phyad;
313
    wire        int_cf2md_op;
314
    wire        int_cf2md_go;
315
    wire [15:0] int_cf2md_datain;
316
 
317
    wire        int_md2cf_status;
318
    wire [15:0] int_md2cf_data;
319
    wire        int_md2cf_cmd_done;
320
 
321
    wire        int_mdio_clk;
322
    wire        int_mdio_out_en;
323
    wire        int_mdio_out;
324
    wire        int_mdc;
325
    wire        int_mdio_in;
326
 
327
// ------------------------------------------------------------------------
328
// MDIO Enable/disable Mux
329
// MDIO is used only in the WAN MAC block. The MDIO block has to be disabled
330
// in all other places. When MDIO is enabled the MDIO block signals will be
331
// connected to core module appriprotately. If MDIO is disabled, all inputs
332
// to the MDIO module is made zero and all outputs from this module to other
333
// modules is made zero. The enable/disable is controlled by the parameter
334
// mac_mdio_en.
335
// ------------------------------------------------------------------------
336
 
337
// ------------------------------------------------------------------------
338
// Inputs to the MDIO module
339
// ------------------------------------------------------------------------
340
 
341
assign int_s_reset_n     = (mac_mdio_en == 1'b1) ? reset_mdio_clk_n  : 1'b1;
342
assign int_cf2md_regad   = (mac_mdio_en == 1'b1) ? cf2md_regad     : 5'b0;
343
assign int_cf2md_phyad   = (mac_mdio_en == 1'b1) ? cf2md_phyad     : 5'b0;
344
assign int_cf2md_op      = (mac_mdio_en == 1'b1) ? cf2md_op        : 1'b0;
345
assign int_cf2md_go      = (mac_mdio_en == 1'b1) ? cf2md_go        : 1'b0;
346
assign int_cf2md_datain  = (mac_mdio_en == 1'b1) ? cf2md_datain    : 16'b0;
347
 
348
// ------------------------------------------------------------------------
349
// Outputs from the MDIO module used locally
350
// ------------------------------------------------------------------------
351
 
352
assign md2cf_status      = (mac_mdio_en == 1'b1) ? int_md2cf_status   : 1'b0;
353
assign md2cf_data        = (mac_mdio_en == 1'b1) ? int_md2cf_data     : 16'b0;
354
//assign md2cf_cmd_done    = (mac_mdio_en == 1'b1) ? int_md2cf_cmd_done : 1'b0;
355
 
356
// ------------------------------------------------------------------------
357
// Outputs from the MDIO module driven out of this module
358
// ------------------------------------------------------------------------
359
 
360
assign mdio_out_en       = (mac_mdio_en == 1'b1) ? int_mdio_out_en : 1'b0;
361
assign mdio_out          = (mac_mdio_en == 1'b1) ? int_mdio_out    : 1'b0;
362
assign mdc               = (mac_mdio_en == 1'b1) ? int_mdc         : 1'b0;
363
 
364
assign int_mdio_clk      = (mac_mdio_en == 1'b1) ? mdio_clk        : 1'b0;
365
assign int_mdio_in       = (mac_mdio_en == 1'b1) ? mdio_in         : 1'b0;
366
 
367
// ------------------------------------------------------------------------
368
// MDIO module connected with 'int_' signals
369
// ------------------------------------------------------------------------
370
 
371
 
372
    g_md_intf u_md_intf(
373
                  //apllication interface
374 77 dinesha
                    .scan_mode                    (scan_mode),
375
                    .reset_n                      (int_s_reset_n),
376 12 dinesha
 
377
                    .mdio_clk                     (int_mdio_clk),
378
                    .mdio_in                      (int_mdio_in),
379
                    .mdio_outen_reg               (int_mdio_out_en),
380
                    .mdio_out_reg                 (int_mdio_out),
381
                    //Config interface
382
                    .mdio_regad                   (int_cf2md_regad),
383
                    .mdio_phyad                   (int_cf2md_phyad),
384
                    .mdio_op                      (int_cf2md_op),
385
                    .go_mdio                      (int_cf2md_go),
386
                    .mdio_datain                  (int_cf2md_datain),
387
                    .mdio_dataout                 (int_md2cf_data),
388
                    .mdio_cmd_done                (md2cf_cmd_done),
389
                    .mdio_stat                    (int_md2cf_status),
390
                    .mdc                          (int_mdc)
391
                    );
392
 
393
 
394
  wire [7:0]  cf2df_dfl_single;
395
  wire [47:0] cf_mac_sa;
396
  wire        cf2tx_force_bad_fcs;
397
  wire        set_fifo_undrn;
398
 
399
    g_tx_top U_tx_top                    (
400
                    .app_clk                      (app_clk) ,
401
                    .set_fifo_undrn               (tx_set_fifo_undrn_o),
402
 
403
                    //Outputs
404
                    //TX FIFO management
405
                    .tx_commit_read               (tx_commit_read_o),
406
                    .tx_dt_rd                     (tx_fifo_rd_o),
407
 
408
                    //MII interface
409
                    .tx2mi_strt_preamble          (tx2mi_strt_preamble),
410
                    .tx2mi_byte_valid             (tx2mi_byte_valid),
411
                    .tx2mi_byte                   (tx2mi_tx_byte),
412
                    .tx2mi_end_transmit           (tx2mi_end_transmit),
413
                    .tx_ch_en                     (tx_ch_en),
414
 
415
                    //Status to application
416
                    .tx_sts_vld                   (tx_sts_vld_o),
417
                    .tx_sts_byte_cntr             (tx_sts_byte_cntr_o),
418
                    .tx_sts_fifo_underrun         (tx_sts_fifo_underrun_o),
419
 
420
                    //Inputs
421
                    //MII interface
422
                    .phy_tx_en                    (phy_tx_en),
423
                    .phy_tx_er                    (phy_tx_er),
424
 
425
 
426
                    //configuration
427
                    .cf2tx_ch_en                  (cf2tx_ch_en),
428
                    .cf2df_dfl_single             (cf2df_dfl_single),
429
                    .cf2tx_pad_enable             (cf2tx_pad_enable),
430
                    .cf2tx_append_fcs             (cf2tx_append_fcs),
431
                    .cf_mac_mode                  (cf_mac_mode_o),
432
                    .cf_mac_sa                    (cf_mac_sa),
433
                    .cf2tx_force_bad_fcs          (cf2tx_force_bad_fcs),
434
 
435
                    //FIFO data
436
                    .app_tx_dt_in                 (tx_fifo_data_i),
437
                    .app_tx_fifo_empty            (tx_fifo_empty_i),
438
                    .app_tx_rdy                   (tx_fifo_rdy_i),
439
 
440
                    //MII
441
                    .mi2tx_byte_ack               (mi2tx_byte_ack),
442
 
443 77 dinesha
                    .app_reset_n                    (s_reset_n),
444 12 dinesha
                    .tx_reset_n                     (tx_reset_n),
445
                    .tx_clk                       (phy_tx_clk)
446
              );
447
 
448
    toggle_sync u_rx_sts_sync (
449
                    . in_clk    (phy_rx_clk    ),
450
                    . in_rst_n  (rx_reset_n    ),
451
                    . in        (rx_sts_vld_o  ),
452
                    . out_clk   (app_clk       ),
453
                    . out_rst_n (app_reset_n   ),
454
                    . out_req   (rx_sts_vld_ss ),
455
                    . out_ack   (rx_sts_vld_ss )
456
                    );
457
 
458
 
459
    toggle_sync u_tx_sts_sync (
460
                    . in_clk    (phy_tx_clk    ),
461
                    . in_rst_n  (tx_reset_n    ),
462
                    . in        (tx_sts_vld_o  ),
463
                    . out_clk   (app_clk       ),
464
                    . out_rst_n (app_reset_n   ),
465
                    . out_req   (tx_sts_vld_ss ),
466
                    . out_ack   (tx_sts_vld_ss )
467
                    );
468
 
469
 
470
 
471
    g_cfg_mgmt #(mac_mdio_en) u_cfg_mgmt (
472
 
473
                 // Reg Bus Interface Signal
474
                      . reg_cs   (reg_cs),
475
                      . reg_wr   (reg_wr),
476
                      . reg_addr (reg_addr),
477
                      . reg_wdata (reg_wdata),
478
                      . reg_be    (reg_be),
479
 
480
                     // Outputs
481
                     . reg_rdata (reg_rdata),
482
                     . reg_ack   (reg_ack),
483
 
484
                     // Rx Status
485
                     . rx_sts_vld(rx_sts_vld_ss),
486
                     . rx_sts    ({rx_sts_large_pkt_o,
487
                                   rx_sts_lengthfield_err_o,
488
                                   rx_sts_len_mismatch_o,
489
                                   rx_sts_crc_err_o,
490
                                   rx_sts_runt_pkt_rcvd_o,
491
                                   rx_sts_rx_overrun_o,
492
                                   rx_sts_frm_length_err_o,
493
                                   rx_sts_rx_er_o
494
                                  }),
495
 
496
                     // Tx Status
497
                     . tx_sts_vld(tx_sts_vld_ss),
498
                     . tx_sts    (tx_sts_fifo_underrun_o),
499
 
500
                    // MDIO READ DATA FROM PHY
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
 
521
                    //CHANNEL enable
522
                    .cf2tx_ch_en                  (cf2tx_ch_en),
523
                    .cf2df_dfl_single             (cf2df_dfl_single),
524
                    .cf2df_dfl_single_rx          (cf2df_dfl_single_rx),
525
                    .cf2tx_pad_enable             (cf2tx_pad_enable),
526
                    .cf2tx_append_fcs             (cf2tx_append_fcs),
527
                    //CHANNEL CONTROL RX
528
                    .cf2rx_max_pkt_sz             (cf2rx_max_pkt_sz),
529
                    .cf2rx_ch_en                  (cf2rx_ch_en),
530
                    .cf2rx_strp_pad_en            (cf2rx_strp_pad_en),
531
                    .cf2rx_snd_crc                (cf2rx_snd_crc),
532
                    .cf2rx_runt_pkt_en            (cf2rx_runt_pkt_en),
533
                    .cf_mac_sa                    (cf_mac_sa),
534 36 dinesha
                    .cfg_ip_sa                    (cfg_ip_sa),
535
                    .cfg_mac_filter               (cfg_mac_filter),
536 12 dinesha
                    .cf2tx_force_bad_fcs          (cf2tx_force_bad_fcs),
537
                    //MDIO CONTROL & DATA
538
                    .cf2md_datain                 (cf2md_datain),
539
                    .cf2md_regad                  (cf2md_regad),
540
                    .cf2md_phyad                  (cf2md_phyad),
541
                    .cf2md_op                     (cf2md_op),
542 50 dinesha
                    .cf2md_go                     (cf2md_go),
543
 
544
                    .rx_buf_base_addr             (rx_buf_base_addr),
545
                    .tx_buf_base_addr             (tx_buf_base_addr),
546
 
547
                    .rx_buf_qbase_addr            (rx_buf_qbase_addr),
548
                    .tx_buf_qbase_addr            (tx_buf_qbase_addr),
549
 
550
                    .tx_qcnt_inc                  (tx_qcnt_inc),
551
                    .tx_qcnt_dec                  (tx_qcnt_dec),
552
                    .tx_qcnt                      (tx_qcnt),
553
 
554
                    .rx_qcnt_inc                  (rx_qcnt_inc),
555
                    .rx_qcnt_dec                  (rx_qcnt_dec),
556
                    .rx_qcnt                      (rx_qcnt)
557
 
558
 
559 12 dinesha
                 );
560
 
561
    g_mii_intf u_mii_intf(
562
                  // Data and Control Signals to tx_fsm and rx_fsm
563
                    .mi2rx_strt_rcv               (mi2rx_strt_rcv),
564
                    .mi2rx_rcv_vld                (mi2rx_rcv_vld),
565
                    .mi2rx_rx_byte                (mi2rx_rx_byte),
566
                    .mi2rx_end_rcv                (mi2rx_end_rcv),
567
                    .mi2rx_extend                 (mi2rx_extend),
568
                    .mi2rx_frame_err              (mi2rx_frame_err),
569
                    .mi2rx_end_frame              (mi2rx_end_frame),
570
                    .mi2rx_crs                    (mi2rx_crs),
571
                    .mi2tx_byte_ack               (mi2tx_byte_ack),
572
                    .cfg_uni_mac_mode_change      (cfg_uni_mac_mode_change_i),
573
 
574
                    // Phy Signals 
575
                    .phy_tx_en                    (phy_tx_en),
576
                    .phy_tx_er                    (phy_tx_er),
577
                    .phy_txd                      (phy_txd),
578
                    .phy_tx_clk                   (phy_tx_clk),
579
                    .phy_rx_clk                   (phy_rx_clk),
580
                    .tx_reset_n                   (tx_reset_n),
581
                    .rx_reset_n                     (rx_reset_n),
582
                    .phy_rx_er                    (phy_rx_er),
583
                    .phy_rx_dv                    (phy_rx_dv),
584
                    .phy_rxd                      (phy_rxd),
585
                    .phy_crs                      (phy_crs),
586
 
587
                    // Reset signal
588
                    // .app_reset                 (app_reset), 
589
                    .rx_sts_rx_er_reg             (rx_sts_rx_er),
590
                    .app_reset_n                    (s_reset_n),
591
 
592
                    // Signals from Config Management
593
                    .cf2mi_loopback_en            (cf2mi_loopback_en),
594
                    .cf2mi_rmii_en                (cf2mi_rmii_en_o),
595
                    .cf_mac_mode                  (cf_mac_mode_o),
596
                    .cf_chk_rx_dfl                (cf_chk_rx_dfl),
597
                    .cf_silent_mode               (cf_silent_mode),
598
 
599
                    // Signal from Application to transmit JAM
600
                    .df2rx_dfl_dn                 (df2rx_dfl_dn),
601
 
602
                    // Inputs from Transmit FSM
603
                    .tx2mi_strt_preamble          (tx2mi_strt_preamble),
604
                    .tx2mi_end_transmit           (tx2mi_end_transmit),
605
                    .tx2mi_tx_byte                (tx2mi_tx_byte),
606
                    .tx_ch_en                     (tx_ch_en),
607
                    .mi2tx_slot_vld               ()
608
                    );
609
endmodule

powered by: WebSVN 2.1.0

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