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

Subversion Repositories ethernet_tri_mode

[/] [ethernet_tri_mode/] [trunk/] [rtl/] [verilog/] [RMON.v] - Blame information for rev 35

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

Line No. Rev Author Line
1 5 maverickis
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3 7 maverickis
////  RMON.v                                                      ////
4 5 maverickis
////                                                              ////
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 7 maverickis
////      - Jon Gao (gaojon@yahoo.com)                            ////
10 5 maverickis
////                                                              ////
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 19 maverickis
// Revision 1.3  2006/01/19 14:07:53  maverickist
43
// verification is complete.
44
//
45 7 maverickis
// Revision 1.2  2005/12/16 06:44:16  Administrator
46
// replaced tab with space.
47
// passed 9.6k length frame test.
48
//
49 6 maverickis
// Revision 1.1.1.1  2005/12/13 01:51:44  Administrator
50
// no message
51
// 
52 5 maverickis
 
53
module RMON (
54 7 maverickis
Clk                 ,
55
Reset               ,
56 5 maverickis
//Tx_RMON            
57 7 maverickis
Tx_pkt_type_rmon    ,
58
Tx_pkt_length_rmon  ,
59
Tx_apply_rmon       ,
60 5 maverickis
Tx_pkt_err_type_rmon,
61
//Tx_RMON            
62 7 maverickis
Rx_pkt_type_rmon    ,
63
Rx_pkt_length_rmon  ,
64
Rx_apply_rmon       ,
65 5 maverickis
Rx_pkt_err_type_rmon,
66
//CPU                
67 7 maverickis
CPU_rd_addr         ,
68
CPU_rd_apply        ,
69
CPU_rd_grant        ,
70
CPU_rd_dout
71 5 maverickis
 
72
);
73 7 maverickis
input               Clk                 ;
74
input               Reset               ;
75
                    //Tx_RMON
76
input   [2:0]       Tx_pkt_type_rmon    ;
77
input   [15:0]      Tx_pkt_length_rmon  ;
78
input               Tx_apply_rmon       ;
79
input   [2:0]       Tx_pkt_err_type_rmon;
80
                    //Tx_RMON
81
input   [2:0]       Rx_pkt_type_rmon    ;
82
input   [15:0]      Rx_pkt_length_rmon  ;
83
input               Rx_apply_rmon       ;
84
input   [2:0]       Rx_pkt_err_type_rmon;
85
                    //CPU
86
input   [5:0]       CPU_rd_addr         ;
87
input               CPU_rd_apply        ;
88
output              CPU_rd_grant        ;
89
output  [31:0]      CPU_rd_dout         ;
90 5 maverickis
 
91
//******************************************************************************  
92
//interface signals
93
//******************************************************************************  
94 7 maverickis
wire                Reg_apply_0     ;
95
wire    [4:0]       Reg_addr_0      ;
96
wire    [15:0]      Reg_data_0      ;
97
wire                Reg_next_0      ;
98
wire                Reg_apply_1     ;
99
wire    [4:0]       Reg_addr_1      ;
100
wire    [15:0]      Reg_data_1      ;
101
wire                Reg_next_1      ;
102
wire    [5:0]       Addra           ;
103
wire    [31:0]      Dina            ;
104
wire    [31:0]      Douta           ;
105
wire                Wea             ;
106 5 maverickis
 
107
//******************************************************************************  
108
 
109 7 maverickis
assign      RxAddrb=0;
110
assign      TxAddrb=0;
111 5 maverickis
 
112
RMON_addr_gen U_0_Rx_RMON_addr_gen(
113 7 maverickis
.Clk                    (Clk                        ),
114
.Reset                  (Reset                      ),
115
 //RMON                 (//RMON                     ),                                 
116
.Pkt_type_rmon          (Rx_pkt_type_rmon           ),
117
.Pkt_length_rmon        (Rx_pkt_length_rmon         ),
118
.Apply_rmon             (Rx_apply_rmon              ),
119
.Pkt_err_type_rmon      (Rx_pkt_err_type_rmon       ),
120
 //Rmon_ctrl            (//Rron_ctrl                ),                                          
121
.Reg_apply              (Reg_apply_0                ),
122
.Reg_addr               (Reg_addr_0                 ),
123
.Reg_data               (Reg_data_0                 ),
124
.Reg_next               (Reg_next_0                 ),
125
 //CPU                  (//CPU                       ),                                 
126
.Reg_drop_apply         (                           ));
127 5 maverickis
 
128
RMON_addr_gen U_0_Tx_RMON_addr_gen(
129 7 maverickis
.Clk                    (Clk                        ),
130
.Reset                  (Reset                      ),
131
 //RMON                 (//RMON                     ),                                 
132
.Pkt_type_rmon          (Tx_pkt_type_rmon           ),
133
.Pkt_length_rmon        (Tx_pkt_length_rmon         ),
134
.Apply_rmon             (Tx_apply_rmon              ),
135
.Pkt_err_type_rmon      (Tx_pkt_err_type_rmon       ),
136
 //Rmon_ctrl            (//Rron_ctrl                ),                                              
137
.Reg_apply              (Reg_apply_1                ),
138
.Reg_addr               (Reg_addr_1                 ),
139
.Reg_data               (Reg_data_1                 ),
140
.Reg_next               (Reg_next_1                 ),
141
 //CPU                  (//CPU                       ),                                 
142
.Reg_drop_apply         (                           ));
143 5 maverickis
 
144
RMON_CTRL U_RMON_CTRL(
145 7 maverickis
.Clk                    (Clk                        ),
146
.Reset                  (Reset                      ),
147
 //RMON_CTRL            (//RMON_CTRL                ),  
148
.Reg_apply_0            (Reg_apply_0                ),
149
.Reg_addr_0             (Reg_addr_0                 ),
150
.Reg_data_0             (Reg_data_0                 ),
151
.Reg_next_0             (Reg_next_0                 ),
152
.Reg_apply_1            (Reg_apply_1                ),
153
.Reg_addr_1             (Reg_addr_1                 ),
154
.Reg_data_1             (Reg_data_1                 ),
155
.Reg_next_1             (Reg_next_1                 ),
156
 //dual-port ram        (//dual-port ram            ),  
157
.Addra                  (Addra                      ),
158
.Dina                   (Dina                       ),
159
.Douta                  (Douta                      ),
160
.Wea                    (Wea                        ),
161
 //CPU                  (//CPU                      ),    
162
.CPU_rd_addr            (CPU_rd_addr                ),
163
.CPU_rd_apply           (CPU_rd_apply               ),
164
.CPU_rd_grant           (CPU_rd_grant               ),
165
.CPU_rd_dout            (CPU_rd_dout                )
166 5 maverickis
);
167
 
168
RMON_dpram U_Rx_RMON_dpram(
169 7 maverickis
.Reset                  (Reset                      ),
170
.Clk                    (Clk                        ),
171
//port-a for Rmon       (//port-a for Rmon          ),
172
.Addra                  (Addra                      ),
173
.Dina                   (Dina                       ),
174 19 maverickis
.Douta                  (                           ),
175 7 maverickis
.Wea                    (Wea                        ),
176
//port-b for CPU        (//port-b for CPU           ),
177 19 maverickis
.Addrb                  (Addra                      ),
178
.Doutb                  (Douta                      ));
179 5 maverickis
 
180
endmodule

powered by: WebSVN 2.1.0

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