summaryrefslogtreecommitdiffstats
path: root/sdr_lib/cic_interp.v
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
commit69bef1c19b287244a4f3fb04cadc06ec49ca328a (patch)
tree972728a5298b786db04090478649e42cb733ba6c /sdr_lib/cic_interp.v
parent4a2d8bec69cef42bedece7c0f2ada64829c8eab2 (diff)
downloaduhd-69bef1c19b287244a4f3fb04cadc06ec49ca328a.tar.gz
uhd-69bef1c19b287244a4f3fb04cadc06ec49ca328a.tar.bz2
uhd-69bef1c19b287244a4f3fb04cadc06ec49ca328a.zip
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
Diffstat (limited to 'sdr_lib/cic_interp.v')
-rwxr-xr-xsdr_lib/cic_interp.v7
1 files changed, 4 insertions, 3 deletions
diff --git a/sdr_lib/cic_interp.v b/sdr_lib/cic_interp.v
index 732f82ce0..32d106861 100755
--- a/sdr_lib/cic_interp.v
+++ b/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