summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/lib/general/CMakeLists.txt6
-rw-r--r--gnuradio-core/src/lib/general/general.i6
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_b.cc84
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_b.h66
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_b.i37
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_f.cc84
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_f.h66
-rw-r--r--gnuradio-core/src/lib/general/gr_glfsr_source_f.i37
-rw-r--r--gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc77
-rw-r--r--gnuradio-core/src/lib/general/gr_pn_correlator_cc.h62
-rw-r--r--gnuradio-core/src/lib/general/gr_pn_correlator_cc.i32
-rw-r--r--gnuradio-core/src/lib/general/gri_glfsr.cc67
-rw-r--r--gnuradio-core/src/lib/general/gri_glfsr.h57
-rw-r--r--gnuradio-core/src/lib/general/qa_general.cc2
-rw-r--r--gnuradio-core/src/lib/general/qa_gri_lfsr.cc142
-rw-r--r--gnuradio-core/src/lib/general/qa_gri_lfsr.h42
-rwxr-xr-xgnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py94
-rwxr-xr-xgnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py50
-rw-r--r--gr-digital/include/digital_glfsr_source_b.h4
-rw-r--r--gr-digital/include/digital_glfsr_source_f.h4
-rw-r--r--gr-digital/include/digital_pn_correlator_cc.h4
-rw-r--r--gr-digital/lib/digital_glfsr_source_b.cc6
-rw-r--r--gr-digital/lib/digital_glfsr_source_f.cc6
-rw-r--r--gr-digital/lib/digital_pn_correlator_cc.cc4
-rwxr-xr-xgr-digital/python/qa_glfsr_source.py8
-rw-r--r--grc/blocks/block_tree.xml2
-rw-r--r--grc/blocks/gr_glfsr_source_x.xml59
-rw-r--r--grc/blocks/gr_pn_correlator_cc.xml35
28 files changed, 18 insertions, 1125 deletions
diff --git a/gnuradio-core/src/lib/general/CMakeLists.txt b/gnuradio-core/src/lib/general/CMakeLists.txt
index 3dd388261f..394b96c6fb 100644
--- a/gnuradio-core/src/lib/general/CMakeLists.txt
+++ b/gnuradio-core/src/lib/general/CMakeLists.txt
@@ -84,7 +84,6 @@ list(APPEND gnuradio_core_sources
${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_int.cc
${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.cc
${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.cc
${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.cc
${CMAKE_CURRENT_SOURCE_DIR}/gri_int_to_float.cc
${CMAKE_CURRENT_SOURCE_DIR}/gri_short_to_float.cc
@@ -104,7 +103,6 @@ list(APPEND test_gnuradio_core_sources
${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_nco.cc
${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_fxpt_vco.cc
${CMAKE_CURRENT_SOURCE_DIR}/qa_gr_math.cc
- ${CMAKE_CURRENT_SOURCE_DIR}/qa_gri_lfsr.cc
)
########################################################################
@@ -143,7 +141,6 @@ install(FILES
${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_short.h
${CMAKE_CURRENT_SOURCE_DIR}/gri_float_to_uchar.h
${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr.h
- ${CMAKE_CURRENT_SOURCE_DIR}/gri_glfsr.h
${CMAKE_CURRENT_SOURCE_DIR}/gri_interleaved_short_to_complex.h
${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_15_1_0.h
${CMAKE_CURRENT_SOURCE_DIR}/gri_lfsr_32k.h
@@ -218,8 +215,6 @@ set(gr_core_general_triple_threats
gr_fmdet_cf
gr_frequency_modulator_fc
gr_framer_sink_1
- gr_glfsr_source_b
- gr_glfsr_source_f
gr_head
gr_int_to_float
gr_interleave
@@ -245,7 +240,6 @@ set(gr_core_general_triple_threats
gr_pll_carriertracking_cc
gr_pll_freqdet_cf
gr_pll_refout_cc
- gr_pn_correlator_cc
gr_prefs
gr_probe_avg_mag_sqrd_c
gr_probe_avg_mag_sqrd_cf
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index 7a2abd3520..fce02ec108 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -87,7 +87,6 @@
#include <gr_pll_freqdet_cf.h>
#include <gr_pll_refout_cc.h>
#include <gr_pll_carriertracking_cc.h>
-#include <gr_pn_correlator_cc.h>
#include <gr_probe_avg_mag_sqrd_c.h>
#include <gr_probe_avg_mag_sqrd_cf.h>
#include <gr_probe_avg_mag_sqrd_f.h>
@@ -115,8 +114,6 @@
#include <gr_ctcss_squelch_ff.h>
#include <gr_feedforward_agc_cc.h>
#include <gr_bin_statistics_f.h>
-#include <gr_glfsr_source_b.h>
-#include <gr_glfsr_source_f.h>
#include <gr_peak_detector2_fb.h>
#include <gr_repeat.h>
#include <gr_cpfsk_bc.h>
@@ -201,7 +198,6 @@
%include "gr_pll_freqdet_cf.i"
%include "gr_pll_refout_cc.i"
%include "gr_pll_carriertracking_cc.i"
-%include "gr_pn_correlator_cc.i"
%include "gr_probe_avg_mag_sqrd_c.i"
%include "gr_probe_avg_mag_sqrd_cf.i"
%include "gr_probe_avg_mag_sqrd_f.i"
@@ -229,8 +225,6 @@
%include "gr_ctcss_squelch_ff.i"
%include "gr_feedforward_agc_cc.i"
%include "gr_bin_statistics_f.i"
-%include "gr_glfsr_source_b.i"
-%include "gr_glfsr_source_f.i"
%include "gr_peak_detector2_fb.i"
%include "gr_repeat.i"
%include "gr_cpfsk_bc.i"
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc b/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc
deleted file mode 100644
index fcfeb80dcf..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gr_glfsr_source_b.h>
-#include <gri_glfsr.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-gr_glfsr_source_b_sptr
-gr_make_glfsr_source_b(int degree, bool repeat, int mask, int seed)
-{
- return gnuradio::get_initial_sptr(new gr_glfsr_source_b(degree, repeat, mask, seed));
-}
-
-gr_glfsr_source_b::gr_glfsr_source_b(int degree, bool repeat, int mask, int seed)
- : gr_sync_block ("glfsr_source_b",
- gr_make_io_signature (0, 0, 0),
- gr_make_io_signature (1, 1, sizeof(unsigned char))),
- d_repeat(repeat),
- d_index(0)
-{
- if (degree < 1 || degree > 32)
- throw std::runtime_error("gr_glfsr_source_b: degree must be between 1 and 32 inclusive");
- d_length = (unsigned int)((1ULL << degree)-1);
-
- if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_glfsr = new gri_glfsr(mask, seed);
-}
-
-gr_glfsr_source_b::~gr_glfsr_source_b()
-{
- delete d_glfsr;
-}
-
-int
-gr_glfsr_source_b::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- char *out = (char *) output_items[0];
- if ((d_index > d_length) && d_repeat == false)
- return -1; /* once through the sequence */
-
- int i;
- for (i = 0; i < noutput_items; i++) {
- out[i] = d_glfsr->next_bit();
- d_index++;
- if (d_index > d_length && d_repeat == false)
- break;
- }
-
- return i;
-}
-
-int
-gr_glfsr_source_b::mask() const
-{
- return d_glfsr->mask();
-}
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.h b/gnuradio-core/src/lib/general/gr_glfsr_source_b.h
deleted file mode 100644
index 7549a76b32..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_GLFSR_SOURCE_B_H
-#define INCLUDED_GR_GLFSR_SOURCE_B_H
-
-#include <gr_core_api.h>
-#include <gr_sync_block.h>
-
-class gri_glfsr;
-
-class gr_glfsr_source_b;
-typedef boost::shared_ptr<gr_glfsr_source_b> gr_glfsr_source_b_sptr;
-
-GR_CORE_API gr_glfsr_source_b_sptr gr_make_glfsr_source_b(int degree, bool repeat=true, int mask=0, int seed=1);
-
-/*!
- * \brief Galois LFSR pseudo-random source
- * \ingroup source_blk
- */
-class GR_CORE_API gr_glfsr_source_b : public gr_sync_block
-{
- private:
- friend GR_CORE_API gr_glfsr_source_b_sptr
- gr_make_glfsr_source_b(int degree, bool repeat, int mask, int seed);
-
- gri_glfsr *d_glfsr;
-
- bool d_repeat;
- unsigned int d_index;
- unsigned int d_length;
-
- gr_glfsr_source_b(int degree, bool repeat, int mask, int seed);
-
- public:
-
- ~gr_glfsr_source_b();
-
- int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-
- unsigned int period() const { return d_length; }
- int mask() const;
-};
-
-#endif /* INCLUDED_GR_GLFSR_SOURCE_B_H */
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_b.i b/gnuradio-core/src/lib/general/gr_glfsr_source_b.i
deleted file mode 100644
index ffdd52ddba..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_b.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,glfsr_source_b);
-
-gr_glfsr_source_b_sptr
-gr_make_glfsr_source_b(int degree, bool repeat=true, int mask=0, int seed=1)
- throw (std::runtime_error);
-
-class gr_glfsr_source_b : public gr_sync_block
-{
-protected:
- gr_glfsr_source_b(int degree, bool repeat, int mask, int seed);
-
-public:
- unsigned int period() const;
- int mask() const;
-};
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc b/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc
deleted file mode 100644
index a9efc8a706..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.cc
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <gr_glfsr_source_f.h>
-#include <gri_glfsr.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-
-gr_glfsr_source_f_sptr
-gr_make_glfsr_source_f(int degree, bool repeat, int mask, int seed)
-{
- return gnuradio::get_initial_sptr(new gr_glfsr_source_f(degree, repeat, mask, seed));
-}
-
-gr_glfsr_source_f::gr_glfsr_source_f(int degree, bool repeat, int mask, int seed)
- : gr_sync_block ("glfsr_source_f",
- gr_make_io_signature (0, 0, 0),
- gr_make_io_signature (1, 1, sizeof(float))),
- d_repeat(repeat),
- d_index(0)
-{
- if (degree < 1 || degree > 32)
- throw std::runtime_error("gr_glfsr_source_f: degree must be between 1 and 32 inclusive");
- d_length = (unsigned int)((1ULL << degree)-1);
-
- if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_glfsr = new gri_glfsr(mask, seed);
-}
-
-gr_glfsr_source_f::~gr_glfsr_source_f()
-{
- delete d_glfsr;
-}
-
-int
-gr_glfsr_source_f::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- float *out = (float *) output_items[0];
- if ((d_index > d_length) && d_repeat == false)
- return -1; /* once through the sequence */
-
- int i;
- for (i = 0; i < noutput_items; i++) {
- out[i] = (float)d_glfsr->next_bit()*2.0-1.0;
- d_index++;
- if (d_index > d_length && d_repeat == false)
- break;
- }
-
- return i;
-}
-
-int
-gr_glfsr_source_f::mask() const
-{
- return d_glfsr->mask();
-}
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.h b/gnuradio-core/src/lib/general/gr_glfsr_source_f.h
deleted file mode 100644
index 3549e3e5df..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_GLFSR_SOURCE_F_H
-#define INCLUDED_GR_GLFSR_SOURCE_F_H
-
-#include <gr_core_api.h>
-#include <gr_sync_block.h>
-
-class gri_glfsr;
-
-class gr_glfsr_source_f;
-typedef boost::shared_ptr<gr_glfsr_source_f> gr_glfsr_source_f_sptr;
-
-GR_CORE_API gr_glfsr_source_f_sptr gr_make_glfsr_source_f(int degree, bool repeat=true, int mask=0, int seed=1);
-
-/*!
- * \brief Galois LFSR pseudo-random source generating float outputs -1.0 - 1.0
- * \ingroup source_blk
- */
-class GR_CORE_API gr_glfsr_source_f : public gr_sync_block
-{
- private:
- friend GR_CORE_API gr_glfsr_source_f_sptr
- gr_make_glfsr_source_f(int degree, bool repeat, int mask, int seed);
-
- gri_glfsr *d_glfsr;
-
- bool d_repeat;
- unsigned int d_index;
- unsigned int d_length;
-
- gr_glfsr_source_f(int degree, bool repeat, int mask, int seed);
-
- public:
-
- ~gr_glfsr_source_f();
-
- int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-
- unsigned int period() const { return d_length; }
- int mask() const;
-};
-
-#endif /* INCLUDED_GR_GLFSR_SOURCE_F_H */
diff --git a/gnuradio-core/src/lib/general/gr_glfsr_source_f.i b/gnuradio-core/src/lib/general/gr_glfsr_source_f.i
deleted file mode 100644
index 2f84387c27..0000000000
--- a/gnuradio-core/src/lib/general/gr_glfsr_source_f.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,glfsr_source_f);
-
-gr_glfsr_source_f_sptr
-gr_make_glfsr_source_f(int degree, bool repeat=true, int mask=0, int seed=1)
- throw (std::runtime_error);
-
-class gr_glfsr_source_f : public gr_sync_block
-{
-protected:
- gr_glfsr_source_f(int degree, bool repeat, int mask, int seed);
-
-public:
- unsigned int period() const;
- int mask() const;
-};
diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc
deleted file mode 100644
index 818e48c34b..0000000000
--- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.cc
+++ /dev/null
@@ -1,77 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007,2010 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <gr_pn_correlator_cc.h>
-#include <gr_io_signature.h>
-
-gr_pn_correlator_cc_sptr
-gr_make_pn_correlator_cc(int degree, int mask, int seed)
-{
- return gnuradio::get_initial_sptr(new gr_pn_correlator_cc(degree, mask, seed));
-}
-
-gr_pn_correlator_cc::gr_pn_correlator_cc(int degree, int mask, int seed)
- : gr_sync_decimator ("pn_correlator_cc",
- gr_make_io_signature (1, 1, sizeof(gr_complex)),
- gr_make_io_signature (1, 1, sizeof(gr_complex)),
- (unsigned int)((1ULL << degree)-1)) // PN code length
-{
- d_len = (unsigned int)((1ULL << degree)-1);
- if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_reference = new gri_glfsr(mask, seed);
- for (int i = 0; i < d_len; i++) // initialize to last value in sequence
- d_pn = 2.0*d_reference->next_bit()-1.0;
-}
-
-gr_pn_correlator_cc::~gr_pn_correlator_cc()
-{
- delete d_reference;
-}
-
-int
-gr_pn_correlator_cc::work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
-{
- const gr_complex *in = (const gr_complex *) input_items[0];
- gr_complex *out = (gr_complex *) output_items[0];
- gr_complex sum;
-
- for (int i = 0; i < noutput_items; i++) {
- sum = 0.0;
-
- for (int j = 0; j < d_len; j++) {
- if (j != 0) // retard PN generator one sample per period
- d_pn = 2.0*d_reference->next_bit()-1.0; // no conditionals
- sum += *in++ * d_pn;
- }
-
- *out++ = sum*gr_complex(1.0/d_len, 0.0);
- }
-
- return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h
deleted file mode 100644
index 69bd2c502f..0000000000
--- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GR_PN_CORRELATOR_CC_H
-#define INCLUDED_GR_PN_CORRELATOR_CC_H
-
-#include <gr_core_api.h>
-#include <gr_sync_decimator.h>
-#include <gri_glfsr.h>
-
-class gr_pn_correlator_cc;
-typedef boost::shared_ptr<gr_pn_correlator_cc> gr_pn_correlator_cc_sptr;
-
-GR_CORE_API gr_pn_correlator_cc_sptr
-gr_make_pn_correlator_cc(int degree, int mask=0, int seed=1);
-/*!
- * \brief PN code sequential search correlator
- *
- * \ingroup sync_blk
- * Receives complex baseband signal, outputs complex correlation against
- * reference PN code, one sample per PN code period
- */
-
-class GR_CORE_API gr_pn_correlator_cc : public gr_sync_decimator
-{
- friend GR_CORE_API gr_pn_correlator_cc_sptr gr_make_pn_correlator_cc(int degree, int mask, int seed);
-
- int d_len;
- float d_pn;
- gri_glfsr *d_reference;
-
- protected:
- gr_pn_correlator_cc(int degree, int mask, int seed);
-
- public:
- virtual int work(int noutput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
-
- ~gr_pn_correlator_cc();
-};
-
-#endif /* INCLUDED_GR_PN_CORRELATOR_CC_H */
diff --git a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i b/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i
deleted file mode 100644
index e992f33a7f..0000000000
--- a/gnuradio-core/src/lib/general/gr_pn_correlator_cc.i
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-GR_SWIG_BLOCK_MAGIC(gr,pn_correlator_cc)
-
-gr_pn_correlator_cc_sptr
-gr_make_pn_correlator_cc(int degree, int mask=0, int seed=1);
-
-class gr_pn_correlator_cc : public gr_sync_decimator
-{
- protected:
- gr_pn_correlator_cc();
-};
diff --git a/gnuradio-core/src/lib/general/gri_glfsr.cc b/gnuradio-core/src/lib/general/gri_glfsr.cc
deleted file mode 100644
index ba6951882b..0000000000
--- a/gnuradio-core/src/lib/general/gri_glfsr.cc
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <gri_glfsr.h>
-#include <stdexcept>
-
-static int s_polynomial_masks[] = {
- 0x00000000,
- 0x00000001, // x^1 + 1
- 0x00000003, // x^2 + x^1 + 1
- 0x00000005, // x^3 + x^1 + 1
- 0x00000009, // x^4 + x^1 + 1
- 0x00000012, // x^5 + x^2 + 1
- 0x00000021, // x^6 + x^1 + 1
- 0x00000041, // x^7 + x^1 + 1
- 0x0000008E, // x^8 + x^4 + x^3 + x^2 + 1
- 0x00000108, // x^9 + x^4 + 1
- 0x00000204, // x^10 + x^4 + 1
- 0x00000402, // x^11 + x^2 + 1
- 0x00000829, // x^12 + x^6 + x^4 + x^1 + 1
- 0x0000100D, // x^13 + x^4 + x^3 + x^1 + 1
- 0x00002015, // x^14 + x^5 + x^3 + x^1 + 1
- 0x00004001, // x^15 + x^1 + 1
- 0x00008016, // x^16 + x^5 + x^3 + x^2 + 1
- 0x00010004, // x^17 + x^3 + 1
- 0x00020013, // x^18 + x^5 + x^2 + x^1 + 1
- 0x00040013, // x^19 + x^5 + x^2 + x^1 + 1
- 0x00080004, // x^20 + x^3 + 1
- 0x00100002, // x^21 + x^2 + 1
- 0x00200001, // x^22 + x^1 + 1
- 0x00400010, // x^23 + x^5 + 1
- 0x0080000D, // x^24 + x^4 + x^3 + x^1 + 1
- 0x01000004, // x^25 + x^3 + 1
- 0x02000023, // x^26 + x^6 + x^2 + x^1 + 1
- 0x04000013, // x^27 + x^5 + x^2 + x^1 + 1
- 0x08000004, // x^28 + x^3 + 1
- 0x10000002, // x^29 + x^2 + 1
- 0x20000029, // x^30 + x^4 + x^1 + 1
- 0x40000004, // x^31 + x^3 + 1
- 0x80000057 // x^32 + x^7 + x^5 + x^3 + x^2 + x^1 + 1
-};
-
-int gri_glfsr::glfsr_mask(int degree)
-{
- if (degree < 1 || degree > 32)
- throw std::runtime_error("gri_glfsr::glfsr_mask(): degree must be between 1 and 32 inclusive");
- return s_polynomial_masks[degree];
-}
diff --git a/gnuradio-core/src/lib/general/gri_glfsr.h b/gnuradio-core/src/lib/general/gri_glfsr.h
deleted file mode 100644
index 9aae2d9f17..0000000000
--- a/gnuradio-core/src/lib/general/gri_glfsr.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2007 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifndef INCLUDED_GRI_GLFSR_H
-#define INCLUDED_GRI_GLFSR_H
-
-#include <gr_core_api.h>
-
-/*!
- * \brief Galois Linear Feedback Shift Register using specified polynomial mask
- * \ingroup misc
- *
- * Generates a maximal length pseudo-random sequence of length 2^degree-1
- */
-
-class GR_CORE_API gri_glfsr
-{
- private:
- int d_shift_register;
- int d_mask;
-
- public:
-
- gri_glfsr(int mask, int seed) { d_shift_register = seed; d_mask = mask; }
- static int glfsr_mask(int degree);
-
- unsigned char next_bit() {
- unsigned char bit = d_shift_register & 1;
- d_shift_register >>= 1;
- if (bit)
- d_shift_register ^= d_mask;
- return bit;
- }
-
- int mask() const { return d_mask; }
-};
-
-#endif /* INCLUDED_GRI_GLFSR_H */ \ No newline at end of file
diff --git a/gnuradio-core/src/lib/general/qa_general.cc b/gnuradio-core/src/lib/general/qa_general.cc
index 26b21983e6..61e5c159bd 100644
--- a/gnuradio-core/src/lib/general/qa_general.cc
+++ b/gnuradio-core/src/lib/general/qa_general.cc
@@ -33,7 +33,6 @@
#include <qa_gr_fxpt_nco.h>
#include <qa_gr_fxpt_vco.h>
#include <qa_gr_math.h>
-#include <qa_gri_lfsr.h>
CppUnit::TestSuite *
qa_general::suite ()
@@ -47,7 +46,6 @@ qa_general::suite ()
s->addTest (qa_gr_fxpt_nco::suite ());
s->addTest (qa_gr_fxpt_vco::suite ());
s->addTest (qa_gr_math::suite ());
- s->addTest (qa_gri_lfsr::suite ());
return s;
}
diff --git a/gnuradio-core/src/lib/general/qa_gri_lfsr.cc b/gnuradio-core/src/lib/general/qa_gri_lfsr.cc
deleted file mode 100644
index 87d610df68..0000000000
--- a/gnuradio-core/src/lib/general/qa_gri_lfsr.cc
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#include <gri_lfsr.h>
-#include <qa_gri_lfsr.h>
-#include <cppunit/TestAssert.h>
-#include <stdio.h>
-#include <string.h>
-#include <vector>
-
-void
-qa_gri_lfsr::test_lfsr ()
-{
- int mask = 0x19;
- int seed = 0x01;
- int length = 5;
-
- gri_lfsr lfsr1(mask,seed,length);
- gri_lfsr lfsr2(mask,seed,length);
-
- unsigned char expected[] = {1, 0, 1, 1, 0, 1, 0, 1, 0, 0};
-
- for(unsigned int i=0; i<31; i++){
- lfsr1.next_bit();
- }
-
- // test that after one lfsr cycle we still match out uncycled lfsr
- for (unsigned int i = 0; i < 41; i++) {
- CPPUNIT_ASSERT_EQUAL((int) lfsr1.next_bit(), (int) lfsr2.next_bit());
- }
-
- // test the known correct values at the given shift offset
- for(unsigned int i=0; i<10; i++){
- CPPUNIT_ASSERT_EQUAL((int) lfsr1.next_bit(), (int) expected[i]);
- }
-
- // test for register length too long
- CPPUNIT_ASSERT_THROW(gri_lfsr(mask, seed, 32), std::invalid_argument);
-}
-
-void
-qa_gri_lfsr::test_scrambler()
-{
- // CCSDS 7-bit scrambler
- int mask = 0x8A;
- int seed = 0x7F;
- int length = 7;
-
- gri_lfsr scrambler(mask, seed, length);
-
- // Impulse (1 and 126 more zeroes)
- unsigned char src[] =
- { 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0 }; // flush bits
-
- // Impulse response (including leading bits)
- unsigned char expected[] =
- { 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0,
- 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1,
- 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1,
- 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0,
- 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0,
- 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0,
- 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, };
-
- int len = sizeof(src);
- std::vector<unsigned char> actual(len);
-
- for (int i = 0; i < len; i++)
- actual[i] = scrambler.next_bit_scramble(src[i]);
-
- CPPUNIT_ASSERT(memcmp(expected, &actual[0], len) == 0);
-}
-
-void
-qa_gri_lfsr::test_descrambler()
-{
- // CCSDS 7-bit scrambler
- int mask = 0x8A;
- int seed = 0x7F;
- int length = 7;
-
- gri_lfsr descrambler(mask, seed, length);
-
- // Scrambled sequence (impulse response)
- unsigned char src[] =
- { 0, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0,
- 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1,
- 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1,
- 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0,
- 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0,
- 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0,
- 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0,
- 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0 };
-
- // Original (garbage while synchronizing, them impulse)
- unsigned char expected[] =
- { 0, 1, 0, 0, 1, 0,
- 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0 };
-
- int len = sizeof(src);
- std::vector<unsigned char> actual(len);
-
- for (int i = 0; i < len; i++)
- actual[i] = descrambler.next_bit_descramble(src[i]);
-
- CPPUNIT_ASSERT(memcmp(expected, &actual[0], len) == 0);
-}
diff --git a/gnuradio-core/src/lib/general/qa_gri_lfsr.h b/gnuradio-core/src/lib/general/qa_gri_lfsr.h
deleted file mode 100644
index e91843bbb3..0000000000
--- a/gnuradio-core/src/lib/general/qa_gri_lfsr.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2008 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-#ifndef _QA_GRI_LFSR_H_
-#define _QA_GRI_LFSR_H_
-
-#include <cppunit/extensions/HelperMacros.h>
-#include <cppunit/TestCase.h>
-
-class qa_gri_lfsr : public CppUnit::TestCase {
-
- CPPUNIT_TEST_SUITE(qa_gri_lfsr);
- CPPUNIT_TEST(test_lfsr);
- CPPUNIT_TEST(test_scrambler);
- CPPUNIT_TEST(test_descrambler);
- CPPUNIT_TEST_SUITE_END();
-
- private:
- void test_lfsr();
- void test_scrambler();
- void test_descrambler();
-};
-
-#endif /* _QA_GRI_LFSR_H_ */
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py b/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py
deleted file mode 100755
index 161e4a5cc1..0000000000
--- a/gnuradio-core/src/python/gnuradio/gr/qa_glfsr_source.py
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-
-class test_glfsr_source(gr_unittest.TestCase):
-
- def setUp (self):
- self.tb = gr.top_block ()
-
- def tearDown (self):
- self.tb = None
-
- def test_000_make_b(self):
- src = gr.glfsr_source_b(16)
- self.assertEquals(src.mask(), 0x8016)
- self.assertEquals(src.period(), 2**16-1)
-
- def test_001_degree_b(self):
- self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_b(0))
- self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_b(33))
-
- def test_002_correlation_b(self):
- for degree in range(1,11): # Higher degrees take too long to correlate
- src = gr.glfsr_source_b(degree, False)
- b2f = gr.chunks_to_symbols_bf((-1.0,1.0), 1)
- dst = gr.vector_sink_f()
- del self.tb # Discard existing top block
- self.tb = gr.top_block()
- self.tb.connect(src, b2f, dst)
- self.tb.run()
- self.tb.disconnect_all()
- actual_result = dst.data()
- R = auto_correlate(actual_result)
- self.assertEqual(R[0], float(len(R))) # Auto-correlation peak at origin
- for i in range(len(R)-1):
- self.assertEqual(R[i+1], -1.0) # Auto-correlation minimum everywhere else
-
- def test_003_make_f(self):
- src = gr.glfsr_source_f(16)
- self.assertEquals(src.mask(), 0x8016)
- self.assertEquals(src.period(), 2**16-1)
-
- def test_004_degree_f(self):
- self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_f(0))
- self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_f(33))
- def test_005_correlation_f(self):
- for degree in range(1,11): # Higher degrees take too long to correlate
- src = gr.glfsr_source_f(degree, False)
- dst = gr.vector_sink_f()
- del self.tb # Discard existing top block
- self.tb = gr.top_block()
- self.tb.connect(src, dst)
- self.tb.run()
-
- actual_result = dst.data()
- R = auto_correlate(actual_result)
- self.assertEqual(R[0], float(len(R))) # Auto-correlation peak at origin
- for i in range(len(R)-1):
- self.assertEqual(R[i+1], -1.0) # Auto-correlation minimum everywhere else
-
-def auto_correlate(data):
- l = len(data)
- R = [0,]*l
- for lag in range(l):
- for i in range(l):
- R[lag] += data[i]*data[i-lag]
- return R
-
-if __name__ == '__main__':
- gr_unittest.run(test_glfsr_source, "test_glfsr_source.xml")
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py b/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py
deleted file mode 100755
index 6a62a6997b..0000000000
--- a/gnuradio-core/src/python/gnuradio/gr/qa_pn_correlator_cc.py
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2007,2010 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-#
-
-from gnuradio import gr, gr_unittest
-
-class test_pn_correlator_cc(gr_unittest.TestCase):
-
- def setUp(self):
- self.tb = gr.top_block ()
-
- def tearDown(self):
- self.tb = None
-
- def test_000_make(self):
- c = gr.pn_correlator_cc(10)
-
- def test_001_correlate(self):
- degree = 10
- length = 2**degree-1
- src = gr.glfsr_source_f(degree)
- head = gr.head(gr.sizeof_float, length*length)
- f2c = gr.float_to_complex()
- corr = gr.pn_correlator_cc(degree)
- dst = gr.vector_sink_c()
- self.tb.connect(src, head, f2c, corr, dst)
- self.tb.run()
- data = dst.data()
- self.assertEqual(data[-1], (1.0+0j))
-
-if __name__ == '__main__':
- gr_unittest.run(test_pn_correlator_cc, "test_pn_correlator_cc.xml")
diff --git a/gr-digital/include/digital_glfsr_source_b.h b/gr-digital/include/digital_glfsr_source_b.h
index 92e5e81f5c..151e5a296c 100644
--- a/gr-digital/include/digital_glfsr_source_b.h
+++ b/gr-digital/include/digital_glfsr_source_b.h
@@ -26,7 +26,7 @@
#include <digital_api.h>
#include <gr_sync_block.h>
-class gri_glfsr;
+class digital_impl_glfsr;
class digital_glfsr_source_b;
typedef boost::shared_ptr<digital_glfsr_source_b> digital_glfsr_source_b_sptr;
@@ -54,7 +54,7 @@ class DIGITAL_API digital_glfsr_source_b : public gr_sync_block
digital_make_glfsr_source_b(int degree, bool repeat,
int mask, int seed);
- gri_glfsr *d_glfsr;
+ digital_impl_glfsr *d_glfsr;
bool d_repeat;
unsigned int d_index;
diff --git a/gr-digital/include/digital_glfsr_source_f.h b/gr-digital/include/digital_glfsr_source_f.h
index 77d7b0f741..fb5b064e4f 100644
--- a/gr-digital/include/digital_glfsr_source_f.h
+++ b/gr-digital/include/digital_glfsr_source_f.h
@@ -26,7 +26,7 @@
#include <digital_api.h>
#include <gr_sync_block.h>
-class gri_glfsr;
+class digital_impl_glfsr;
class digital_glfsr_source_f;
typedef boost::shared_ptr<digital_glfsr_source_f> digital_glfsr_source_f_sptr;
@@ -54,7 +54,7 @@ class DIGITAL_API digital_glfsr_source_f : public gr_sync_block
digital_make_glfsr_source_f(int degree, bool repeat,
int mask, int seed);
- gri_glfsr *d_glfsr;
+ digital_impl_glfsr *d_glfsr;
bool d_repeat;
unsigned int d_index;
diff --git a/gr-digital/include/digital_pn_correlator_cc.h b/gr-digital/include/digital_pn_correlator_cc.h
index 87cc2ff93c..407cc1e67b 100644
--- a/gr-digital/include/digital_pn_correlator_cc.h
+++ b/gr-digital/include/digital_pn_correlator_cc.h
@@ -25,7 +25,7 @@
#include <digital_api.h>
#include <gr_sync_decimator.h>
-#include <gri_glfsr.h>
+#include <digital_impl_glfsr.h>
class digital_pn_correlator_cc;
typedef boost::shared_ptr<digital_pn_correlator_cc> digital_pn_correlator_cc_sptr;
@@ -56,7 +56,7 @@ class DIGITAL_API digital_pn_correlator_cc : public gr_sync_decimator
int d_len;
float d_pn;
- gri_glfsr *d_reference;
+ digital_impl_glfsr *d_reference;
protected:
digital_pn_correlator_cc(int degree, int mask, int seed);
diff --git a/gr-digital/lib/digital_glfsr_source_b.cc b/gr-digital/lib/digital_glfsr_source_b.cc
index e557e475a8..63a5ffdb0a 100644
--- a/gr-digital/lib/digital_glfsr_source_b.cc
+++ b/gr-digital/lib/digital_glfsr_source_b.cc
@@ -26,7 +26,7 @@
#endif
#include <digital_glfsr_source_b.h>
-#include <gri_glfsr.h>
+#include <digital_impl_glfsr.h>
#include <gr_io_signature.h>
#include <stdexcept>
@@ -50,8 +50,8 @@ digital_glfsr_source_b::digital_glfsr_source_b(int degree, bool repeat,
d_length = (unsigned int)((1ULL << degree)-1);
if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_glfsr = new gri_glfsr(mask, seed);
+ mask = digital_impl_glfsr::glfsr_mask(degree);
+ d_glfsr = new digital_impl_glfsr(mask, seed);
}
digital_glfsr_source_b::~digital_glfsr_source_b()
diff --git a/gr-digital/lib/digital_glfsr_source_f.cc b/gr-digital/lib/digital_glfsr_source_f.cc
index 5a7736ef8d..6ae84d5679 100644
--- a/gr-digital/lib/digital_glfsr_source_f.cc
+++ b/gr-digital/lib/digital_glfsr_source_f.cc
@@ -26,7 +26,7 @@
#endif
#include <digital_glfsr_source_f.h>
-#include <gri_glfsr.h>
+#include <digital_impl_glfsr.h>
#include <gr_io_signature.h>
#include <stdexcept>
@@ -50,8 +50,8 @@ digital_glfsr_source_f::digital_glfsr_source_f(int degree, bool repeat,
d_length = (unsigned int)((1ULL << degree)-1);
if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_glfsr = new gri_glfsr(mask, seed);
+ mask = digital_impl_glfsr::glfsr_mask(degree);
+ d_glfsr = new digital_impl_glfsr(mask, seed);
}
digital_glfsr_source_f::~digital_glfsr_source_f()
diff --git a/gr-digital/lib/digital_pn_correlator_cc.cc b/gr-digital/lib/digital_pn_correlator_cc.cc
index 43a3ddbd1f..52e06bc2ad 100644
--- a/gr-digital/lib/digital_pn_correlator_cc.cc
+++ b/gr-digital/lib/digital_pn_correlator_cc.cc
@@ -44,8 +44,8 @@ digital_pn_correlator_cc::digital_pn_correlator_cc(int degree,
{
d_len = (unsigned int)((1ULL << degree)-1);
if (mask == 0)
- mask = gri_glfsr::glfsr_mask(degree);
- d_reference = new gri_glfsr(mask, seed);
+ mask = digital_impl_glfsr::glfsr_mask(degree);
+ d_reference = new digital_impl_glfsr(mask, seed);
for (int i = 0; i < d_len; i++) // initialize to last value in sequence
d_pn = 2.0*d_reference->next_bit()-1.0;
}
diff --git a/gr-digital/python/qa_glfsr_source.py b/gr-digital/python/qa_glfsr_source.py
index 157520d7f8..7d02037335 100755
--- a/gr-digital/python/qa_glfsr_source.py
+++ b/gr-digital/python/qa_glfsr_source.py
@@ -38,9 +38,9 @@ class test_glfsr_source(gr_unittest.TestCase):
def test_001_degree_b(self):
self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_b(0))
+ lambda: digital.glfsr_source_b(0))
self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_b(33))
+ lambda: digital.glfsr_source_b(33))
def test_002_correlation_b(self):
for degree in range(1,11): # Higher degrees take too long to correlate
@@ -65,9 +65,9 @@ class test_glfsr_source(gr_unittest.TestCase):
def test_004_degree_f(self):
self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_f(0))
+ lambda: digital.glfsr_source_f(0))
self.assertRaises(RuntimeError,
- lambda: gr.glfsr_source_f(33))
+ lambda: digital.glfsr_source_f(33))
def test_005_correlation_f(self):
for degree in range(1,11): # Higher degrees take too long to correlate
src = digital.glfsr_source_f(degree, False)
diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml
index 28f4304dd9..95640ac83b 100644
--- a/grc/blocks/block_tree.xml
+++ b/grc/blocks/block_tree.xml
@@ -13,7 +13,6 @@
<block>gr_noise_source_x</block>
<block>gr_vector_source_x</block>
<block>random_source_x</block>
- <block>gr_glfsr_source_x</block>
<block>gr_null_source</block>
<block>gr_file_source</block>
<block>blks2_tcp_source</block>
@@ -127,7 +126,6 @@
<block>gr_pll_freqdet_cf</block>
<block>gr_pll_refout_cc</block>
- <block>gr_pn_correlator_cc</block>
<block>gr_simple_correlator</block>
<block>gr_simple_framer</block>
diff --git a/grc/blocks/gr_glfsr_source_x.xml b/grc/blocks/gr_glfsr_source_x.xml
deleted file mode 100644
index 88fb66797b..0000000000
--- a/grc/blocks/gr_glfsr_source_x.xml
+++ /dev/null
@@ -1,59 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##GLFSR Source
-###################################################
- -->
-<block>
- <name>GLFSR Source</name>
- <key>gr_glfsr_source_x</key>
- <import>from gnuradio import gr</import>
- <make>gr.glfsr_source_$(type.fcn)($degree, $repeat, $mask, $seed)</make>
- <param>
- <name>Type</name>
- <key>type</key>
- <type>enum</type>
- <option>
- <name>Float</name>
- <key>float</key>
- <opt>fcn:f</opt>
- </option>
- <option>
- <name>Byte</name>
- <key>byte</key>
- <opt>fcn:b</opt>
- </option>
- </param>
- <param>
- <name>Degree</name>
- <key>degree</key>
- <type>int</type>
- </param>
- <param>
- <name>Repeat</name>
- <key>repeat</key>
- <type>enum</type>
- <option>
- <name>Yes</name>
- <key>True</key>
- </option>
- <option>
- <name>No</name>
- <key>False</key>
- </option>
- </param>
- <param>
- <name>Mask</name>
- <key>mask</key>
- <type>int</type>
- </param>
- <param>
- <name>Seed</name>
- <key>seed</key>
- <type>int</type>
- </param>
- <source>
- <name>out</name>
- <type>$type</type>
- </source>
-</block>
diff --git a/grc/blocks/gr_pn_correlator_cc.xml b/grc/blocks/gr_pn_correlator_cc.xml
deleted file mode 100644
index 094f46cdfd..0000000000
--- a/grc/blocks/gr_pn_correlator_cc.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-<?xml version="1.0"?>
-<!--
-###################################################
-##PN Correlator
-###################################################
- -->
-<block>
- <name>PN Correlator</name>
- <key>gr_pn_correlator_cc</key>
- <import>from gnuradio import gr</import>
- <make>gr.pn_correlator_cc($degree, $mask, $seed)</make>
- <param>
- <name>Degree</name>
- <key>degree</key>
- <type>int</type>
- </param>
- <param>
- <name>Mask</name>
- <key>mask</key>
- <type>int</type>
- </param>
- <param>
- <name>Seed</name>
- <key>seed</key>
- <type>int</type>
- </param>
- <sink>
- <name>in</name>
- <type>complex</type>
- </sink>
- <source>
- <name>out</name>
- <type>complex</type>
- </source>
-</block>