summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt2009-04-01 00:41:59 +0000
committermatt2009-04-01 00:41:59 +0000
commitcb1a975e2c6813325f9bb3613f6cc08ef6123faa (patch)
tree50e27b40d818b03ababfc7655f458a00e12ee74b
parent0933dbae83a375ea3cf99304fcb722172c7768fb (diff)
downloadgnuradio-cb1a975e2c6813325f9bb3613f6cc08ef6123faa.tar.gz
gnuradio-cb1a975e2c6813325f9bb3613f6cc08ef6123faa.tar.bz2
gnuradio-cb1a975e2c6813325f9bb3613f6cc08ef6123faa.zip
checkpoint
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10725 221aa14e-8319-0410-a670-987f0aec2ac5
-rw-r--r--usrp2/fpga/simple_gemac/address_filter.v34
1 files changed, 34 insertions, 0 deletions
diff --git a/usrp2/fpga/simple_gemac/address_filter.v b/usrp2/fpga/simple_gemac/address_filter.v
new file mode 100644
index 000000000..2d2f4df51
--- /dev/null
+++ b/usrp2/fpga/simple_gemac/address_filter.v
@@ -0,0 +1,34 @@
+
+
+module address_filter
+ (input clk,
+ input reset,
+ input go,
+ input [7:0] data,
+ input [47:0] address,
+ output match,
+ output done);
+
+ reg [2:0] af_state;
+
+ always @(posedge clk)
+ if(reset)
+ af_state <= 0;
+ else
+ if(go)
+ af_state <= (data == address[47:40]) ? 1 : 7;
+ else
+ case(af_state)
+ 1 : af_state <= (data == address[39:32]) ? 2 : 7;
+ 2 : af_state <= (data == address[31:24]) ? 3 : 7;
+ 3 : af_state <= (data == address[23:16]) ? 4 : 7;
+ 4 : af_state <= (data == address[15:8]) ? 5 : 7;
+ 5 : af_state <= (data == address[7:0]) ? 6 : 7;
+ endcase // case (af_state)
+
+ assign match = (af_state==6);
+ assign done = (af_state==6)|(af_state==7);
+
+endmodule // address_filter
+
+