commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r10725 - gnuradio/trunk/usrp2/fpga/simple_gemac


From: matt
Subject: [Commit-gnuradio] r10725 - gnuradio/trunk/usrp2/fpga/simple_gemac
Date: Tue, 31 Mar 2009 18:42:00 -0600 (MDT)

Author: matt
Date: 2009-03-31 18:41:59 -0600 (Tue, 31 Mar 2009)
New Revision: 10725

Added:
   gnuradio/trunk/usrp2/fpga/simple_gemac/address_filter.v
Log:
checkpoint


Added: gnuradio/trunk/usrp2/fpga/simple_gemac/address_filter.v
===================================================================
--- gnuradio/trunk/usrp2/fpga/simple_gemac/address_filter.v                     
        (rev 0)
+++ gnuradio/trunk/usrp2/fpga/simple_gemac/address_filter.v     2009-04-01 
00:41:59 UTC (rev 10725)
@@ -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
+
+   





reply via email to

[Prev in Thread] Current Thread [Next in Thread]