From 9a687bdb82eeb5f5133146bb3af6800d8435c75d Mon Sep 17 00:00:00 2001
From: Matt Ettus <matt@ettus.com>
Date: Thu, 21 Oct 2010 15:14:37 -0700
Subject: address gray coding

---
 usrp2/extramfifo/nobl_if.v | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/usrp2/extramfifo/nobl_if.v b/usrp2/extramfifo/nobl_if.v
index 391a841e8..a8303deca 100644
--- a/usrp2/extramfifo/nobl_if.v
+++ b/usrp2/extramfifo/nobl_if.v
@@ -39,6 +39,12 @@ module nobl_if
    assign 	   RAM_LDn = 0;
    // ZBT/NoBL RAM actually manages its own output enables very well.
    assign 	   RAM_OEn = 0;
+
+   // gray code the address to reduce EMI
+   wire [WIDTH-1:0] address_gray;
+   
+   bin2gray #(.WIDTH(WIDTH)) bin2gray (.bin(address),.gray(address_gray));
+   
    
    //
    // Pipeline stage 1
@@ -59,7 +65,7 @@ module nobl_if
 	  
 	  if (enable)
 	    begin
-	       address_pipe1 <= address;
+	       address_pipe1 <= address_gray;
 	       write_pipe1 <= write;
 	       RAM_WEn <= ~write;  // Creates IOB flob
 	       
-- 
cgit v1.2.3