1 |
39 |
fisher5090 |
//////////////////////////////////////////////////////////////////////
|
2 |
|
|
//// ////
|
3 |
|
|
//// MODULE NAME: Destination Address Check ////
|
4 |
|
|
//// ////
|
5 |
|
|
//// DESCRIPTION: Destination Address Checker of 10 Gigabit ////
|
6 |
|
|
//// Ethernet MAC. ////
|
7 |
|
|
//// ////
|
8 |
|
|
//// This file is part of the 10 Gigabit Ethernet IP core project ////
|
9 |
|
|
//// http://www.opencores.org/projects/ethmac10g/ ////
|
10 |
|
|
//// ////
|
11 |
|
|
//// AUTHOR(S): ////
|
12 |
|
|
//// Zheng Cao ////
|
13 |
|
|
//// ////
|
14 |
|
|
//////////////////////////////////////////////////////////////////////
|
15 |
|
|
//// ////
|
16 |
|
|
//// Copyright (c) 2005 AUTHORS. All rights reserved. ////
|
17 |
|
|
//// ////
|
18 |
|
|
//// This source file may be used and distributed without ////
|
19 |
|
|
//// restriction provided that this copyright statement is not ////
|
20 |
|
|
//// removed from the file and that any derivative work contains ////
|
21 |
|
|
//// the original copyright notice and the associated disclaimer. ////
|
22 |
|
|
//// ////
|
23 |
|
|
//// This source file is free software; you can redistribute it ////
|
24 |
|
|
//// and/or modify it under the terms of the GNU Lesser General ////
|
25 |
|
|
//// Public License as published by the Free Software Foundation; ////
|
26 |
|
|
//// either version 2.1 of the License, or (at your option) any ////
|
27 |
|
|
//// later version. ////
|
28 |
|
|
//// ////
|
29 |
|
|
//// This source is distributed in the hope that it will be ////
|
30 |
|
|
//// useful, but WITHOUT ANY WARRANTY; without even the implied ////
|
31 |
|
|
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ////
|
32 |
|
|
//// PURPOSE. See the GNU Lesser General Public License for more ////
|
33 |
|
|
//// details. ////
|
34 |
|
|
//// ////
|
35 |
|
|
//// You should have received a copy of the GNU Lesser General ////
|
36 |
|
|
//// Public License along with this source; if not, download it ////
|
37 |
|
|
//// from http://www.opencores.org/lgpl.shtml ////
|
38 |
|
|
//// ////
|
39 |
|
|
//////////////////////////////////////////////////////////////////////
|
40 |
|
|
//
|
41 |
|
|
// CVS REVISION HISTORY:
|
42 |
|
|
//
|
43 |
|
|
// $Log: not supported by cvs2svn $
|
44 |
|
|
// Revision 1.1 2005/12/25 16:43:10 Zheng Cao
|
45 |
|
|
//
|
46 |
|
|
//
|
47 |
|
|
//
|
48 |
|
|
//////////////////////////////////////////////////////////////////////
|
49 |
|
|
|
50 |
|
|
`include "timescale.v"
|
51 |
|
|
`include "xgiga_define.v"
|
52 |
|
|
|
53 |
|
|
module rxDAchecker(rxclk,reset,local_invalid, broad_valid, multi_valid, MAC_Addr, da_addr);
|
54 |
|
|
input rxclk;
|
55 |
|
|
input reset;
|
56 |
|
|
|
57 |
|
|
output local_invalid;
|
58 |
|
|
output broad_valid;
|
59 |
|
|
output multi_valid;
|
60 |
|
|
|
61 |
|
|
input [47:0] MAC_Addr;
|
62 |
|
|
input [47:0] da_addr;
|
63 |
|
|
|
64 |
|
|
parameter TP = 1;
|
65 |
|
|
|
66 |
|
|
reg multi_valid;
|
67 |
|
|
reg broad_valid;
|
68 |
|
|
reg local_valid;
|
69 |
|
|
always @(posedge rxclk or posedge reset) begin
|
70 |
|
|
if (reset) begin
|
71 |
|
|
multi_valid <=#TP 0;
|
72 |
|
|
broad_valid <=#TP 0;
|
73 |
|
|
local_valid <=#TP 0;
|
74 |
|
|
end
|
75 |
|
|
else begin
|
76 |
|
|
multi_valid <=#TP (da_addr==`MULTICAST);
|
77 |
|
|
broad_valid <=#TP (da_addr==`BROADCAST);
|
78 |
|
|
local_valid <=#TP (da_addr==MAC_Addr);
|
79 |
|
|
end
|
80 |
|
|
end
|
81 |
|
|
|
82 |
|
|
assign local_invalid = 1'b0;//~local_valid & ~multi_valid & ~broad_valid;
|
83 |
|
|
|
84 |
|
|
endmodule
|