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 6

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

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

powered by: WebSVN 2.1.0

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