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

Subversion Repositories turbo8051

[/] [turbo8051/] [trunk/] [rtl/] [gmac/] [mac/] [g_rx_top.v] - Blame information for rev 12

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
 
45
 module g_rx_top(
46
                app_reset_n,
47
                phy_rx_clk,
48
                rx_reset_n,
49
                app_clk,
50
                          scan_mode,
51
                rx_sts_vld,
52
                rx_sts_bytes_rcvd,
53
                rx_sts_large_pkt,
54
                rx_sts_lengthfield_err,
55
                rx_sts_len_mismatch,
56
                rx_sts_crc_err,
57
                rx_sts_runt_pkt_rcvd,
58
                rx_sts_rx_overrun,
59
                rx_sts_frm_length_err,
60
                clr_rx_error_from_rx_fsm,
61
                rx_fifo_full,
62
                rx_dt_wrt,
63
                rx_dt_out,
64
                rx_commit_wr,
65
                commit_write_done,
66
                rx_rewind_wr,
67
                rx2tx_pause_tx,
68
                mi2rx_strt_rcv,
69
                mi2rx_rcv_vld,
70
                mi2rx_rx_byte,
71
                mi2rx_end_rcv,
72
                mi2rx_extend,
73
                mi2rx_frame_err,
74
                mi2rx_end_frame,
75
                phy_rx_dv,
76
                cf2rx_max_pkt_sz,
77
                cf2rx_rx_ch_en,
78
                cf2rx_strp_pad_en,
79
                cf2rx_snd_crc,
80
                cf2rx_pause_en,
81
                cf2df_dfl_single_rx,
82
                cf2rx_rcv_runt_pkt_en,
83
                cf_macmode,
84
                mi2rx_crs,
85
                df2rx_dfl_dn,
86
                ap2rx_rx_fifo_err,
87
      //A200 change Port added for crs based flow control
88
      phy_crs,
89
      //A200 change crs flow control enable signal
90
      crs_flow_control_enable,
91
      //A200 change pause detected pulse for counter
92
      pause_frame_detected
93
               );
94
 
95
    input               app_reset_n;
96
    input               phy_rx_clk;
97
    input               rx_reset_n;
98
    input               app_clk;
99
   input        scan_mode;
100
 
101
    output              rx_sts_vld;
102
    output [15:0]       rx_sts_bytes_rcvd;
103
    output              rx_sts_large_pkt;
104
    output              rx_sts_lengthfield_err;
105
    output              rx_sts_len_mismatch;
106
    output              rx_sts_crc_err;
107
    output              rx_sts_runt_pkt_rcvd;
108
    output              rx_sts_rx_overrun;
109
    output              rx_sts_frm_length_err;
110
 
111
    output              clr_rx_error_from_rx_fsm;
112
    input               rx_fifo_full;
113
    output              rx_dt_wrt;
114
    output [8:0] rx_dt_out;
115
    output              rx_commit_wr;
116
    output              commit_write_done;
117
    output              rx_rewind_wr;
118
    output              rx2tx_pause_tx;
119
    input               mi2rx_strt_rcv;
120
    input               mi2rx_rcv_vld;
121
    input [7:0]          mi2rx_rx_byte;
122
    input               mi2rx_end_rcv;
123
    input               mi2rx_extend;
124
    input               mi2rx_frame_err;
125
    input               mi2rx_end_frame;
126
    input               phy_rx_dv;
127
    input [15:0]        cf2rx_max_pkt_sz;
128
    input               cf2rx_rx_ch_en;
129
    input               cf2rx_strp_pad_en;
130
    input               cf2rx_snd_crc;
131
    input               cf2rx_pause_en;
132
    input               cf2rx_rcv_runt_pkt_en;
133
    input               cf_macmode;
134
    input  [7:0]        cf2df_dfl_single_rx;
135
    input               ap2rx_rx_fifo_err;
136
    input               mi2rx_crs;
137
    output              df2rx_dfl_dn;
138
 
139
    //A200 change Port added for crs based flow control
140
    input            phy_crs;
141
    //A200 change crs flow control enable signal
142
    input            crs_flow_control_enable;
143
 
144
    //A200 change pause detected pulse for counter
145
    output           pause_frame_detected;
146
 
147
 
