summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2008-09-02 19:50:09 +0000
committermatt <matt@221aa14e-8319-0410-a670-987f0aec2ac5>2008-09-02 19:50:09 +0000
commitb5d45b36d47b198ff50289b5f292ff2e519dc7ad (patch)
tree5609763a486eb219860f9621364658a717616b6e
parent580a21ac5aa342b79b8d616117478196c5072e71 (diff)
Allows for changing the interpolation rate dynamically. Stop the pipeline, set the rate, restart the pipeline. Fixes bug #248.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9485 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-xusrp/fpga/sdr_lib/cic_interp.v7
1 files changed, 4 insertions, 3 deletions
diff --git a/usrp/fpga/sdr_lib/cic_interp.v b/usrp/fpga/sdr_lib/cic_interp.v
index 732f82ce07..32d106861a 100755
--- a/usrp/fpga/sdr_lib/cic_interp.v
+++ b/usrp/fpga/sdr_lib/cic_interp.v
@@ -45,11 +45,12 @@ module cic_interp(clock,reset,enable,rate,strobe_in,strobe_out,signal_in,signal_
sign_extend #(bw,bw+maxbitgain)
ext_input (.in(signal_in),.out(signal_in_ext));
-
+
+ wire clear_me = reset | ~enable;
//FIXME Note that this section has pipe and diff reversed
// It still works, but is confusing
always @(posedge clock)
- if(reset)
+ if(clear_me)
for(i=0;i<N;i=i+1)
integrator[i] <= #1 0;
else if (enable & strobe_out)
@@ -61,7 +62,7 @@ module cic_interp(clock,reset,enable,rate,strobe_in,strobe_out,signal_in,signal_
end
always @(posedge clock)
- if(reset)
+ if(clear_me)
begin
for(i=0;i<N;i=i+1)
begin