diff options
author | Eric Blossom | 2010-12-21 13:31:58 -0800 |
---|---|---|
committer | Eric Blossom | 2010-12-21 13:31:58 -0800 |
commit | 75b650ef2506fe5c607517a3d5188b0705f60fde (patch) | |
tree | 99cb6fd6adc3e91edc832cbaee236d2fe30fa3fd /gnuradio-core | |
parent | 1984aab345857296564e174395cf3af1375e1469 (diff) | |
parent | ed78ba5d9999bbe50507373a1aa2877ef0da64c6 (diff) | |
download | gnuradio-75b650ef2506fe5c607517a3d5188b0705f60fde.tar.gz gnuradio-75b650ef2506fe5c607517a3d5188b0705f60fde.tar.bz2 gnuradio-75b650ef2506fe5c607517a3d5188b0705f60fde.zip |
Merge branch 'next' into guile.
Passes distcheck.
* next: (32 commits)
volk: Fix for popcnt's 64/32-bit issues.
Using a copy of config.guess and config.sub instead of sym links.
Including time header to qa files.
Changed python env variable to more globally usable version.
gr_uhd: Quick fix for make distcheck failures if UHD is not installed.
PFB resampler: fix it this way to avoid the signed/unsigned warning.
PFB resampler: fixes bug where filter could be looking past the number of inputs.
resampler PFB: Sets relative rate when rate is changed.
Create method to set rate on pfb_arb_resamp after it has been created. Allow it to be called from GRC.
volk: fix for running 32-bit OS on 64-bit processor. System is correctly identified as 32-bit and compiles with the correct flags.
volk: changing the path variables again. This works on my various systems tested. Using abs_ path names failed on Ubuntu 8.04 32-bit.
volk: May be a hack, but it was required for my 32-bit Fedora 13 to work.
volk: Removing unnecessary shell script; last commit takes care if its functions.
volk: Fixing build system to handle making volk_mktables, volk_tables.h, and volk_config.h instead of a standalone shell script.
volk: readding 16sc_magnitude_32f_sse with fix for SSE hadd_ps error.
volk: Adding a few more generic-only test cases.
volk: adding generic QA test for 16sc_magnitude_32f.
volk: modified the configure scripts to output which architectures it will be building based on the configure tests.
uhd: update notes in grc blocks for addressing scheme
volk: Removing erroneous SSE function that actually usese an SSE3 intrin (mm_hadd_ps).
...
Diffstat (limited to 'gnuradio-core')
4 files changed, 17 insertions, 9 deletions
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc index 59b76a6f0..834450436 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.cc @@ -58,8 +58,7 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, process. */ d_int_rate = filter_size; - d_dec_rate = (unsigned int)floor(d_int_rate/rate); - d_flt_rate = (d_int_rate/rate) - d_dec_rate; + set_rate(rate); // Store the last filter between calls to work d_last_filter = 0; @@ -81,8 +80,6 @@ gr_pfb_arb_resampler_ccf::gr_pfb_arb_resampler_ccf (float rate, create_diff_taps(taps, dtaps); create_taps(taps, d_taps, d_filters); create_taps(dtaps, d_dtaps, d_diff_filters); - - set_relative_rate(rate); } gr_pfb_arb_resampler_ccf::~gr_pfb_arb_resampler_ccf () @@ -179,8 +176,8 @@ gr_pfb_arb_resampler_ccf::general_work (int noutput_items, j = d_last_filter; // produce output as long as we can and there are enough input samples - while((i < noutput_items) && (count < ninput_items[0]-1)) { - + int max_input = ninput_items[0]-(int)d_taps_per_filter; + while((i < noutput_items) && (count < max_input)) { // start j by wrapping around mod the number of channels while((j < d_int_rate) && (i < noutput_items)) { // Take the current filter and derivative filter output diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h index cf5a79d4e..2c36c95f9 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.h @@ -161,7 +161,12 @@ public: * Print all of the filterbank taps to screen. */ void print_taps(); - + void set_rate (float rate) { + d_dec_rate = (unsigned int)floor(d_int_rate/rate); + d_flt_rate = (d_int_rate/rate) - d_dec_rate; + set_relative_rate(rate); + } + int general_work (int noutput_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, diff --git a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i index 4f07af861..77f28acdf 100644 --- a/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i +++ b/gnuradio-core/src/lib/filter/gr_pfb_arb_resampler_ccf.i @@ -38,4 +38,5 @@ class gr_pfb_arb_resampler_ccf : public gr_block //void set_taps (const std::vector<float> &taps); void print_taps(); + void set_rate (float rate); }; diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py index cd9289fa5..74eae58dc 100644 --- a/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py +++ b/gnuradio-core/src/python/gnuradio/blks2impl/pfb_arb_resampler.py @@ -48,9 +48,14 @@ class pfb_arb_resampler_ccf(gr.hier_block2): self._taps = gr.firdes.low_pass_2(self._size, self._size, bw, tb, atten) self.pfb = gr.pfb_arb_resampler_ccf(self._rate, self._taps, self._size) - + #print "PFB has %d taps\n" % (len(self._taps),) + self.connect(self, self.pfb) self.connect(self.pfb, self) - + + # Note -- set_taps not implemented in base class yet def set_taps(self, taps): self.pfb.set_taps(taps) + + def set_rate(self, rate): + self.pfb.set_rate(rate) |