summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/lib/filter/CMakeLists.txt2
-rw-r--r--gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc21
-rw-r--r--gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h3
-rw-r--r--gnuradio-core/src/lib/io/gr_udp_sink.cc2
-rwxr-xr-xgr-digital/python/qa_fll_band_edge.py1
-rw-r--r--volk/lib/CMakeLists.txt12
6 files changed, 33 insertions, 8 deletions
diff --git a/gnuradio-core/src/lib/filter/CMakeLists.txt b/gnuradio-core/src/lib/filter/CMakeLists.txt
index ce7e387c2..d26e55fb8 100644
--- a/gnuradio-core/src/lib/filter/CMakeLists.txt
+++ b/gnuradio-core/src/lib/filter/CMakeLists.txt
@@ -28,7 +28,7 @@ foreach(gr_core_filter_asm ${gr_core_filter_asms})
endforeach(gr_core_filter_asm)
#detect 32 or 64 bit compiler
-if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x86_64)$")
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^(i.86|x86|x86_64|amd64)$")
include(CheckTypeSize)
check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY)
if (${SIZEOF_VOID_P} EQUAL 8)
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
index 398956ddd..9297b6587 100644
--- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
+++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.cc
@@ -60,7 +60,7 @@ gr_pfb_clock_sync_ccf::gr_pfb_clock_sync_ccf (double sps, float loop_bw,
gr_make_io_signaturev (1, 4, iosig)),
d_updated (false), d_nfilters(filter_size),
d_max_dev(max_rate_deviation),
- d_osps(osps), d_error(0)
+ d_osps(osps), d_error(0), d_out_idx(0)
{
d_nfilters = filter_size;
d_sps = floor(sps);
@@ -380,7 +380,7 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
// produce output as long as we can and there are enough input samples
while((i < noutput_items) && (count < nrequired)) {
- for(int k = 0; k < d_osps; k++) {
+ while(d_out_idx < d_osps) {
d_filtnum = (int)floor(d_k);
// Keep the current filter number in [0, d_nfilters]
@@ -397,16 +397,27 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
count -= 1;
}
- out[i+k] = d_filters[d_filtnum]->filter(&in[count+k]);
+ out[i+d_out_idx] = d_filters[d_filtnum]->filter(&in[count+d_out_idx]);
d_k = d_k + d_rate_i + d_rate_f; // update phase
-
+ d_out_idx++;
+
if(output_items.size() == 4) {
err[i] = d_error;
outrate[i] = d_rate_f;
outk[i] = d_k;
}
+
+ // We've run out of output items we can create; return now.
+ if(i+d_out_idx >= noutput_items) {
+ consume_each(count);
+ return i;
+ }
}
+ // reset here; if we didn't complete a full osps samples last time,
+ // the early return would take care of it.
+ d_out_idx = 0;
+
// Update the phase and rate estimates for this symbol
gr_complex diff = d_diff_filters[d_filtnum]->filter(&in[count]);
error_r = out[i].real() * diff.real();
@@ -424,7 +435,7 @@ gr_pfb_clock_sync_ccf::general_work (int noutput_items,
i+=d_osps;
count += (int)floor(d_sps);
}
- consume_each(count);
+ consume_each(count);
return i;
}
diff --git a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h
index f4f589cd9..1e1bbca10 100644
--- a/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h
+++ b/gnuradio-core/src/lib/filter/gr_pfb_clock_sync_ccf.h
@@ -197,7 +197,8 @@ class GR_CORE_API gr_pfb_clock_sync_ccf : public gr_block
int d_filtnum;
int d_osps;
float d_error;
-
+ int d_out_idx;
+
/*!
* Build the polyphase filterbank timing synchronizer.
*/
diff --git a/gnuradio-core/src/lib/io/gr_udp_sink.cc b/gnuradio-core/src/lib/io/gr_udp_sink.cc
index 36b4cbe36..9fc4da0ae 100644
--- a/gnuradio-core/src/lib/io/gr_udp_sink.cc
+++ b/gnuradio-core/src/lib/io/gr_udp_sink.cc
@@ -20,6 +20,8 @@
* Boston, MA 02110-1301, USA.
*/
+#include <boost/asio.hpp>
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/gr-digital/python/qa_fll_band_edge.py b/gr-digital/python/qa_fll_band_edge.py
index 088eb2b68..7d89bc9ea 100755
--- a/gr-digital/python/qa_fll_band_edge.py
+++ b/gr-digital/python/qa_fll_band_edge.py
@@ -46,6 +46,7 @@ class test_fll_band_edge_cc(gr_unittest.TestCase):
foffset = 0.2 / (2.0*math.pi)
# Create a set of 1's and -1's, pulse shape and interpolate to sps
+ random.seed(0)
data = [2.0*random.randint(0, 2) - 1.0 for i in xrange(200)]
self.src = gr.vector_source_c(data, False)
self.rrc = gr.interp_fir_filter_ccf(sps, rrc_taps)
diff --git a/volk/lib/CMakeLists.txt b/volk/lib/CMakeLists.txt
index 092c3ba0d..1891996af 100644
--- a/volk/lib/CMakeLists.txt
+++ b/volk/lib/CMakeLists.txt
@@ -85,7 +85,17 @@ execute_process(
#set the various overrule values (see archs.xml)
#a lot of this is translating between automake and cmake
if(NOT "${CROSSCOMPILE_MULTILIB}" STREQUAL "true")
- set(MD_SUBCPU ${CMAKE_HOST_SYSTEM_PROCESSOR})
+ set(MD_SUBCPU ${CMAKE_SYSTEM_PROCESSOR})
+ #detect 32 or 64 bit compiler
+ if(MD_SUBCPU MATCHES "^(i.86|x86|x86_64|amd64)$")
+ include(CheckTypeSize)
+ check_type_size("void*" SIZEOF_VOID_P BUILTIN_TYPES_ONLY)
+ if (${SIZEOF_VOID_P} EQUAL 8)
+ set(MD_SUBCPU x86_64)
+ else()
+ set(MD_SUBCPU x86)
+ endif()
+ endif()
endif()
if(NOT "${ORC_FOUND}" STREQUAL "TRUE")
set(LV_HAVE_ORC "no")