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 29

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

powered by: WebSVN 2.1.0

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