patch-gnuradio
[Top][All Lists]
Advanced

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

[Patch-gnuradio] USRP 1 CIC Decimator Removal Patch


From: Paul Creekmore
Subject: [Patch-gnuradio] USRP 1 CIC Decimator Removal Patch
Date: Tue, 17 Feb 2009 15:16:56 -0500
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Here is a patch to correct a bug in the USRP 1 FGPA code.  As written, the code will not build if RX_CIC_ON is not defined (if the user attempts to build a version without the CIC decimator), the compiler directives include a block of code fails to correctly rout the data and sample strobe directly to the halfband filter.

---Side note---
Incidentally, I've tested the USRP with this patch applied, both the CIC filter and halfband filter removed, and my quantization code (previously presented for review on the discussion list) in place and successfully achieved a 64 MHz sample rate for low quantization levels.  "Low" is defined by the quality of the USB connection and any host computer processing/hard drive speed limitations.

--Paul
Index: usrp/fpga/sdr_lib/rx_chain.v
===================================================================
--- usrp/fpga/sdr_lib/rx_chain.v        (revision 10455)
+++ usrp/fpga/sdr_lib/rx_chain.v        (working copy)
@@ -69,19 +69,20 @@
      ( .clock(clock),.reset(reset),.enable(enable),
        
.rate(decim_rate),.strobe_in(sample_strobe),.strobe_out(decimator_strobe),
        .signal_in(bb_i),.signal_out(hb_in_i) );
+   assign hb_strobe_in = decimator_strobe;
 `else
    assign hb_in_i = bb_i;
-   assign decimator_strobe = sample_strobe;
+   assign hb_strobe_in = sample_strobe;
 `endif
    
 `ifdef RX_HB_ON
    halfband_decim hbd_i_0
      ( .clock(clock),.reset(reset),.enable(enable),
-       .strobe_in(decimator_strobe),.strobe_out(hb_strobe),
+       .strobe_in(hb_strobe_in),.strobe_out(hb_strobe),
        .data_in(hb_in_i),.data_out(i_out),.debugctrl(debugctrl) );
 `else
    assign i_out = hb_in_i;
-   assign hb_strobe = decimator_strobe;
+   assign hb_strobe = hb_strobe_in;
 `endif
    
 `ifdef RX_CIC_ON
@@ -96,7 +97,7 @@
 `ifdef RX_HB_ON
    halfband_decim hbd_q_0
      ( .clock(clock),.reset(reset),.enable(enable),
-       .strobe_in(decimator_strobe),.strobe_out(),
+       .strobe_in(hb_strobe_in),.strobe_out(),
        .data_in(hb_in_q),.data_out(q_out) );   
 `else
    assign q_out = hb_in_q;

reply via email to

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