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

Subversion Repositories srdydrdy_lib

[/] [srdydrdy_lib/] [trunk/] [external/] [ethernet_tri_mode/] [MAC_rx/] [Broadcast_filter.v] - Blame information for rev 23

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 23 ghutchis
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
////  Broadcast_filter.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
// $Log: Broadcast_filter.v,v $
42
// Revision 1.3  2006/01/19 14:07:54  maverickist
43
// verification is complete.
44
//
45
// Revision 1.2  2005/12/16 06:44:16  Administrator
46
// replaced tab with space.
47
// passed 9.6k length frame test.
48
//
49
// Revision 1.1.1.1  2005/12/13 01:51:45  Administrator
50
// no message
51
//    
52
 
53
module Broadcast_filter (
54
Reset                   ,
55
Clk                     ,
56
//MAC_rx_ctrl           ,
57
broadcast_ptr           ,
58
broadcast_drop          ,
59
//FromCPU               ,
60
broadcast_filter_en     ,
61
broadcast_bucket_depth    ,
62
broadcast_bucket_interval
63
);
64
input           Reset                       ;
65
input           Clk                         ;
66
                //MAC_rx_ctrl               
67
input           broadcast_ptr               ;
68
output          broadcast_drop              ;
69
                //FromCPU                   ;
70
input           broadcast_filter_en         ;
71
input   [15:0]  broadcast_bucket_depth      ;
72
input   [15:0]  broadcast_bucket_interval   ;
73
 
74
//******************************************************************************  
75
//internal signals                                                                
76
//******************************************************************************  
77
reg     [15:0]  time_counter            ;
78
reg     [15:0]  broadcast_counter        ;
79
reg             broadcast_drop          ;
80
//******************************************************************************  
81
//                                                               
82
//****************************************************************************** 
83
always @ (posedge Clk or posedge Reset)
84
    if (Reset)
85
        time_counter    <=0;
86
    else if (time_counter==broadcast_bucket_interval)
87
        time_counter    <=0;
88
    else
89
        time_counter    <=time_counter+1;
90
 
91
always @ (posedge Clk or posedge Reset)
92
    if (Reset)
93
        broadcast_counter   <=0;
94
    else if (time_counter==broadcast_bucket_interval)
95
        broadcast_counter   <=0;
96
    else if (broadcast_ptr&&broadcast_counter!=broadcast_bucket_depth)
97
        broadcast_counter   <=broadcast_counter+1;
98
 
99
always @ (posedge Clk or posedge Reset)
100
    if (Reset)
101
        broadcast_drop      <=0;
102
    else if(broadcast_filter_en&&broadcast_counter==broadcast_bucket_depth)
103
        broadcast_drop      <=1;
104
    else
105
        broadcast_drop      <=0;
106
 
107
endmodule

powered by: WebSVN 2.1.0

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