148
    g_rx_fsm u_rx_fsm(
149
              // Status information to Applications
150
              .rx_sts_vld(rx_sts_vld),
151
              .rx_sts_bytes_rcvd(rx_sts_bytes_rcvd),
152
              .rx_sts_large_pkt(rx_sts_large_pkt),
153
              .rx_sts_lengthfield_err(rx_sts_lengthfield_err),
154
              .rx_sts_len_mismatch(rx_sts_len_mismatch),
155
              .rx_sts_crc_err(rx_sts_crc_err),
156
              .rx_sts_runt_pkt_rcvd(rx_sts_runt_pkt_rcvd),
157
              .rx_sts_rx_overrun(rx_sts_rx_overrun),
158
              .rx_sts_frm_length_err(rx_sts_frm_length_err),
159
              // Data Signals to Fifo Management Block
160
              .clr_rx_error_from_rx_fsm(clr_rx_error_from_rx_fsm),
161
              .rx2ap_rx_fsm_wrt(rx_dt_wrt),
162
              .rx2ap_rx_fsm_dt(rx_dt_out),
163
              // Fifo Control Signal to Fifo Management Block
164
              .rx2ap_commit_write(rx_commit_wr),
165
              .rx2ap_rewind_write(rx_rewind_wr),
166
              // To address filtering block
167
              // Pause control to Tx block
168
              .rx2tx_pause_tx(rx2tx_pause_tx),
169
              .commit_write_done(commit_write_done),
170
 
171
              // Global Signals 
172
              .reset_n(rx_reset_n),
173
              .phy_rx_clk(phy_rx_clk),
174
              // Signals from Mii/Rmii block for Receive data 
175
              .mi2rx_strt_rcv(mi2rx_strt_rcv),
176
              .mi2rx_rcv_vld(mi2rx_rcv_vld),
177
              .mi2rx_rx_byte(mi2rx_rx_byte),
178
              .mi2rx_end_rcv(mi2rx_end_rcv),
179
              .mi2rx_extend(mi2rx_extend),
180
              .mi2rx_end_frame(mi2rx_end_frame),
181
              .mi2rx_frame_err(mi2rx_frame_err),
182
              // Rx fifo management signal to indicate overrun
183
              .rx_fifo_full(rx_fifo_full),
184
              .ap2rx_rx_fifo_err(ap2rx_rx_fifo_err),
185
              // Signal from CRC check block
186
              .rc2rx_crc_ok(rc2rx_crc_ok),
187
              // Signals from Address filtering block
188
              .af2rx_pause_frame(af2rx_pause_frame),
189
              // Signals from Config Management Block
190
              .cf2rx_max_pkt_sz(cf2rx_max_pkt_sz),
191
              .cf2rx_rx_ch_en(cf2rx_rx_ch_en),
192
              .cf2rx_strp_pad_en(cf2rx_strp_pad_en),
193
              .cf2rx_snd_crc(cf2rx_snd_crc),
194
              .cf2rx_pause_en(cf2rx_pause_en),
195
              .cf2rx_rcv_runt_pkt_en(cf2rx_rcv_runt_pkt_en),
196
              .cf2rx_gigabit_xfr(cf_macmode),
197
         //A200 change Port added for crs based flow control
198
         .phy_crs(phy_crs),
199
         //A200 change crs flow control enable signal
200
         .crs_flow_control_enable(crs_flow_control_enable),
201
         //A200 change pause detected pulse for counter
202
         .pause_frame_detected(pause_frame_detected)
203
              );
204
 
205
    g_ad_fltr u_ad_fltr(
206
            .phy_rx_clk(phy_rx_clk),
207
            .rx_reset_n(rx_reset_n),
208
            .app_clk(app_clk),
209
            .scan_mode(scan_mode),
210
    //MII Interface
211
            .mi2af_rcv_vld(mi2rx_rcv_vld),
212
            .mi2af_strt_rcv(mi2rx_strt_rcv),
213
            .mi2af_end_rcv(mi2rx_end_rcv),
214
            .mi2af_rx_data(mi2rx_rx_byte),
215
    //RX_FSM Interface
216
            .af2rf_pause_frame(af2rx_pause_frame)
217
         );
218
 
219
  g_rx_crc32 u_rx_crc32 (
220
              // CRC Valid signal to rx_fsm
221
              .rc2rf_crc_ok(rc2rx_crc_ok),
222
 
223
              // Global Signals
224
              .phy_rx_clk(phy_rx_clk),
225
              .reset_n(rx_reset_n),
226
              // CRC Data signals
227
              .mi2rc_strt_rcv(mi2rx_strt_rcv),
228
              .mi2rc_rcv_valid(mi2rx_rcv_vld),
229
              .mi2rc_rx_byte(mi2rx_rx_byte)
230
              );
231
 
232
 
233
  g_deferral_rx U_deferral_rx (
234
//0503 Changed .port names to match g_deferral_rx
235
            .rx_dfl_dn(df2rx_dfl_dn),
236
            .dfl_single(cf2df_dfl_single_rx),
237
            .rx_dv(phy_rx_dv),
238
//0504      .phy_rx_er(phy_rx_er),
239
            .rx_clk(phy_rx_clk),
240
            .reset_n(rx_reset_n));
241
 
242
  endmodule

powered by: WebSVN 2.1.0

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