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

Subversion Repositories ethernet_tri_mode

[/] [ethernet_tri_mode/] [trunk/] [rtl/] [verilog/] [MAC_rx.v] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 maverickis
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  MAC_rx.v                                               ////
4
////                                                              ////
5
////  This file is part of the Ethernet IP core project           ////
6
////  http://www.opencores.org/projects.cgi/web/ethernet_tri_mode/////
7
////                                                              ////
8
////  Author(s):                                                  ////
9
////      - Jon Gao (gaojon@yahoo.com)                            ////
10
////                                                              ////
11
////                                                              ////
12
//////////////////////////////////////////////////////////////////////
13
////                                                              ////
14
//// Copyright (C) 2001 Authors                                   ////
15
////                                                              ////
16
//// This source file may be used and distributed without         ////
17
//// restriction provided that this copyright statement is not    ////
18
//// removed from the file and that any derivative work contains  ////
19
//// the original copyright notice and the associated disclaimer. ////
20
////                                                              ////
21
//// This source file is free software; you can redistribute it   ////
22
//// and/or modify it under the terms of the GNU Lesser General   ////
23
//// Public License as published by the Free Software Foundation; ////
24
//// either version 2.1 of the License, or (at your option) any   ////
25
//// later version.                                               ////
26
////                                                              ////
27
//// This source is distributed in the hope that it will be       ////
28
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
29
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
30
//// PURPOSE.  See the GNU Lesser General Public License for more ////
31
//// details.                                                     ////
32
////                                                              ////
33
//// You should have received a copy of the GNU Lesser General    ////
34
//// Public License along with this source; if not, download it   ////
35
//// from http://www.opencores.org/lgpl.shtml                     ////
36
////                                                              ////
37
//////////////////////////////////////////////////////////////////////
38
//                                                                    
39
// CVS Revision History                                               
40
//                                                                    
41 6 maverickis
// $Log: not supported by cvs2svn $
42
// Revision 1.1.1.1  2005/12/13 01:51:44  Administrator
43
// no message
44
// 
45 5 maverickis
module MAC_rx (
46
input                   Reset   ,
47
input                   Clk_user,
48
input                   Clk     ,
49
                                //RMII interface
50
input                   MCrs_dv ,
51
input   [7:0]    MRxD    ,
52
input                   MRxErr  ,
53
                                //flow_control signals  
54
output  [15:0]   pause_quanta            ,
55
output                  pause_quanta_val        ,
56
                                //user interface 
57
output                  Rx_mac_ra       ,
58
input                   Rx_mac_rd       ,
59
output[31:0]     Rx_mac_data     ,
60
output[1:0]              Rx_mac_BE       ,
61
output                  Rx_mac_pa       ,
62
output                  Rx_mac_sop      ,
63
output                  Rx_mac_eop      ,
64
                                //CPU
65
input                   MAC_rx_add_chk_en       ,
66
input   [7:0]    MAC_add_prom_data       ,
67
input   [2:0]    MAC_add_prom_add        ,
68
input                   MAC_add_prom_wr         ,
69
input                   broadcast_filter_en         ,
70
input   [15:0]   broadcast_MAX           ,
71
input                   RX_APPEND_CRC,
72
input                   CRC_chk_en      ,
73
input   [5:0]    RX_IFG_SET        ,
74
input   [15:0]   RX_MAX_LENGTH   ,//     1518
75
input   [6:0]    RX_MIN_LENGTH   ,//     64
76
                                //RMON interface
77
output  [15:0]   Rx_pkt_length_rmon              ,
78
output                  Rx_apply_rmon           ,
79
output  [2:0]    Rx_pkt_err_type_rmon    ,
80
output  [2:0]    Rx_pkt_type_rmon
81
);
82
//******************************************************************************
83
//internal signals                                                              
84
//******************************************************************************
85
//CRC_chk interface
86
wire                    CRC_en  ;
87
wire                    CRC_init;
88
wire            CRC_err ;
89
                                //MAC_rx_add_chk interface
90
wire                    MAC_add_en                      ;
91
wire                    MAC_rx_add_chk_err      ;
92
                                //broadcast_filter
93
wire                    broadcast_ptr           ;
94
wire                    broadcast_drop          ;
95
                                //flow_control signals  
96
wire    [15:0]   pause_quanta            ;
97
wire                    pause_quanta_val        ;
98
                                //MAC_rx_ctrl interface 
99
wire    [7:0]    Fifo_data               ;
100
wire                    Fifo_data_en    ;
101
wire                    Fifo_full           ;
102
wire                    Fifo_data_err   ;
103
wire                    Fifo_data_end   ;
104
//******************************************************************************
105
//instantiation                                                            
106
//******************************************************************************
107
 
108
 
109
MAC_rx_ctrl U_MAC_rx_ctrl(
110
.Reset                           (Reset                     ),
111
.Clk                         (Clk                           ),
112
  //RMII interface           ( //RMII interface         ),                                                    
113
.MCrs_dv                                 (MCrs_dv                               ),
114
.MRxD                                (MRxD                                  ),
115
.MRxErr                              (MRxErr                            ),
116
 //CRC_chk interface         (//CRC_chk interface       ),                                                   
117
.CRC_en                      (CRC_en                    ),
118
.CRC_init                    (CRC_init                  ),
119
.CRC_err                     (CRC_err                   ),
120
 //MAC_rx_add_chk interface  (//MAC_rx_add_chk interface),                                                   
121
.MAC_add_en                              (MAC_add_en                        ),
122
.MAC_rx_add_chk_err              (MAC_rx_add_chk_err        ),
123
 //broadcast_filter          (//broadcast_filter        ),                           
124
.broadcast_ptr               (broadcast_ptr                 ),
125
.broadcast_drop              (broadcast_drop            ),
126
 //flow_control signals      (//flow_control signals    ),                           
127
.pause_quanta                    (pause_quanta                  ),
128
.pause_quanta_val                (pause_quanta_val              ),
129
 //MAC_rx_FF interface       (//MAC_rx_FF interface     ),                                                   
130
.Fifo_data                           (Fifo_data                     ),
131
.Fifo_data_en                (Fifo_data_en                  ),
132
.Fifo_data_err               (Fifo_data_err                 ),
133
.Fifo_data_end               (Fifo_data_end                 ),
134
.Fifo_full                           (Fifo_full                     ),
135
 //RMON interface            (//RMON interface          ),                               
136
.Rx_pkt_type_rmon                    (Rx_pkt_type_rmon              ),
137
.Rx_pkt_length_rmon                  (Rx_pkt_length_rmon                ),
138
.Rx_apply_rmon               (Rx_apply_rmon                 ),
139
.Rx_pkt_err_type_rmon        (Rx_pkt_err_type_rmon          ),
140
 //CPU                       (//CPU                     ),                                             
141
.RX_IFG_SET                      (RX_IFG_SET                ),
142
.RX_MAX_LENGTH               (RX_MAX_LENGTH             ),
143
.RX_MIN_LENGTH               (RX_MIN_LENGTH             )
144
);
145
 
146
MAC_rx_FF  U_MAC_rx_FF (
147
.Reset                           (Reset                         ),
148
.Clk_MAC                         (Clk                           ),
149
.Clk_SYS                         (Clk_user                      ),
150
 //MAC_rx_ctrl interface     (//MAC_rx_ctrl interface   ),
151
.Fifo_data                           (Fifo_data                     ),
152
.Fifo_data_en                (Fifo_data_en                  ),
153
.Fifo_full                       (Fifo_full                     ),
154
.Fifo_data_err               (Fifo_data_err                 ),
155
.Fifo_data_end               (Fifo_data_end                 ),
156
 //CPU                       (//CPU                     ),
157
.RX_APPEND_CRC               (RX_APPEND_CRC             ),
158
 //user interface            (//user interface          ),
159
.Rx_mac_ra                       (Rx_mac_ra                     ),
160
.Rx_mac_rd                       (Rx_mac_rd                     ),
161
.Rx_mac_data                 (Rx_mac_data                   ),
162
.Rx_mac_BE                       (Rx_mac_BE                     ),
163
.Rx_mac_sop                      (Rx_mac_sop                ),
164
.Rx_mac_pa                   (Rx_mac_pa                 ),
165
.Rx_mac_eop                      (Rx_mac_eop                )
166
);
167
 
168
Broadcast_filter U_Broadcast_filter(
169
.Reset                                          (Reset                                          ),
170
.Clk                        (Clk                            ),
171
 //MAC_rx_ctrl              (//MAC_rx_ctrl              ),
172
.broadcast_ptr              (broadcast_ptr                  ),
173
.broadcast_drop             (broadcast_drop                 ),
174
 //FromCPU                      (//FromCPU                      ),
175
.broadcast_filter_en        (broadcast_filter_en            ),
176
.broadcast_MAX              (broadcast_MAX                  )
177
);
178
 
179
CRC_chk U_CRC_chk(
180
.Reset                                  (Reset                                          ),
181
.Clk                        (Clk                            ),
182
.CRC_data                       (Fifo_data                      ),
183
.CRC_init                       (CRC_init                       ),
184
.CRC_en                     (CRC_en                         ),
185
 //From CPU                 (//From CPU                 ),
186
.CRC_chk_en                     (CRC_chk_en                     ),
187
.CRC_err                        (CRC_err                        )
188
);
189
 
190
MAC_rx_add_chk U_MAC_rx_add_chk(
191
.Reset                                          (Reset                                  ),
192
.Clk                        (Clk                            ),
193
.Init                       (CRC_init                   ),
194
.data                       (Fifo_data                  ),
195
.MAC_add_en                     (MAC_add_en                     ),
196
.MAC_rx_add_chk_err             (MAC_rx_add_chk_err             ),
197
 //From CPU                 (//From CPU                 ),
198
.MAC_rx_add_chk_en              (MAC_rx_add_chk_en              ),
199
.MAC_add_prom_data              (MAC_add_prom_data              ),
200
.MAC_add_prom_add               (MAC_add_prom_add               ),
201
.MAC_add_prom_wr                    (MAC_add_prom_wr                )
202
);
203
 
204
endmodule

powered by: WebSVN 2.1.0

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