From 3f94d49bae62301349f31959c34c690b5c47fc2b Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Tue, 19 Jul 2011 21:30:19 -0400
Subject: digital: moved gr_binary_slicer_fb to digital_binary_slicer_fb and
 added QA code. Removed constellation_decoder and everything that dependedon
 it. Must switch everything to digital_constellation_decoder now. Also moved
 gmsk to gr-digital. Make check passes.

---
 .../src/python/gnuradio/blks2impl/d8psk.py         | 363 --------------------
 .../src/python/gnuradio/blks2impl/dbpsk.py         | 363 --------------------
 .../src/python/gnuradio/blks2impl/dbpsk2.py        | 369 --------------------
 .../src/python/gnuradio/blks2impl/dqpsk.py         | 363 --------------------
 .../src/python/gnuradio/blks2impl/dqpsk2.py        | 377 ---------------------
 .../src/python/gnuradio/blks2impl/gmsk.py          | 292 ----------------
 gnuradio-core/src/python/gnuradio/gr/Makefile.am   |   1 -
 .../gnuradio/gr/qa_constellation_decoder_cb.py     |  53 ---
 8 files changed, 2181 deletions(-)
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/d8psk.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/gmsk.py
 delete mode 100755 gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/d8psk.py b/gnuradio-core/src/python/gnuradio/blks2impl/d8psk.py
deleted file mode 100644
index 67cf9f5696..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/d8psk.py
+++ /dev/null
@@ -1,363 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential 8PSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import psk
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 3
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = 0.175
-_def_gain_mu = 0.175
-_def_mu = 0.5
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           D8PSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class d8psk_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "d8psk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-				
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2,self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect & Initialize base class
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-            	     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 3
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gray code = %s" % self._gray_code
-        print "RS roll-off factor = %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds 8PSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(d8psk_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           D8PSK demodulator
-#
-# Differentially coherent detection of differentially encoded 8psk
-# /////////////////////////////////////////////////////////////////////////////
-
-class d8psk_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered DQPSK demodulation
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (LSB)
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: float
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param costas_alpha: loop filter gain
-        @type costas_alphas: float
-        @param gain_mu: for M&M block
-        @type gain_mu: float
-        @param mu: for M&M block
-        @type mu: float
-        @param omega_relative_limit: for M&M block
-        @type omega_relative_limit: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-	
-	gr.hier_block2.__init__(self, "d8psk_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._costas_alpha = costas_alpha
-        self._mm_gain_mu = gain_mu
-        self._mm_mu = mu
-        self._mm_omega_relative_limit = omega_relative_limit
-        self._gray_code = gray_code
-
-        if samples_per_symbol < 2:
-            raise TypeError, "sbp must be >= 2, is %d" % samples_per_symbol
-
-        arity = pow(2,self.bits_per_symbol())
- 
-        # Automatic gain control
-        scale = (1.0/16384.0)
-        self.pre_scaler = gr.multiply_const_cc(scale)   # scale the signal from full-range to +-1
-        #self.agc = gr.agc_cc(1e-2, 1, 1, 100)
-        self.agc = gr.agc2_cc(1e-1, 1e-2, 1, 1, 100)
-        #self.agc = gr.feedforward_agc_cc(16, 1.0)
-
-        # RRC data filter
-        ntaps = 11 * samples_per_symbol
-        self.rrc_taps = gr.firdes.root_raised_cosine(
-            1.0,                      # gain
-            self._samples_per_symbol, # sampling rate
-            1.0,                      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-        self.rrc_filter=gr.interp_fir_filter_ccf(1, self.rrc_taps)        
-
-        # symbol clock recovery
-        self._mm_omega = self._samples_per_symbol
-        self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
-        self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.025
-        fmax = 0.025
-
-        self.receiver=gr.mpsk_receiver_cc(arity, 0,
-                                         self._costas_alpha, self._costas_beta,
-                                         fmin, fmax,
-                                         self._mm_mu, self._mm_gain_mu,
-                                         self._mm_omega, self._mm_gain_omega,
-                                         self._mm_omega_relative_limit)
-        
-        # Perform Differential decoding on the constellation
-        self.diffdec = gr.diff_phasor_cc()
-
-        # find closest constellation point
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-
-        
-        # unpack the k bit vector into a stream of bits
-        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
- 
-        # Connect
-        self.connect(self, self.pre_scaler, self.agc, self.rrc_filter, self.receiver,
-                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 3
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "Gray code:           %s"   % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "Costas Loop alpha:   %.2e" % self._costas_alpha
-        print "Costas Loop beta:    %.2e" % self._costas_beta
-        print "M&M mu:              %.2f" % self._mm_mu
-        print "M&M mu gain:         %.2e" % self._mm_gain_mu
-        print "M&M omega:           %.2f" % self._mm_omega
-        print "M&M omega gain:      %.2e" % self._mm_gain_omega
-        print "M&M omega limit:     %.2f" % self._mm_omega_relative_limit
-        
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.pre_scaler,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_prescaler.dat"))
-        self.connect(self.agc,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_rrc_filter.dat"))
-        self.connect(self.receiver,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_receiver.dat"))
-        self.connect(self.diffdec,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
-        self.connect(self.slicer,
-                     gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "rx_gray_decoder.dat"))
-        self.connect(self.unpack,
-                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
-
-    def add_options(parser):
-        """
-        Adds modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-        parser.add_option("", "--costas-alpha", type="float", default=_def_costas_alpha,
-                          help="set Costas loop alpha value [default=%default] (PSK)")
-        parser.add_option("", "--gain-mu", type="float", default=_def_gain_mu,
-                          help="set M&M symbol sync loop gain mu value [default=%default] (PSK)")
-        parser.add_option("", "--mu", type="float", default=_def_mu,
-                          help="set M&M symbol sync loop mu value [default=%default] (PSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(
-            d8psk_demod.__init__, ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-#
-# Add these to the mod/demod registry
-#
-# NOT READY TO BE USED YET -- ENABLE AT YOUR OWN RISK
-modulation_utils.add_type_1_mod('d8psk', d8psk_mod)
-modulation_utils.add_type_1_demod('d8psk', d8psk_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
deleted file mode 100644
index 55e4890f30..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
+++ /dev/null
@@ -1,363 +0,0 @@
-#
-# Copyright 2005,2006,2007,2009 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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential BPSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import psk
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = 0.1
-_def_gain_mu = None
-_def_mu = 0.5
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                             DBPSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class dbpsk_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered differential BPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-        
-	@param samples_per_symbol: samples per baud >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param log: Log modulation data to files?
-        @type log: bool
-	"""
-
-	gr.hier_block2.__init__(self, "dbpsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(self._samples_per_symbol, int) or self._samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol)
-        
-	ntaps = 11 * self._samples_per_symbol
-
-        arity = pow(2,self.bits_per_symbol())
-        
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
-
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        self.chunks2symbols = gr.chunks_to_symbols_bc(psk.constellation[arity])
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol,   # gain (samples_per_symbol since we're
-                                        # interpolating by samples_per_symbol)
-	    self._samples_per_symbol,   # sampling rate
-	    1.0,		        # symbol rate
-	    self._excess_bw,            # excess bandwidth (roll-off factor)
-            ntaps)
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol,
-                                                   self.rrc_taps)
-
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-        if verbose:
-            self._print_verbage()
-            
-        if log:
-            self._setup_logging()
-            
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # static method that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def add_options(parser):
-        """
-        Adds DBPSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default]")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=True,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(dbpsk_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-    def _print_verbage(self):
-        print "\nModulator:"
-        print "bits per symbol:     %d" % self.bits_per_symbol()
-        print "Gray code:           %s" % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
-              
-
-# /////////////////////////////////////////////////////////////////////////////
-#                             DBPSK demodulator
-#
-#      Differentially coherent detection of differentially encoded BPSK
-# /////////////////////////////////////////////////////////////////////////////
-
-class dbpsk_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered differential BPSK demodulation
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (LSB)
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: float
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param costas_alpha: loop filter gain
-        @type costas_alphas: float
-        @param gain_mu: for M&M block
-        @type gain_mu: float
-        @param mu: for M&M block
-        @type mu: float
-        @param omega_relative_limit: for M&M block
-        @type omega_relative_limit: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-        
-	gr.hier_block2.__init__(self, "dbpsk_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-				
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._costas_alpha = costas_alpha
-        self._mm_gain_mu = gain_mu
-        self._mm_mu = mu
-        self._mm_omega_relative_limit = omega_relative_limit
-        self._gray_code = gray_code
-        
-        if samples_per_symbol < 2:
-            raise TypeError, "samples_per_symbol must be >= 2, is %r" % (samples_per_symbol,)
-
-        arity = pow(2,self.bits_per_symbol())
-
-        # Automatic gain control
-        #scale = (1.0/16384.0)
-        #self.pre_scaler = gr.multiply_const_cc(scale)   # scale the signal from full-range to +-1
-        self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
-        #self.agc = gr.feedforward_agc_cc(16, 2.0)
-
-        # RRC data filter
-        ntaps = 11 * samples_per_symbol
-        self.rrc_taps = gr.firdes.root_raised_cosine(
-            1.0,                      # gain
-            self._samples_per_symbol, # sampling rate
-            1.0,                      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-        self.rrc_filter=gr.interp_fir_filter_ccf(1, self.rrc_taps)        
-
-        # symbol clock recovery
-        if not self._mm_gain_mu:
-            self._mm_gain_mu = 0.1
-
-        self._mm_omega = self._samples_per_symbol
-        self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
-        self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.25
-        fmax = 0.25
-        
-        self.receiver=gr.mpsk_receiver_cc(arity, 0,
-                                          self._costas_alpha, self._costas_beta,
-                                          fmin, fmax,
-                                          self._mm_mu, self._mm_gain_mu,
-                                          self._mm_omega, self._mm_gain_omega,
-                                          self._mm_omega_relative_limit)
-            
-        # Do differential decoding based on phase change of symbols
-        self.diffdec = gr.diff_phasor_cc()
-
-        # find closest constellation point
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-        
-        # unpack the k bit vector into a stream of bits
-        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
-
-        if verbose:
-            self._print_verbage()
-
-        if log:
-            self._setup_logging()
-
-        # Connect and Initialize base class
-        self.connect(self, self.agc, self.rrc_filter, self.receiver,
-                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "Gray code:           %s"   % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "Costas Loop alpha:   %.2e" % self._costas_alpha
-        print "Costas Loop beta:    %.2e" % self._costas_beta
-        print "M&M mu:              %.2f" % self._mm_mu
-        print "M&M mu gain:         %.2e" % self._mm_gain_mu
-        print "M&M omega:           %.2f" % self._mm_omega
-        print "M&M omega gain:      %.2e" % self._mm_gain_omega
-        print "M&M omega limit:     %.2f" % self._mm_omega_relative_limit
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.pre_scaler,
-                         gr.file_sink(gr.sizeof_gr_complex, "rx_prescaler.dat"))
-        self.connect(self.agc,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_rrc_filter.dat"))
-        self.connect(self.receiver,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_receiver.dat"))
-        self.connect(self.diffdec,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
-        self.connect(self.slicer,
-                    gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "rx_symbol_mapper.dat"))
-        self.connect(self.unpack,
-                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
-        
-    def add_options(parser):
-        """
-        Adds DBPSK demodulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-        parser.add_option("", "--costas-alpha", type="float", default=None,
-                          help="set Costas loop alpha value [default=%default] (PSK)")
-        parser.add_option("", "--gain-mu", type="float", default=_def_gain_mu,
-                          help="set M&M symbol sync loop gain mu value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--mu", type="float", default=_def_mu,
-                          help="set M&M symbol sync loop mu value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--omega-relative-limit", type="float", default=_def_omega_relative_limit,
-                          help="M&M clock recovery omega relative limit [default=%default] (GMSK/PSK)")
-    add_options=staticmethod(add_options)
-    
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(
-                 dbpsk_demod.__init__, ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-#
-# Add these to the mod/demod registry
-#
-modulation_utils.add_type_1_mod('dbpsk', dbpsk_mod)
-modulation_utils.add_type_1_demod('dbpsk', dbpsk_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
deleted file mode 100644
index d7bcf53907..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk2.py
+++ /dev/null
@@ -1,369 +0,0 @@
-#
-# Copyright 2009,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential BPSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils2
-from math import pi, sqrt, ceil
-import psk
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_freq_alpha = 0.010
-_def_phase_alpha = 0.1
-_def_timing_alpha = 0.100
-_def_timing_beta = 0.010
-_def_timing_max_dev = 1.5
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                             DBPSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class dbpsk2_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered differential BPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-        
-	@param samples_per_symbol: samples per baud >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param log: Log modulation data to files?
-        @type log: bool
-	"""
-
-	gr.hier_block2.__init__(self, "dbpsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if self._samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % self._samples_per_symbol)
-        
-        arity = pow(2,self.bits_per_symbol())
-        
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
-
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        self.chunks2symbols = gr.chunks_to_symbols_bc(psk.constellation[arity])
-
-        # pulse shaping filter
-        nfilts = 32
-        ntaps = nfilts * 11 * int(self._samples_per_symbol)    # make nfilts filters of ntaps each
-        self.rrc_taps = gr.firdes.root_raised_cosine(
-            nfilts,          # gain
-            nfilts,          # sampling rate based on 32 filters in resampler
-            1.0,             # symbol rate
-            self._excess_bw, # excess bandwidth (roll-off factor)
-            ntaps)
-        self.rrc_filter = gr.pfb_arb_resampler_ccf(self._samples_per_symbol, self.rrc_taps)
-
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-        if verbose:
-            self._print_verbage()
-            
-        if log:
-            self._setup_logging()
-            
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # static method that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def add_options(parser):
-        """
-        Adds DBPSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default]")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=True,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils2.extract_kwargs_from_options(dbpsk2_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-    def _print_verbage(self):
-        print "\nModulator:"
-        print "bits per symbol:     %d" % self.bits_per_symbol()
-        print "Gray code:           %s" % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
-              
-
-# /////////////////////////////////////////////////////////////////////////////
-#                             DBPSK demodulator
-#
-#      Differentially coherent detection of differentially encoded BPSK
-# /////////////////////////////////////////////////////////////////////////////
-
-class dbpsk2_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 freq_alpha=_def_freq_alpha,
-                 phase_alpha=_def_phase_alpha,
-                 timing_alpha=_def_timing_alpha,
-                 timing_max_dev=_def_timing_max_dev,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log,
-                 sync_out=False):
-        """
-	Hierarchical block for RRC-filtered differential BPSK demodulation
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (LSB)
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: float
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param freq_alpha: loop filter gain for frequency recovery
-        @type freq_alpha: float
-        @param phase_alpha: loop filter gain for phase/fine frequency recovery
-        @type phase_alpha: float
-        @param timing_alpha: loop alpha gain for timing recovery
-        @type timing_alpha: float
-        @param timing_max: timing loop maximum rate deviations
-        @type timing_max: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param log: Print modualtion data to files?
-        @type log: bool
-        @param sync_out: Output a sync signal on :1?
-        @type sync_out: bool
-	"""
-	if sync_out: io_sig_out = gr.io_signaturev(2, 2, (gr.sizeof_char, gr.sizeof_gr_complex))
-	else: io_sig_out = gr.io_signature(1, 1, gr.sizeof_char)
-
-	gr.hier_block2.__init__(self, "dqpsk2_demod",
-			        gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-			        io_sig_out)       # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._freq_alpha = freq_alpha
-        self._freq_beta = 0.10*self._freq_alpha
-        self._phase_alpha = phase_alpha
-        self._timing_alpha = timing_alpha
-        self._timing_beta = _def_timing_beta
-        self._timing_max_dev=timing_max_dev
-        self._gray_code = gray_code
-        
-        if samples_per_symbol < 2:
-            raise TypeError, "samples_per_symbol must be >= 2, is %r" % (samples_per_symbol,)
-
-        arity = pow(2,self.bits_per_symbol())
-
-        # Automatic gain control
-        self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
-        #self.agc = gr.feedforward_agc_cc(16, 1.0)
-
-        # Frequency correction
-        self.freq_recov = gr.fll_band_edge_cc(self._samples_per_symbol, self._excess_bw,
-                                              11*int(self._samples_per_symbol),
-                                              self._freq_alpha, self._freq_beta)
-
-        # symbol timing recovery with RRC data filter
-        nfilts = 32
-        ntaps = 11 * int(self._samples_per_symbol*nfilts)
-        taps = gr.firdes.root_raised_cosine(nfilts, nfilts,
-                                            1.0/float(self._samples_per_symbol),
-                                            self._excess_bw, ntaps)
-        self.time_recov = gr.pfb_clock_sync_ccf(self._samples_per_symbol,
-                                                self._timing_alpha,
-                                                taps, nfilts, nfilts/2, self._timing_max_dev)
-        self.time_recov.set_beta(self._timing_beta)
-
-        # Perform phase / fine frequency correction
-        self._phase_beta  = 0.25 * self._phase_alpha * self._phase_alpha
-        # Allow a frequency swing of +/- half of the sample rate
-        fmin = -0.5
-        fmax = 0.5
-        
-        self.phase_recov = gr.costas_loop_cc(self._phase_alpha,
-                                             self._phase_beta,
-                                             fmax, fmin, arity)
-
-        # Do differential decoding based on phase change of symbols
-        self.diffdec = gr.diff_phasor_cc()
-
-        # find closest constellation point
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-        
-        # unpack the k bit vector into a stream of bits
-        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
-
-        if verbose:
-            self._print_verbage()
-
-        if log:
-            self._setup_logging()
-
-        # Connect
-        self.connect(self, self.agc,
-                     self.freq_recov, self.time_recov, self.phase_recov,
-                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
-        if sync_out: self.connect(self.time_recov, (self, 1))
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "Gray code:           %s"   % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "FLL gain:            %.2e" % self._freq_alpha
-        print "Timing alpha gain:   %.2e" % self._timing_alpha
-        print "Timing beta gain:    %.2e" % self._timing_beta
-        print "Timing max dev:      %.2f" % self._timing_max_dev
-        print "Phase track alpha:   %.2e" % self._phase_alpha
-        print "Phase track beta:    %.2e" % self._phase_beta
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.agc,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
-        self.connect(self.freq_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_freq_recov.dat"))
-        self.connect(self.time_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_time_recov.dat"))
-        self.connect(self.phase_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_phase_recov.dat"))
-        self.connect(self.diffdec,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
-        self.connect(self.slicer,
-                     gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "rx_symbol_mapper.dat"))
-        self.connect(self.unpack,
-                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
-        
-    def add_options(parser):
-        """
-        Adds DBPSK demodulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-        parser.add_option("", "--freq-alpha", type="float", default=_def_freq_alpha,
-                          help="set frequency lock loop alpha gain value [default=%default] (PSK)")
-        parser.add_option("", "--phase-alpha", type="float", default=_def_phase_alpha,
-                          help="set phase tracking loop alpha value [default=%default] (PSK)")
-        parser.add_option("", "--timing-alpha", type="float", default=_def_timing_alpha,
-                          help="set timing symbol sync loop gain alpha value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--timing-beta", type="float", default=_def_timing_beta,
-                          help="set timing symbol sync loop gain beta value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--timing-max-dev", type="float", default=_def_timing_max_dev,
-                          help="set timing symbol sync loop maximum deviation [default=%default] (GMSK/PSK)")
-    add_options=staticmethod(add_options)
-    
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils2.extract_kwargs_from_options(
-                 dbpsk2_demod.__init__, ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-#
-# Add these to the mod/demod registry
-#
-modulation_utils2.add_type_1_mod('dbpsk2', dbpsk2_mod)
-modulation_utils2.add_type_1_demod('dbpsk2', dbpsk2_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
deleted file mode 100644
index 42d5341685..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
+++ /dev/null
@@ -1,363 +0,0 @@
-#
-# Copyright 2005,2006,2007,2009 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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential QPSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import psk
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = 0.15
-_def_gain_mu = None
-_def_mu = 0.5
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           DQPSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class dqpsk_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "dqpsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2,self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = .707 + .707j
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect & Initialize base class
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 2
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nModulator:"
-        print "bits per symbol:     %d" % self.bits_per_symbol()
-        print "Gray code:           %s" % self._gray_code
-        print "RRS roll-off factor: %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QPSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(dqpsk_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           DQPSK demodulator
-#
-# Differentially coherent detection of differentially encoded qpsk
-# /////////////////////////////////////////////////////////////////////////////
-
-class dqpsk_demod(gr.hier_block2):
-
-    def __init__(self, 
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered DQPSK demodulation
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (LSB)
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: float
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param costas_alpha: loop filter gain
-        @type costas_alphas: float
-        @param gain_mu: for M&M block
-        @type gain_mu: float
-        @param mu: for M&M block
-        @type mu: float
-        @param omega_relative_limit: for M&M block
-        @type omega_relative_limit: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "dqpsk_demod",
-			        gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-			        gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._costas_alpha = costas_alpha
-        self._mm_gain_mu = gain_mu
-        self._mm_mu = mu
-        self._mm_omega_relative_limit = omega_relative_limit
-        self._gray_code = gray_code
-
-        if samples_per_symbol < 2:
-            raise TypeError, "sbp must be >= 2, is %d" % samples_per_symbol
-
-        arity = pow(2,self.bits_per_symbol())
- 
-        # Automatic gain control
-        scale = (1.0/16384.0)
-        self.pre_scaler = gr.multiply_const_cc(scale)   # scale the signal from full-range to +-1
-        #self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
-        self.agc = gr.feedforward_agc_cc(16, 2.0)
-       
-        # RRC data filter
-        ntaps = 11 * samples_per_symbol
-        self.rrc_taps = gr.firdes.root_raised_cosine(
-            1.0,                      # gain
-            self._samples_per_symbol, # sampling rate
-            1.0,                      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-        self.rrc_filter=gr.interp_fir_filter_ccf(1, self.rrc_taps)        
-
-        if not self._mm_gain_mu:
-            sbs_to_mm = {2: 0.050, 3: 0.075, 4: 0.11, 5: 0.125, 6: 0.15, 7: 0.15}
-            self._mm_gain_mu = sbs_to_mm[samples_per_symbol]
-
-        self._mm_omega = self._samples_per_symbol
-        self._mm_gain_omega = .25 * self._mm_gain_mu * self._mm_gain_mu
-        self._costas_beta  = 0.25 * self._costas_alpha * self._costas_alpha
-        fmin = -0.25
-        fmax = 0.25
-        
-        self.receiver=gr.mpsk_receiver_cc(arity, pi/4.0,
-                                          self._costas_alpha, self._costas_beta,
-                                          fmin, fmax,
-                                          self._mm_mu, self._mm_gain_mu,
-                                          self._mm_omega, self._mm_gain_omega,
-                                          self._mm_omega_relative_limit)
-        
-        # Perform Differential decoding on the constellation
-        self.diffdec = gr.diff_phasor_cc()
-        
-        # find closest constellation point
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-        
-        # unpack the k bit vector into a stream of bits
-        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
- 
-        # Connect & Initialize base class
-        self.connect(self, self.pre_scaler, self.agc, self.rrc_filter, self.receiver,
-                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 2
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "Gray code:           %s"   % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "Costas Loop alpha:   %.2e" % self._costas_alpha
-        print "Costas Loop beta:    %.2e" % self._costas_beta
-        print "M&M mu:              %.2f" % self._mm_mu
-        print "M&M mu gain:         %.2e" % self._mm_gain_mu
-        print "M&M omega:           %.2f" % self._mm_omega
-        print "M&M omega gain:      %.2e" % self._mm_gain_omega
-        print "M&M omega limit:     %.2f" % self._mm_omega_relative_limit
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.pre_scaler,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_prescaler.dat"))
-        self.connect(self.agc,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_rrc_filter.dat"))
-        self.connect(self.receiver,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_receiver.dat"))
-        self.connect(self.diffdec,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
-        self.connect(self.slicer,
-                     gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "rx_gray_decoder.dat"))
-        self.connect(self.unpack,
-                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
-
-    def add_options(parser):
-        """
-        Adds modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-        parser.add_option("", "--costas-alpha", type="float", default=_def_costas_alpha,
-                          help="set Costas loop alpha value [default=%default] (PSK)")
-        parser.add_option("", "--gain-mu", type="float", default=_def_gain_mu,
-                          help="set M&M symbol sync loop gain mu value [default=%default] (PSK)")
-        parser.add_option("", "--mu", type="float", default=_def_mu,
-                          help="set M&M symbol sync loop mu value [default=%default] (PSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(
-            dqpsk_demod.__init__, ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-#
-# Add these to the mod/demod registry
-#
-modulation_utils.add_type_1_mod('dqpsk', dqpsk_mod)
-modulation_utils.add_type_1_demod('dqpsk', dqpsk_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
deleted file mode 100644
index e1e627707b..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk2.py
+++ /dev/null
@@ -1,377 +0,0 @@
-#
-# Copyright 2009,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential QPSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils2
-from math import pi, sqrt
-import psk
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_freq_alpha = 0.010
-_def_phase_alpha = 0.01
-_def_timing_alpha = 0.100
-_def_timing_beta = 0.010
-_def_timing_max_dev = 1.5
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           DQPSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class dqpsk2_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "dqpsk2_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if samples_per_symbol < 2:
-            raise TypeError, ("sbp must be >= 2, is %f" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2,self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = .707 + .707j
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-        nfilts = 32
-        ntaps = 11 * int(nfilts * self._samples_per_symbol)  # make nfilts filters of ntaps each
-        self.rrc_taps = gr.firdes.root_raised_cosine(
-            nfilts,          # gain
-            nfilts,          # sampling rate based on 32 filters in resampler
-            1.0,             # symbol rate
-            self._excess_bw, # excess bandwidth (roll-off factor)
-            ntaps)
-        self.rrc_filter = gr.pfb_arb_resampler_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect & Initialize base class
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 2
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nModulator:"
-        print "bits per symbol:     %d" % self.bits_per_symbol()
-        print "Gray code:           %s" % self._gray_code
-        print "RRS roll-off factor: %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "tx_bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "tx_graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "tx_diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "tx_rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QPSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils2.extract_kwargs_from_options(dqpsk2_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           DQPSK demodulator
-#
-# Differentially coherent detection of differentially encoded qpsk
-# /////////////////////////////////////////////////////////////////////////////
-
-class dqpsk2_demod(gr.hier_block2):
-
-    def __init__(self, 
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 freq_alpha=_def_freq_alpha,
-                 phase_alpha=_def_phase_alpha,
-                 timing_alpha=_def_timing_alpha,
-                 timing_max_dev=_def_timing_max_dev,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log,
-                 sync_out=False):
-        """
-	Hierarchical block for RRC-filtered DQPSK demodulation
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (LSB)
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: float
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param freq_alpha: loop filter gain for frequency recovery
-        @type freq_alpha: float
-        @param phase_alpha: loop filter gain
-        @type phase_alphas: float
-        @param timing_alpha: timing loop alpha gain
-        @type timing_alpha: float
-        @param timing_max: timing loop maximum rate deviations
-        @type timing_max: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param log: Print modualtion data to files?
-        @type log: bool
-        @param sync_out: Output a sync signal on :1?
-        @type sync_out: bool
-	"""
-	if sync_out: io_sig_out = gr.io_signaturev(2, 2, (gr.sizeof_char, gr.sizeof_gr_complex))
-	else: io_sig_out = gr.io_signature(1, 1, gr.sizeof_char)
-
-	gr.hier_block2.__init__(self, "dqpsk2_demod",
-			        gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-			        io_sig_out)       # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._freq_alpha = freq_alpha
-        self._freq_beta = 0.25*self._freq_alpha**2
-        self._phase_alpha = phase_alpha
-        self._timing_alpha = timing_alpha
-        self._timing_beta = _def_timing_beta
-        self._timing_max_dev=timing_max_dev
-        self._gray_code = gray_code
-
-        if samples_per_symbol < 2:
-            raise TypeError, "sbp must be >= 2, is %d" % samples_per_symbol
-
-        arity = pow(2,self.bits_per_symbol())
- 
-        # Automatic gain control
-        self.agc = gr.agc2_cc(0.6e-1, 1e-3, 1, 1, 100)
-        #self.agc = gr.feedforward_agc_cc(16, 2.0)
-
-        # Frequency correction
-        self.freq_recov = gr.fll_band_edge_cc(self._samples_per_symbol, self._excess_bw,
-                                              11*int(self._samples_per_symbol),
-                                              self._freq_alpha, self._freq_beta)
-
-
-        # symbol timing recovery with RRC data filter
-        nfilts = 32
-        ntaps = 11 * int(samples_per_symbol*nfilts)
-        taps = gr.firdes.root_raised_cosine(nfilts, nfilts,
-                                            1.0/float(self._samples_per_symbol),
-                                            self._excess_bw, ntaps)
-        self.time_recov = gr.pfb_clock_sync_ccf(self._samples_per_symbol,
-                                                self._timing_alpha,
-                                                taps, nfilts, nfilts/2, self._timing_max_dev)
-        self.time_recov.set_beta(self._timing_beta)
-        
-
-        # Perform phase / fine frequency correction
-        self._phase_beta  = 0.25 * self._phase_alpha * self._phase_alpha
-        # Allow a frequency swing of +/- half of the sample rate
-        fmin = -0.5
-        fmax = 0.5
-
-        self.phase_recov = gr.costas_loop_cc(self._phase_alpha,
-                                             self._phase_beta,
-                                             fmax, fmin, arity)
-
-
-        # Perform Differential decoding on the constellation
-        self.diffdec = gr.diff_phasor_cc()
-        
-        # find closest constellation point
-        rot = 1
-        rotated_const = map(lambda pt: pt * rot, psk.constellation[arity])
-        self.slicer = gr.constellation_decoder_cb(rotated_const, range(arity))
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(psk.gray_to_binary[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(psk.ungray_to_binary[arity])
-        
-        # unpack the k bit vector into a stream of bits
-        self.unpack = gr.unpack_k_bits_bb(self.bits_per_symbol())
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
- 
-        # Connect
-        self.connect(self, self.agc, 
-                     self.freq_recov, self.time_recov, self.phase_recov,
-                     self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
-        if sync_out: self.connect(self.time_recov, (self, 1))
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 2
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "\nDemodulator:"
-        print "bits per symbol:     %d"   % self.bits_per_symbol()
-        print "Gray code:           %s"   % self._gray_code
-        print "RRC roll-off factor: %.2f" % self._excess_bw
-        print "FLL gain:            %.2f" % self._freq_alpha
-        print "Timing alpha gain:   %.2f" % self._timing_alpha
-        print "Timing beta gain:    %.2f" % self._timing_beta
-        print "Timing max dev:      %.2f" % self._timing_max_dev
-        print "Phase track alpha:   %.2e" % self._phase_alpha
-        print "Phase track beta:    %.2e" % self._phase_beta
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.agc,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_agc.dat"))
-        self.connect(self.freq_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_freq_recov.dat"))
-        self.connect(self.time_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_time_recov.dat"))
-        self.connect(self.phase_recov,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_phase_recov.dat"))
-        self.connect(self.diffdec,
-                     gr.file_sink(gr.sizeof_gr_complex, "rx_diffdec.dat"))        
-        self.connect(self.slicer,
-                     gr.file_sink(gr.sizeof_char, "rx_slicer.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "rx_gray_decoder.dat"))
-        self.connect(self.unpack,
-                     gr.file_sink(gr.sizeof_char, "rx_unpack.dat"))
-
-    def add_options(parser):
-        """
-        Adds DQPSK demodulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-        parser.add_option("", "--freq-alpha", type="float", default=_def_freq_alpha,
-                          help="set frequency lock loop alpha gain value [default=%default] (PSK)")
-        parser.add_option("", "--phase-alpha", type="float", default=_def_phase_alpha,
-                          help="set phase tracking loop alpha value [default=%default] (PSK)")
-        parser.add_option("", "--timing-alpha", type="float", default=_def_timing_alpha,
-                          help="set timing symbol sync loop gain alpha value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--timing-beta", type="float", default=_def_timing_beta,
-                          help="set timing symbol sync loop gain beta value [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--timing-max-dev", type="float", default=_def_timing_max_dev,
-                          help="set timing symbol sync loop maximum deviation [default=%default] (GMSK/PSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils2.extract_kwargs_from_options(
-            dqpsk2_demod.__init__, ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-#
-# Add these to the mod/demod registry
-#
-modulation_utils2.add_type_1_mod('dqpsk2', dqpsk2_mod)
-modulation_utils2.add_type_1_demod('dqpsk2', dqpsk2_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/gmsk.py b/gnuradio-core/src/python/gnuradio/blks2impl/gmsk.py
deleted file mode 100644
index 3b6c016a0b..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/gmsk.py
+++ /dev/null
@@ -1,292 +0,0 @@
-#
-# GMSK modulation and demodulation.  
-#
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-from gnuradio import gr
-from gnuradio import modulation_utils
-from math import pi
-import numpy
-from pprint import pprint
-import inspect
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_bt = 0.35
-_def_verbose = False
-_def_log = False
-
-_def_gain_mu = None
-_def_mu = 0.5
-_def_freq_error = 0.0
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                              GMSK modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class gmsk_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 bt=_def_bt,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for Gaussian Minimum Shift Key (GMSK)
-	modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per baud >= 2
-	@type samples_per_symbol: integer
-	@param bt: Gaussian filter bandwidth * symbol time
-	@type bt: float
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool       
-	"""
-
-	gr.hier_block2.__init__(self, "gmsk_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._bt = bt
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
-
-	ntaps = 4 * samples_per_symbol			# up to 3 bits in filter at once
-	sensitivity = (pi / 2) / samples_per_symbol	# phase change per bit = pi / 2
-
-	# Turn it into NRZ data.
-	self.nrz = gr.bytes_to_syms()
-
-	# Form Gaussian filter
-        # Generate Gaussian response (Needs to be convolved with window below).
-	self.gaussian_taps = gr.firdes.gaussian(
-		1,		       # gain
-		samples_per_symbol,    # symbol_rate
-		bt,		       # bandwidth * symbol time
-		ntaps	               # number of taps
-		)
-
-	self.sqwave = (1,) * samples_per_symbol       # rectangular window
-	self.taps = numpy.convolve(numpy.array(self.gaussian_taps),numpy.array(self.sqwave))
-	self.gaussian_filter = gr.interp_fir_filter_fff(samples_per_symbol, self.taps)
-
-	# FM modulation
-	self.fmmod = gr.frequency_modulator_fc(sensitivity)
-		
-        if verbose:
-            self._print_verbage()
-         
-        if log:
-            self._setup_logging()
-
-	# Connect & Initialize base class
-	self.connect(self, self.nrz, self.gaussian_filter, self.fmmod, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):     # staticmethod that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.
-
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gaussian filter bt = %.2f" % self._bt
-
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.nrz,
-                     gr.file_sink(gr.sizeof_float, "nrz.dat"))
-        self.connect(self.gaussian_filter,
-                     gr.file_sink(gr.sizeof_float, "gaussian_filter.dat"))
-        self.connect(self.fmmod,
-                     gr.file_sink(gr.sizeof_gr_complex, "fmmod.dat"))
-
-
-    def add_options(parser):
-        """
-        Adds GMSK modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--bt", type="float", default=_def_bt,
-                          help="set bandwidth-time product [default=%default] (GMSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(gmsk_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                            GMSK demodulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class gmsk_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 freq_error=_def_freq_error,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for Gaussian Minimum Shift Key (GMSK)
-	demodulation.
-
-	The input is the complex modulated signal at baseband.
-	The output is a stream of bits packed 1 bit per byte (the LSB)
-
-	@param samples_per_symbol: samples per baud
-	@type samples_per_symbol: integer
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param log: Print modualtion data to files?
-        @type log: bool 
-
-        Clock recovery parameters.  These all have reasonble defaults.
-        
-        @param gain_mu: controls rate of mu adjustment
-        @type gain_mu: float
-        @param mu: fractional delay [0.0, 1.0]
-        @type mu: float
-        @param omega_relative_limit: sets max variation in omega
-        @type omega_relative_limit: float, typically 0.000200 (200 ppm)
-        @param freq_error: bit rate error as a fraction
-        @param float
-	"""
-
-	gr.hier_block2.__init__(self, "gmsk_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._gain_mu = gain_mu
-        self._mu = mu
-        self._omega_relative_limit = omega_relative_limit
-        self._freq_error = freq_error
-        
-        if samples_per_symbol < 2:
-            raise TypeError, "samples_per_symbol >= 2, is %f" % samples_per_symbol
-
-        self._omega = samples_per_symbol*(1+self._freq_error)
-
-        if not self._gain_mu:
-            self._gain_mu = 0.175
-            
-	self._gain_omega = .25 * self._gain_mu * self._gain_mu        # critically damped
-
-	# Demodulate FM
-	sensitivity = (pi / 2) / samples_per_symbol
-	self.fmdemod = gr.quadrature_demod_cf(1.0 / sensitivity)
-
-	# the clock recovery block tracks the symbol clock and resamples as needed.
-	# the output of the block is a stream of soft symbols (float)
-	self.clock_recovery = gr.clock_recovery_mm_ff(self._omega, self._gain_omega,
-                                                      self._mu, self._gain_mu,
-                                                      self._omega_relative_limit)
-
-        # slice the floats at 0, outputting 1 bit (the LSB of the output byte) per sample
-        self.slicer = gr.binary_slicer_fb()
-
-        if verbose:
-            self._print_verbage()
-         
-        if log:
-            self._setup_logging()
-
-	# Connect & Initialize base class
-	self.connect(self, self.fmdemod, self.clock_recovery, self.slicer, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 1
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.
-
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "M&M clock recovery omega = %f" % self._omega
-        print "M&M clock recovery gain mu = %f" % self._gain_mu
-        print "M&M clock recovery mu = %f" % self._mu
-        print "M&M clock recovery omega rel. limit = %f" % self._omega_relative_limit
-        print "frequency error = %f" % self._freq_error
-
-
-    def _setup_logging(self):
-        print "Demodulation logging turned on."
-        self.connect(self.fmdemod,
-                    gr.file_sink(gr.sizeof_float, "fmdemod.dat"))
-        self.connect(self.clock_recovery,
-                    gr.file_sink(gr.sizeof_float, "clock_recovery.dat"))
-        self.connect(self.slicer,
-                    gr.file_sink(gr.sizeof_char, "slicer.dat"))
-
-    def add_options(parser):
-        """
-        Adds GMSK demodulation-specific options to the standard parser
-        """
-        parser.add_option("", "--gain-mu", type="float", default=_def_gain_mu,
-                          help="M&M clock recovery gain mu [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--mu", type="float", default=_def_mu,
-                          help="M&M clock recovery mu [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--omega-relative-limit", type="float", default=_def_omega_relative_limit,
-                          help="M&M clock recovery omega relative limit [default=%default] (GMSK/PSK)")
-        parser.add_option("", "--freq-error", type="float", default=_def_freq_error,
-                          help="M&M clock recovery frequency error [default=%default] (GMSK)")
-    add_options=staticmethod(add_options)
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(gmsk_demod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-#
-# Add these to the mod/demod registry
-#
-modulation_utils.add_type_1_mod('gmsk', gmsk_mod)
-modulation_utils.add_type_1_demod('gmsk', gmsk_demod)
diff --git a/gnuradio-core/src/python/gnuradio/gr/Makefile.am b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
index 45c970227f..e1c79ab4f1 100644
--- a/gnuradio-core/src/python/gnuradio/gr/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
@@ -51,7 +51,6 @@ noinst_PYTHON = 			\
 	qa_classify.py			\
 	qa_cma_equalizer.py		\
 	qa_complex_to_xxx.py		\
-	qa_constellation_decoder_cb.py  \
 	qa_copy.py			\
 	qa_correlate_access_code.py	\
 	qa_delay.py			\
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py b/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py
deleted file mode 100755
index 27e1802e08..0000000000
--- a/gnuradio-core/src/python/gnuradio/gr/qa_constellation_decoder_cb.py
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2004,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
-import math
-
-class test_constellation_decoder (gr_unittest.TestCase):
-
-    def setUp (self):
-        self.tb = gr.top_block ()
-
-    def tearDown (self):
-        self.tb = None
-
-    def test_constellation_decoder_cb (self):
-        symbol_positions  = [1 + 0j, 0 + 1j , -1 + 0j, 0 - 1j]
-        symbol_values_out = [0, 1, 2, 3]
-	expected_result = (       0,          3,           2,            1,        0,       0,          3)
-  	src_data =        (0.5 + 0j, 0.1 - 1.2j, -0.8 - 0.1j, -0.45 + 0.8j, 0.8 - 0j, 0.5 + 0j, 0.1 - 1.2j)
-        src = gr.vector_source_c (src_data)
-        op = gr.constellation_decoder_cb (symbol_positions, symbol_values_out)
-        dst = gr.vector_sink_b ()
-        self.tb.connect (src, op)
-        self.tb.connect (op, dst)
-        self.tb.run ()               # run the graph and wait for it to finish
-        actual_result = dst.data ()  # fetch the contents of the sink
-	#print "actual result", actual_result
-	#print "expected result", expected_result
-        self.assertFloatTuplesAlmostEqual (expected_result, actual_result)
-
-
-if __name__ == '__main__':
-    gr_unittest.run(test_constellation_decoder, "test_constellation_decoder.xml")
-
-- 
cgit v1.2.3


From f6e1b8f01d767edae193bdbda3307f37c94527bc Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Tue, 19 Jul 2011 23:34:24 -0400
Subject: digital: removed references to modulators that were moved to
 gr-digital.

---
 gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am | 6 ------
 1 file changed, 6 deletions(-)

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am b/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
index 7b24fb69d7..0499b8c802 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
@@ -30,16 +30,10 @@ grblkspython_PYTHON =		\
 	__init__.py		\
 	am_demod.py		\
 	channel_model.py	\
-	dbpsk.py		\
-	dbpsk2.py		\
-	dqpsk.py		\
-	dqpsk2.py		\
-	d8psk.py		\
 	filterbank.py		\
 	fm_demod.py		\
 	fm_emph.py		\
 	generic_usrp.py	\
-	gmsk.py			\
 	cpm.py			\
 	logpwrfft.py		\
 	nbfm_rx.py		\
-- 
cgit v1.2.3


From f7185e3468e7d24b8f726dd717157cf2fed4b19a Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Wed, 20 Jul 2011 21:35:31 -0400
Subject: digital: removed LMS and CMA equalizers from core that are supplanted
 in gr-digital.

---
 gnuradio-core/src/guile/tests/filter_ctors.test    |   3 -
 gnuradio-core/src/guile/tests/general_ctors.test   |   6 -
 gnuradio-core/src/lib/filter/Makefile.am           |   5 +-
 gnuradio-core/src/lib/filter/filter.i              |   2 -
 .../src/lib/filter/gr_cma_equalizer_cc.cc          |  42 ------
 gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h |  62 ---------
 gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.i |  37 ------
 gnuradio-core/src/lib/general/Makefile.am          |   6 -
 gnuradio-core/src/lib/general/general.i            |   4 -
 gnuradio-core/src/lib/general/gr_lms_dfe_cc.cc     | 148 ---------------------
 gnuradio-core/src/lib/general/gr_lms_dfe_cc.h      |  64 ---------
 gnuradio-core/src/lib/general/gr_lms_dfe_cc.i      |  37 ------
 gnuradio-core/src/lib/general/gr_lms_dfe_ff.cc     | 122 -----------------
 gnuradio-core/src/lib/general/gr_lms_dfe_ff.h      |  62 ---------
 gnuradio-core/src/lib/general/gr_lms_dfe_ff.i      |  34 -----
 gnuradio-core/src/python/gnuradio/gr/Makefile.am   |   1 -
 .../src/python/gnuradio/gr/qa_cma_equalizer.py     |  49 -------
 gr-digital/python/Makefile.am                      |   1 +
 gr-digital/python/qa_cma_equalizer.py              |  50 +++++++
 gr-qtgui/swig/Makefile.swig.gen                    |   2 +-
 20 files changed, 53 insertions(+), 684 deletions(-)
 delete mode 100644 gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.cc
 delete mode 100644 gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h
 delete mode 100644 gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.i
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_cc.cc
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_cc.h
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_cc.i
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_ff.cc
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_ff.h
 delete mode 100644 gnuradio-core/src/lib/general/gr_lms_dfe_ff.i
 delete mode 100755 gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py
 create mode 100755 gr-digital/python/qa_cma_equalizer.py

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/guile/tests/filter_ctors.test b/gnuradio-core/src/guile/tests/filter_ctors.test
index 4dd0bc1870..fe1d9421d1 100644
--- a/gnuradio-core/src/guile/tests/filter_ctors.test
+++ b/gnuradio-core/src/guile/tests/filter_ctors.test
@@ -36,9 +36,6 @@
 ;; gr_adaptive_fir_ccf(char *name, int decimation, const std::vector<float> &taps);
 ;; (pass-if (true? (gr:adaptive-fir-ccf "foo" 0 #(1.0 2.0 3.0 4.0))))
 
-;;; ./filter/gr_cma_equalizer_cc.h
-(pass-if (true? (gr:cma-equalizer-cc 0 0 0)))
-
 ;;; ./filter/gr_fft_filter_ccc.h
 (pass-if (true? (gr:fft-filter-ccc 0 #(1+3i 23+5i))))
 
diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test
index 0019b62afe..26233b253d 100644
--- a/gnuradio-core/src/guile/tests/general_ctors.test
+++ b/gnuradio-core/src/guile/tests/general_ctors.test
@@ -203,12 +203,6 @@
 ;;; ./general/gr_lfsr_32k_source_s.h
 (pass-if (true? (gr:lfsr-32k-source-s)))
 
-;;; ./general/gr_lms_dfe_cc.h
-(pass-if (true? (gr:lms-dfe-ff 1 1 1 1)))
-
-;;; ./general/gr_lms_dfe_ff.h
-(pass-if (true? (gr:lms-dfe-ff 1 1 1 1)))
-
 ;;; ./general/gr_map_bb.h
 (pass-if (true? (gr:map-bb #(1 2))))
 
diff --git a/gnuradio-core/src/lib/filter/Makefile.am b/gnuradio-core/src/lib/filter/Makefile.am
index d8f634c382..48ec55a622 100644
--- a/gnuradio-core/src/lib/filter/Makefile.am
+++ b/gnuradio-core/src/lib/filter/Makefile.am
@@ -1,5 +1,5 @@
 #
-# Copyright 2001,2002,2004,2005,2006,2007,2008,2009,2010,2011 Free Software Foundation, Inc.
+# Copyright 2001,2002,2004-2011 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -190,7 +190,6 @@ libfilter_la_common_SOURCES = 		\
 	$(GENERATED_CC)			\
 	gr_adaptive_fir_ccc.cc		\
 	gr_adaptive_fir_ccf.cc		\
-	gr_cma_equalizer_cc.cc		\
 	gri_fft_filter_fff_generic.cc	\
 	gri_fft_filter_ccc_generic.cc	\
 	gr_fft_filter_ccc.cc		\
@@ -276,7 +275,6 @@ grinclude_HEADERS = 			\
 	gr_adaptive_fir_ccc.h		\
 	gr_adaptive_fir_ccf.h		\
 	gr_altivec.h			\
-	gr_cma_equalizer_cc.h		\
 	gr_cpu.h			\
 	gri_fft_filter_fff_generic.h	\
 	gri_fft_filter_ccc_generic.h	\
@@ -361,7 +359,6 @@ swiginclude_HEADERS =			\
 	filter_generated.i		\
 	gr_adaptive_fir_ccc.i		\
 	gr_adaptive_fir_ccf.i		\
-	gr_cma_equalizer_cc.i		\
 	gr_fft_filter_ccc.i		\
 	gr_fft_filter_fff.i		\
 	gr_filter_delay_fc.i		\
diff --git a/gnuradio-core/src/lib/filter/filter.i b/gnuradio-core/src/lib/filter/filter.i
index 58bb4f0d5d..2af7fcc5c6 100644
--- a/gnuradio-core/src/lib/filter/filter.i
+++ b/gnuradio-core/src/lib/filter/filter.i
@@ -31,7 +31,6 @@
 #include <gr_fractional_interpolator_ff.h>
 #include <gr_fractional_interpolator_cc.h>
 #include <gr_goertzel_fc.h>
-#include <gr_cma_equalizer_cc.h>
 #include <gr_pfb_channelizer_ccf.h>
 #include <gr_pfb_synthesis_filterbank_ccf.h>
 #include <gr_pfb_decimator_ccf.h>
@@ -53,7 +52,6 @@
 %include "gr_fractional_interpolator_ff.i"
 %include "gr_fractional_interpolator_cc.i"
 %include "gr_goertzel_fc.i"
-%include "gr_cma_equalizer_cc.i"
 %include "gr_pfb_channelizer_ccf.i"
 %include "gr_pfb_synthesis_filterbank_ccf.i"
 %include "gr_pfb_decimator_ccf.i"
diff --git a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.cc b/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.cc
deleted file mode 100644
index f80bfd5184..0000000000
--- a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.cc
+++ /dev/null
@@ -1,42 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,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_cma_equalizer_cc.h>
-
-gr_cma_equalizer_cc_sptr
-gr_make_cma_equalizer_cc(int num_taps, float modulus, float mu)
-{
-  return gnuradio::get_initial_sptr(new gr_cma_equalizer_cc(num_taps, modulus, mu));
-}
-
-gr_cma_equalizer_cc::gr_cma_equalizer_cc(int num_taps, float modulus, float mu)
-  : gr_adaptive_fir_ccf("cma_equalizer_cc", 1, std::vector<float>(num_taps)),
-    d_modulus(modulus), d_mu(mu)
-{
-  if (num_taps > 0)
-    d_taps[0] = 1.0;
-}
-
diff --git a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h b/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h
deleted file mode 100644
index c78047c16d..0000000000
--- a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006 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_CMA_EQUALIZER_CC_H
-#define	INCLUDED_GR_CMA_EQUALIZER_CC_H
-
-#include <gr_adaptive_fir_ccf.h>
-
-class gr_cma_equalizer_cc;
-typedef boost::shared_ptr<gr_cma_equalizer_cc> gr_cma_equalizer_cc_sptr;
-
-gr_cma_equalizer_cc_sptr 
-gr_make_cma_equalizer_cc(int num_taps, float modulus, float mu);
-
-/*!
- * \brief Implements constant modulus adaptive filter on complex stream
- * \ingroup eq_blk
- */
-class gr_cma_equalizer_cc : public gr_adaptive_fir_ccf
-{
-private:
-  float d_modulus;
-  float d_mu;
-  
-  friend gr_cma_equalizer_cc_sptr gr_make_cma_equalizer_cc(int num_taps, float modulus, float mu);
-  gr_cma_equalizer_cc(int num_taps, float modulus, float mu);
-
-protected:
-
-  virtual float error(const gr_complex &out) 
-  { 
-    return (d_modulus - norm(out)); 
-  }
-
-  virtual void update_tap(float &tap, const gr_complex &in) 
-  {
-    tap += d_mu*d_error*abs(in);
-  }
-  
-public:
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.i b/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.i
deleted file mode 100644
index 30e2fb8bd9..0000000000
--- a/gnuradio-core/src/lib/filter/gr_cma_equalizer_cc.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006,2009 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,cma_equalizer_cc)
-
-// retrieve info on the base class, without generating wrappers since
-// the base class has a pure virual method.
-%import "gr_adaptive_fir_ccf.i"
-
-gr_cma_equalizer_cc_sptr gr_make_cma_equalizer_cc(int num_taps, float modulus, float mu);
-
-class gr_cma_equalizer_cc : public gr_adaptive_fir_ccf
-{
-private:
-  gr_cma_equalizer_cc(int num_taps, float modulus, float mu);
-
-public:
-};
diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am
index f0679388d4..f3244d4dbb 100644
--- a/gnuradio-core/src/lib/general/Makefile.am
+++ b/gnuradio-core/src/lib/general/Makefile.am
@@ -92,8 +92,6 @@ libgeneral_la_SOURCES = 		\
 	gr_keep_one_in_n.cc		\
 	gr_kludge_copy.cc		\
 	gr_lfsr_32k_source_s.cc		\
-	gr_lms_dfe_cc.cc		\
-	gr_lms_dfe_ff.cc		\
 	gr_map_bb.cc			\
 	gr_misc.cc			\
 	gr_mpsk_receiver_cc.cc		\
@@ -247,8 +245,6 @@ grinclude_HEADERS = 			\
 	gr_keep_one_in_n.h		\
 	gr_kludge_copy.h		\
 	gr_lfsr_32k_source_s.h		\
-	gr_lms_dfe_cc.h			\
-	gr_lms_dfe_ff.h			\
 	gr_log2_const.h			\
 	gr_map_bb.h			\
 	gr_math.h			\
@@ -412,8 +408,6 @@ swiginclude_HEADERS =			\
 	gr_keep_one_in_n.i		\
 	gr_kludge_copy.i		\
 	gr_lfsr_32k_source_s.i		\
-	gr_lms_dfe_cc.i			\
-	gr_lms_dfe_ff.i			\
 	gr_map_bb.i			\
 	gr_mpsk_receiver_cc.i		\
 	gr_nlog10_ff.i			\
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index 1c3ebeae4b..37e304481c 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -80,8 +80,6 @@
 #include <gr_crc32.h>
 #include <gr_threshold_ff.h>
 #include <gr_packet_sink.h>
-#include <gr_lms_dfe_cc.h>
-#include <gr_lms_dfe_ff.h>
 #include <gr_dpll_bb.h>
 #include <gr_fmdet_cf.h>
 #include <gr_pll_freqdet_cf.h>
@@ -202,8 +200,6 @@
 %include "gr_crc32.i"
 %include "gr_threshold_ff.i"
 %include "gr_packet_sink.i"
-%include "gr_lms_dfe_cc.i"
-%include "gr_lms_dfe_ff.i"
 %include "gr_dpll_bb.i"
 %include "gr_fmdet_cf.i"
 %include "gr_pll_freqdet_cf.i"
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.cc b/gnuradio-core/src/lib/general/gr_lms_dfe_cc.cc
deleted file mode 100644
index 8659386d50..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.cc
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,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_lms_dfe_cc.h>
-#include <gr_io_signature.h>
-#include <gr_misc.h>
-#include <iostream>
-
-gr_complex
-gr_lms_dfe_cc::slicer_0deg (gr_complex sample)
-{
-  gr_complex out;
-  if(fabs(real(sample))>fabs(imag(sample))) {
-    if(real(sample) > 0)
-      out = gr_complex(1,0);
-    else
-      out = gr_complex(-1,0);
-  }
-  else {
-    if(imag(sample) > 0)
-      out = gr_complex(0,1);
-    else
-      out = gr_complex(0,-1);
-  }
-  return out;
-}
-
-gr_complex
-gr_lms_dfe_cc::slicer_45deg (gr_complex sample)
-{
-  gr_complex out;
-  if(real(sample) > 0)
-    out = gr_complex(1,0);
-  else
-    out = gr_complex(-1,0);
-  if(imag(sample) > 0)
-    out += gr_complex(0,1);
-  else
-    out += gr_complex(0,-1);
-  return out;
-}
-
-gr_lms_dfe_cc_sptr
-gr_make_lms_dfe_cc (float lambda_ff, float lambda_fb, 
-		    unsigned int num_fftaps, unsigned int num_fbtaps)
-{
-  return gnuradio::get_initial_sptr(new gr_lms_dfe_cc (lambda_ff, lambda_fb,
-						num_fftaps, num_fbtaps));
-}
-
-gr_lms_dfe_cc::gr_lms_dfe_cc (float lambda_ff, float lambda_fb , 
-			      unsigned int num_fftaps, unsigned int num_fbtaps)
-  : gr_sync_block ("lms_dfe_cc",
-		   gr_make_io_signature (1, 1, sizeof (gr_complex)),
-		   gr_make_io_signature (1, 1, sizeof (gr_complex))),
-    d_lambda_ff (lambda_ff), d_lambda_fb (lambda_fb), 
-    d_ff_delayline(gr_rounduppow2(num_fftaps)),
-    d_fb_delayline(gr_rounduppow2(num_fbtaps)),
-    d_ff_taps(num_fftaps),d_fb_taps(num_fbtaps),
-    d_ff_index(0), d_fb_index(0)
-{
-  gr_zero_vector(d_ff_taps);
-  d_ff_taps [d_ff_taps.size()/2] = 1;
-
-  gr_zero_vector(d_fb_taps);
-  gr_zero_vector(d_ff_delayline);
-  gr_zero_vector(d_fb_delayline);
-}
-
-int
-gr_lms_dfe_cc::work (int noutput_items,
-		   gr_vector_const_void_star &input_items,
-		   gr_vector_void_star &output_items)
-{
-  const gr_complex *iptr = (const gr_complex *) input_items[0];
-  gr_complex *optr = (gr_complex *) output_items[0];
-  
-  gr_complex acc, decision, error;
-  unsigned int i;
-
-  unsigned int ff_mask = d_ff_delayline.size() - 1;	// size is power of 2
-  unsigned int fb_mask = d_fb_delayline.size() - 1;
-
-  int	size = noutput_items;
-  while (size-- > 0){
-    acc = 0; 
-    d_ff_delayline[d_ff_index] = *iptr++;
-
-    // Compute output
-    for (i=0; i < d_ff_taps.size(); i++) 
-      acc += conj(d_ff_delayline[(i+d_ff_index) & ff_mask]) * d_ff_taps[i];
-    
-    for (i=0; i < d_fb_taps.size(); i++)
-      acc -= conj(d_fb_delayline[(i+d_fb_index) & fb_mask]) * d_fb_taps[i];
-
-    decision = slicer_45deg(acc);
-    error = decision - acc;
-    
-    //  Update taps
-    for (i=0; i < d_ff_taps.size(); i++)
-      d_ff_taps[i] += d_lambda_ff * conj(error) * d_ff_delayline[(i+d_ff_index) & ff_mask];
-    
-    for (i=0; i < d_fb_taps.size(); i++)
-      d_fb_taps[i] -= d_lambda_fb * conj(error) * d_fb_delayline[(i+d_fb_index) & fb_mask];
-    
-    d_fb_index = (d_fb_index - 1) & fb_mask;	// Decrement index
-    d_ff_index = (d_ff_index - 1) & ff_mask;	// Decrement index
-
-    d_fb_delayline[d_fb_index] = decision;	// Save decision in feedback
-
-    *optr++ = acc;   // Output decision
-  }
-
-  if (0){
-    std::cout << "FF Taps\t";
-    for(i=0;i<d_ff_taps.size();i++)
-      std::cout << d_ff_taps[i] << "\t";
-    std::cout << std::endl << "FB Taps\t";
-    for(i=0;i<d_fb_taps.size();i++)
-      std::cout << d_fb_taps[i] << "\t";
-    std::cout << std::endl;
-  }
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.h b/gnuradio-core/src/lib/general/gr_lms_dfe_cc.h
deleted file mode 100644
index 7b3a2c84eb..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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_LMS_DFE_CC_H
-#define INCLUDED_GR_LMS_DFE_CC_H
-
-#include <gr_sync_block.h>
-
-class gr_lms_dfe_cc;
-typedef boost::shared_ptr<gr_lms_dfe_cc> gr_lms_dfe_cc_sptr;
-
-gr_lms_dfe_cc_sptr gr_make_lms_dfe_cc (float lambda_ff, float lambda_fb,
-				       unsigned int num_fftaps, unsigned int num_fbtaps);
-
-/*!
- * \brief Least-Mean-Square Decision Feedback Equalizer (complex in/out)
- * \ingroup eq_blk
- */
-class gr_lms_dfe_cc : public gr_sync_block
-{
-  friend gr_lms_dfe_cc_sptr gr_make_lms_dfe_cc (float lambda_ff, float lambda_fb,
-						unsigned int num_fftaps, unsigned int num_fbtaps);
-  
-  float	d_lambda_ff;
-  float	d_lambda_fb;
-  std::vector<gr_complex>  d_ff_delayline;
-  std::vector<gr_complex>  d_fb_delayline;
-  std::vector<gr_complex>  d_ff_taps;
-  std::vector<gr_complex>  d_fb_taps;
-  unsigned int d_ff_index;
-  unsigned int d_fb_index;
-
-  gr_lms_dfe_cc (float lambda_ff, float lambda_fb, 
-		 unsigned int num_fftaps, unsigned int num_fbtaps);
-  gr_complex slicer_0deg(gr_complex baud);
-  gr_complex slicer_45deg(gr_complex baud);
-
-  public:
-  
-  int work (int noutput_items,
-	    gr_vector_const_void_star &input_items,
-	    gr_vector_void_star &output_items);
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.i b/gnuradio-core/src/lib/general/gr_lms_dfe_cc.i
deleted file mode 100644
index 9a9f22b6ea..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_cc.i
+++ /dev/null
@@ -1,37 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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,lms_dfe_cc)
-
-gr_lms_dfe_cc_sptr gr_make_lms_dfe_cc (float lambda_ff, float lambda_fb, 
-				       unsigned int num_fftaps, unsigned int num_fbtaps);
-
-class gr_lms_dfe_cc : public gr_sync_block
-{
- private:
-  gr_lms_dfe_cc (float lambda_ff, float lambda_fb, 
-		 unsigned int num_fftaps, unsigned int num_fbtaps);
-  gr_complex slicer_0deg(gr_complex baud);
-  gr_complex slicer_45deg(gr_complex baud);
-  gr_complex conjg(gr_complex val);
-};
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.cc b/gnuradio-core/src/lib/general/gr_lms_dfe_ff.cc
deleted file mode 100644
index 8a5e22c2fe..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.cc
+++ /dev/null
@@ -1,122 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,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_lms_dfe_ff.h>
-#include <gr_io_signature.h>
-#include <gr_misc.h>
-#include <iostream>
-
-float
-slice(float val)
-{
-  if (val>0)
-    return 1;
-  else
-    return -1;
-}
-
-gr_lms_dfe_ff_sptr
-gr_make_lms_dfe_ff (float lambda_ff, float lambda_fb, 
-		    unsigned int num_fftaps, unsigned int num_fbtaps)
-{
-  return gnuradio::get_initial_sptr(new gr_lms_dfe_ff (lambda_ff,lambda_fb,num_fftaps,num_fbtaps));
-}
-
-gr_lms_dfe_ff::gr_lms_dfe_ff (float lambda_ff, float lambda_fb , 
-			      unsigned int num_fftaps, unsigned int num_fbtaps)
-  : gr_sync_block ("lms_dfe_ff",
-		   gr_make_io_signature (1, 1, sizeof (float)),
-		   gr_make_io_signature (1, 1, sizeof (float))),
-    d_lambda_ff (lambda_ff), d_lambda_fb (lambda_fb), 
-    d_ff_delayline(gr_rounduppow2(num_fftaps)),
-    d_fb_delayline(gr_rounduppow2(num_fbtaps)),
-    d_ff_taps(num_fftaps), d_fb_taps(num_fbtaps),
-    d_ff_index(0), d_fb_index(0)
-{
-  gr_zero_vector(d_ff_taps);
-  d_ff_taps [d_ff_taps.size()/2] = 1;
-
-  gr_zero_vector(d_fb_taps);
-  gr_zero_vector(d_ff_delayline);
-  gr_zero_vector(d_fb_delayline);
-}
-
-int
-gr_lms_dfe_ff::work (int noutput_items,
-		   gr_vector_const_void_star &input_items,
-		   gr_vector_void_star &output_items)
-{
-  const float *iptr = (const float *) input_items[0];
-  float *optr = (float *) output_items[0];
-  
-  float acc, decision, error;
-  unsigned int i;
-
-  unsigned int ff_mask = d_ff_delayline.size() - 1;	// size is power of 2
-  unsigned int fb_mask = d_fb_delayline.size() - 1;
-
-  int	size = noutput_items;
-  while(size-- > 0) {
-    acc = 0; 
-    d_ff_delayline[d_ff_index] = *iptr++;
-
-    // Compute output
-    for (i=0; i < d_ff_taps.size(); i++) 
-      acc += d_ff_delayline[(i+d_ff_index) & ff_mask] * d_ff_taps[i];
-    
-    for (i=0; i < d_fb_taps.size(); i++)
-      acc -= d_fb_delayline[(i+d_fb_index) & fb_mask] * d_fb_taps[i];
-
-    decision = slice(acc);
-    error = decision - acc;
-    
-    // Update taps
-    for (i=0; i < d_ff_taps.size(); i++)
-      d_ff_taps[i] += d_lambda_ff * error * d_ff_delayline[(i+d_ff_index) & ff_mask];
-    
-    for (i=0; i < d_fb_taps.size(); i++)
-      d_fb_taps[i] -= d_lambda_fb * error * d_fb_delayline[(i+d_fb_index) & fb_mask];
-    
-    d_fb_index = (d_fb_index - 1) & fb_mask;   	// Decrement index
-    d_ff_index = (d_ff_index - 1) & ff_mask;   	// Decrement index
-
-    d_fb_delayline[d_fb_index] = decision; 	// Save decision in feedback
-
-    *optr++ = acc;   // Output decision
-  }
-
-  if (0){
-    std::cout << "FF Taps\t";
-    for(i=0;i<d_ff_taps.size();i++)
-      std::cout << d_ff_taps[i] << "\t";
-    std::cout << std::endl << "FB Taps\t";
-    for(i=0;i<d_fb_taps.size();i++)
-      std::cout << d_fb_taps[i] << "\t";
-    std::cout << std::endl;
-  }
-
-  return noutput_items;
-}
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.h b/gnuradio-core/src/lib/general/gr_lms_dfe_ff.h
deleted file mode 100644
index dd610c4707..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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_LMS_DFE_FF_H
-#define INCLUDED_GR_LMS_DFE_FF_H
-
-#include <gr_sync_block.h>
-
-class gr_lms_dfe_ff;
-typedef boost::shared_ptr<gr_lms_dfe_ff> gr_lms_dfe_ff_sptr;
-
-gr_lms_dfe_ff_sptr gr_make_lms_dfe_ff (float lambda_ff, float lambda_fb,
-				       unsigned int num_fftaps, unsigned int num_fbtaps);
-
-/*!
- * \brief Least-Mean-Square Decision Feedback Equalizer (float in/out)
- * \ingroup eq_blk
- */
-class gr_lms_dfe_ff : public gr_sync_block
-{
-  friend gr_lms_dfe_ff_sptr gr_make_lms_dfe_ff (float lambda_ff, float lambda_fb,
-						unsigned int num_fftaps, unsigned int num_fbtaps);
-  
-  float	d_lambda_ff;
-  float	d_lambda_fb;
-  std::vector<float>  d_ff_delayline;
-  std::vector<float>  d_fb_delayline;
-  std::vector<float>  d_ff_taps;
-  std::vector<float>  d_fb_taps;
-  unsigned int d_ff_index;
-  unsigned int d_fb_index;
-
-  gr_lms_dfe_ff (float lambda_ff, float lambda_fb, 
-		 unsigned int num_fftaps, unsigned int num_fbtaps);
-  
-  public:
-  
-  int work (int noutput_items,
-	    gr_vector_const_void_star &input_items,
-	    gr_vector_void_star &output_items);
-};
-
-#endif
diff --git a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.i b/gnuradio-core/src/lib/general/gr_lms_dfe_ff.i
deleted file mode 100644
index 3ca488b524..0000000000
--- a/gnuradio-core/src/lib/general/gr_lms_dfe_ff.i
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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,lms_dfe_ff)
-
-gr_lms_dfe_ff_sptr gr_make_lms_dfe_ff (float lambda_ff, float lambda_fb, 
-				       unsigned int num_fftaps, unsigned int num_fbtaps);
-
-class gr_lms_dfe_ff : public gr_sync_block
-{
- private:
-  gr_lms_dfe_ff (float lambda_ff, float lambda_fb, 
-		 unsigned int num_fftaps, unsigned int num_fbtaps);
-};
diff --git a/gnuradio-core/src/python/gnuradio/gr/Makefile.am b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
index e1c79ab4f1..640baf6f77 100644
--- a/gnuradio-core/src/python/gnuradio/gr/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
@@ -49,7 +49,6 @@ noinst_PYTHON = 			\
 	qa_argmax.py			\
 	qa_bin_statistics.py		\
 	qa_classify.py			\
-	qa_cma_equalizer.py		\
 	qa_complex_to_xxx.py		\
 	qa_copy.py			\
 	qa_correlate_access_code.py	\
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py b/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py
deleted file mode 100755
index 79e9cd092f..0000000000
--- a/gnuradio-core/src/python/gnuradio/gr/qa_cma_equalizer.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,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_cma_equalizer_fir(gr_unittest.TestCase):
-
-    def setUp(self):
-    	self.tb = gr.top_block()
-
-    def tearDown(self):
-    	self.tb = None
-    	
-    def transform(self, src_data):
-	SRC = gr.vector_source_c(src_data, False)
-	EQU = gr.cma_equalizer_cc(4, 1.0, .001)
-	DST = gr.vector_sink_c()
-	self.tb.connect(SRC, EQU, DST)
-	self.tb.run()
-	return DST.data()
-
-    def test_001_identity(self):
-    	# Constant modulus signal so no adjustments
-	src_data      = (1+0j, 0+1j, -1+0j, 0-1j)*1000
-	expected_data = src_data
-	result = self.transform(src_data)
-	self.assertComplexTuplesAlmostEqual(expected_data, result)
-
-if __name__ == "__main__":
-    gr_unittest.run(test_cma_equalizer_fir, "test_cma_equalizer_fir.xml")
diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am
index 49271fa183..e0cf477c56 100644
--- a/gr-digital/python/Makefile.am
+++ b/gr-digital/python/Makefile.am
@@ -33,6 +33,7 @@ digitaldir = $(grpythondir)/digital
 noinst_PYTHON = \
 	qa_digital.py			\
 	qa_binary_slicer_fb.py		\
+	qa_cma_equalizer.py		\
 	qa_constellation.py		\
 	qa_constellation_receiver.py	\
 	qa_constellation_decoder_cb.py	\
diff --git a/gr-digital/python/qa_cma_equalizer.py b/gr-digital/python/qa_cma_equalizer.py
new file mode 100755
index 0000000000..75fb0f05ed
--- /dev/null
+++ b/gr-digital/python/qa_cma_equalizer.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+#
+# Copyright 2006,2007,2010,2011 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
+import digital_swig
+
+class test_cma_equalizer_fir(gr_unittest.TestCase):
+
+    def setUp(self):
+    	self.tb = gr.top_block()
+
+    def tearDown(self):
+    	self.tb = None
+    	
+    def transform(self, src_data):
+	SRC = gr.vector_source_c(src_data, False)
+	EQU = digital_swig.cma_equalizer_cc(4, 1.0, .001, 1)
+	DST = gr.vector_sink_c()
+	self.tb.connect(SRC, EQU, DST)
+	self.tb.run()
+	return DST.data()
+
+    def test_001_identity(self):
+    	# Constant modulus signal so no adjustments
+	src_data      = (1+0j, 0+1j, -1+0j, 0-1j)*1000
+	expected_data = src_data
+	result = self.transform(src_data)
+	self.assertComplexTuplesAlmostEqual(expected_data, result)
+
+if __name__ == "__main__":
+    gr_unittest.run(test_cma_equalizer_fir, "test_cma_equalizer_fir.xml")
diff --git a/gr-qtgui/swig/Makefile.swig.gen b/gr-qtgui/swig/Makefile.swig.gen
index 3659601c33..e343db374c 100644
--- a/gr-qtgui/swig/Makefile.swig.gen
+++ b/gr-qtgui/swig/Makefile.swig.gen
@@ -105,7 +105,7 @@ _qtgui_swig_la_CXXFLAGS =			\
 	$(qtgui_swig_la_swig_cxxflags)
 
 python/qtgui_swig.cc: qtgui_swig.py
-qtgui_swig.py: qtgui_swig.i
+qtgui_swig.py: qtgui_swig.i 
 
 # Include the python dependencies for this file
 -include python/qtgui_swig.d
-- 
cgit v1.2.3


From a444c2a5cf19333f981d007be7f6ecb96f85bb6a Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Thu, 21 Jul 2011 23:35:03 -0400
Subject: digital: moving correlate_access_code to gr-digital.

---
 gnuradio-core/src/guile/tests/general_ctors.test   |   6 -
 gnuradio-core/src/lib/general/Makefile.am          |   3 -
 gnuradio-core/src/lib/general/general.i            |   2 -
 .../src/lib/general/gr_correlate_access_code_bb.cc | 133 --------------------
 .../src/lib/general/gr_correlate_access_code_bb.h  |  83 -------------
 .../src/lib/general/gr_correlate_access_code_bb.i  |  60 ---------
 gnuradio-core/src/python/gnuradio/gr/Makefile.am   |   1 -
 .../python/gnuradio/gr/qa_correlate_access_code.py |  83 -------------
 gr-digital/lib/Makefile.am                         |   2 +
 gr-digital/lib/digital_correlate_access_code_bb.cc | 134 +++++++++++++++++++++
 gr-digital/lib/digital_correlate_access_code_bb.h  |  83 +++++++++++++
 gr-digital/python/Makefile.am                      |   4 +-
 gr-digital/python/qa_correlate_access_code.py      |  84 +++++++++++++
 gr-digital/swig/Makefile.am                        |   1 +
 gr-digital/swig/digital_correlate_access_code_bb.i |  60 +++++++++
 gr-digital/swig/digital_swig.i                     |  18 +--
 16 files changed, 377 insertions(+), 380 deletions(-)
 delete mode 100644 gnuradio-core/src/lib/general/gr_correlate_access_code_bb.cc
 delete mode 100644 gnuradio-core/src/lib/general/gr_correlate_access_code_bb.h
 delete mode 100644 gnuradio-core/src/lib/general/gr_correlate_access_code_bb.i
 delete mode 100755 gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py
 create mode 100644 gr-digital/lib/digital_correlate_access_code_bb.cc
 create mode 100644 gr-digital/lib/digital_correlate_access_code_bb.h
 create mode 100755 gr-digital/python/qa_correlate_access_code.py
 create mode 100644 gr-digital/swig/digital_correlate_access_code_bb.i

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/guile/tests/general_ctors.test b/gnuradio-core/src/guile/tests/general_ctors.test
index 26233b253d..06cd395330 100644
--- a/gnuradio-core/src/guile/tests/general_ctors.test
+++ b/gnuradio-core/src/guile/tests/general_ctors.test
@@ -100,12 +100,6 @@
 ;;; ./general/gr_copy.h
 (pass-if (true? (gr:copy 1)))
 
-;;; ./general/gr_correlate_access_code_bb.h
-(pass-if (true? (gr:correlate-access-code-bb "foo" 0)))
-(pass-if-throw "confirm throw correlate-access-code-bb" #t
-  (true? (gr:correlate-access-code-bb
-	  "00000000000000000000000000000000000000000000000000000000000000000" 0)))
-
 ;;; ./general/gr_cpfsk_bc.h
 (pass-if (true? (gr:cpfsk-bc 1 1 1)))
 
diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am
index f3244d4dbb..ed6717c4d8 100644
--- a/gnuradio-core/src/lib/general/Makefile.am
+++ b/gnuradio-core/src/lib/general/Makefile.am
@@ -53,7 +53,6 @@ libgeneral_la_SOURCES = 		\
 	gr_complex_to_xxx.cc		\
 	gr_conjugate_cc.cc		\
 	gr_copy.cc			\
-	gr_correlate_access_code_bb.cc	\
 	gr_count_bits.cc		\
 	gr_cpfsk_bc.cc			\
 	gr_crc32.cc			\
@@ -204,7 +203,6 @@ grinclude_HEADERS = 			\
 	gr_complex_to_xxx.h		\
 	gr_conjugate_cc.h		\
 	gr_copy.h			\
-	gr_correlate_access_code_bb.h	\
 	gr_count_bits.h			\
 	gr_cpfsk_bc.h			\
 	gr_crc32.h			\
@@ -372,7 +370,6 @@ swiginclude_HEADERS =			\
 	gr_complex_to_xxx.i		\
 	gr_conjugate_cc.i		\
 	gr_copy.i			\
-	gr_correlate_access_code_bb.i	\
 	gr_cpfsk_bc.i			\
 	gr_crc32.i			\
 	gr_ctcss_squelch_ff.i		\
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index 37e304481c..d4bad60b84 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -105,7 +105,6 @@
 #include <gr_test_types.h>
 #include <gr_test.h>
 #include <gr_unpack_k_bits_bb.h>
-#include <gr_correlate_access_code_bb.h>
 #include <gr_diff_phasor_cc.h>
 #include <gr_diff_encoder_bb.h>
 #include <gr_diff_decoder_bb.h>
@@ -225,7 +224,6 @@
 %include "gr_test_types.h"
 %include "gr_test.i"
 %include "gr_unpack_k_bits_bb.i"
-%include "gr_correlate_access_code_bb.i"
 %include "gr_diff_phasor_cc.i"
 %include "gr_diff_encoder_bb.i"
 %include "gr_diff_decoder_bb.i"
diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.cc b/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.cc
deleted file mode 100644
index 15f6734111..0000000000
--- a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.cc
+++ /dev/null
@@ -1,133 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2004,2006,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_correlate_access_code_bb.h>
-#include <gr_io_signature.h>
-#include <stdexcept>
-#include <gr_count_bits.h>
-#include <cstdio>
-
-
-#define VERBOSE 0
-
-
-gr_correlate_access_code_bb_sptr
-gr_make_correlate_access_code_bb (const std::string &access_code, int threshold)
-{
-  return gnuradio::get_initial_sptr(new gr_correlate_access_code_bb (access_code, threshold));
-}
-
-
-gr_correlate_access_code_bb::gr_correlate_access_code_bb (
-  const std::string &access_code, int threshold)
-  : gr_sync_block ("correlate_access_code_bb",
-		   gr_make_io_signature (1, 1, sizeof(char)),
-		   gr_make_io_signature (1, 1, sizeof(char))),
-    d_data_reg(0), d_flag_reg(0), d_flag_bit(0), d_mask(0),
-    d_threshold(threshold)
-
-{
-  if (!set_access_code(access_code)){
-    fprintf(stderr, "gr_correlate_access_code_bb: access_code is > 64 bits\n");
-    throw std::out_of_range ("access_code is > 64 bits");
-  }
-}
-
-gr_correlate_access_code_bb::~gr_correlate_access_code_bb ()
-{
-}
-
-bool
-gr_correlate_access_code_bb::set_access_code(
-  const std::string &access_code)
-{
-  unsigned len = access_code.length();	// # of bytes in string
-  if (len > 64)
-    return false;
-
-  // set len top bits to 1.
-  d_mask = ((~0ULL) >> (64 - len)) << (64 - len);
-
-  d_flag_bit = 1LL << (64 - len);	// Where we or-in new flag values.
-                                        // new data always goes in 0x0000000000000001
-  d_access_code = 0;
-  for (unsigned i=0; i < 64; i++){
-    d_access_code <<= 1;
-    if (i < len)
-      d_access_code |= access_code[i] & 1;	// look at LSB only
-  }
-
-  return true;
-}
-
-int
-gr_correlate_access_code_bb::work (int noutput_items,
-				   gr_vector_const_void_star &input_items,
-				   gr_vector_void_star &output_items)
-{
-  const unsigned char *in = (const unsigned char *) input_items[0];
-  unsigned char *out = (unsigned char *) output_items[0];
-
-  for (int i = 0; i < noutput_items; i++){
-
-    // compute output value
-    unsigned int t = 0;
-
-    t |= ((d_data_reg >> 63) & 0x1) << 0;
-    t |= ((d_flag_reg >> 63) & 0x1) << 1;	// flag bit
-    out[i] = t;
-    
-    // compute hamming distance between desired access code and current data
-    unsigned long long wrong_bits = 0;
-    unsigned int nwrong = d_threshold+1;
-    int new_flag = 0;
-
-    wrong_bits  = (d_data_reg ^ d_access_code) & d_mask;
-    nwrong = gr_count_bits64(wrong_bits);
-
-    // test for access code with up to threshold errors
-    new_flag = (nwrong <= d_threshold);
-
-#if VERBOSE
-    if(new_flag) {
-      fprintf(stderr, "access code found: %llx\n", d_access_code);
-    }
-    else {
-      fprintf(stderr, "%llx  ==>  %llx\n", d_access_code, d_data_reg);
-    }
-#endif
-
-    // shift in new data and new flag
-    d_data_reg = (d_data_reg << 1) | (in[i] & 0x1);
-    d_flag_reg = (d_flag_reg << 1);
-    if (new_flag) {
-      d_flag_reg |= d_flag_bit;
-    }
-  }
-
-  return noutput_items;
-}
-  
diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.h b/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.h
deleted file mode 100644
index 581713c147..0000000000
--- a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005,2006 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_CORRELATE_ACCESS_CODE_BB_H
-#define INCLUDED_GR_CORRELATE_ACCESS_CODE_BB_H
-
-#include <gr_sync_block.h>
-#include <string>
-
-class gr_correlate_access_code_bb;
-typedef boost::shared_ptr<gr_correlate_access_code_bb> gr_correlate_access_code_bb_sptr;
-
-/*!
- * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
- * \param threshold maximum number of bits that may be wrong
- */
-gr_correlate_access_code_bb_sptr 
-gr_make_correlate_access_code_bb (const std::string &access_code, int threshold);
-
-/*!
- * \brief Examine input for specified access code, one bit at a time.
- * \ingroup sync_blk
- *
- * input:  stream of bits, 1 bit per input byte (data in LSB)
- * output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
- *
- * Each output byte contains two valid bits, the data bit, and the
- * flag bit.  The LSB (bit 0) is the data bit, and is the original
- * input data, delayed 64 bits.  Bit 1 is the
- * flag bit and is 1 if the corresponding data bit is the first data
- * bit following the access code. Otherwise the flag bit is 0.
- */
-class gr_correlate_access_code_bb : public gr_sync_block
-{
-  friend gr_correlate_access_code_bb_sptr 
-  gr_make_correlate_access_code_bb (const std::string &access_code, int threshold);
- private:
-  unsigned long long d_access_code;	// access code to locate start of packet
-                                        //   access code is left justified in the word
-  unsigned long long d_data_reg;	// used to look for access_code
-  unsigned long long d_flag_reg;	// keep track of decisions
-  unsigned long long d_flag_bit;	// mask containing 1 bit which is location of new flag
-  unsigned long long d_mask;		// masks access_code bits (top N bits are set where
-                                        //   N is the number of bits in the access code)
-  unsigned int	     d_threshold;	// how many bits may be wrong in sync vector
-
- protected:
-  gr_correlate_access_code_bb(const std::string &access_code, int threshold);
-
- public:
-  ~gr_correlate_access_code_bb();
-
-  int work(int noutput_items,
-	   gr_vector_const_void_star &input_items,
-	   gr_vector_void_star &output_items);
-
-  
-  /*!
-   * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
-   */
-  bool set_access_code (const std::string &access_code);
-};
-
-#endif /* INCLUDED_GR_CORRELATE_ACCESS_CODE_BB_H */
diff --git a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.i b/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.i
deleted file mode 100644
index bec4282f12..0000000000
--- a/gnuradio-core/src/lib/general/gr_correlate_access_code_bb.i
+++ /dev/null
@@ -1,60 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2006 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,correlate_access_code_bb);
-
-/*!
- * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
- * \param threshold maximum number of bits that may be wrong
- */
-gr_correlate_access_code_bb_sptr 
-gr_make_correlate_access_code_bb (const std::string &access_code, int threshold) 
-  throw(std::out_of_range);
-
-/*!
- * \brief Examine input for specified access code, one bit at a time.
- * \ingroup block
- *
- * input:  stream of bits, 1 bit per input byte (data in LSB)
- * output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
- *
- * Each output byte contains two valid bits, the data bit, and the
- * flag bit.  The LSB (bit 0) is the data bit, and is the original
- * input data, delayed 64 bits.  Bit 1 is the
- * flag bit and is 1 if the corresponding data bit is the first data
- * bit following the access code. Otherwise the flag bit is 0.
- */
-class gr_correlate_access_code_bb : public gr_sync_block
-{
-  friend gr_correlate_access_code_bb_sptr 
-  gr_make_correlate_access_code_bb (const std::string &access_code, int threshold);
- protected:
-  gr_correlate_access_code_bb(const std::string &access_code, int threshold);
-
- public:
-  ~gr_correlate_access_code_bb();
-
-  /*!
-   * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
-   */
-  bool set_access_code (const std::string &access_code);
-};
diff --git a/gnuradio-core/src/python/gnuradio/gr/Makefile.am b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
index 640baf6f77..7bf1c0827e 100644
--- a/gnuradio-core/src/python/gnuradio/gr/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/gr/Makefile.am
@@ -51,7 +51,6 @@ noinst_PYTHON = 			\
 	qa_classify.py			\
 	qa_complex_to_xxx.py		\
 	qa_copy.py			\
-	qa_correlate_access_code.py	\
 	qa_delay.py			\
 	qa_dc_blocker.py		\
 	qa_diff_encoder.py		\
diff --git a/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py b/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py
deleted file mode 100755
index b3575f4e6b..0000000000
--- a/gnuradio-core/src/python/gnuradio/gr/qa_correlate_access_code.py
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2006,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
-import math
-
-default_access_code = '\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC'
-
-def string_to_1_0_list(s):
-    r = []
-    for ch in s:
-        x = ord(ch)
-        for i in range(8):
-            t = (x >> i) & 0x1
-            r.append(t)
-
-    return r
-
-def to_1_0_string(L):
-    return ''.join(map(lambda x: chr(x + ord('0')), L))
-
-class test_correlate_access_code(gr_unittest.TestCase):
-
-    def setUp(self):
-        self.tb = gr.top_block()
-
-    def tearDown(self):
-        self.tb = None
-
-    def test_001(self):
-        pad = (0,) * 64
-        #           0  0  0  1  0  0  0  1
-        src_data = (1, 0, 1, 1, 1, 1, 0, 1, 1) + pad + (0,) * 7
-        expected_result = pad + (1, 0, 1, 1, 3, 1, 0, 1, 1, 2) + (0,) * 6
-        src = gr.vector_source_b (src_data)
-        op = gr.correlate_access_code_bb("1011", 0)
-        dst = gr.vector_sink_b ()
-        self.tb.connect (src, op, dst)
-        self.tb.run ()
-        result_data = dst.data ()
-        self.assertEqual (expected_result, result_data)
-
-
-    def test_002(self):
-        code = tuple(string_to_1_0_list(default_access_code))
-        access_code = to_1_0_string(code)
-        pad = (0,) * 64
-        #print code
-        #print access_code
-        src_data = code + (1, 0, 1, 1) + pad
-        expected_result = pad + code + (3, 0, 1, 1)
-        src = gr.vector_source_b (src_data)
-        op = gr.correlate_access_code_bb(access_code, 0)
-        dst = gr.vector_sink_b ()
-        self.tb.connect (src, op, dst)
-        self.tb.run ()
-        result_data = dst.data ()
-        self.assertEqual (expected_result, result_data)
-        
-        
-
-if __name__ == '__main__':
-    gr_unittest.run(test_correlate_access_code, "test_correlate_access_code.xml")
-        
diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am
index 3d39d15dac..acefa1ef9c 100644
--- a/gr-digital/lib/Makefile.am
+++ b/gr-digital/lib/Makefile.am
@@ -31,6 +31,7 @@ grinclude_HEADERS = 				\
 	digital_constellation.h			\
 	digital_constellation_receiver_cb.h 	\
 	digital_constellation_decoder_cb.h 	\
+	digital_correlate_access_code_bb.h	\
 	digital_costas_loop_cc.h		\
 	digital_cma_equalizer_cc.h		\
 	digital_lms_dd_equalizer_cc.h		\
@@ -46,6 +47,7 @@ libgnuradio_digital_la_SOURCES = 		\
 	digital_constellation.cc		\
 	digital_constellation_receiver_cb.cc	\
 	digital_constellation_decoder_cb.cc	\
+	digital_correlate_access_code_bb.cc	\
 	digital_costas_loop_cc.cc		\
 	digital_cma_equalizer_cc.cc		\
 	digital_lms_dd_equalizer_cc.cc		\
diff --git a/gr-digital/lib/digital_correlate_access_code_bb.cc b/gr-digital/lib/digital_correlate_access_code_bb.cc
new file mode 100644
index 0000000000..f21b57d92c
--- /dev/null
+++ b/gr-digital/lib/digital_correlate_access_code_bb.cc
@@ -0,0 +1,134 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2004,2006,2010,2011 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 <digital_correlate_access_code_bb.h>
+#include <gr_io_signature.h>
+#include <stdexcept>
+#include <gr_count_bits.h>
+#include <cstdio>
+
+
+#define VERBOSE 0
+
+
+digital_correlate_access_code_bb_sptr
+digital_make_correlate_access_code_bb (const std::string &access_code, int threshold)
+{
+  return gnuradio::get_initial_sptr(new digital_correlate_access_code_bb
+				    (access_code, threshold));
+}
+
+
+digital_correlate_access_code_bb::digital_correlate_access_code_bb (
+  const std::string &access_code, int threshold)
+  : gr_sync_block ("correlate_access_code_bb",
+		   gr_make_io_signature (1, 1, sizeof(char)),
+		   gr_make_io_signature (1, 1, sizeof(char))),
+    d_data_reg(0), d_flag_reg(0), d_flag_bit(0), d_mask(0),
+    d_threshold(threshold)
+
+{
+  if (!set_access_code(access_code)){
+    fprintf(stderr, "digital_correlate_access_code_bb: access_code is > 64 bits\n");
+    throw std::out_of_range ("access_code is > 64 bits");
+  }
+}
+
+digital_correlate_access_code_bb::~digital_correlate_access_code_bb ()
+{
+}
+
+bool
+digital_correlate_access_code_bb::set_access_code(
+  const std::string &access_code)
+{
+  unsigned len = access_code.length();	// # of bytes in string
+  if (len > 64)
+    return false;
+
+  // set len top bits to 1.
+  d_mask = ((~0ULL) >> (64 - len)) << (64 - len);
+
+  d_flag_bit = 1LL << (64 - len);	// Where we or-in new flag values.
+                                        // new data always goes in 0x0000000000000001
+  d_access_code = 0;
+  for (unsigned i=0; i < 64; i++){
+    d_access_code <<= 1;
+    if (i < len)
+      d_access_code |= access_code[i] & 1;	// look at LSB only
+  }
+
+  return true;
+}
+
+int
+digital_correlate_access_code_bb::work (int noutput_items,
+					gr_vector_const_void_star &input_items,
+					gr_vector_void_star &output_items)
+{
+  const unsigned char *in = (const unsigned char *) input_items[0];
+  unsigned char *out = (unsigned char *) output_items[0];
+
+  for (int i = 0; i < noutput_items; i++){
+
+    // compute output value
+    unsigned int t = 0;
+
+    t |= ((d_data_reg >> 63) & 0x1) << 0;
+    t |= ((d_flag_reg >> 63) & 0x1) << 1;	// flag bit
+    out[i] = t;
+    
+    // compute hamming distance between desired access code and current data
+    unsigned long long wrong_bits = 0;
+    unsigned int nwrong = d_threshold+1;
+    int new_flag = 0;
+
+    wrong_bits  = (d_data_reg ^ d_access_code) & d_mask;
+    nwrong = gr_count_bits64(wrong_bits);
+
+    // test for access code with up to threshold errors
+    new_flag = (nwrong <= d_threshold);
+
+#if VERBOSE
+    if(new_flag) {
+      fprintf(stderr, "access code found: %llx\n", d_access_code);
+    }
+    else {
+      fprintf(stderr, "%llx  ==>  %llx\n", d_access_code, d_data_reg);
+    }
+#endif
+
+    // shift in new data and new flag
+    d_data_reg = (d_data_reg << 1) | (in[i] & 0x1);
+    d_flag_reg = (d_flag_reg << 1);
+    if (new_flag) {
+      d_flag_reg |= d_flag_bit;
+    }
+  }
+
+  return noutput_items;
+}
+  
diff --git a/gr-digital/lib/digital_correlate_access_code_bb.h b/gr-digital/lib/digital_correlate_access_code_bb.h
new file mode 100644
index 0000000000..2607ae84c2
--- /dev/null
+++ b/gr-digital/lib/digital_correlate_access_code_bb.h
@@ -0,0 +1,83 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2006,2011 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_DIGITAL_CORRELATE_ACCESS_CODE_BB_H
+#define INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H
+
+#include <gr_sync_block.h>
+#include <string>
+
+class digital_correlate_access_code_bb;
+typedef boost::shared_ptr<digital_correlate_access_code_bb> digital_correlate_access_code_bb_sptr;
+
+/*!
+ * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
+ * \param threshold maximum number of bits that may be wrong
+ */
+digital_correlate_access_code_bb_sptr 
+digital_make_correlate_access_code_bb (const std::string &access_code, int threshold);
+
+/*!
+ * \brief Examine input for specified access code, one bit at a time.
+ * \ingroup sync_blk
+ *
+ * input:  stream of bits, 1 bit per input byte (data in LSB)
+ * output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
+ *
+ * Each output byte contains two valid bits, the data bit, and the
+ * flag bit.  The LSB (bit 0) is the data bit, and is the original
+ * input data, delayed 64 bits.  Bit 1 is the
+ * flag bit and is 1 if the corresponding data bit is the first data
+ * bit following the access code. Otherwise the flag bit is 0.
+ */
+class digital_correlate_access_code_bb : public gr_sync_block
+{
+  friend digital_correlate_access_code_bb_sptr 
+  digital_make_correlate_access_code_bb (const std::string &access_code, int threshold);
+ private:
+  unsigned long long d_access_code;	// access code to locate start of packet
+                                        //   access code is left justified in the word
+  unsigned long long d_data_reg;	// used to look for access_code
+  unsigned long long d_flag_reg;	// keep track of decisions
+  unsigned long long d_flag_bit;	// mask containing 1 bit which is location of new flag
+  unsigned long long d_mask;		// masks access_code bits (top N bits are set where
+                                        //   N is the number of bits in the access code)
+  unsigned int	     d_threshold;	// how many bits may be wrong in sync vector
+
+ protected:
+  digital_correlate_access_code_bb(const std::string &access_code, int threshold);
+
+ public:
+  ~digital_correlate_access_code_bb();
+
+  int work(int noutput_items,
+	   gr_vector_const_void_star &input_items,
+	   gr_vector_void_star &output_items);
+
+  
+  /*!
+   * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
+   */
+  bool set_access_code (const std::string &access_code);
+};
+
+#endif /* INCLUDED_DIGITAL_CORRELATE_ACCESS_CODE_BB_H */
diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am
index e0cf477c56..0f68c6ded2 100644
--- a/gr-digital/python/Makefile.am
+++ b/gr-digital/python/Makefile.am
@@ -37,7 +37,9 @@ noinst_PYTHON = \
 	qa_constellation.py		\
 	qa_constellation_receiver.py	\
 	qa_constellation_decoder_cb.py	\
-	qa_costas_loop_cc.py
+	qa_correlate_access_code.py	\
+	qa_costas_loop_cc.py		\
+	qa_lms_equalizer.py
 
 digital_PYTHON = \
 	__init__.py	\
diff --git a/gr-digital/python/qa_correlate_access_code.py b/gr-digital/python/qa_correlate_access_code.py
new file mode 100755
index 0000000000..6b6f25051e
--- /dev/null
+++ b/gr-digital/python/qa_correlate_access_code.py
@@ -0,0 +1,84 @@
+#!/usr/bin/env python
+#
+# Copyright 2006,2007,2010,2011 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
+import digital_swig
+import math
+
+default_access_code = '\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC'
+
+def string_to_1_0_list(s):
+    r = []
+    for ch in s:
+        x = ord(ch)
+        for i in range(8):
+            t = (x >> i) & 0x1
+            r.append(t)
+
+    return r
+
+def to_1_0_string(L):
+    return ''.join(map(lambda x: chr(x + ord('0')), L))
+
+class test_correlate_access_code(gr_unittest.TestCase):
+
+    def setUp(self):
+        self.tb = gr.top_block()
+
+    def tearDown(self):
+        self.tb = None
+
+    def test_001(self):
+        pad = (0,) * 64
+        #           0  0  0  1  0  0  0  1
+        src_data = (1, 0, 1, 1, 1, 1, 0, 1, 1) + pad + (0,) * 7
+        expected_result = pad + (1, 0, 1, 1, 3, 1, 0, 1, 1, 2) + (0,) * 6
+        src = gr.vector_source_b (src_data)
+        op = digital_swig.correlate_access_code_bb("1011", 0)
+        dst = gr.vector_sink_b ()
+        self.tb.connect (src, op, dst)
+        self.tb.run ()
+        result_data = dst.data ()
+        self.assertEqual (expected_result, result_data)
+
+
+    def test_002(self):
+        code = tuple(string_to_1_0_list(default_access_code))
+        access_code = to_1_0_string(code)
+        pad = (0,) * 64
+        #print code
+        #print access_code
+        src_data = code + (1, 0, 1, 1) + pad
+        expected_result = pad + code + (3, 0, 1, 1)
+        src = gr.vector_source_b (src_data)
+        op = digital_swig.correlate_access_code_bb(access_code, 0)
+        dst = gr.vector_sink_b ()
+        self.tb.connect (src, op, dst)
+        self.tb.run ()
+        result_data = dst.data ()
+        self.assertEqual (expected_result, result_data)
+        
+        
+
+if __name__ == '__main__':
+    gr_unittest.run(test_correlate_access_code, "test_correlate_access_code.xml")
+        
diff --git a/gr-digital/swig/Makefile.am b/gr-digital/swig/Makefile.am
index aad63ee449..df8f184b3f 100644
--- a/gr-digital/swig/Makefile.am
+++ b/gr-digital/swig/Makefile.am
@@ -64,6 +64,7 @@ digital_swig_swiginclude_headers =		\
 	digital_constellation.i			\
 	digital_constellation_receiver_cb.i 	\
 	digital_constellation_decoder_cb.i	\
+	digital_correlate_access_code_bb.i	\
 	digital_costas_loop_cc.i		\
 	digital_cma_equalizer_cc.i		\
 	digital_lms_dd_equalizer_cc.i		\
diff --git a/gr-digital/swig/digital_correlate_access_code_bb.i b/gr-digital/swig/digital_correlate_access_code_bb.i
new file mode 100644
index 0000000000..01087b8e93
--- /dev/null
+++ b/gr-digital/swig/digital_correlate_access_code_bb.i
@@ -0,0 +1,60 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2006,2011 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(digital,correlate_access_code_bb);
+
+/*!
+ * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
+ * \param threshold maximum number of bits that may be wrong
+ */
+digital_correlate_access_code_bb_sptr 
+digital_make_correlate_access_code_bb (const std::string &access_code, int threshold) 
+  throw(std::out_of_range);
+
+/*!
+ * \brief Examine input for specified access code, one bit at a time.
+ * \ingroup block
+ *
+ * input:  stream of bits, 1 bit per input byte (data in LSB)
+ * output: stream of bits, 2 bits per output byte (data in LSB, flag in next higher bit)
+ *
+ * Each output byte contains two valid bits, the data bit, and the
+ * flag bit.  The LSB (bit 0) is the data bit, and is the original
+ * input data, delayed 64 bits.  Bit 1 is the
+ * flag bit and is 1 if the corresponding data bit is the first data
+ * bit following the access code. Otherwise the flag bit is 0.
+ */
+class digital_correlate_access_code_bb : public gr_sync_block
+{
+  friend digital_correlate_access_code_bb_sptr 
+  digital_make_correlate_access_code_bb (const std::string &access_code, int threshold);
+ protected:
+  digital_correlate_access_code_bb(const std::string &access_code, int threshold);
+
+ public:
+  ~digital_correlate_access_code_bb();
+
+  /*!
+   * \param access_code is represented with 1 byte per bit, e.g., "010101010111000100"
+   */
+  bool set_access_code (const std::string &access_code);
+};
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index dd4f3c02ce..23459a1e57 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -23,23 +23,25 @@
 
 %{
 #include "digital_binary_slicer_fb.h"
+#include "digital_cma_equalizer_cc.h"
 #include "digital_constellation.h"
+#include "digital_constellation_decoder_cb.h"
+#include "digital_constellation_receiver_cb.h"
+#include "digital_correlate_access_code_bb.h"
 #include "digital_costas_loop_cc.h"
-#include "digital_cma_equalizer_cc.h"
-#include "digital_lms_dd_equalizer_cc.h"
 #include "digital_kurtotic_equalizer_cc.h"
-#include "digital_constellation_receiver_cb.h"
-#include "digital_constellation_decoder_cb.h"
+#include "digital_lms_dd_equalizer_cc.h"
 %}
 
 %include "digital_binary_slicer_fb.i"
+%include "digital_cma_equalizer_cc.i"
 %include "digital_constellation.i"
+%include "digital_constellation_decoder_cb.i"
+%include "digital_constellation_receiver_cb.i"
+%include "digital_correlate_access_code_bb.i"
 %include "digital_costas_loop_cc.i"
-%include "digital_cma_equalizer_cc.i"
-%include "digital_lms_dd_equalizer_cc.i"
 %include "digital_kurtotic_equalizer_cc.i"
-%include "digital_constellation_receiver_cb.i"
-%include "digital_constellation_decoder_cb.i"
+%include "digital_lms_dd_equalizer_cc.i"
 
 #if SWIGGUILE
 %scheme %{
-- 
cgit v1.2.3


From 1cb52da49230c64c3719b4ab944ba1cf5a9abb92 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Sun, 24 Jul 2011 13:25:27 -0400
Subject: digital: moved CRC32 from gnuradio-core to gr-digital. Also added QA
 code for it.

---
 gnuradio-core/src/lib/general/Makefile.am        |   3 -
 gnuradio-core/src/lib/general/general.i          |   2 -
 gnuradio-core/src/lib/general/gr_crc32.cc        | 130 -----------------------
 gnuradio-core/src/lib/general/gr_crc32.h         |  50 ---------
 gnuradio-core/src/lib/general/gr_crc32.i         |  27 -----
 gnuradio-core/src/python/gnuradio/gruimpl/crc.py |  38 -------
 gr-digital/lib/Makefile.am                       |   2 +
 gr-digital/lib/digital_crc32.cc                  | 130 +++++++++++++++++++++++
 gr-digital/lib/digital_crc32.h                   |  50 +++++++++
 gr-digital/python/Makefile.am                    |  12 ++-
 gr-digital/python/crc.py                         |  37 +++++++
 gr-digital/python/qa_crc32.py                    |  60 +++++++++++
 gr-digital/swig/Makefile.am                      |   1 +
 gr-digital/swig/digital_crc32.i                  |  27 +++++
 gr-digital/swig/digital_swig.i                   |   2 +
 15 files changed, 316 insertions(+), 255 deletions(-)
 delete mode 100644 gnuradio-core/src/lib/general/gr_crc32.cc
 delete mode 100644 gnuradio-core/src/lib/general/gr_crc32.h
 delete mode 100644 gnuradio-core/src/lib/general/gr_crc32.i
 delete mode 100644 gnuradio-core/src/python/gnuradio/gruimpl/crc.py
 create mode 100644 gr-digital/lib/digital_crc32.cc
 create mode 100644 gr-digital/lib/digital_crc32.h
 create mode 100644 gr-digital/python/crc.py
 create mode 100644 gr-digital/python/qa_crc32.py
 create mode 100644 gr-digital/swig/digital_crc32.i

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/lib/general/Makefile.am b/gnuradio-core/src/lib/general/Makefile.am
index ed6717c4d8..7382df7214 100644
--- a/gnuradio-core/src/lib/general/Makefile.am
+++ b/gnuradio-core/src/lib/general/Makefile.am
@@ -55,7 +55,6 @@ libgeneral_la_SOURCES = 		\
 	gr_copy.cc			\
 	gr_count_bits.cc		\
 	gr_cpfsk_bc.cc			\
-	gr_crc32.cc			\
 	gr_ctcss_squelch_ff.cc		\
 	gr_decode_ccsds_27_fb.cc	\
 	gr_deinterleave.cc		\
@@ -205,7 +204,6 @@ grinclude_HEADERS = 			\
 	gr_copy.h			\
 	gr_count_bits.h			\
 	gr_cpfsk_bc.h			\
-	gr_crc32.h			\
 	gr_ctcss_squelch_ff.h		\
 	gr_decode_ccsds_27_fb.h		\
 	gr_diff_decoder_bb.h		\
@@ -371,7 +369,6 @@ swiginclude_HEADERS =			\
 	gr_conjugate_cc.i		\
 	gr_copy.i			\
 	gr_cpfsk_bc.i			\
-	gr_crc32.i			\
 	gr_ctcss_squelch_ff.i		\
 	gr_decode_ccsds_27_fb.i		\
 	gr_diff_decoder_bb.i		\
diff --git a/gnuradio-core/src/lib/general/general.i b/gnuradio-core/src/lib/general/general.i
index d4bad60b84..d10b6ecfb2 100644
--- a/gnuradio-core/src/lib/general/general.i
+++ b/gnuradio-core/src/lib/general/general.i
@@ -77,7 +77,6 @@
 #include <gr_vector_to_streams.h>
 #include <gr_conjugate_cc.h>
 #include <gr_vco_f.h>
-#include <gr_crc32.h>
 #include <gr_threshold_ff.h>
 #include <gr_packet_sink.h>
 #include <gr_dpll_bb.h>
@@ -196,7 +195,6 @@
 %include "gr_vector_to_streams.i"
 %include "gr_conjugate_cc.i"
 %include "gr_vco_f.i"
-%include "gr_crc32.i"
 %include "gr_threshold_ff.i"
 %include "gr_packet_sink.i"
 %include "gr_dpll_bb.i"
diff --git a/gnuradio-core/src/lib/general/gr_crc32.cc b/gnuradio-core/src/lib/general/gr_crc32.cc
deleted file mode 100644
index d4e8435286..0000000000
--- a/gnuradio-core/src/lib/general/gr_crc32.cc
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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.
- */
-
-/*
- * See also ISO 3309 [ISO-3309] or ITU-T V.42 [ITU-V42] for a formal specification.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <gr_crc32.h>
-
-   
-// Automatically generated CRC function
-// polynomial: 0x104C11DB7
-unsigned int
-gr_update_crc32(unsigned int crc, const unsigned char *data, size_t len)
-{
-    static const unsigned int table[256] = {
-    0x00000000U,0x04C11DB7U,0x09823B6EU,0x0D4326D9U,
-    0x130476DCU,0x17C56B6BU,0x1A864DB2U,0x1E475005U,
-    0x2608EDB8U,0x22C9F00FU,0x2F8AD6D6U,0x2B4BCB61U,
-    0x350C9B64U,0x31CD86D3U,0x3C8EA00AU,0x384FBDBDU,
-    0x4C11DB70U,0x48D0C6C7U,0x4593E01EU,0x4152FDA9U,
-    0x5F15ADACU,0x5BD4B01BU,0x569796C2U,0x52568B75U,
-    0x6A1936C8U,0x6ED82B7FU,0x639B0DA6U,0x675A1011U,
-    0x791D4014U,0x7DDC5DA3U,0x709F7B7AU,0x745E66CDU,
-    0x9823B6E0U,0x9CE2AB57U,0x91A18D8EU,0x95609039U,
-    0x8B27C03CU,0x8FE6DD8BU,0x82A5FB52U,0x8664E6E5U,
-    0xBE2B5B58U,0xBAEA46EFU,0xB7A96036U,0xB3687D81U,
-    0xAD2F2D84U,0xA9EE3033U,0xA4AD16EAU,0xA06C0B5DU,
-    0xD4326D90U,0xD0F37027U,0xDDB056FEU,0xD9714B49U,
-    0xC7361B4CU,0xC3F706FBU,0xCEB42022U,0xCA753D95U,
-    0xF23A8028U,0xF6FB9D9FU,0xFBB8BB46U,0xFF79A6F1U,
-    0xE13EF6F4U,0xE5FFEB43U,0xE8BCCD9AU,0xEC7DD02DU,
-    0x34867077U,0x30476DC0U,0x3D044B19U,0x39C556AEU,
-    0x278206ABU,0x23431B1CU,0x2E003DC5U,0x2AC12072U,
-    0x128E9DCFU,0x164F8078U,0x1B0CA6A1U,0x1FCDBB16U,
-    0x018AEB13U,0x054BF6A4U,0x0808D07DU,0x0CC9CDCAU,
-    0x7897AB07U,0x7C56B6B0U,0x71159069U,0x75D48DDEU,
-    0x6B93DDDBU,0x6F52C06CU,0x6211E6B5U,0x66D0FB02U,
-    0x5E9F46BFU,0x5A5E5B08U,0x571D7DD1U,0x53DC6066U,
-    0x4D9B3063U,0x495A2DD4U,0x44190B0DU,0x40D816BAU,
-    0xACA5C697U,0xA864DB20U,0xA527FDF9U,0xA1E6E04EU,
-    0xBFA1B04BU,0xBB60ADFCU,0xB6238B25U,0xB2E29692U,
-    0x8AAD2B2FU,0x8E6C3698U,0x832F1041U,0x87EE0DF6U,
-    0x99A95DF3U,0x9D684044U,0x902B669DU,0x94EA7B2AU,
-    0xE0B41DE7U,0xE4750050U,0xE9362689U,0xEDF73B3EU,
-    0xF3B06B3BU,0xF771768CU,0xFA325055U,0xFEF34DE2U,
-    0xC6BCF05FU,0xC27DEDE8U,0xCF3ECB31U,0xCBFFD686U,
-    0xD5B88683U,0xD1799B34U,0xDC3ABDEDU,0xD8FBA05AU,
-    0x690CE0EEU,0x6DCDFD59U,0x608EDB80U,0x644FC637U,
-    0x7A089632U,0x7EC98B85U,0x738AAD5CU,0x774BB0EBU,
-    0x4F040D56U,0x4BC510E1U,0x46863638U,0x42472B8FU,
-    0x5C007B8AU,0x58C1663DU,0x558240E4U,0x51435D53U,
-    0x251D3B9EU,0x21DC2629U,0x2C9F00F0U,0x285E1D47U,
-    0x36194D42U,0x32D850F5U,0x3F9B762CU,0x3B5A6B9BU,
-    0x0315D626U,0x07D4CB91U,0x0A97ED48U,0x0E56F0FFU,
-    0x1011A0FAU,0x14D0BD4DU,0x19939B94U,0x1D528623U,
-    0xF12F560EU,0xF5EE4BB9U,0xF8AD6D60U,0xFC6C70D7U,
-    0xE22B20D2U,0xE6EA3D65U,0xEBA91BBCU,0xEF68060BU,
-    0xD727BBB6U,0xD3E6A601U,0xDEA580D8U,0xDA649D6FU,
-    0xC423CD6AU,0xC0E2D0DDU,0xCDA1F604U,0xC960EBB3U,
-    0xBD3E8D7EU,0xB9FF90C9U,0xB4BCB610U,0xB07DABA7U,
-    0xAE3AFBA2U,0xAAFBE615U,0xA7B8C0CCU,0xA379DD7BU,
-    0x9B3660C6U,0x9FF77D71U,0x92B45BA8U,0x9675461FU,
-    0x8832161AU,0x8CF30BADU,0x81B02D74U,0x857130C3U,
-    0x5D8A9099U,0x594B8D2EU,0x5408ABF7U,0x50C9B640U,
-    0x4E8EE645U,0x4A4FFBF2U,0x470CDD2BU,0x43CDC09CU,
-    0x7B827D21U,0x7F436096U,0x7200464FU,0x76C15BF8U,
-    0x68860BFDU,0x6C47164AU,0x61043093U,0x65C52D24U,
-    0x119B4BE9U,0x155A565EU,0x18197087U,0x1CD86D30U,
-    0x029F3D35U,0x065E2082U,0x0B1D065BU,0x0FDC1BECU,
-    0x3793A651U,0x3352BBE6U,0x3E119D3FU,0x3AD08088U,
-    0x2497D08DU,0x2056CD3AU,0x2D15EBE3U,0x29D4F654U,
-    0xC5A92679U,0xC1683BCEU,0xCC2B1D17U,0xC8EA00A0U,
-    0xD6AD50A5U,0xD26C4D12U,0xDF2F6BCBU,0xDBEE767CU,
-    0xE3A1CBC1U,0xE760D676U,0xEA23F0AFU,0xEEE2ED18U,
-    0xF0A5BD1DU,0xF464A0AAU,0xF9278673U,0xFDE69BC4U,
-    0x89B8FD09U,0x8D79E0BEU,0x803AC667U,0x84FBDBD0U,
-    0x9ABC8BD5U,0x9E7D9662U,0x933EB0BBU,0x97FFAD0CU,
-    0xAFB010B1U,0xAB710D06U,0xA6322BDFU,0xA2F33668U,
-    0xBCB4666DU,0xB8757BDAU,0xB5365D03U,0xB1F740B4U,
-    };
-  
-    while (len > 0)
-    {
-      crc = table[*data ^ ((crc >> 24) & 0xff)] ^ (crc << 8);
-      data++;
-      len--;
-    }
-    return crc;
-}
-
-unsigned int
-gr_update_crc32(unsigned int crc, const std::string s)
-{
-  return gr_update_crc32(crc, (const unsigned char *) s.data(), s.size());
-}
-    
-unsigned int
-gr_crc32(const unsigned char *buf, size_t len)
-{
-  return gr_update_crc32(0xffffffff, buf, len) ^ 0xffffffff;
-}
-
-unsigned int
-gr_crc32(const std::string s)
-{
-  return gr_crc32((const unsigned char *) s.data(), s.size());
-}
diff --git a/gnuradio-core/src/lib/general/gr_crc32.h b/gnuradio-core/src/lib/general/gr_crc32.h
deleted file mode 100644
index 87a8d15f29..0000000000
--- a/gnuradio-core/src/lib/general/gr_crc32.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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_CRC32_H
-#define INCLUDED_GR_CRC32_H
-
-#include <string>
-#include <gr_types.h>
-
-/*!
- * \brief update running CRC-32
- * \ingroup misc
- *
- * Update a running CRC with the bytes buf[0..len-1] The CRC should be
- * initialized to all 1's, and the transmitted value is the 1's
- * complement of the final running CRC.  The resulting CRC should be
- * transmitted in big endian order.
- */
-unsigned int 
-gr_update_crc32(unsigned int crc, const unsigned char *buf, size_t len);
-
-unsigned int 
-gr_update_crc32(unsigned int crc, const std::string buf);
-
-unsigned int 
-gr_crc32(const unsigned char *buf, size_t len);
-
-unsigned int 
-gr_crc32(const std::string buf);
-
-#endif /* INCLUDED_CRC32_H */
diff --git a/gnuradio-core/src/lib/general/gr_crc32.i b/gnuradio-core/src/lib/general/gr_crc32.i
deleted file mode 100644
index 7dca5c6a12..0000000000
--- a/gnuradio-core/src/lib/general/gr_crc32.i
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2005 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.
- */
-
-%rename(update_crc32) gr_update_crc32;
-%rename(crc32) gr_crc32;
-
-unsigned int gr_update_crc32(unsigned int crc, const std::string buf);
-unsigned int gr_crc32(const std::string buf);
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/crc.py b/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
deleted file mode 100644
index d31aca0ea7..0000000000
--- a/gnuradio-core/src/python/gnuradio/gruimpl/crc.py
+++ /dev/null
@@ -1,38 +0,0 @@
-#
-# Copyright 2005,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.
-# 
-
-from gnuradio import gr
-from hexint import *
-import struct
-
-def gen_and_append_crc32(s):
-    crc = gr.crc32(s)
-    return s + struct.pack(">I", hexint(crc) & 0xFFFFFFFF)
-
-def check_crc32(s):
-    if len(s) < 4:
-        return (False, '')
-    msg = s[:-4]
-    #print "msg = '%s'" % (msg,)
-    actual = gr.crc32(msg)
-    (expected,) = struct.unpack(">I", s[-4:])
-    # print "actual =", hex(actual), "expected =", hex(expected)
-    return (actual == expected, msg)
diff --git a/gr-digital/lib/Makefile.am b/gr-digital/lib/Makefile.am
index acefa1ef9c..e3cbbe7ea6 100644
--- a/gr-digital/lib/Makefile.am
+++ b/gr-digital/lib/Makefile.am
@@ -34,6 +34,7 @@ grinclude_HEADERS = 				\
 	digital_correlate_access_code_bb.h	\
 	digital_costas_loop_cc.h		\
 	digital_cma_equalizer_cc.h		\
+	digital_crc32.h				\
 	digital_lms_dd_equalizer_cc.h		\
 	digital_kurtotic_equalizer_cc.h 	\
 	digital_metric_type.h
@@ -50,6 +51,7 @@ libgnuradio_digital_la_SOURCES = 		\
 	digital_correlate_access_code_bb.cc	\
 	digital_costas_loop_cc.cc		\
 	digital_cma_equalizer_cc.cc		\
+	digital_crc32.cc			\
 	digital_lms_dd_equalizer_cc.cc		\
 	digital_kurtotic_equalizer_cc.cc
 
diff --git a/gr-digital/lib/digital_crc32.cc b/gr-digital/lib/digital_crc32.cc
new file mode 100644
index 0000000000..8806d6e9c7
--- /dev/null
+++ b/gr-digital/lib/digital_crc32.cc
@@ -0,0 +1,130 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2011 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.
+ */
+
+/*
+ * See also ISO 3309 [ISO-3309] or ITU-T V.42 [ITU-V42] for a formal specification.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+#include <digital_crc32.h>
+
+   
+// Automatically generated CRC function
+// polynomial: 0x104C11DB7
+unsigned int
+digital_update_crc32(unsigned int crc, const unsigned char *data, size_t len)
+{
+    static const unsigned int table[256] = {
+    0x00000000U,0x04C11DB7U,0x09823B6EU,0x0D4326D9U,
+    0x130476DCU,0x17C56B6BU,0x1A864DB2U,0x1E475005U,
+    0x2608EDB8U,0x22C9F00FU,0x2F8AD6D6U,0x2B4BCB61U,
+    0x350C9B64U,0x31CD86D3U,0x3C8EA00AU,0x384FBDBDU,
+    0x4C11DB70U,0x48D0C6C7U,0x4593E01EU,0x4152FDA9U,
+    0x5F15ADACU,0x5BD4B01BU,0x569796C2U,0x52568B75U,
+    0x6A1936C8U,0x6ED82B7FU,0x639B0DA6U,0x675A1011U,
+    0x791D4014U,0x7DDC5DA3U,0x709F7B7AU,0x745E66CDU,
+    0x9823B6E0U,0x9CE2AB57U,0x91A18D8EU,0x95609039U,
+    0x8B27C03CU,0x8FE6DD8BU,0x82A5FB52U,0x8664E6E5U,
+    0xBE2B5B58U,0xBAEA46EFU,0xB7A96036U,0xB3687D81U,
+    0xAD2F2D84U,0xA9EE3033U,0xA4AD16EAU,0xA06C0B5DU,
+    0xD4326D90U,0xD0F37027U,0xDDB056FEU,0xD9714B49U,
+    0xC7361B4CU,0xC3F706FBU,0xCEB42022U,0xCA753D95U,
+    0xF23A8028U,0xF6FB9D9FU,0xFBB8BB46U,0xFF79A6F1U,
+    0xE13EF6F4U,0xE5FFEB43U,0xE8BCCD9AU,0xEC7DD02DU,
+    0x34867077U,0x30476DC0U,0x3D044B19U,0x39C556AEU,
+    0x278206ABU,0x23431B1CU,0x2E003DC5U,0x2AC12072U,
+    0x128E9DCFU,0x164F8078U,0x1B0CA6A1U,0x1FCDBB16U,
+    0x018AEB13U,0x054BF6A4U,0x0808D07DU,0x0CC9CDCAU,
+    0x7897AB07U,0x7C56B6B0U,0x71159069U,0x75D48DDEU,
+    0x6B93DDDBU,0x6F52C06CU,0x6211E6B5U,0x66D0FB02U,
+    0x5E9F46BFU,0x5A5E5B08U,0x571D7DD1U,0x53DC6066U,
+    0x4D9B3063U,0x495A2DD4U,0x44190B0DU,0x40D816BAU,
+    0xACA5C697U,0xA864DB20U,0xA527FDF9U,0xA1E6E04EU,
+    0xBFA1B04BU,0xBB60ADFCU,0xB6238B25U,0xB2E29692U,
+    0x8AAD2B2FU,0x8E6C3698U,0x832F1041U,0x87EE0DF6U,
+    0x99A95DF3U,0x9D684044U,0x902B669DU,0x94EA7B2AU,
+    0xE0B41DE7U,0xE4750050U,0xE9362689U,0xEDF73B3EU,
+    0xF3B06B3BU,0xF771768CU,0xFA325055U,0xFEF34DE2U,
+    0xC6BCF05FU,0xC27DEDE8U,0xCF3ECB31U,0xCBFFD686U,
+    0xD5B88683U,0xD1799B34U,0xDC3ABDEDU,0xD8FBA05AU,
+    0x690CE0EEU,0x6DCDFD59U,0x608EDB80U,0x644FC637U,
+    0x7A089632U,0x7EC98B85U,0x738AAD5CU,0x774BB0EBU,
+    0x4F040D56U,0x4BC510E1U,0x46863638U,0x42472B8FU,
+    0x5C007B8AU,0x58C1663DU,0x558240E4U,0x51435D53U,
+    0x251D3B9EU,0x21DC2629U,0x2C9F00F0U,0x285E1D47U,
+    0x36194D42U,0x32D850F5U,0x3F9B762CU,0x3B5A6B9BU,
+    0x0315D626U,0x07D4CB91U,0x0A97ED48U,0x0E56F0FFU,
+    0x1011A0FAU,0x14D0BD4DU,0x19939B94U,0x1D528623U,
+    0xF12F560EU,0xF5EE4BB9U,0xF8AD6D60U,0xFC6C70D7U,
+    0xE22B20D2U,0xE6EA3D65U,0xEBA91BBCU,0xEF68060BU,
+    0xD727BBB6U,0xD3E6A601U,0xDEA580D8U,0xDA649D6FU,
+    0xC423CD6AU,0xC0E2D0DDU,0xCDA1F604U,0xC960EBB3U,
+    0xBD3E8D7EU,0xB9FF90C9U,0xB4BCB610U,0xB07DABA7U,
+    0xAE3AFBA2U,0xAAFBE615U,0xA7B8C0CCU,0xA379DD7BU,
+    0x9B3660C6U,0x9FF77D71U,0x92B45BA8U,0x9675461FU,
+    0x8832161AU,0x8CF30BADU,0x81B02D74U,0x857130C3U,
+    0x5D8A9099U,0x594B8D2EU,0x5408ABF7U,0x50C9B640U,
+    0x4E8EE645U,0x4A4FFBF2U,0x470CDD2BU,0x43CDC09CU,
+    0x7B827D21U,0x7F436096U,0x7200464FU,0x76C15BF8U,
+    0x68860BFDU,0x6C47164AU,0x61043093U,0x65C52D24U,
+    0x119B4BE9U,0x155A565EU,0x18197087U,0x1CD86D30U,
+    0x029F3D35U,0x065E2082U,0x0B1D065BU,0x0FDC1BECU,
+    0x3793A651U,0x3352BBE6U,0x3E119D3FU,0x3AD08088U,
+    0x2497D08DU,0x2056CD3AU,0x2D15EBE3U,0x29D4F654U,
+    0xC5A92679U,0xC1683BCEU,0xCC2B1D17U,0xC8EA00A0U,
+    0xD6AD50A5U,0xD26C4D12U,0xDF2F6BCBU,0xDBEE767CU,
+    0xE3A1CBC1U,0xE760D676U,0xEA23F0AFU,0xEEE2ED18U,
+    0xF0A5BD1DU,0xF464A0AAU,0xF9278673U,0xFDE69BC4U,
+    0x89B8FD09U,0x8D79E0BEU,0x803AC667U,0x84FBDBD0U,
+    0x9ABC8BD5U,0x9E7D9662U,0x933EB0BBU,0x97FFAD0CU,
+    0xAFB010B1U,0xAB710D06U,0xA6322BDFU,0xA2F33668U,
+    0xBCB4666DU,0xB8757BDAU,0xB5365D03U,0xB1F740B4U,
+    };
+  
+    while (len > 0)
+    {
+      crc = table[*data ^ ((crc >> 24) & 0xff)] ^ (crc << 8);
+      data++;
+      len--;
+    }
+    return crc;
+}
+
+unsigned int
+digital_update_crc32(unsigned int crc, const std::string s)
+{
+  return digital_update_crc32(crc, (const unsigned char *) s.data(), s.size());
+}
+    
+unsigned int
+digital_crc32(const unsigned char *buf, size_t len)
+{
+  return digital_update_crc32(0xffffffff, buf, len) ^ 0xffffffff;
+}
+
+unsigned int
+digital_crc32(const std::string s)
+{
+  return digital_crc32((const unsigned char *) s.data(), s.size());
+}
diff --git a/gr-digital/lib/digital_crc32.h b/gr-digital/lib/digital_crc32.h
new file mode 100644
index 0000000000..64aa12f7b4
--- /dev/null
+++ b/gr-digital/lib/digital_crc32.h
@@ -0,0 +1,50 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2011 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_DIGITAL_CRC32_H
+#define INCLUDED_DIGITAL_CRC32_H
+
+#include <string>
+#include <gr_types.h>
+
+/*!
+ * \brief update running CRC-32
+ * \ingroup misc
+ *
+ * Update a running CRC with the bytes buf[0..len-1] The CRC should be
+ * initialized to all 1's, and the transmitted value is the 1's
+ * complement of the final running CRC.  The resulting CRC should be
+ * transmitted in big endian order.
+ */
+unsigned int 
+digital_update_crc32(unsigned int crc, const unsigned char *buf, size_t len);
+
+unsigned int 
+digital_update_crc32(unsigned int crc, const std::string buf);
+
+unsigned int 
+digital_crc32(const unsigned char *buf, size_t len);
+
+unsigned int 
+digital_crc32(const std::string buf);
+
+#endif /* INCLUDED_CRC32_H */
diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am
index a6d9f779d1..09be67f3a5 100644
--- a/gr-digital/python/Makefile.am
+++ b/gr-digital/python/Makefile.am
@@ -40,18 +40,20 @@ noinst_PYTHON = \
 	qa_constellation_decoder_cb.py	\
 	qa_correlate_access_code.py	\
 	qa_costas_loop_cc.py		\
+	qa_crc32.py			\
 	qa_lms_equalizer.py
 
 digital_PYTHON = \
 	__init__.py	\
-	psk.py		\
+	crc.py		\
+	bpsk.py		\
 	dbpsk.py	\
 	dqpsk.py	\
 	d8psk.py	\
-	psk2.py		\
 	generic_mod_demod.py	\
+	gmsk.py		\
+	psk.py		\
+	psk2.py		\
 	qam.py		\
-	bpsk.py		\
-	qpsk.py		\
-	gmsk.py
+	qpsk.py
 endif
diff --git a/gr-digital/python/crc.py b/gr-digital/python/crc.py
new file mode 100644
index 0000000000..f9d369f4cb
--- /dev/null
+++ b/gr-digital/python/crc.py
@@ -0,0 +1,37 @@
+#
+# Copyright 2005,2007,2011 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, gru
+import struct
+
+def gen_and_append_crc32(s):
+    crc = gr.crc32(s)
+    return s + struct.pack(">I", gru.hexint(crc) & 0xFFFFFFFF)
+
+def check_crc32(s):
+    if len(s) < 4:
+        return (False, '')
+    msg = s[:-4]
+    #print "msg = '%s'" % (msg,)
+    actual = gr.crc32(msg)
+    (expected,) = struct.unpack(">I", s[-4:])
+    # print "actual =", hex(actual), "expected =", hex(expected)
+    return (actual == expected, msg)
diff --git a/gr-digital/python/qa_crc32.py b/gr-digital/python/qa_crc32.py
new file mode 100644
index 0000000000..f86813f3f3
--- /dev/null
+++ b/gr-digital/python/qa_crc32.py
@@ -0,0 +1,60 @@
+#!/usr/bin/env python
+#
+# Copyright 2011 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
+import digital_swig
+import random, cmath
+
+class test_crc32(gr_unittest.TestCase):
+
+    def setUp (self):
+        self.tb = gr.top_block ()
+
+    def tearDown (self):
+        self.tb = None
+
+    def test01 (self):
+        data = 100*"0"
+        expected_result = 2943744955
+        result = digital_swig.crc32(data)
+        #print hex(result)
+        
+        self.assertEqual (expected_result, result)
+
+    def test02 (self):
+        data = 100*"1"
+        expected_result = 2326594156
+        result = digital_swig.crc32(data)
+        #print hex(result)
+        
+        self.assertEqual (expected_result, result)
+
+    def test03 (self):
+        data = 10*"0123456789"
+        expected_result = 3774345973
+        result = digital_swig.crc32(data)
+        #print hex(result)
+
+        self.assertEqual (expected_result, result)
+
+if __name__ == '__main__':
+    gr_unittest.run(test_crc32, "test_crc32.xml")
diff --git a/gr-digital/swig/Makefile.am b/gr-digital/swig/Makefile.am
index df8f184b3f..0a4176fc1c 100644
--- a/gr-digital/swig/Makefile.am
+++ b/gr-digital/swig/Makefile.am
@@ -67,6 +67,7 @@ digital_swig_swiginclude_headers =		\
 	digital_correlate_access_code_bb.i	\
 	digital_costas_loop_cc.i		\
 	digital_cma_equalizer_cc.i		\
+	digital_crc32.i				\
 	digital_lms_dd_equalizer_cc.i		\
 	digital_kurtotic_equalizer_cc.i
 
diff --git a/gr-digital/swig/digital_crc32.i b/gr-digital/swig/digital_crc32.i
new file mode 100644
index 0000000000..806bfad6a0
--- /dev/null
+++ b/gr-digital/swig/digital_crc32.i
@@ -0,0 +1,27 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2005,2011 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.
+ */
+
+%rename(update_crc32) digital_update_crc32;
+%rename(crc32) digital_crc32;
+
+unsigned int digital_update_crc32(unsigned int crc, const std::string buf);
+unsigned int digital_crc32(const std::string buf);
diff --git a/gr-digital/swig/digital_swig.i b/gr-digital/swig/digital_swig.i
index 700c540398..bc7c9b0d9e 100644
--- a/gr-digital/swig/digital_swig.i
+++ b/gr-digital/swig/digital_swig.i
@@ -31,6 +31,7 @@
 #include "digital_constellation_receiver_cb.h"
 #include "digital_correlate_access_code_bb.h"
 #include "digital_costas_loop_cc.h"
+#include "digital_crc32.h"
 #include "digital_kurtotic_equalizer_cc.h"
 #include "digital_lms_dd_equalizer_cc.h"
 %}
@@ -44,6 +45,7 @@
 %include "digital_constellation_receiver_cb.i"
 %include "digital_correlate_access_code_bb.i"
 %include "digital_costas_loop_cc.i"
+%include "digital_crc32.i"
 %include "digital_kurtotic_equalizer_cc.i"
 %include "digital_lms_dd_equalizer_cc.i"
 
-- 
cgit v1.2.3


From 199ab116e54a5d8b8bf82d0d18569ccfe2114fd8 Mon Sep 17 00:00:00 2001
From: Tom Rondeau <trondeau@vt.edu>
Date: Sun, 24 Jul 2011 15:41:36 -0400
Subject: digital: moving Python digital stuff to gr-digital. Fixing some build
 issues.

---
 gnuradio-core/src/python/gnuradio/Makefile.am      |   2 -
 .../src/python/gnuradio/blks2impl/Makefile.am      |   6 -
 gnuradio-core/src/python/gnuradio/blks2impl/cpm.py | 249 -----------
 gnuradio-core/src/python/gnuradio/blks2impl/pkt.py | 184 ---------
 .../src/python/gnuradio/blks2impl/qam16.py         | 208 ----------
 .../src/python/gnuradio/blks2impl/qam256.py        | 209 ----------
 .../src/python/gnuradio/blks2impl/qam64.py         | 208 ----------
 .../src/python/gnuradio/blks2impl/qam8.py          | 209 ----------
 .../src/python/gnuradio/gruimpl/Makefile.am        |   1 -
 .../src/python/gnuradio/modulation_utils.py        |  81 ----
 gnuradio-core/src/python/gnuradio/packet_utils.py  | 457 ---------------------
 gr-digital/python/Makefile.am                      |  25 +-
 gr-digital/python/cpm.py                           | 249 +++++++++++
 gr-digital/python/modulation_utils.py              |  81 ++++
 gr-digital/python/modulation_utils2.py             | 101 +++++
 gr-digital/python/packet_utils.py                  | 457 +++++++++++++++++++++
 gr-digital/python/pkt.py                           | 184 +++++++++
 gr-digital/python/qa_constellation_receiver.py     |   4 +-
 18 files changed, 1089 insertions(+), 1826 deletions(-)
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/cpm.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/pkt.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/qam16.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/qam256.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/qam64.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/blks2impl/qam8.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/modulation_utils.py
 delete mode 100644 gnuradio-core/src/python/gnuradio/packet_utils.py
 create mode 100644 gr-digital/python/cpm.py
 create mode 100644 gr-digital/python/modulation_utils.py
 create mode 100644 gr-digital/python/modulation_utils2.py
 create mode 100644 gr-digital/python/packet_utils.py
 create mode 100644 gr-digital/python/pkt.py

(limited to 'gnuradio-core/src/python')

diff --git a/gnuradio-core/src/python/gnuradio/Makefile.am b/gnuradio-core/src/python/gnuradio/Makefile.am
index eff35e95cd..30b5d02abb 100644
--- a/gnuradio-core/src/python/gnuradio/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/Makefile.am
@@ -28,10 +28,8 @@ grpython_PYTHON = 			\
 	__init__.py			\
 	eng_notation.py			\
 	eng_option.py			\
-	modulation_utils.py		\
 	modulation_utils2.py		\
 	ofdm_packet_utils.py		\
-	packet_utils.py			\
 	gr_unittest.py			\
 	gr_xmlrunner.py			\
 	optfir.py			\
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am b/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
index 0499b8c802..9665dde0b8 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/Makefile.am
@@ -34,7 +34,6 @@ grblkspython_PYTHON =		\
 	fm_demod.py		\
 	fm_emph.py		\
 	generic_usrp.py	\
-	cpm.py			\
 	logpwrfft.py		\
 	nbfm_rx.py		\
 	nbfm_tx.py		\
@@ -48,13 +47,8 @@ grblkspython_PYTHON =		\
 	pfb_channelizer.py	\
 	pfb_decimator.py	\
 	pfb_interpolator.py	\
-	pkt.py			\
 	psk.py			\
 	qam.py			\
-	qam8.py			\
-	qam16.py		\
-	qam64.py		\
-	qam256.py		\
 	rational_resampler.py	\
 	standard_squelch.py	\
 	stream_to_vector_decimator.py \
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/cpm.py b/gnuradio-core/src/python/gnuradio/blks2impl/cpm.py
deleted file mode 100644
index 8f593cd51e..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/cpm.py
+++ /dev/null
@@ -1,249 +0,0 @@
-#
-# CPM modulation and demodulation.  
-#
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-from gnuradio import gr
-from gnuradio import modulation_utils
-from math import pi
-import numpy
-from pprint import pprint
-import inspect
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_bits_per_symbol = 1
-_def_h_numerator = 1
-_def_h_denominator = 2
-_def_cpm_type = 0 # 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL
-_def_bt = 0.35
-_def_symbols_per_pulse = 1
-_def_generic_taps = numpy.empty(1)
-_def_verbose = False
-_def_log = False
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                              CPM modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class cpm_mod(gr.hier_block2):
-    def __init__(self, 
-                 samples_per_symbol=_def_samples_per_symbol,
-                 bits_per_symbol=_def_bits_per_symbol,
-                 h_numerator=_def_h_numerator,
-                 h_denominator=_def_h_denominator,
-                 cpm_type=_def_cpm_type,
-		 bt=_def_bt,
-		 symbols_per_pulse=_def_symbols_per_pulse,
-                 generic_taps=_def_generic_taps,
-                 verbose=_def_verbose,
-                 log=_def_log):
-        """
-	Hierarchical block for Continuous Phase
-	modulation.
-
-	The input is a byte stream (unsigned char) 
-        representing packed bits and the
-	output is the complex modulated signal at baseband.
-
-        See Proakis for definition of generic CPM signals:
-        s(t)=exp(j phi(t))
-        phi(t)= 2 pi h int_0^t f(t') dt'
-        f(t)=sum_k a_k g(t-kT)
-        (normalizing assumption: int_0^infty g(t) dt = 1/2)
-
-	@param samples_per_symbol: samples per baud >= 2
-	@type samples_per_symbol: integer
-	@param bits_per_symbol: bits per symbol
-	@type bits_per_symbol: integer
-	@param h_numerator: numerator of modulation index
-	@type h_numerator: integer
-	@param h_denominator: denominator of modulation index (numerator and denominator must be relative primes)
-	@type h_denominator: integer
-	@param cpm_type: supported types are: 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL
-	@type cpm_type: integer
-        @param bt: bandwidth symbol time product for GMSK
-        @type bt: float
-	@param symbols_per_pulse: shaping pulse duration in symbols
-	@type symbols_per_pulse: integer
-	@param generic_taps: define a generic CPM pulse shape (sum = samples_per_symbol/2)
-	@type generic_taps: array of floats
-
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modulation data to files?
-        @type debug: bool       
-	"""
-
-	gr.hier_block2.__init__("cpm_mod", 
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) #  Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._bits_per_symbol = bits_per_symbol
-        self._h_numerator = h_numerator
-        self._h_denominator = h_denominator
-        self._cpm_type = cpm_type
-        self._bt=bt
-        if cpm_type == 0 or cpm_type == 2 or cpm_type == 3: # CPFSK, RC, Generic
-	    self._symbols_per_pulse = symbols_per_pulse
-        elif cpm_type == 1: # GMSK
-	    self._symbols_per_pulse = 4
-        else:
-            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
-
-        self._generic_taps=numpy.array(generic_taps)
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
-
-        self.nsymbols = 2**bits_per_symbol
-        self.sym_alphabet=numpy.arange(-(self.nsymbols-1),self.nsymbols,2)
-
-
-	self.ntaps = self._symbols_per_pulse * samples_per_symbol
-	sensitivity = 2 * pi * h_numerator / h_denominator / samples_per_symbol
-
-        # Unpack Bytes into bits_per_symbol groups
-        self.B2s = gr.packed_to_unpacked_bb(bits_per_symbol,gr.GR_MSB_FIRST)
- 
- 
-	# Turn it into symmetric PAM data.
-        self.pam = gr.chunks_to_symbols_bf(self.sym_alphabet,1)
-
-        # Generate pulse (sum of taps = samples_per_symbol/2)
-        if cpm_type == 0: # CPFSK
-            self.taps= (1.0/self._symbols_per_pulse/2,) * self.ntaps
-        elif cpm_type == 1: # GMSK
-            gaussian_taps = gr.firdes.gaussian(
-                1.0/2,                     # gain
-                samples_per_symbol,    # symbol_rate
-                bt,                    # bandwidth * symbol time
-                self.ntaps                  # number of taps
-                )
-	    sqwave = (1,) * samples_per_symbol       # rectangular window
-	    self.taps = numpy.convolve(numpy.array(gaussian_taps),numpy.array(sqwave))
-        elif cpm_type == 2: # Raised Cosine
-            # generalize it for arbitrary roll-off factor
-            self.taps = (1-numpy.cos(2*pi*numpy.arange(0,self.ntaps)/samples_per_symbol/self._symbols_per_pulse))/(2*self._symbols_per_pulse)
-        elif cpm_type == 3: # Generic CPM
-            self.taps = generic_taps
-        else:
-            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
-
-	self.filter = gr.interp_fir_filter_fff(samples_per_symbol, self.taps)
-
-	# FM modulation
-	self.fmmod = gr.frequency_modulator_fc(sensitivity)
-		
-        if verbose:
-            self._print_verbage()
-         
-        if log:
-            self._setup_logging()
-
-	# Connect
-	self.connect(self, self.B2s, self.pam, self.filter, self.fmmod, self)
-
-    #def samples_per_symbol(self):
-        #return self._samples_per_symbol
-    
-    #def bits_per_symbol(self):  
-        #return self._bits_per_symbol
-    
-    #def h_numerator(self):  
-        #return self._h_numerator
-
-    #def h_denominator(self):  
-        #return self._h_denominator
-
-    #def cpm_type(self):  
-        #return self._cpm_type
-
-    #def bt(self):  
-        #return self._bt
-
-    #def symbols_per_pulse(self):  
-        #return self._symbols_per_pulse
-
-
-    def _print_verbage(self):
-        print "Samples per symbol = %d" % self._samples_per_symbol
-        print "Bits per symbol = %d" % self._bits_per_symbol
-        print "h = " , self._h_numerator , " / " ,  self._h_denominator
-        print "Symbol alphabet = " , self.sym_alphabet
-        print "Symbols per pulse = %d" % self._symbols_per_pulse
-        print "taps = " , self.taps
-
-        print "CPM type = %d" % self._cpm_type
-        if self._cpm_type == 1:
-             print "Gaussian filter BT = %.2f" % self._bt
-
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.B2s,
-                     gr.file_sink(gr.sizeof_float, "symbols.dat"))
-        self.connect(self.pam,
-                     gr.file_sink(gr.sizeof_float, "pam.dat"))
-        self.connect(self.filter,
-                     gr.file_sink(gr.sizeof_float, "filter.dat"))
-        self.connect(self.fmmod,
-                     gr.file_sink(gr.sizeof_gr_complex, "fmmod.dat"))
-
-
-    def add_options(parser):
-        """
-        Adds CPM modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--bt", type="float", default=_def_bt,
-                          help="set bandwidth-time product [default=%default] (GMSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(cpm_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                            CPM demodulator
-# /////////////////////////////////////////////////////////////////////////////
-#
-# Not yet implemented
-#
-
-
-
-#
-# Add these to the mod/demod registry
-#
-modulation_utils.add_type_1_mod('cpm', cpm_mod)
-#modulation_utils.add_type_1_demod('cpm', cpm_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/pkt.py b/gnuradio-core/src/python/gnuradio/blks2impl/pkt.py
deleted file mode 100644
index aa720d1a52..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/pkt.py
+++ /dev/null
@@ -1,184 +0,0 @@
-#
-# Copyright 2005, 2006, 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.
-# 
-
-from math import pi
-from gnuradio import gr, packet_utils
-import gnuradio.gr.gr_threading as _threading
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                   mod/demod with packets as i/o
-# /////////////////////////////////////////////////////////////////////////////
-
-class mod_pkts(gr.hier_block2):
-    """
-    Wrap an arbitrary digital modulator in our packet handling framework.
-
-    Send packets by calling send_pkt
-    """
-    def __init__(self, modulator, access_code=None, msgq_limit=2, pad_for_usrp=True, use_whitener_offset=False,
-                 modulate=True):
-        """
-	Hierarchical block for sending packets
-
-        Packets to be sent are enqueued by calling send_pkt.
-        The output is the complex modulated signal at baseband.
-
-        @param modulator: instance of modulator class (gr_block or hier_block2)
-        @type modulator: complex baseband out
-        @param access_code: AKA sync vector
-        @type access_code: string of 1's and 0's between 1 and 64 long
-        @param msgq_limit: maximum number of messages in message queue
-        @type msgq_limit: int
-        @param pad_for_usrp: If true, packets are padded such that they end up a multiple of 128 samples
-        @param use_whitener_offset: If true, start of whitener XOR string is incremented each packet
-        @param modulate: If false, no modulation will be performed.
-        
-        See gmsk_mod for remaining parameters
-        """
-        if modulate:
-            output_size = gr.sizeof_gr_complex
-        else:
-            output_size = gr.sizeof_char
-
-	gr.hier_block2.__init__(self, "mod_pkts",
-				gr.io_signature(0, 0, 0),                    # Input signature
-				gr.io_signature(1, 1, output_size))          # Output signature
-
-        self._modulator = modulator
-        self._pad_for_usrp = pad_for_usrp
-        self._use_whitener_offset = use_whitener_offset
-        self._whitener_offset = 0
-        
-        if access_code is None:
-            access_code = packet_utils.default_access_code
-        if not packet_utils.is_1_0_string(access_code):
-            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
-        self._access_code = access_code
-
-        # accepts messages from the outside world
-        self._pkt_input = gr.message_source(gr.sizeof_char, msgq_limit)
-        if modulate:
-            self.connect(self._pkt_input, self._modulator, self)
-        else:
-            self.connect(self._pkt_input, self)
-
-    def send_pkt(self, payload='', eof=False):
-        """
-        Send the payload.
-
-        @param payload: data to send
-        @type payload: string
-        """
-        if eof:
-            msg = gr.message(1) # tell self._pkt_input we're not sending any more packets
-        else:
-            # print "original_payload =", string_to_hex_list(payload)
-            pkt = packet_utils.make_packet(payload,
-                                           self._modulator.samples_per_symbol(),
-                                           self._modulator.bits_per_symbol(),
-                                           self._access_code,
-                                           self._pad_for_usrp,
-                                           self._whitener_offset)
-            #print "pkt =", string_to_hex_list(pkt)
-            msg = gr.message_from_string(pkt)
-            if self._use_whitener_offset is True:
-                self._whitener_offset = (self._whitener_offset + 1) % 16
-                
-        self._pkt_input.msgq().insert_tail(msg)
-
-
-
-class demod_pkts(gr.hier_block2):
-    """
-    Wrap an arbitrary digital demodulator in our packet handling framework.
-
-    The input is complex baseband.  When packets are demodulated, they are passed to the
-    app via the callback.
-    """
-
-    def __init__(self, demodulator, access_code=None, callback=None, threshold=-1, demodulate=True):
-        """
-	Hierarchical block for demodulating and deframing packets.
-
-	The input is the complex modulated signal at baseband.
-        Demodulated packets are sent to the handler.
-
-        If demodulator is None it is assumed the input is already demodulated.
-
-        @param demodulator: instance of demodulator class (gr_block or hier_block2)
-        @type demodulator: complex baseband in
-        @param access_code: AKA sync vector
-        @type access_code: string of 1's and 0's
-        @param callback:  function of two args: ok, payload
-        @type callback: ok: bool; payload: string
-        @param threshold: detect access_code with up to threshold bits wrong (-1 -> use default)
-        @type threshold: int
-	"""
-
-        if demodulator is not None:
-            input_size = gr.sizeof_gr_complex
-        else:
-            input_size = gr.sizeof_char
-
-	gr.hier_block2.__init__(self, "demod_pkts",
-				gr.io_signature(1, 1, input_size), # Input signature
-				gr.io_signature(0, 0, 0))          # Output signature
-
-        self._demodulator = demodulator
-        if access_code is None:
-            access_code = packet_utils.default_access_code
-        if not packet_utils.is_1_0_string(access_code):
-            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
-        self._access_code = access_code
-
-        if threshold == -1:
-            threshold = 12              # FIXME raise exception
-
-        self._rcvd_pktq = gr.msg_queue()          # holds packets from the PHY
-        self.correlator = gr.correlate_access_code_bb(access_code, threshold)
-
-        self.framer_sink = gr.framer_sink_1(self._rcvd_pktq)
-        if self._demodulator is not None:
-            self.connect(self, self._demodulator, self.correlator, self.framer_sink)
-        else:
-            self.connect(self, self.correlator, self.framer_sink)
-        
-        if callback is not None:
-            self._watcher = _queue_watcher_thread(self._rcvd_pktq, callback)
-
-
-class _queue_watcher_thread(_threading.Thread):
-    def __init__(self, rcvd_pktq, callback):
-        _threading.Thread.__init__(self)
-        self.setDaemon(1)
-        self.rcvd_pktq = rcvd_pktq
-        self.callback = callback
-        self.keep_running = True
-        self.start()
-
-
-    def run(self):
-        while self.keep_running:
-            msg = self.rcvd_pktq.delete_head()
-            ok, payload = packet_utils.unmake_packet(msg.to_string(), int(msg.arg1()))
-            if self.callback:
-                self.callback(ok, payload)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/qam16.py b/gnuradio-core/src/python/gnuradio/blks2impl/qam16.py
deleted file mode 100644
index 0bdb9c6fb8..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/qam16.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-QAM16 modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import qam
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = None
-_def_gain_mu = 0.03
-_def_mu = 0.05
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM16 modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam16_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "qam16_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2, self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = 1.0
-        print "constellation with %d arity" % arity
-        rotated_const = map(lambda pt: pt * rot, qam.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 4
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gray code = %s" % self._gray_code
-        print "RRS roll-off factor = %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QAM modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(qam16_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM16 demodulator
-#
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam16_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-	gr.hier_block2.__init__(self, "qam16_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-        # do this
-        pass
-    
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 4
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-#
-# Add these to the mod/demod registry
-#
-# NOT READY TO BE USED YET -- ENABLE AT YOUR OWN RISK
-#modulation_utils.add_type_1_mod('qam16', qam16_mod)
-#modulation_utils.add_type_1_demod('qam16', qam16_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/qam256.py b/gnuradio-core/src/python/gnuradio/blks2impl/qam256.py
deleted file mode 100644
index fc455f17c1..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/qam256.py
+++ /dev/null
@@ -1,209 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-QAM256 modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import qam
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = None
-_def_gain_mu = 0.03
-_def_mu = 0.05
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM256 modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam256_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "qam256_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-				
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2, self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = 1.0
-        print "constellation with %d arity" % arity
-        rotated_const = map(lambda pt: pt * rot, qam.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 8
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gray code = %s" % self._gray_code
-        print "RRS roll-off factor = %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QAM modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(qam256_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM256 demodulator
-#
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam256_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-	gr.hier_block2.__init__(self, "qam256_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-
-        # do this
-        pass
-    
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 8
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-#
-# Add these to the mod/demod registry
-#
-# NOT READY TO BE USED YET -- ENABLE AT YOUR OWN RISK
-#modulation_utils.add_type_1_mod('qam256', qam256_mod)
-#modulation_utils.add_type_1_demod('qam256', qam256_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/qam64.py b/gnuradio-core/src/python/gnuradio/blks2impl/qam64.py
deleted file mode 100644
index 5509f37458..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/qam64.py
+++ /dev/null
@@ -1,208 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-differential QPSK modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import qam
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = None
-_def_gain_mu = 0.03
-_def_mu = 0.05
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM64 modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam64_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "qam64_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2, self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = 1.0
-        print "constellation with %d arity" % arity
-        rotated_const = map(lambda pt: pt * rot, qam.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 6
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gray code = %s" % self._gray_code
-        print "RRS roll-off factor = %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QAM modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(qam64_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM16 demodulator
-#
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam64_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-	
-	gr.hier_block2.__init__(self, "qam64_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))       # Output signature
-
-        # do this
-        pass
-    
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 6
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-#
-# Add these to the mod/demod registry
-#
-# NOT READY TO BE USED YET -- ENABLE AT YOUR OWN RISK
-#modulation_utils.add_type_1_mod('qam64', qam64_mod)
-#modulation_utils.add_type_1_demod('qam16', qam16_demod)
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/qam8.py b/gnuradio-core/src/python/gnuradio/blks2impl/qam8.py
deleted file mode 100644
index 6a7b355978..0000000000
--- a/gnuradio-core/src/python/gnuradio/blks2impl/qam8.py
+++ /dev/null
@@ -1,209 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-# See gnuradio-examples/python/digital for examples
-
-"""
-QAM8 modulation and demodulation.
-"""
-
-from gnuradio import gr, gru, modulation_utils
-from math import pi, sqrt
-import qam
-import cmath
-from pprint import pprint
-
-# default values (used in __init__ and add_options)
-_def_samples_per_symbol = 2
-_def_excess_bw = 0.35
-_def_gray_code = True
-_def_verbose = False
-_def_log = False
-
-_def_costas_alpha = None
-_def_gain_mu = 0.03
-_def_mu = 0.05
-_def_omega_relative_limit = 0.005
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM8 modulator
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam8_mod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-        """
-	Hierarchical block for RRC-filtered QPSK modulation.
-
-	The input is a byte stream (unsigned char) and the
-	output is the complex modulated signal at baseband.
-
-	@param samples_per_symbol: samples per symbol >= 2
-	@type samples_per_symbol: integer
-	@param excess_bw: Root-raised cosine filter excess bandwidth
-	@type excess_bw: float
-        @param gray_code: Tell modulator to Gray code the bits
-        @type gray_code: bool
-        @param verbose: Print information about modulator?
-        @type verbose: bool
-        @param debug: Print modualtion data to files?
-        @type debug: bool
-	"""
-
-	gr.hier_block2.__init__(self, "qam8_mod",
-				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
-				gr.io_signature(1, 1, gr.sizeof_gr_complex)) # Output signature
-
-        self._samples_per_symbol = samples_per_symbol
-        self._excess_bw = excess_bw
-        self._gray_code = gray_code
-
-        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
-            raise TypeError, ("sbp must be an integer >= 2, is %d" % samples_per_symbol)
-
-	ntaps = 11 * samples_per_symbol
- 
-        arity = pow(2, self.bits_per_symbol())
-
-        # turn bytes into k-bit vectors
-        self.bytes2chunks = \
-          gr.packed_to_unpacked_bb(self.bits_per_symbol(), gr.GR_MSB_FIRST)
-
-        if self._gray_code:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_gray[arity])
-        else:
-            self.symbol_mapper = gr.map_bb(qam.binary_to_ungray[arity])
-            
-        self.diffenc = gr.diff_encoder_bb(arity)
-
-        rot = 1.0
-        print "constellation with %d arity" % arity
-        rotated_const = map(lambda pt: pt * rot, qam.constellation[arity])
-        self.chunks2symbols = gr.chunks_to_symbols_bc(rotated_const)
-
-        # pulse shaping filter
-	self.rrc_taps = gr.firdes.root_raised_cosine(
-	    self._samples_per_symbol, # gain  (sps since we're interpolating by sps)
-            self._samples_per_symbol, # sampling rate
-            1.0,		      # symbol rate
-            self._excess_bw,          # excess bandwidth (roll-off factor)
-            ntaps)
-
-	self.rrc_filter = gr.interp_fir_filter_ccf(self._samples_per_symbol, self.rrc_taps)
-
-        if verbose:
-            self._print_verbage()
-        
-        if log:
-            self._setup_logging()
-            
-	# Connect
-        self.connect(self, self.bytes2chunks, self.symbol_mapper, self.diffenc,
-                     self.chunks2symbols, self.rrc_filter, self)
-
-    def samples_per_symbol(self):
-        return self._samples_per_symbol
-
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 3
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-    def _print_verbage(self):
-        print "bits per symbol = %d" % self.bits_per_symbol()
-        print "Gray code = %s" % self._gray_code
-        print "RRS roll-off factor = %f" % self._excess_bw
-
-    def _setup_logging(self):
-        print "Modulation logging turned on."
-        self.connect(self.bytes2chunks,
-                     gr.file_sink(gr.sizeof_char, "bytes2chunks.dat"))
-        self.connect(self.symbol_mapper,
-                     gr.file_sink(gr.sizeof_char, "graycoder.dat"))
-        self.connect(self.diffenc,
-                     gr.file_sink(gr.sizeof_char, "diffenc.dat"))        
-        self.connect(self.chunks2symbols,
-                     gr.file_sink(gr.sizeof_gr_complex, "chunks2symbols.dat"))
-        self.connect(self.rrc_filter,
-                     gr.file_sink(gr.sizeof_gr_complex, "rrc_filter.dat"))
-
-    def add_options(parser):
-        """
-        Adds QAM modulation-specific options to the standard parser
-        """
-        parser.add_option("", "--excess-bw", type="float", default=_def_excess_bw,
-                          help="set RRC excess bandwith factor [default=%default] (PSK)")
-        parser.add_option("", "--no-gray-code", dest="gray_code",
-                          action="store_false", default=_def_gray_code,
-                          help="disable gray coding on modulated bits (PSK)")
-    add_options=staticmethod(add_options)
-
-
-    def extract_kwargs_from_options(options):
-        """
-        Given command line options, create dictionary suitable for passing to __init__
-        """
-        return modulation_utils.extract_kwargs_from_options(qam8_mod.__init__,
-                                                            ('self',), options)
-    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
-
-
-# /////////////////////////////////////////////////////////////////////////////
-#                           QAM8 demodulator
-#
-# /////////////////////////////////////////////////////////////////////////////
-
-class qam8_demod(gr.hier_block2):
-
-    def __init__(self,
-                 samples_per_symbol=_def_samples_per_symbol,
-                 excess_bw=_def_excess_bw,
-                 costas_alpha=_def_costas_alpha,
-                 gain_mu=_def_gain_mu,
-                 mu=_def_mu,
-                 omega_relative_limit=_def_omega_relative_limit,
-                 gray_code=_def_gray_code,
-                 verbose=_def_verbose,
-                 log=_def_log):
-
-	gr.hier_block2.__init__(self, "qam8_demod",
-				gr.io_signature(1, 1, gr.sizeof_gr_complex), # Input signature
-				gr.io_signature(1, 1, gr.sizeof_char))    # Output signature
-
-        # do this
-        pass
-    
-    def bits_per_symbol(self=None):   # staticmethod that's also callable on an instance
-        return 3
-    bits_per_symbol = staticmethod(bits_per_symbol)      # make it a static method.  RTFM
-
-#
-# Add these to the mod/demod registry
-#
-# NOT READY TO BE USED YET -- ENABLE AT YOUR OWN RISK
-modulation_utils.add_type_1_mod('qam8', qam8_mod)
-#modulation_utils.add_type_1_demod('qam8', qam8_demod)
diff --git a/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am b/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am
index ffae4b8094..903bc26955 100644
--- a/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am
+++ b/gnuradio-core/src/python/gnuradio/gruimpl/Makefile.am
@@ -25,7 +25,6 @@ grupythondir = $(grpythondir)/gruimpl
 
 grupython_PYTHON = 			\
 	__init__.py			\
-	crc.py				\
 	freqz.py			\
 	gnuplot_freqz.py		\
 	hexint.py			\
diff --git a/gnuradio-core/src/python/gnuradio/modulation_utils.py b/gnuradio-core/src/python/gnuradio/modulation_utils.py
deleted file mode 100644
index 71ba773895..0000000000
--- a/gnuradio-core/src/python/gnuradio/modulation_utils.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#
-# Copyright 2006 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 this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-
-"""
-Miscellaneous utilities for managing mods and demods, as well as other items
-useful in dealing with generalized handling of different modulations and demods.
-"""
-
-import inspect
-
-
-# Type 1 modulators accept a stream of bytes on their input and produce complex baseband output
-_type_1_modulators = {}
-
-def type_1_mods():
-    return _type_1_modulators
-
-def add_type_1_mod(name, mod_class):
-    _type_1_modulators[name] = mod_class
-
-
-# Type 1 demodulators accept complex baseband input and produce a stream of bits, packed
-# 1 bit / byte as their output.  Their output is completely unambiguous.  There is no need
-# to resolve phase or polarity ambiguities.
-_type_1_demodulators = {}
-
-def type_1_demods():
-    return _type_1_demodulators
-
-def add_type_1_demod(name, demod_class):
-    _type_1_demodulators[name] = demod_class
-
-
-def extract_kwargs_from_options(function, excluded_args, options):
-    """
-    Given a function, a list of excluded arguments and the result of
-    parsing command line options, create a dictionary of key word
-    arguments suitable for passing to the function.  The dictionary
-    will be populated with key/value pairs where the keys are those
-    that are common to the function's argument list (minus the
-    excluded_args) and the attributes in options.  The values are the
-    corresponding values from options unless that value is None.
-    In that case, the corresponding dictionary entry is not populated.
-
-    (This allows different modulations that have the same parameter
-    names, but different default values to coexist.  The downside is
-    that --help in the option parser will list the default as None,
-    but in that case the default provided in the __init__ argument
-    list will be used since there is no kwargs entry.)
-
-    @param function: the function whose parameter list will be examined
-    @param excluded_args: function arguments that are NOT to be added to the dictionary
-    @type excluded_args: sequence of strings
-    @param options: result of command argument parsing
-    @type options: optparse.Values
-    """
-    # Try this in C++ ;)
-    args, varargs, varkw, defaults = inspect.getargspec(function)
-    d = {}
-    for kw in [a for a in args if a not in excluded_args]:
-        if hasattr(options, kw):
-            if getattr(options, kw) is not None:
-                d[kw] = getattr(options, kw)
-    return d
diff --git a/gnuradio-core/src/python/gnuradio/packet_utils.py b/gnuradio-core/src/python/gnuradio/packet_utils.py
deleted file mode 100644
index e36b05413e..0000000000
--- a/gnuradio-core/src/python/gnuradio/packet_utils.py
+++ /dev/null
@@ -1,457 +0,0 @@
-#
-# Copyright 2005,2006,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.
-# 
-
-import struct
-import numpy
-from gnuradio import gru
-
-
-def conv_packed_binary_string_to_1_0_string(s):
-    """
-    '\xAF' --> '10101111'
-    """
-    r = []
-    for ch in s:
-        x = ord(ch)
-        for i in range(7,-1,-1):
-            t = (x >> i) & 0x1
-            r.append(t)
-
-    return ''.join(map(lambda x: chr(x + ord('0')), r))
-
-def conv_1_0_string_to_packed_binary_string(s):
-    """
-    '10101111' -> ('\xAF', False)
-
-    Basically the inverse of conv_packed_binary_string_to_1_0_string,
-    but also returns a flag indicating if we had to pad with leading zeros
-    to get to a multiple of 8.
-    """
-    if not is_1_0_string(s):
-        raise ValueError, "Input must be a string containing only 0's and 1's"
-    
-    # pad to multiple of 8
-    padded = False
-    rem = len(s) % 8
-    if rem != 0:
-        npad = 8 - rem
-        s = '0' * npad + s
-        padded = True
-
-    assert len(s) % 8 == 0
-
-    r = []
-    i = 0
-    while i < len(s):
-        t = 0
-        for j in range(8):
-            t = (t << 1) | (ord(s[i + j]) - ord('0'))
-        r.append(chr(t))
-        i += 8
-    return (''.join(r), padded)
-        
-
-default_access_code = \
-  conv_packed_binary_string_to_1_0_string('\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC')
-preamble = \
-  conv_packed_binary_string_to_1_0_string('\xA4\xF2')
-
-def is_1_0_string(s):
-    if not isinstance(s, str):
-        return False
-    for ch in s:
-        if not ch in ('0', '1'):
-            return False
-    return True
-
-def string_to_hex_list(s):
-    return map(lambda x: hex(ord(x)), s)
-
-
-def whiten(s, o):
-    sa = numpy.fromstring(s, numpy.uint8)
-    z = sa ^ random_mask_vec8[o:len(sa)+o]
-    return z.tostring()
-
-def dewhiten(s, o):
-    return whiten(s, o)        # self inverse
-
-
-def make_header(payload_len, whitener_offset=0):
-    # Upper nibble is offset, lower 12 bits is len
-    val = ((whitener_offset & 0xf) << 12) | (payload_len & 0x0fff)
-    #print "offset =", whitener_offset, " len =", payload_len, " val=", val
-    return struct.pack('!HH', val, val)
-
-def make_packet(payload, samples_per_symbol, bits_per_symbol,
-                access_code=default_access_code, pad_for_usrp=True,
-                whitener_offset=0, whitening=True):
-    """
-    Build a packet, given access code, payload, and whitener offset
-
-    @param payload:               packet payload, len [0, 4096]
-    @param samples_per_symbol:    samples per symbol (needed for padding calculation)
-    @type  samples_per_symbol:    int
-    @param bits_per_symbol:       (needed for padding calculation)
-    @type bits_per_symbol:        int
-    @param access_code:           string of ascii 0's and 1's
-    @param whitener_offset        offset into whitener string to use [0-16)
-    
-    Packet will have access code at the beginning, followed by length, payload
-    and finally CRC-32.
-    """
-    if not is_1_0_string(access_code):
-        raise ValueError, "access_code must be a string containing only 0's and 1's (%r)" % (access_code,)
-
-    if not whitener_offset >=0 and whitener_offset < 16:
-        raise ValueError, "whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,)
-
-    (packed_access_code, padded) = conv_1_0_string_to_packed_binary_string(access_code)
-    (packed_preamble, ignore) = conv_1_0_string_to_packed_binary_string(preamble)
-    
-    payload_with_crc = gru.gen_and_append_crc32(payload)
-    #print "outbound crc =", string_to_hex_list(payload_with_crc[-4:])
-
-    L = len(payload_with_crc)
-    MAXLEN = len(random_mask_tuple)
-    if L > MAXLEN:
-        raise ValueError, "len(payload) must be in [0, %d]" % (MAXLEN,)
-
-    if whitening:
-        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
-                       whiten(payload_with_crc, whitener_offset), '\x55'))
-    else:
-        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
-                       (payload_with_crc), '\x55'))
-
-    if pad_for_usrp:
-        pkt = pkt + (_npadding_bytes(len(pkt), int(samples_per_symbol), bits_per_symbol) * '\x55')
-
-    #print "make_packet: len(pkt) =", len(pkt)
-    return pkt
-
-def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
-    """
-    Generate sufficient padding such that each packet ultimately ends
-    up being a multiple of 512 bytes when sent across the USB.  We
-    send 4-byte samples across the USB (16-bit I and 16-bit Q), thus
-    we want to pad so that after modulation the resulting packet
-    is a multiple of 128 samples.
-
-    @param ptk_byte_len: len in bytes of packet, not including padding.
-    @param samples_per_symbol: samples per bit (1 bit / symbolwidth GMSK)
-    @type samples_per_symbol: int
-    @param bits_per_symbol: bits per symbol (log2(modulation order))
-    @type bits_per_symbol: int
-
-    @returns number of bytes of padding to append.
-    """
-    modulus = 128
-    byte_modulus = gru.lcm(modulus/8, samples_per_symbol) * bits_per_symbol / samples_per_symbol
-    r = pkt_byte_len % byte_modulus
-    if r == 0:
-        return 0
-    return byte_modulus - r
-    
-
-def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=True):
-    """
-    Return (ok, payload)
-
-    @param whitened_payload_with_crc: string
-    """
-
-    if dewhitening:
-        payload_with_crc = dewhiten(whitened_payload_with_crc, whitener_offset)
-    else:
-        payload_with_crc = (whitened_payload_with_crc)
-
-    ok, payload = gru.check_crc32(payload_with_crc)
-
-    if 0:
-        print "payload_with_crc =", string_to_hex_list(payload_with_crc)
-        print "ok = %r, len(payload) = %d" % (ok, len(payload))
-        print "payload =", string_to_hex_list(payload)
-
-    return ok, payload
-
-
-# FYI, this PN code is the output of a 15-bit LFSR
-random_mask_tuple = (
-  255,  63,   0,  16,   0,  12,   0,   5, 192,   3,  16,   1, 204,   0,  85, 192, 
-   63,  16,  16,  12,  12,   5, 197, 195,  19,  17, 205, 204,  85, 149, 255,  47, 
-    0,  28,   0,   9, 192,   6, 208,   2, 220,   1, 153, 192, 106, 208,  47,  28, 
-   28,   9, 201, 198, 214, 210, 222, 221, 152,  89, 170, 186, 255,  51,   0,  21, 
-  192,  15,  16,   4,  12,   3,  69, 193, 243,  16,  69, 204,  51,  21, 213, 207, 
-   31,  20,   8,  15,  70, 132,  50, 227,  85, 137, 255,  38, 192,  26, 208,  11, 
-   28,   7,  73, 194, 182, 209, 182, 220, 118, 217, 230, 218, 202, 219,  23,  27, 
-   78, 139, 116, 103, 103, 106, 170, 175,  63,  60,  16,  17, 204,  12,  85, 197, 
-  255,  19,   0,  13, 192,   5, 144,   3,  44,   1, 221, 192,  89, 144,  58, 236, 
-   19,  13, 205, 197, 149, 147,  47,  45, 220,  29, 153, 201, 170, 214, 255,  30, 
-  192,   8,  80,   6, 188,   2, 241, 193, 132,  80,  99, 124,  41, 225, 222, 200, 
-   88,  86, 186, 190, 243,  48,  69, 212,  51,  31,  85, 200,  63,  22, 144,  14, 
-  236,   4,  77, 195, 117, 145, 231,  44,  74, 157, 247,  41, 134, 158, 226, 232, 
-   73, 142, 182, 228, 118, 203, 102, 215, 106, 222, 175,  24, 124,  10, 161, 199, 
-   56,  82, 146, 189, 173, 177, 189, 180, 113, 183, 100, 118, 171, 102, 255, 106, 
-  192,  47,  16,  28,  12,   9, 197, 198, 211,  18, 221, 205, 153, 149, 170, 239, 
-   63,  12,  16,   5, 204,   3,  21, 193, 207,  16,  84,  12,  63,  69, 208,  51, 
-   28,  21, 201, 207,  22, 212,  14, 223,  68,  88,  51, 122, 149, 227,  47,   9, 
-  220,   6, 217, 194, 218, 209, 155,  28, 107,  73, 239, 118, 204,  38, 213, 218, 
-  223,  27,  24,  11,  74, 135, 119,  34, 166, 153, 186, 234, 243,  15,   5, 196, 
-    3,  19,  65, 205, 240,  85, 132,  63,  35,  80,  25, 252,  10, 193, 199,  16, 
-   82, 140,  61, 165, 209, 187,  28, 115,  73, 229, 246, 203,   6, 215,  66, 222, 
-  177, 152, 116, 106, 167, 111,  58, 172,  19,  61, 205, 209, 149, 156, 111,  41, 
-  236,  30, 205, 200,  85, 150, 191,  46, 240,  28,  68,   9, 243,  70, 197, 242, 
-  211,   5, 157, 195,  41, 145, 222, 236,  88,  77, 250, 181, 131,  55,  33, 214, 
-  152,  94, 234, 184,  79,  50, 180,  21, 183,  79,  54, 180,  22, 247,  78, 198, 
-  180,  82, 247, 125, 134, 161, 162, 248, 121, 130, 162, 225, 185, 136, 114, 230, 
-  165, 138, 251,  39,   3,  90, 129, 251,  32,  67,  88,  49, 250, 148,  67,  47, 
-  113, 220,  36,  89, 219, 122, 219,  99,  27, 105, 203, 110, 215, 108,  94, 173, 
-  248, 125, 130, 161, 161, 184, 120, 114, 162, 165, 185, 187,  50, 243,  85, 133, 
-  255,  35,   0,  25, 192,  10, 208,   7,  28,   2, 137, 193, 166, 208, 122, 220, 
-   35,  25, 217, 202, 218, 215,  27,  30, 139,  72, 103, 118, 170, 166, 255,  58, 
-  192,  19,  16,  13, 204,   5, 149, 195,  47,  17, 220,  12,  89, 197, 250, 211, 
-    3,  29, 193, 201, 144,  86, 236,  62, 205, 208,  85, 156,  63,  41, 208,  30, 
-  220,   8,  89, 198, 186, 210, 243,  29, 133, 201, 163,  22, 249, 206, 194, 212, 
-   81, 159, 124, 104,  33, 238, 152,  76, 106, 181, 239,  55,  12,  22, 133, 206, 
-  227,  20,  73, 207, 118, 212,  38, 223,  90, 216,  59,  26, 147,  75,  45, 247, 
-   93, 134, 185, 162, 242, 249, 133, 130, 227,  33, 137, 216, 102, 218, 170, 219, 
-   63,  27,  80,  11, 124,   7,  97, 194, 168,  81, 190, 188, 112, 113, 228,  36, 
-   75,  91, 119, 123, 102, 163, 106, 249, 239,   2, 204,   1, 149, 192, 111,  16, 
-   44,  12,  29, 197, 201, 147,  22, 237, 206, 205, 148,  85, 175, 127,  60,  32, 
-   17, 216,  12,  90, 133, 251,  35,   3,  89, 193, 250, 208,  67,  28,  49, 201, 
-  212,  86, 223, 126, 216,  32,  90, 152,  59,  42, 147,  95,  45, 248,  29, 130, 
-  137, 161, 166, 248, 122, 194, 163,  17, 185, 204, 114, 213, 229, 159,  11,  40, 
-    7,  94, 130, 184,  97, 178, 168, 117, 190, 167,  48, 122, 148,  35,  47,  89, 
-  220,  58, 217, 211,  26, 221, 203,  25, 151,  74, 238, 183,  12, 118, 133, 230, 
-  227,  10, 201, 199,  22, 210, 142, 221, 164,  89, 187, 122, 243,  99,   5, 233, 
-  195,  14, 209, 196,  92,  83, 121, 253, 226, 193, 137, 144, 102, 236,  42, 205, 
-  223,  21, 152,  15,  42, 132,  31,  35,  72,  25, 246, 138, 198, 231,  18, 202, 
-  141, 151,  37, 174, 155,  60, 107,  81, 239, 124,  76,  33, 245, 216,  71,  26, 
-  178, 139,  53, 167,  87,  58, 190, 147,  48, 109, 212,  45, 159,  93, 168,  57, 
-  190, 146, 240, 109, 132,  45, 163,  93, 185, 249, 178, 194, 245, 145, 135,  44, 
-   98, 157, 233, 169, 142, 254, 228,  64,  75, 112,  55, 100,  22, 171,  78, 255, 
-  116,  64,  39, 112,  26, 164,  11,  59,  71,  83, 114, 189, 229, 177, 139,  52, 
-  103,  87, 106, 190, 175,  48, 124,  20,  33, 207,  88,  84,  58, 191,  83,  48, 
-   61, 212,  17, 159,  76, 104,  53, 238, 151,  12, 110, 133, 236,  99,  13, 233, 
-  197, 142, 211,  36,  93, 219, 121, 155,  98, 235, 105, 143, 110, 228,  44,  75, 
-   93, 247, 121, 134, 162, 226, 249, 137, 130, 230, 225, 138, 200, 103,  22, 170, 
-  142, 255,  36,  64,  27, 112,  11, 100,   7, 107,  66, 175, 113, 188,  36, 113, 
-  219, 100,  91, 107, 123, 111,  99, 108,  41, 237, 222, 205, 152,  85, 170, 191, 
-   63,  48,  16,  20,  12,  15,  69, 196,  51,  19,  85, 205, 255,  21, 128,  15, 
-   32,   4,  24,   3,  74, 129, 247,  32,  70, 152,  50, 234, 149, 143,  47,  36, 
-   28,  27,  73, 203, 118, 215, 102, 222, 170, 216, 127,  26, 160,  11,  56,   7, 
-   82, 130, 189, 161, 177, 184, 116, 114, 167, 101, 186, 171,  51,  63,  85, 208, 
-   63,  28,  16,   9, 204,   6, 213, 194, 223,  17, 152,  12, 106, 133, 239,  35, 
-   12,  25, 197, 202, 211,  23,  29, 206, 137, 148, 102, 239, 106, 204,  47,  21, 
-  220,  15,  25, 196,  10, 211,  71,  29, 242, 137, 133, 166, 227,  58, 201, 211, 
-   22, 221, 206, 217, 148,  90, 239, 123,  12,  35,  69, 217, 243,  26, 197, 203, 
-   19,  23,  77, 206, 181, 148, 119,  47, 102, 156,  42, 233, 223,  14, 216,   4, 
-   90, 131, 123,  33, 227,  88,  73, 250, 182, 195,  54, 209, 214, 220,  94, 217, 
-  248,  90, 194, 187,  17, 179,  76, 117, 245, 231,   7,  10, 130, 135,  33, 162, 
-  152, 121, 170, 162, 255,  57, 128,  18, 224,  13, 136,   5, 166, 131,  58, 225, 
-  211,   8,  93, 198, 185, 146, 242, 237, 133, 141, 163,  37, 185, 219,  50, 219, 
-   85, 155, 127,  43,  96,  31, 104,   8,  46, 134, 156,  98, 233, 233, 142, 206, 
-  228,  84,  75, 127, 119,  96,  38, 168,  26, 254, 139,   0, 103,  64,  42, 176, 
-   31,  52,   8,  23,  70, 142, 178, 228, 117, 139, 103,  39, 106, 154, 175,  43, 
-   60,  31,  81, 200,  60,  86, 145, 254, 236,  64,  77, 240,  53, 132,  23,  35, 
-   78, 153, 244, 106, 199, 111,  18, 172,  13, 189, 197, 177, 147,  52, 109, 215, 
-  109, 158, 173, 168, 125, 190, 161, 176, 120, 116,  34, 167,  89, 186, 186, 243, 
-   51,   5, 213, 195,  31,  17, 200,  12,  86, 133, 254, 227,   0,  73, 192,  54, 
-  208,  22, 220,  14, 217, 196,  90, 211, 123,  29, 227,  73, 137, 246, 230, 198, 
-  202, 210, 215,  29, 158, 137, 168, 102, 254, 170, 192, 127,  16,  32,  12,  24, 
-    5, 202, 131,  23,  33, 206, 152,  84, 106, 191, 111,  48,  44,  20,  29, 207, 
-   73, 148,  54, 239,  86, 204,  62, 213, 208,  95,  28,  56,   9, 210, 134, 221, 
-  162, 217, 185, 154, 242, 235,   5, 143,  67,  36,  49, 219,  84,  91, 127, 123, 
-   96,  35, 104,  25, 238, 138, 204, 103,  21, 234, 143,  15,  36,   4,  27,  67, 
-   75, 113, 247, 100,  70, 171, 114, 255, 101, 128,  43,  32,  31,  88,   8,  58, 
-  134, 147,  34, 237, 217, 141, 154, 229, 171,  11,  63,  71,  80,  50, 188,  21, 
-  177, 207,  52,  84,  23, 127,  78, 160,  52, 120,  23,  98, 142, 169, 164, 126, 
-  251,  96,  67, 104,  49, 238, 148,  76, 111, 117, 236,  39,  13, 218, 133, 155, 
-   35,  43,  89, 223, 122, 216,  35,  26, 153, 203,  42, 215,  95,  30, 184,   8, 
-  114, 134, 165, 162, 251,  57, 131,  82, 225, 253, 136,  65, 166, 176, 122, 244, 
-   35,   7,  89, 194, 186, 209, 179,  28, 117, 201, 231,  22, 202, 142, 215,  36, 
-   94, 155, 120, 107,  98, 175, 105, 188,  46, 241, 220,  68,  89, 243, 122, 197, 
-  227,  19,   9, 205, 198, 213, 146, 223,  45, 152,  29, 170, 137, 191,  38, 240, 
-   26, 196,  11,  19,  71,  77, 242, 181, 133, 183,  35,  54, 153, 214, 234, 222, 
-  207,  24,  84,  10, 191,  71,  48,  50, 148,  21, 175,  79,  60,  52,  17, 215, 
-   76,  94, 181, 248, 119,   2, 166, 129, 186, 224, 115,   8,  37, 198, 155,  18, 
-  235,  77, 143, 117, 164,  39,  59,  90, 147, 123,  45, 227,  93, 137, 249, 166, 
-  194, 250, 209, 131,  28,  97, 201, 232,  86, 206, 190, 212, 112,  95, 100,  56, 
-   43,  82, 159, 125, 168,  33, 190, 152, 112, 106, 164,  47,  59,  92,  19, 121, 
-  205, 226, 213, 137, 159,  38, 232,  26, 206, 139,  20, 103,  79, 106, 180,  47, 
-   55,  92,  22, 185, 206, 242, 212,  69, 159, 115,  40,  37, 222, 155,  24, 107, 
-   74, 175, 119,  60,  38, 145, 218, 236,  91,  13, 251,  69, 131, 115,  33, 229, 
-  216,  75,  26, 183,  75,  54, 183,  86, 246, 190, 198, 240,  82, 196,  61, 147, 
-   81, 173, 252, 125, 129, 225, 160,  72, 120,  54, 162, 150, 249, 174, 194, 252, 
-   81, 129, 252,  96,  65, 232,  48,  78, 148,  52, 111,  87, 108,  62, 173, 208, 
-  125, 156,  33, 169, 216, 126, 218, 160,  91,  56,  59,  82, 147, 125, 173, 225, 
-  189, 136, 113, 166, 164, 122, 251,  99,   3, 105, 193, 238, 208,  76,  92,  53, 
-  249, 215,   2, 222, 129, 152,  96, 106, 168,  47,  62, 156,  16, 105, 204,  46, 
-  213, 220,  95,  25, 248,  10, 194, 135,  17, 162, 140, 121, 165, 226, 251,   9, 
-  131,  70, 225, 242, 200,  69, 150, 179,  46, 245, 220,  71,  25, 242, 138, 197, 
-  167,  19,  58, 141, 211,  37, 157, 219,  41, 155,  94, 235, 120,  79,  98, 180, 
-   41, 183,  94, 246, 184,  70, 242, 178, 197, 181, 147,  55,  45, 214, 157, 158, 
-  233, 168,  78, 254, 180,  64, 119, 112,  38, 164,  26, 251,  75,   3, 119,  65, 
-  230, 176,  74, 244,  55,   7,  86, 130, 190, 225, 176,  72, 116,  54, 167,  86, 
-  250, 190, 195,  48,  81, 212,  60,  95,  81, 248,  60,  66, 145, 241, 172,  68, 
-  125, 243,  97, 133, 232,  99,  14, 169, 196, 126, 211,  96,  93, 232,  57, 142, 
-  146, 228, 109, 139, 109, 167, 109, 186, 173, 179,  61, 181, 209, 183,  28, 118, 
-  137, 230, 230, 202, 202, 215,  23,  30, 142, 136, 100, 102, 171, 106, 255, 111, 
-    0,  44,   0,  29, 192,   9, 144,   6, 236,   2, 205, 193, 149, 144, 111,  44, 
-   44,  29, 221, 201, 153, 150, 234, 238, 207,  12,  84,   5, 255,  67,   0,  49, 
-  192,  20,  80,  15, 124,   4,  33, 195,  88,  81, 250, 188,  67,  49, 241, 212, 
-   68,  95, 115, 120,  37, 226, 155,   9, 171,  70, 255, 114, 192,  37, 144,  27, 
-   44,  11,  93, 199, 121, 146, 162, 237, 185, 141, 178, 229, 181, 139,  55,  39, 
-   86, 154, 190, 235,  48,  79,  84,  52,  63,  87,  80,  62, 188,  16, 113, 204, 
-   36,  85, 219, 127,  27,  96,  11, 104,   7, 110, 130, 172,  97, 189, 232, 113, 
-  142, 164, 100, 123, 107,  99, 111, 105, 236,  46, 205, 220,  85, 153, 255,  42, 
-  192,  31,  16,   8,  12,   6, 133, 194, 227,  17, 137, 204, 102, 213, 234, 223, 
-   15,  24,   4,  10, 131,  71,  33, 242, 152,  69, 170, 179,  63,  53, 208,  23, 
-   28,  14, 137, 196, 102, 211, 106, 221, 239,  25, 140,  10, 229, 199,  11,  18, 
-  135,  77, 162, 181, 185, 183,  50, 246, 149, 134, 239,  34, 204,  25, 149, 202, 
-  239,  23,  12,  14, 133, 196,  99,  19, 105, 205, 238, 213, 140,  95,  37, 248, 
-   27,   2, 139,  65, 167, 112, 122, 164,  35,  59,  89, 211, 122, 221, 227,  25, 
-  137, 202, 230, 215,  10, 222, 135,  24,  98, 138, 169, 167,  62, 250, 144,  67, 
-   44,  49, 221, 212,  89, 159, 122, 232,  35,  14, 153, 196, 106, 211, 111,  29, 
-  236,   9, 141, 198, 229, 146, 203,  45, 151,  93, 174, 185, 188, 114, 241, 229, 
-  132,  75,  35, 119,  89, 230, 186, 202, 243,  23,   5, 206, 131,  20,  97, 207, 
-  104,  84,  46, 191,  92, 112,  57, 228,  18, 203,  77, 151, 117, 174, 167,  60, 
-  122, 145, 227,  44,  73, 221, 246, 217, 134, 218, 226, 219,   9, 155,  70, 235, 
-  114, 207, 101, 148,  43,  47,  95,  92,  56,  57, 210, 146, 221, 173, 153, 189, 
-  170, 241, 191,   4, 112,   3, 100,   1, 235,  64,  79, 112,  52,  36,  23,  91, 
-   78, 187, 116, 115, 103, 101, 234, 171,  15,  63,  68,  16,  51,  76,  21, 245, 
-  207,   7,  20,   2, 143,  65, 164,  48, 123,  84,  35, 127,  89, 224,  58, 200, 
-   19,  22, 141, 206, 229, 148,  75,  47, 119,  92,  38, 185, 218, 242, 219,   5, 
-  155,  67,  43, 113, 223, 100,  88,  43, 122, 159,  99,  40,  41, 222, 158, 216, 
-  104,  90, 174, 187,  60, 115,  81, 229, 252,  75,   1, 247,  64,  70, 176,  50, 
-  244,  21, 135,  79,  34, 180,  25, 183,  74, 246, 183,   6, 246, 130, 198, 225, 
-  146, 200, 109, 150, 173, 174, 253, 188,  65, 177, 240, 116,  68,  39, 115,  90, 
-  165, 251,  59,   3,  83,  65, 253, 240,  65, 132,  48,  99,  84,  41, 255,  94, 
-  192,  56,  80,  18, 188,  13, 177, 197, 180,  83,  55, 125, 214, 161, 158, 248, 
-  104,  66, 174, 177, 188, 116, 113, 231, 100,  74, 171, 119,  63, 102, 144,  42, 
-  236,  31,  13, 200,   5, 150, 131,  46, 225, 220,  72,  89, 246, 186, 198, 243, 
-   18, 197, 205, 147,  21, 173, 207,  61, 148,  17, 175,  76, 124,  53, 225, 215, 
-    8,  94, 134, 184,  98, 242, 169, 133, 190, 227,  48,  73, 212,  54, 223,  86, 
-  216,  62, 218, 144,  91,  44,  59,  93, 211, 121, 157, 226, 233, 137, 142, 230, 
-  228,  74, 203, 119,  23, 102, 142, 170, 228, 127,  11,  96,   7, 104,   2, 174, 
-  129, 188,  96, 113, 232,  36,  78, 155, 116, 107, 103, 111, 106, 172,  47,  61, 
-  220,  17, 153, 204, 106, 213, 239,  31,  12,   8,   5, 198, 131,  18, 225, 205, 
-  136,  85, 166, 191,  58, 240,  19,   4,  13, 195,  69, 145, 243,  44,  69, 221, 
-  243,  25, 133, 202, 227,  23,   9, 206, 134, 212,  98, 223, 105, 152,  46, 234, 
-  156,  79,  41, 244,  30, 199,  72,  82, 182, 189, 182, 241, 182, 196, 118, 211, 
-  102, 221, 234, 217, 143,  26, 228,  11,  11,  71,  71, 114, 178, 165, 181, 187, 
-   55,  51,  86, 149, 254, 239,   0,  76,   0,  53, 192,  23,  16,  14, 140,   4, 
-  101, 195, 107,  17, 239,  76,  76,  53, 245, 215,   7,  30, 130, 136,  97, 166, 
-  168, 122, 254, 163,   0, 121, 192,  34, 208,  25, 156,  10, 233, 199,  14, 210, 
-  132,  93, 163, 121, 185, 226, 242, 201, 133, 150, 227,  46, 201, 220,  86, 217, 
-  254, 218, 192,  91,  16,  59,  76,  19, 117, 205, 231,  21, 138, 143,  39,  36, 
-   26, 155,  75,  43, 119,  95, 102, 184,  42, 242, 159,   5, 168,   3,  62, 129, 
-  208,  96,  92,  40,  57, 222, 146, 216, 109, 154, 173, 171,  61, 191,  81, 176, 
-   60, 116,  17, 231,  76,  74, 181, 247,  55,   6, 150, 130, 238, 225, 140,  72, 
-  101, 246, 171,   6, 255,  66, 192,  49, 144,  20, 108,  15, 109, 196,  45, 147, 
-   93, 173, 249, 189, 130, 241, 161, 132, 120,  99,  98, 169, 233, 190, 206, 240, 
-   84,  68,  63, 115,  80,  37, 252,  27,   1, 203,  64,  87, 112,  62, 164,  16, 
-  123,  76,  35, 117, 217, 231,  26, 202, 139,  23,  39,  78, 154, 180, 107,  55, 
-  111,  86, 172,  62, 253, 208,  65, 156,  48, 105, 212,  46, 223,  92,  88,  57, 
-  250, 146, 195,  45, 145, 221, 172,  89, 189, 250, 241, 131,   4,  97, 195, 104, 
-   81, 238, 188,  76, 113, 245, 228,  71,  11, 114, 135, 101, 162, 171,  57, 191, 
-   82, 240,  61, 132,  17, 163,  76, 121, 245, 226, 199,   9, 146, 134, 237, 162, 
-  205, 185, 149, 178, 239,  53, 140,  23,  37, 206, 155,  20, 107,  79, 111, 116, 
-   44,  39,  93, 218, 185, 155,  50, 235,  85, 143, 127,  36,  32,  27,  88,  11, 
-  122, 135,  99,  34, 169, 217, 190, 218, 240,  91,   4,  59,  67,  83, 113, 253, 
-  228,  65, 139, 112, 103, 100,  42, 171,  95,  63, 120,  16,  34, 140,  25, 165, 
-  202, 251,  23,   3,  78, 129, 244,  96,  71, 104,  50, 174, 149, 188, 111,  49, 
-  236,  20,  77, 207, 117, 148,  39,  47,  90, 156,  59,  41, 211,  94, 221, 248, 
-   89, 130, 186, 225, 179,   8, 117, 198, 167,  18, 250, 141, 131,  37, 161, 219, 
-   56,  91,  82, 187, 125, 179,  97, 181, 232, 119,  14, 166, 132, 122, 227,  99, 
-    9, 233, 198, 206, 210, 212,  93, 159, 121, 168,  34, 254, 153, 128, 106, 224, 
-   47,   8,  28,   6, 137, 194, 230, 209, 138, 220, 103,  25, 234, 138, 207,  39, 
-   20,  26, 143,  75,  36,  55,  91,  86, 187, 126, 243,  96,  69, 232,  51,  14, 
-  149, 196, 111,  19, 108,  13, 237, 197, 141, 147,  37, 173, 219,  61, 155,  81, 
-  171, 124, 127,  97, 224,  40,  72,  30, 182, 136, 118, 230, 166, 202, 250, 215, 
-    3,  30, 129, 200,  96,  86, 168,  62, 254, 144,  64, 108,  48,  45, 212,  29, 
-  159,  73, 168,  54, 254, 150, 192, 110, 208,  44,  92,  29, 249, 201, 130, 214, 
-  225, 158, 200, 104,  86, 174, 190, 252, 112,  65, 228,  48,  75,  84,  55, 127, 
-   86, 160,  62, 248,  16,  66, 140,  49, 165, 212, 123,  31,  99,  72,  41, 246, 
-  158, 198, 232,  82, 206, 189, 148, 113, 175, 100, 124,  43,  97, 223, 104,  88, 
-   46, 186, 156, 115,  41, 229, 222, 203,  24,  87,  74, 190, 183,  48, 118, 148, 
-   38, 239,  90, 204,  59,  21, 211,  79,  29, 244,   9, 135,  70, 226, 178, 201, 
-  181, 150, 247,  46, 198, 156,  82, 233, 253, 142, 193, 164,  80, 123, 124,  35, 
-   97, 217, 232,  90, 206, 187,  20, 115,  79, 101, 244,  43,   7,  95,  66, 184, 
-   49, 178, 148, 117, 175, 103,  60,  42, 145, 223,  44,  88,  29, 250, 137, 131, 
-   38, 225, 218, 200,  91,  22, 187,  78, 243, 116,  69, 231, 115,  10, 165, 199, 
-   59,  18, 147,  77, 173, 245, 189, 135,  49, 162, 148, 121, 175,  98, 252,  41, 
-  129, 222, 224,  88,  72,  58, 182, 147,  54, 237, 214, 205, 158, 213, 168,  95, 
-   62, 184,  16, 114, 140,  37, 165, 219,  59,  27,  83,  75, 125, 247,  97, 134, 
-  168,  98, 254, 169, 128, 126, 224,  32,  72,  24,  54, 138, 150, 231,  46, 202, 
-  156,  87,  41, 254, 158, 192, 104,  80,  46, 188,  28, 113, 201, 228,  86, 203, 
-  126, 215,  96,  94, 168,  56, 126, 146, 160, 109, 184,  45, 178, 157, 181, 169, 
-  183,  62, 246, 144,  70, 236,  50, 205, 213, 149, 159,  47,  40,  28,  30, 137, 
-  200, 102, 214, 170, 222, 255,  24,  64,  10, 176,   7,  52,   2, 151,  65, 174, 
-  176, 124, 116,  33, 231,  88,  74, 186, 183,  51,  54, 149, 214, 239,  30, 204, 
-    8,  85, 198, 191,  18, 240,  13, 132,   5, 163,  67,  57, 241, 210, 196,  93, 
-  147, 121, 173, 226, 253, 137, 129, 166, 224, 122, 200,  35,  22, 153, 206, 234, 
-  212,  79,  31, 116,   8,  39,  70, 154, 178, 235,  53, 143,  87,  36,  62, 155, 
-   80, 107, 124,  47,  97, 220,  40,  89, 222, 186, 216, 115,  26, 165, 203,  59, 
-   23,  83,  78, 189, 244, 113, 135, 100,  98, 171, 105, 191, 110, 240,  44,  68, 
-   29, 243,  73, 133, 246, 227,   6, 201, 194, 214, 209, 158, 220, 104,  89, 238, 
-  186, 204, 115,  21, 229, 207,  11,  20,   7,  79,  66, 180,  49, 183,  84, 118, 
-  191, 102, 240,  42, 196,  31,  19,  72,  13, 246, 133, 134, 227,  34, 201, 217, 
-  150, 218, 238, 219,  12,  91,  69, 251, 115,   3, 101, 193, 235,  16,  79,  76, 
-   52,  53, 215,  87,  30, 190, 136, 112, 102, 164,  42, 251,  95,   3, 120,   1, 
-  226, 128,  73, 160,  54, 248,  22, 194, 142, 209, 164,  92, 123, 121, 227,  98, 
-  201, 233, 150, 206, 238, 212,  76,  95, 117, 248,  39,   2, 154, 129, 171,  32, 
-  127,  88,  32,  58, 152,  19,  42, 141, 223,  37, 152,  27,  42, 139,  95,  39, 
-  120,  26, 162, 139,  57, 167,  82, 250, 189, 131,  49, 161, 212, 120,  95,  98, 
-  184,  41, 178, 158, 245, 168,  71,  62, 178, 144, 117, 172,  39,  61, 218, 145, 
-  155,  44, 107,  93, 239, 121, 140,  34, 229, 217, 139,  26, 231,  75,  10, 183, 
-   71,  54, 178, 150, 245, 174, 199,  60,  82, 145, 253, 172,  65, 189, 240, 113, 
-  132,  36,  99,  91, 105, 251, 110, 195, 108,  81, 237, 252,  77, 129, 245, 160, 
-   71,  56,  50, 146, 149, 173, 175,  61, 188,  17, 177, 204, 116,  85, 231, 127, 
-   10, 160,   7,  56,   2, 146, 129, 173, 160, 125, 184,  33, 178, 152, 117, 170, 
-  167,  63,  58, 144,  19,  44,  13, 221, 197, 153, 147,  42, 237, 223,  13, 152, 
-    5, 170, 131,  63,  33, 208,  24,  92,  10, 185, 199,  50, 210, 149, 157, 175, 
-   41, 188,  30, 241, 200,  68,  86, 179, 126, 245, 224,  71,   8,  50, 134, 149, 
-  162, 239,  57, 140,  18, 229, 205, 139,  21, 167,  79,  58, 180,  19,  55,  77, 
-  214, 181, 158, 247,  40,  70, 158, 178, 232, 117, 142, 167,  36, 122, 155,  99, 
-   43, 105, 223, 110, 216,  44,  90, 157, 251,  41, 131,  94, 225, 248,  72,  66, 
-  182, 177, 182, 244, 118, 199, 102, 210, 170, 221, 191,  25, 176,  10, 244,   7, 
-    7,  66, 130, 177, 161, 180, 120, 119,  98, 166, 169, 186, 254, 243,   0,  69, 
-  192,  51,  16,  21, 204,  15,  21, 196,  15,  19,  68,  13, 243,  69, 133, 243, 
-   35,   5, 217, 195,  26, 209, 203,  28,  87,  73, 254, 182, 192, 118, 208,  38, 
-  220,  26, 217, 203,  26, 215,  75,  30, 183,  72, 118, 182, 166, 246, 250, 198, 
-  195,  18, 209, 205, 156,  85, 169, 255,  62, 192,  16,  80,  12,  60,   5, 209, 
-  195,  28,  81, 201, 252,  86, 193, 254, 208,  64,  92,  48,  57, 212,  18, 223, 
-   77, 152,  53, 170, 151,  63,  46, 144,  28, 108,   9, 237, 198, 205, 146, 213, 
-  173, 159,  61, 168,  17, 190, 140, 112, 101, 228,  43,  11,  95,  71, 120,  50, 
-  162, 149, 185, 175,  50, 252,  21, 129, 207,  32,  84,  24,  63,  74, 144,  55, 
-   44,  22, 157, 206, 233, 148,  78, 239, 116,  76,  39, 117, 218, 167,  27,  58, 
-  139,  83,  39, 125, 218, 161, 155,  56, 107,  82, 175, 125, 188,  33, 177, 216, 
-  116,  90, 167, 123,  58, 163,  83,  57, 253, 210, 193, 157, 144, 105, 172,  46, 
-  253, 220,  65, 153, 240, 106, 196,  47,  19,  92,  13, 249, 197, 130, 211,  33, 
-  157, 216, 105, 154, 174, 235,  60,  79,  81, 244,  60,  71,  81, 242, 188,  69, 
-  177, 243,  52,  69, 215, 115,  30, 165, 200, 123,  22, 163,  78, 249, 244,  66, 
-  199, 113, 146, 164, 109, 187, 109, 179, 109, 181, 237, 183,  13, 182, 133, 182, 
-  227,  54, 201, 214, 214, 222, 222, 216,  88,  90, 186, 187,  51,  51, 255,  63 )
-
-random_mask_vec8 = numpy.array(random_mask_tuple, numpy.uint8)
-
diff --git a/gr-digital/python/Makefile.am b/gr-digital/python/Makefile.am
index eea4dba955..164bafb998 100644
--- a/gr-digital/python/Makefile.am
+++ b/gr-digital/python/Makefile.am
@@ -45,16 +45,21 @@ noinst_PYTHON = \
 	qa_mpsk_receiver.py
 
 digital_PYTHON = \
-	__init__.py	\
-	crc.py		\
-	bpsk.py		\
-	dbpsk.py	\
-	dqpsk.py	\
-	d8psk.py	\
+	__init__.py		\
+	bpsk.py			\
+	cpm.py			\
+	crc.py			\
+	d8psk.py		\
+	dbpsk.py		\
+	dqpsk.py		\
 	generic_mod_demod.py	\
-	gmsk.py		\
-	psk.py		\
-	psk2.py		\
-	qam.py		\
+	gmsk.py			\
+	modulation_utils.py	\
+	modulation_utils2.py	\
+	packet_utils.py		\
+	pkt.py			\
+	psk.py			\
+	psk2.py			\
+	qam.py			\
 	qpsk.py
 endif
diff --git a/gr-digital/python/cpm.py b/gr-digital/python/cpm.py
new file mode 100644
index 0000000000..8f593cd51e
--- /dev/null
+++ b/gr-digital/python/cpm.py
@@ -0,0 +1,249 @@
+#
+# CPM modulation and demodulation.  
+#
+#
+# Copyright 2005,2006,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.
+# 
+
+# See gnuradio-examples/python/digital for examples
+
+from gnuradio import gr
+from gnuradio import modulation_utils
+from math import pi
+import numpy
+from pprint import pprint
+import inspect
+
+# default values (used in __init__ and add_options)
+_def_samples_per_symbol = 2
+_def_bits_per_symbol = 1
+_def_h_numerator = 1
+_def_h_denominator = 2
+_def_cpm_type = 0 # 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL
+_def_bt = 0.35
+_def_symbols_per_pulse = 1
+_def_generic_taps = numpy.empty(1)
+_def_verbose = False
+_def_log = False
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                              CPM modulator
+# /////////////////////////////////////////////////////////////////////////////
+
+class cpm_mod(gr.hier_block2):
+    def __init__(self, 
+                 samples_per_symbol=_def_samples_per_symbol,
+                 bits_per_symbol=_def_bits_per_symbol,
+                 h_numerator=_def_h_numerator,
+                 h_denominator=_def_h_denominator,
+                 cpm_type=_def_cpm_type,
+		 bt=_def_bt,
+		 symbols_per_pulse=_def_symbols_per_pulse,
+                 generic_taps=_def_generic_taps,
+                 verbose=_def_verbose,
+                 log=_def_log):
+        """
+	Hierarchical block for Continuous Phase
+	modulation.
+
+	The input is a byte stream (unsigned char) 
+        representing packed bits and the
+	output is the complex modulated signal at baseband.
+
+        See Proakis for definition of generic CPM signals:
+        s(t)=exp(j phi(t))
+        phi(t)= 2 pi h int_0^t f(t') dt'
+        f(t)=sum_k a_k g(t-kT)
+        (normalizing assumption: int_0^infty g(t) dt = 1/2)
+
+	@param samples_per_symbol: samples per baud >= 2
+	@type samples_per_symbol: integer
+	@param bits_per_symbol: bits per symbol
+	@type bits_per_symbol: integer
+	@param h_numerator: numerator of modulation index
+	@type h_numerator: integer
+	@param h_denominator: denominator of modulation index (numerator and denominator must be relative primes)
+	@type h_denominator: integer
+	@param cpm_type: supported types are: 0=CPFSK, 1=GMSK, 2=RC, 3=GENERAL
+	@type cpm_type: integer
+        @param bt: bandwidth symbol time product for GMSK
+        @type bt: float
+	@param symbols_per_pulse: shaping pulse duration in symbols
+	@type symbols_per_pulse: integer
+	@param generic_taps: define a generic CPM pulse shape (sum = samples_per_symbol/2)
+	@type generic_taps: array of floats
+
+        @param verbose: Print information about modulator?
+        @type verbose: bool
+        @param debug: Print modulation data to files?
+        @type debug: bool       
+	"""
+
+	gr.hier_block2.__init__("cpm_mod", 
+				gr.io_signature(1, 1, gr.sizeof_char),       # Input signature
+				gr.io_signature(1, 1, gr.sizeof_gr_complex)) #  Output signature
+
+        self._samples_per_symbol = samples_per_symbol
+        self._bits_per_symbol = bits_per_symbol
+        self._h_numerator = h_numerator
+        self._h_denominator = h_denominator
+        self._cpm_type = cpm_type
+        self._bt=bt
+        if cpm_type == 0 or cpm_type == 2 or cpm_type == 3: # CPFSK, RC, Generic
+	    self._symbols_per_pulse = symbols_per_pulse
+        elif cpm_type == 1: # GMSK
+	    self._symbols_per_pulse = 4
+        else:
+            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
+
+        self._generic_taps=numpy.array(generic_taps)
+
+        if not isinstance(samples_per_symbol, int) or samples_per_symbol < 2:
+            raise TypeError, ("samples_per_symbol must be an integer >= 2, is %r" % (samples_per_symbol,))
+
+        self.nsymbols = 2**bits_per_symbol
+        self.sym_alphabet=numpy.arange(-(self.nsymbols-1),self.nsymbols,2)
+
+
+	self.ntaps = self._symbols_per_pulse * samples_per_symbol
+	sensitivity = 2 * pi * h_numerator / h_denominator / samples_per_symbol
+
+        # Unpack Bytes into bits_per_symbol groups
+        self.B2s = gr.packed_to_unpacked_bb(bits_per_symbol,gr.GR_MSB_FIRST)
+ 
+ 
+	# Turn it into symmetric PAM data.
+        self.pam = gr.chunks_to_symbols_bf(self.sym_alphabet,1)
+
+        # Generate pulse (sum of taps = samples_per_symbol/2)
+        if cpm_type == 0: # CPFSK
+            self.taps= (1.0/self._symbols_per_pulse/2,) * self.ntaps
+        elif cpm_type == 1: # GMSK
+            gaussian_taps = gr.firdes.gaussian(
+                1.0/2,                     # gain
+                samples_per_symbol,    # symbol_rate
+                bt,                    # bandwidth * symbol time
+                self.ntaps                  # number of taps
+                )
+	    sqwave = (1,) * samples_per_symbol       # rectangular window
+	    self.taps = numpy.convolve(numpy.array(gaussian_taps),numpy.array(sqwave))
+        elif cpm_type == 2: # Raised Cosine
+            # generalize it for arbitrary roll-off factor
+            self.taps = (1-numpy.cos(2*pi*numpy.arange(0,self.ntaps)/samples_per_symbol/self._symbols_per_pulse))/(2*self._symbols_per_pulse)
+        elif cpm_type == 3: # Generic CPM
+            self.taps = generic_taps
+        else:
+            raise TypeError, ("cpm_type must be an integer in {0,1,2,3}, is %r" % (cpm_type,))
+
+	self.filter = gr.interp_fir_filter_fff(samples_per_symbol, self.taps)
+
+	# FM modulation
+	self.fmmod = gr.frequency_modulator_fc(sensitivity)
+		
+        if verbose:
+            self._print_verbage()
+         
+        if log:
+            self._setup_logging()
+
+	# Connect
+	self.connect(self, self.B2s, self.pam, self.filter, self.fmmod, self)
+
+    #def samples_per_symbol(self):
+        #return self._samples_per_symbol
+    
+    #def bits_per_symbol(self):  
+        #return self._bits_per_symbol
+    
+    #def h_numerator(self):  
+        #return self._h_numerator
+
+    #def h_denominator(self):  
+        #return self._h_denominator
+
+    #def cpm_type(self):  
+        #return self._cpm_type
+
+    #def bt(self):  
+        #return self._bt
+
+    #def symbols_per_pulse(self):  
+        #return self._symbols_per_pulse
+
+
+    def _print_verbage(self):
+        print "Samples per symbol = %d" % self._samples_per_symbol
+        print "Bits per symbol = %d" % self._bits_per_symbol
+        print "h = " , self._h_numerator , " / " ,  self._h_denominator
+        print "Symbol alphabet = " , self.sym_alphabet
+        print "Symbols per pulse = %d" % self._symbols_per_pulse
+        print "taps = " , self.taps
+
+        print "CPM type = %d" % self._cpm_type
+        if self._cpm_type == 1:
+             print "Gaussian filter BT = %.2f" % self._bt
+
+
+    def _setup_logging(self):
+        print "Modulation logging turned on."
+        self.connect(self.B2s,
+                     gr.file_sink(gr.sizeof_float, "symbols.dat"))
+        self.connect(self.pam,
+                     gr.file_sink(gr.sizeof_float, "pam.dat"))
+        self.connect(self.filter,
+                     gr.file_sink(gr.sizeof_float, "filter.dat"))
+        self.connect(self.fmmod,
+                     gr.file_sink(gr.sizeof_gr_complex, "fmmod.dat"))
+
+
+    def add_options(parser):
+        """
+        Adds CPM modulation-specific options to the standard parser
+        """
+        parser.add_option("", "--bt", type="float", default=_def_bt,
+                          help="set bandwidth-time product [default=%default] (GMSK)")
+    add_options=staticmethod(add_options)
+
+
+    def extract_kwargs_from_options(options):
+        """
+        Given command line options, create dictionary suitable for passing to __init__
+        """
+        return modulation_utils.extract_kwargs_from_options(cpm_mod.__init__,
+                                                            ('self',), options)
+    extract_kwargs_from_options=staticmethod(extract_kwargs_from_options)
+
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                            CPM demodulator
+# /////////////////////////////////////////////////////////////////////////////
+#
+# Not yet implemented
+#
+
+
+
+#
+# Add these to the mod/demod registry
+#
+modulation_utils.add_type_1_mod('cpm', cpm_mod)
+#modulation_utils.add_type_1_demod('cpm', cpm_demod)
diff --git a/gr-digital/python/modulation_utils.py b/gr-digital/python/modulation_utils.py
new file mode 100644
index 0000000000..71ba773895
--- /dev/null
+++ b/gr-digital/python/modulation_utils.py
@@ -0,0 +1,81 @@
+#
+# Copyright 2006 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 this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+"""
+Miscellaneous utilities for managing mods and demods, as well as other items
+useful in dealing with generalized handling of different modulations and demods.
+"""
+
+import inspect
+
+
+# Type 1 modulators accept a stream of bytes on their input and produce complex baseband output
+_type_1_modulators = {}
+
+def type_1_mods():
+    return _type_1_modulators
+
+def add_type_1_mod(name, mod_class):
+    _type_1_modulators[name] = mod_class
+
+
+# Type 1 demodulators accept complex baseband input and produce a stream of bits, packed
+# 1 bit / byte as their output.  Their output is completely unambiguous.  There is no need
+# to resolve phase or polarity ambiguities.
+_type_1_demodulators = {}
+
+def type_1_demods():
+    return _type_1_demodulators
+
+def add_type_1_demod(name, demod_class):
+    _type_1_demodulators[name] = demod_class
+
+
+def extract_kwargs_from_options(function, excluded_args, options):
+    """
+    Given a function, a list of excluded arguments and the result of
+    parsing command line options, create a dictionary of key word
+    arguments suitable for passing to the function.  The dictionary
+    will be populated with key/value pairs where the keys are those
+    that are common to the function's argument list (minus the
+    excluded_args) and the attributes in options.  The values are the
+    corresponding values from options unless that value is None.
+    In that case, the corresponding dictionary entry is not populated.
+
+    (This allows different modulations that have the same parameter
+    names, but different default values to coexist.  The downside is
+    that --help in the option parser will list the default as None,
+    but in that case the default provided in the __init__ argument
+    list will be used since there is no kwargs entry.)
+
+    @param function: the function whose parameter list will be examined
+    @param excluded_args: function arguments that are NOT to be added to the dictionary
+    @type excluded_args: sequence of strings
+    @param options: result of command argument parsing
+    @type options: optparse.Values
+    """
+    # Try this in C++ ;)
+    args, varargs, varkw, defaults = inspect.getargspec(function)
+    d = {}
+    for kw in [a for a in args if a not in excluded_args]:
+        if hasattr(options, kw):
+            if getattr(options, kw) is not None:
+                d[kw] = getattr(options, kw)
+    return d
diff --git a/gr-digital/python/modulation_utils2.py b/gr-digital/python/modulation_utils2.py
new file mode 100644
index 0000000000..f30055f4ac
--- /dev/null
+++ b/gr-digital/python/modulation_utils2.py
@@ -0,0 +1,101 @@
+#
+# Copyright 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 this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+
+"""
+Miscellaneous utilities for managing mods and demods, as well as other items
+useful in dealing with generalized handling of different modulations and demods.
+"""
+
+import inspect
+
+
+# Type 1 modulators accept a stream of bytes on their input and produce complex baseband output
+_type_1_modulators = {}
+
+def type_1_mods():
+    return _type_1_modulators
+
+def add_type_1_mod(name, mod_class):
+    _type_1_modulators[name] = mod_class
+
+
+# Type 1 demodulators accept complex baseband input and produce a stream of bits, packed
+# 1 bit / byte as their output.  Their output is completely unambiguous.  There is no need
+# to resolve phase or polarity ambiguities.
+_type_1_demodulators = {}
+
+def type_1_demods():
+    return _type_1_demodulators
+
+def add_type_1_demod(name, demod_class):
+    _type_1_demodulators[name] = demod_class
+
+# Also record the constellation making functions of the modulations
+_type_1_constellations = {}
+
+def type_1_constellations():
+    return _type_1_constellations
+
+def add_type_1_constellation(name, constellation):
+    _type_1_constellations[name] = constellation
+
+
+def extract_kwargs_from_options(function, excluded_args, options):
+    """
+    Given a function, a list of excluded arguments and the result of
+    parsing command line options, create a dictionary of key word
+    arguments suitable for passing to the function.  The dictionary
+    will be populated with key/value pairs where the keys are those
+    that are common to the function's argument list (minus the
+    excluded_args) and the attributes in options.  The values are the
+    corresponding values from options unless that value is None.
+    In that case, the corresponding dictionary entry is not populated.
+
+    (This allows different modulations that have the same parameter
+    names, but different default values to coexist.  The downside is
+    that --help in the option parser will list the default as None,
+    but in that case the default provided in the __init__ argument
+    list will be used since there is no kwargs entry.)
+
+    @param function: the function whose parameter list will be examined
+    @param excluded_args: function arguments that are NOT to be added to the dictionary
+    @type excluded_args: sequence of strings
+    @param options: result of command argument parsing
+    @type options: optparse.Values
+    """
+    # Try this in C++ ;)
+    args, varargs, varkw, defaults = inspect.getargspec(function)
+    d = {}
+    for kw in [a for a in args if a not in excluded_args]:
+        if hasattr(options, kw):
+            if getattr(options, kw) is not None:
+                d[kw] = getattr(options, kw)
+    return d
+
+def extract_kwargs_from_options_for_class(cls, options):
+    """
+    Given command line options, create dictionary suitable for passing to __init__
+    """
+    d = extract_kwargs_from_options(
+        cls.__init__, ('self',), options)
+    for base in cls.__bases__:
+        if hasattr(base, 'extract_kwargs_from_options'):
+            d.update(base.extract_kwargs_from_options(options))
+    return d
diff --git a/gr-digital/python/packet_utils.py b/gr-digital/python/packet_utils.py
new file mode 100644
index 0000000000..e36b05413e
--- /dev/null
+++ b/gr-digital/python/packet_utils.py
@@ -0,0 +1,457 @@
+#
+# Copyright 2005,2006,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.
+# 
+
+import struct
+import numpy
+from gnuradio import gru
+
+
+def conv_packed_binary_string_to_1_0_string(s):
+    """
+    '\xAF' --> '10101111'
+    """
+    r = []
+    for ch in s:
+        x = ord(ch)
+        for i in range(7,-1,-1):
+            t = (x >> i) & 0x1
+            r.append(t)
+
+    return ''.join(map(lambda x: chr(x + ord('0')), r))
+
+def conv_1_0_string_to_packed_binary_string(s):
+    """
+    '10101111' -> ('\xAF', False)
+
+    Basically the inverse of conv_packed_binary_string_to_1_0_string,
+    but also returns a flag indicating if we had to pad with leading zeros
+    to get to a multiple of 8.
+    """
+    if not is_1_0_string(s):
+        raise ValueError, "Input must be a string containing only 0's and 1's"
+    
+    # pad to multiple of 8
+    padded = False
+    rem = len(s) % 8
+    if rem != 0:
+        npad = 8 - rem
+        s = '0' * npad + s
+        padded = True
+
+    assert len(s) % 8 == 0
+
+    r = []
+    i = 0
+    while i < len(s):
+        t = 0
+        for j in range(8):
+            t = (t << 1) | (ord(s[i + j]) - ord('0'))
+        r.append(chr(t))
+        i += 8
+    return (''.join(r), padded)
+        
+
+default_access_code = \
+  conv_packed_binary_string_to_1_0_string('\xAC\xDD\xA4\xE2\xF2\x8C\x20\xFC')
+preamble = \
+  conv_packed_binary_string_to_1_0_string('\xA4\xF2')
+
+def is_1_0_string(s):
+    if not isinstance(s, str):
+        return False
+    for ch in s:
+        if not ch in ('0', '1'):
+            return False
+    return True
+
+def string_to_hex_list(s):
+    return map(lambda x: hex(ord(x)), s)
+
+
+def whiten(s, o):
+    sa = numpy.fromstring(s, numpy.uint8)
+    z = sa ^ random_mask_vec8[o:len(sa)+o]
+    return z.tostring()
+
+def dewhiten(s, o):
+    return whiten(s, o)        # self inverse
+
+
+def make_header(payload_len, whitener_offset=0):
+    # Upper nibble is offset, lower 12 bits is len
+    val = ((whitener_offset & 0xf) << 12) | (payload_len & 0x0fff)
+    #print "offset =", whitener_offset, " len =", payload_len, " val=", val
+    return struct.pack('!HH', val, val)
+
+def make_packet(payload, samples_per_symbol, bits_per_symbol,
+                access_code=default_access_code, pad_for_usrp=True,
+                whitener_offset=0, whitening=True):
+    """
+    Build a packet, given access code, payload, and whitener offset
+
+    @param payload:               packet payload, len [0, 4096]
+    @param samples_per_symbol:    samples per symbol (needed for padding calculation)
+    @type  samples_per_symbol:    int
+    @param bits_per_symbol:       (needed for padding calculation)
+    @type bits_per_symbol:        int
+    @param access_code:           string of ascii 0's and 1's
+    @param whitener_offset        offset into whitener string to use [0-16)
+    
+    Packet will have access code at the beginning, followed by length, payload
+    and finally CRC-32.
+    """
+    if not is_1_0_string(access_code):
+        raise ValueError, "access_code must be a string containing only 0's and 1's (%r)" % (access_code,)
+
+    if not whitener_offset >=0 and whitener_offset < 16:
+        raise ValueError, "whitener_offset must be between 0 and 15, inclusive (%i)" % (whitener_offset,)
+
+    (packed_access_code, padded) = conv_1_0_string_to_packed_binary_string(access_code)
+    (packed_preamble, ignore) = conv_1_0_string_to_packed_binary_string(preamble)
+    
+    payload_with_crc = gru.gen_and_append_crc32(payload)
+    #print "outbound crc =", string_to_hex_list(payload_with_crc[-4:])
+
+    L = len(payload_with_crc)
+    MAXLEN = len(random_mask_tuple)
+    if L > MAXLEN:
+        raise ValueError, "len(payload) must be in [0, %d]" % (MAXLEN,)
+
+    if whitening:
+        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
+                       whiten(payload_with_crc, whitener_offset), '\x55'))
+    else:
+        pkt = ''.join((packed_preamble, packed_access_code, make_header(L, whitener_offset),
+                       (payload_with_crc), '\x55'))
+
+    if pad_for_usrp:
+        pkt = pkt + (_npadding_bytes(len(pkt), int(samples_per_symbol), bits_per_symbol) * '\x55')
+
+    #print "make_packet: len(pkt) =", len(pkt)
+    return pkt
+
+def _npadding_bytes(pkt_byte_len, samples_per_symbol, bits_per_symbol):
+    """
+    Generate sufficient padding such that each packet ultimately ends
+    up being a multiple of 512 bytes when sent across the USB.  We
+    send 4-byte samples across the USB (16-bit I and 16-bit Q), thus
+    we want to pad so that after modulation the resulting packet
+    is a multiple of 128 samples.
+
+    @param ptk_byte_len: len in bytes of packet, not including padding.
+    @param samples_per_symbol: samples per bit (1 bit / symbolwidth GMSK)
+    @type samples_per_symbol: int
+    @param bits_per_symbol: bits per symbol (log2(modulation order))
+    @type bits_per_symbol: int
+
+    @returns number of bytes of padding to append.
+    """
+    modulus = 128
+    byte_modulus = gru.lcm(modulus/8, samples_per_symbol) * bits_per_symbol / samples_per_symbol
+    r = pkt_byte_len % byte_modulus
+    if r == 0:
+        return 0
+    return byte_modulus - r
+    
+
+def unmake_packet(whitened_payload_with_crc, whitener_offset=0, dewhitening=True):
+    """
+    Return (ok, payload)
+
+    @param whitened_payload_with_crc: string
+    """
+
+    if dewhitening:
+        payload_with_crc = dewhiten(whitened_payload_with_crc, whitener_offset)
+    else:
+        payload_with_crc = (whitened_payload_with_crc)
+
+    ok, payload = gru.check_crc32(payload_with_crc)
+
+    if 0:
+        print "payload_with_crc =", string_to_hex_list(payload_with_crc)
+        print "ok = %r, len(payload) = %d" % (ok, len(payload))
+        print "payload =", string_to_hex_list(payload)
+
+    return ok, payload
+
+
+# FYI, this PN code is the output of a 15-bit LFSR
+random_mask_tuple = (
+  255,  63,   0,  16,   0,  12,   0,   5, 192,   3,  16,   1, 204,   0,  85, 192, 
+   63,  16,  16,  12,  12,   5, 197, 195,  19,  17, 205, 204,  85, 149, 255,  47, 
+    0,  28,   0,   9, 192,   6, 208,   2, 220,   1, 153, 192, 106, 208,  47,  28, 
+   28,   9, 201, 198, 214, 210, 222, 221, 152,  89, 170, 186, 255,  51,   0,  21, 
+  192,  15,  16,   4,  12,   3,  69, 193, 243,  16,  69, 204,  51,  21, 213, 207, 
+   31,  20,   8,  15,  70, 132,  50, 227,  85, 137, 255,  38, 192,  26, 208,  11, 
+   28,   7,  73, 194, 182, 209, 182, 220, 118, 217, 230, 218, 202, 219,  23,  27, 
+   78, 139, 116, 103, 103, 106, 170, 175,  63,  60,  16,  17, 204,  12,  85, 197, 
+  255,  19,   0,  13, 192,   5, 144,   3,  44,   1, 221, 192,  89, 144,  58, 236, 
+   19,  13, 205, 197, 149, 147,  47,  45, 220,  29, 153, 201, 170, 214, 255,  30, 
+  192,   8,  80,   6, 188,   2, 241, 193, 132,  80,  99, 124,  41, 225, 222, 200, 
+   88,  86, 186, 190, 243,  48,  69, 212,  51,  31,  85, 200,  63,  22, 144,  14, 
+  236,   4,  77, 195, 117, 145, 231,  44,  74, 157, 247,  41, 134, 158, 226, 232, 
+   73, 142, 182, 228, 118, 203, 102, 215, 106, 222, 175,  24, 124,  10, 161, 199, 
+   56,  82, 146, 189, 173, 177, 189, 180, 113, 183, 100, 118, 171, 102, 255, 106, 
+  192,  47,  16,  28,  12,   9, 197, 198, 211,  18, 221, 205, 153, 149, 170, 239, 
+   63,  12,  16,   5, 204,   3,  21, 193, 207,  16,  84,  12,  63,  69, 208,  51, 
+   28,  21, 201, 207,  22, 212,  14, 223,  68,  88,  51, 122, 149, 227,  47,   9, 
+  220,   6, 217, 194, 218, 209, 155,  28, 107,  73, 239, 118, 204,  38, 213, 218, 
+  223,  27,  24,  11,  74, 135, 119,  34, 166, 153, 186, 234, 243,  15,   5, 196, 
+    3,  19,  65, 205, 240,  85, 132,  63,  35,  80,  25, 252,  10, 193, 199,  16, 
+   82, 140,  61, 165, 209, 187,  28, 115,  73, 229, 246, 203,   6, 215,  66, 222, 
+  177, 152, 116, 106, 167, 111,  58, 172,  19,  61, 205, 209, 149, 156, 111,  41, 
+  236,  30, 205, 200,  85, 150, 191,  46, 240,  28,  68,   9, 243,  70, 197, 242, 
+  211,   5, 157, 195,  41, 145, 222, 236,  88,  77, 250, 181, 131,  55,  33, 214, 
+  152,  94, 234, 184,  79,  50, 180,  21, 183,  79,  54, 180,  22, 247,  78, 198, 
+  180,  82, 247, 125, 134, 161, 162, 248, 121, 130, 162, 225, 185, 136, 114, 230, 
+  165, 138, 251,  39,   3,  90, 129, 251,  32,  67,  88,  49, 250, 148,  67,  47, 
+  113, 220,  36,  89, 219, 122, 219,  99,  27, 105, 203, 110, 215, 108,  94, 173, 
+  248, 125, 130, 161, 161, 184, 120, 114, 162, 165, 185, 187,  50, 243,  85, 133, 
+  255,  35,   0,  25, 192,  10, 208,   7,  28,   2, 137, 193, 166, 208, 122, 220, 
+   35,  25, 217, 202, 218, 215,  27,  30, 139,  72, 103, 118, 170, 166, 255,  58, 
+  192,  19,  16,  13, 204,   5, 149, 195,  47,  17, 220,  12,  89, 197, 250, 211, 
+    3,  29, 193, 201, 144,  86, 236,  62, 205, 208,  85, 156,  63,  41, 208,  30, 
+  220,   8,  89, 198, 186, 210, 243,  29, 133, 201, 163,  22, 249, 206, 194, 212, 
+   81, 159, 124, 104,  33, 238, 152,  76, 106, 181, 239,  55,  12,  22, 133, 206, 
+  227,  20,  73, 207, 118, 212,  38, 223,  90, 216,  59,  26, 147,  75,  45, 247, 
+   93, 134, 185, 162, 242, 249, 133, 130, 227,  33, 137, 216, 102, 218, 170, 219, 
+   63,  27,  80,  11, 124,   7,  97, 194, 168,  81, 190, 188, 112, 113, 228,  36, 
+   75,  91, 119, 123, 102, 163, 106, 249, 239,   2, 204,   1, 149, 192, 111,  16, 
+   44,  12,  29, 197, 201, 147,  22, 237, 206, 205, 148,  85, 175, 127,  60,  32, 
+   17, 216,  12,  90, 133, 251,  35,   3,  89, 193, 250, 208,  67,  28,  49, 201, 
+  212,  86, 223, 126, 216,  32,  90, 152,  59,  42, 147,  95,  45, 248,  29, 130, 
+  137, 161, 166, 248, 122, 194, 163,  17, 185, 204, 114, 213, 229, 159,  11,  40, 
+    7,  94, 130, 184,  97, 178, 168, 117, 190, 167,  48, 122, 148,  35,  47,  89, 
+  220,  58, 217, 211,  26, 221, 203,  25, 151,  74, 238, 183,  12, 118, 133, 230, 
+  227,  10, 201, 199,  22, 210, 142, 221, 164,  89, 187, 122, 243,  99,   5, 233, 
+  195,  14, 209, 196,  92,  83, 121, 253, 226, 193, 137, 144, 102, 236,  42, 205, 
+  223,  21, 152,  15,  42, 132,  31,  35,  72,  25, 246, 138, 198, 231,  18, 202, 
+  141, 151,  37, 174, 155,  60, 107,  81, 239, 124,  76,  33, 245, 216,  71,  26, 
+  178, 139,  53, 167,  87,  58, 190, 147,  48, 109, 212,  45, 159,  93, 168,  57, 
+  190, 146, 240, 109, 132,  45, 163,  93, 185, 249, 178, 194, 245, 145, 135,  44, 
+   98, 157, 233, 169, 142, 254, 228,  64,  75, 112,  55, 100,  22, 171,  78, 255, 
+  116,  64,  39, 112,  26, 164,  11,  59,  71,  83, 114, 189, 229, 177, 139,  52, 
+  103,  87, 106, 190, 175,  48, 124,  20,  33, 207,  88,  84,  58, 191,  83,  48, 
+   61, 212,  17, 159,  76, 104,  53, 238, 151,  12, 110, 133, 236,  99,  13, 233, 
+  197, 142, 211,  36,  93, 219, 121, 155,  98, 235, 105, 143, 110, 228,  44,  75, 
+   93, 247, 121, 134, 162, 226, 249, 137, 130, 230, 225, 138, 200, 103,  22, 170, 
+  142, 255,  36,  64,  27, 112,  11, 100,   7, 107,  66, 175, 113, 188,  36, 113, 
+  219, 100,  91, 107, 123, 111,  99, 108,  41, 237, 222, 205, 152,  85, 170, 191, 
+   63,  48,  16,  20,  12,  15,  69, 196,  51,  19,  85, 205, 255,  21, 128,  15, 
+   32,   4,  24,   3,  74, 129, 247,  32,  70, 152,  50, 234, 149, 143,  47,  36, 
+   28,  27,  73, 203, 118, 215, 102, 222, 170, 216, 127,  26, 160,  11,  56,   7, 
+   82, 130, 189, 161, 177, 184, 116, 114, 167, 101, 186, 171,  51,  63,  85, 208, 
+   63,  28,  16,   9, 204,   6, 213, 194, 223,  17, 152,  12, 106, 133, 239,  35, 
+   12,  25, 197, 202, 211,  23,  29, 206, 137, 148, 102, 239, 106, 204,  47,  21, 
+  220,  15,  25, 196,  10, 211,  71,  29, 242, 137, 133, 166, 227,  58, 201, 211, 
+   22, 221, 206, 217, 148,  90, 239, 123,  12,  35,  69, 217, 243,  26, 197, 203, 
+   19,  23,  77, 206, 181, 148, 119,  47, 102, 156,  42, 233, 223,  14, 216,   4, 
+   90, 131, 123,  33, 227,  88,  73, 250, 182, 195,  54, 209, 214, 220,  94, 217, 
+  248,  90, 194, 187,  17, 179,  76, 117, 245, 231,   7,  10, 130, 135,  33, 162, 
+  152, 121, 170, 162, 255,  57, 128,  18, 224,  13, 136,   5, 166, 131,  58, 225, 
+  211,   8,  93, 198, 185, 146, 242, 237, 133, 141, 163,  37, 185, 219,  50, 219, 
+   85, 155, 127,  43,  96,  31, 104,   8,  46, 134, 156,  98, 233, 233, 142, 206, 
+  228,  84,  75, 127, 119,  96,  38, 168,  26, 254, 139,   0, 103,  64,  42, 176, 
+   31,  52,   8,  23,  70, 142, 178, 228, 117, 139, 103,  39, 106, 154, 175,  43, 
+   60,  31,  81, 200,  60,  86, 145, 254, 236,  64,  77, 240,  53, 132,  23,  35, 
+   78, 153, 244, 106, 199, 111,  18, 172,  13, 189, 197, 177, 147,  52, 109, 215, 
+  109, 158, 173, 168, 125, 190, 161, 176, 120, 116,  34, 167,  89, 186, 186, 243, 
+   51,   5, 213, 195,  31,  17, 200,  12,  86, 133, 254, 227,   0,  73, 192,  54, 
+  208,  22, 220,  14, 217, 196,  90, 211, 123,  29, 227,  73, 137, 246, 230, 198, 
+  202, 210, 215,  29, 158, 137, 168, 102, 254, 170, 192, 127,  16,  32,  12,  24, 
+    5, 202, 131,  23,  33, 206, 152,  84, 106, 191, 111,  48,  44,  20,  29, 207, 
+   73, 148,  54, 239,  86, 204,  62, 213, 208,  95,  28,  56,   9, 210, 134, 221, 
+  162, 217, 185, 154, 242, 235,   5, 143,  67,  36,  49, 219,  84,  91, 127, 123, 
+   96,  35, 104,  25, 238, 138, 204, 103,  21, 234, 143,  15,  36,   4,  27,  67, 
+   75, 113, 247, 100,  70, 171, 114, 255, 101, 128,  43,  32,  31,  88,   8,  58, 
+  134, 147,  34, 237, 217, 141, 154, 229, 171,  11,  63,  71,  80,  50, 188,  21, 
+  177, 207,  52,  84,  23, 127,  78, 160,  52, 120,  23,  98, 142, 169, 164, 126, 
+  251,  96,  67, 104,  49, 238, 148,  76, 111, 117, 236,  39,  13, 218, 133, 155, 
+   35,  43,  89, 223, 122, 216,  35,  26, 153, 203,  42, 215,  95,  30, 184,   8, 
+  114, 134, 165, 162, 251,  57, 131,  82, 225, 253, 136,  65, 166, 176, 122, 244, 
+   35,   7,  89, 194, 186, 209, 179,  28, 117, 201, 231,  22, 202, 142, 215,  36, 
+   94, 155, 120, 107,  98, 175, 105, 188,  46, 241, 220,  68,  89, 243, 122, 197, 
+  227,  19,   9, 205, 198, 213, 146, 223,  45, 152,  29, 170, 137, 191,  38, 240, 
+   26, 196,  11,  19,  71,  77, 242, 181, 133, 183,  35,  54, 153, 214, 234, 222, 
+  207,  24,  84,  10, 191,  71,  48,  50, 148,  21, 175,  79,  60,  52,  17, 215, 
+   76,  94, 181, 248, 119,   2, 166, 129, 186, 224, 115,   8,  37, 198, 155,  18, 
+  235,  77, 143, 117, 164,  39,  59,  90, 147, 123,  45, 227,  93, 137, 249, 166, 
+  194, 250, 209, 131,  28,  97, 201, 232,  86, 206, 190, 212, 112,  95, 100,  56, 
+   43,  82, 159, 125, 168,  33, 190, 152, 112, 106, 164,  47,  59,  92,  19, 121, 
+  205, 226, 213, 137, 159,  38, 232,  26, 206, 139,  20, 103,  79, 106, 180,  47, 
+   55,  92,  22, 185, 206, 242, 212,  69, 159, 115,  40,  37, 222, 155,  24, 107, 
+   74, 175, 119,  60,  38, 145, 218, 236,  91,  13, 251,  69, 131, 115,  33, 229, 
+  216,  75,  26, 183,  75,  54, 183,  86, 246, 190, 198, 240,  82, 196,  61, 147, 
+   81, 173, 252, 125, 129, 225, 160,  72, 120,  54, 162, 150, 249, 174, 194, 252, 
+   81, 129, 252,  96,  65, 232,  48,  78, 148,  52, 111,  87, 108,  62, 173, 208, 
+  125, 156,  33, 169, 216, 126, 218, 160,  91,  56,  59,  82, 147, 125, 173, 225, 
+  189, 136, 113, 166, 164, 122, 251,  99,   3, 105, 193, 238, 208,  76,  92,  53, 
+  249, 215,   2, 222, 129, 152,  96, 106, 168,  47,  62, 156,  16, 105, 204,  46, 
+  213, 220,  95,  25, 248,  10, 194, 135,  17, 162, 140, 121, 165, 226, 251,   9, 
+  131,  70, 225, 242, 200,  69, 150, 179,  46, 245, 220,  71,  25, 242, 138, 197, 
+  167,  19,  58, 141, 211,  37, 157, 219,  41, 155,  94, 235, 120,  79,  98, 180, 
+   41, 183,  94, 246, 184,  70, 242, 178, 197, 181, 147,  55,  45, 214, 157, 158, 
+  233, 168,  78, 254, 180,  64, 119, 112,  38, 164,  26, 251,  75,   3, 119,  65, 
+  230, 176,  74, 244,  55,   7,  86, 130, 190, 225, 176,  72, 116,  54, 167,  86, 
+  250, 190, 195,  48,  81, 212,  60,  95,  81, 248,  60,  66, 145, 241, 172,  68, 
+  125, 243,  97, 133, 232,  99,  14, 169, 196, 126, 211,  96,  93, 232,  57, 142, 
+  146, 228, 109, 139, 109, 167, 109, 186, 173, 179,  61, 181, 209, 183,  28, 118, 
+  137, 230, 230, 202, 202, 215,  23,  30, 142, 136, 100, 102, 171, 106, 255, 111, 
+    0,  44,   0,  29, 192,   9, 144,   6, 236,   2, 205, 193, 149, 144, 111,  44, 
+   44,  29, 221, 201, 153, 150, 234, 238, 207,  12,  84,   5, 255,  67,   0,  49, 
+  192,  20,  80,  15, 124,   4,  33, 195,  88,  81, 250, 188,  67,  49, 241, 212, 
+   68,  95, 115, 120,  37, 226, 155,   9, 171,  70, 255, 114, 192,  37, 144,  27, 
+   44,  11,  93, 199, 121, 146, 162, 237, 185, 141, 178, 229, 181, 139,  55,  39, 
+   86, 154, 190, 235,  48,  79,  84,  52,  63,  87,  80,  62, 188,  16, 113, 204, 
+   36,  85, 219, 127,  27,  96,  11, 104,   7, 110, 130, 172,  97, 189, 232, 113, 
+  142, 164, 100, 123, 107,  99, 111, 105, 236,  46, 205, 220,  85, 153, 255,  42, 
+  192,  31,  16,   8,  12,   6, 133, 194, 227,  17, 137, 204, 102, 213, 234, 223, 
+   15,  24,   4,  10, 131,  71,  33, 242, 152,  69, 170, 179,  63,  53, 208,  23, 
+   28,  14, 137, 196, 102, 211, 106, 221, 239,  25, 140,  10, 229, 199,  11,  18, 
+  135,  77, 162, 181, 185, 183,  50, 246, 149, 134, 239,  34, 204,  25, 149, 202, 
+  239,  23,  12,  14, 133, 196,  99,  19, 105, 205, 238, 213, 140,  95,  37, 248, 
+   27,   2, 139,  65, 167, 112, 122, 164,  35,  59,  89, 211, 122, 221, 227,  25, 
+  137, 202, 230, 215,  10, 222, 135,  24,  98, 138, 169, 167,  62, 250, 144,  67, 
+   44,  49, 221, 212,  89, 159, 122, 232,  35,  14, 153, 196, 106, 211, 111,  29, 
+  236,   9, 141, 198, 229, 146, 203,  45, 151,  93, 174, 185, 188, 114, 241, 229, 
+  132,  75,  35, 119,  89, 230, 186, 202, 243,  23,   5, 206, 131,  20,  97, 207, 
+  104,  84,  46, 191,  92, 112,  57, 228,  18, 203,  77, 151, 117, 174, 167,  60, 
+  122, 145, 227,  44,  73, 221, 246, 217, 134, 218, 226, 219,   9, 155,  70, 235, 
+  114, 207, 101, 148,  43,  47,  95,  92,  56,  57, 210, 146, 221, 173, 153, 189, 
+  170, 241, 191,   4, 112,   3, 100,   1, 235,  64,  79, 112,  52,  36,  23,  91, 
+   78, 187, 116, 115, 103, 101, 234, 171,  15,  63,  68,  16,  51,  76,  21, 245, 
+  207,   7,  20,   2, 143,  65, 164,  48, 123,  84,  35, 127,  89, 224,  58, 200, 
+   19,  22, 141, 206, 229, 148,  75,  47, 119,  92,  38, 185, 218, 242, 219,   5, 
+  155,  67,  43, 113, 223, 100,  88,  43, 122, 159,  99,  40,  41, 222, 158, 216, 
+  104,  90, 174, 187,  60, 115,  81, 229, 252,  75,   1, 247,  64,  70, 176,  50, 
+  244,  21, 135,  79,  34, 180,  25, 183,  74, 246, 183,   6, 246, 130, 198, 225, 
+  146, 200, 109, 150, 173, 174, 253, 188,  65, 177, 240, 116,  68,  39, 115,  90, 
+  165, 251,  59,   3,  83,  65, 253, 240,  65, 132,  48,  99,  84,  41, 255,  94, 
+  192,  56,  80,  18, 188,  13, 177, 197, 180,  83,  55, 125, 214, 161, 158, 248, 
+  104,  66, 174, 177, 188, 116, 113, 231, 100,  74, 171, 119,  63, 102, 144,  42, 
+  236,  31,  13, 200,   5, 150, 131,  46, 225, 220,  72,  89, 246, 186, 198, 243, 
+   18, 197, 205, 147,  21, 173, 207,  61, 148,  17, 175,  76, 124,  53, 225, 215, 
+    8,  94, 134, 184,  98, 242, 169, 133, 190, 227,  48,  73, 212,  54, 223,  86, 
+  216,  62, 218, 144,  91,  44,  59,  93, 211, 121, 157, 226, 233, 137, 142, 230, 
+  228,  74, 203, 119,  23, 102, 142, 170, 228, 127,  11,  96,   7, 104,   2, 174, 
+  129, 188,  96, 113, 232,  36,  78, 155, 116, 107, 103, 111, 106, 172,  47,  61, 
+  220,  17, 153, 204, 106, 213, 239,  31,  12,   8,   5, 198, 131,  18, 225, 205, 
+  136,  85, 166, 191,  58, 240,  19,   4,  13, 195,  69, 145, 243,  44,  69, 221, 
+  243,  25, 133, 202, 227,  23,   9, 206, 134, 212,  98, 223, 105, 152,  46, 234, 
+  156,  79,  41, 244,  30, 199,  72,  82, 182, 189, 182, 241, 182, 196, 118, 211, 
+  102, 221, 234, 217, 143,  26, 228,  11,  11,  71,  71, 114, 178, 165, 181, 187, 
+   55,  51,  86, 149, 254, 239,   0,  76,   0,  53, 192,  23,  16,  14, 140,   4, 
+  101, 195, 107,  17, 239,  76,  76,  53, 245, 215,   7,  30, 130, 136,  97, 166, 
+  168, 122, 254, 163,   0, 121, 192,  34, 208,  25, 156,  10, 233, 199,  14, 210, 
+  132,  93, 163, 121, 185, 226, 242, 201, 133, 150, 227,  46, 201, 220,  86, 217, 
+  254, 218, 192,  91,  16,  59,  76,  19, 117, 205, 231,  21, 138, 143,  39,  36, 
+   26, 155,  75,  43, 119,  95, 102, 184,  42, 242, 159,   5, 168,   3,  62, 129, 
+  208,  96,  92,  40,  57, 222, 146, 216, 109, 154, 173, 171,  61, 191,  81, 176, 
+   60, 116,  17, 231,  76,  74, 181, 247,  55,   6, 150, 130, 238, 225, 140,  72, 
+  101, 246, 171,   6, 255,  66, 192,  49, 144,  20, 108,  15, 109, 196,  45, 147, 
+   93, 173, 249, 189, 130, 241, 161, 132, 120,  99,  98, 169, 233, 190, 206, 240, 
+   84,  68,  63, 115,  80,  37, 252,  27,   1, 203,  64,  87, 112,  62, 164,  16, 
+  123,  76,  35, 117, 217, 231,  26, 202, 139,  23,  39,  78, 154, 180, 107,  55, 
+  111,  86, 172,  62, 253, 208,  65, 156,  48, 105, 212,  46, 223,  92,  88,  57, 
+  250, 146, 195,  45, 145, 221, 172,  89, 189, 250, 241, 131,   4,  97, 195, 104, 
+   81, 238, 188,  76, 113, 245, 228,  71,  11, 114, 135, 101, 162, 171,  57, 191, 
+   82, 240,  61, 132,  17, 163,  76, 121, 245, 226, 199,   9, 146, 134, 237, 162, 
+  205, 185, 149, 178, 239,  53, 140,  23,  37, 206, 155,  20, 107,  79, 111, 116, 
+   44,  39,  93, 218, 185, 155,  50, 235,  85, 143, 127,  36,  32,  27,  88,  11, 
+  122, 135,  99,  34, 169, 217, 190, 218, 240,  91,   4,  59,  67,  83, 113, 253, 
+  228,  65, 139, 112, 103, 100,  42, 171,  95,  63, 120,  16,  34, 140,  25, 165, 
+  202, 251,  23,   3,  78, 129, 244,  96,  71, 104,  50, 174, 149, 188, 111,  49, 
+  236,  20,  77, 207, 117, 148,  39,  47,  90, 156,  59,  41, 211,  94, 221, 248, 
+   89, 130, 186, 225, 179,   8, 117, 198, 167,  18, 250, 141, 131,  37, 161, 219, 
+   56,  91,  82, 187, 125, 179,  97, 181, 232, 119,  14, 166, 132, 122, 227,  99, 
+    9, 233, 198, 206, 210, 212,  93, 159, 121, 168,  34, 254, 153, 128, 106, 224, 
+   47,   8,  28,   6, 137, 194, 230, 209, 138, 220, 103,  25, 234, 138, 207,  39, 
+   20,  26, 143,  75,  36,  55,  91,  86, 187, 126, 243,  96,  69, 232,  51,  14, 
+  149, 196, 111,  19, 108,  13, 237, 197, 141, 147,  37, 173, 219,  61, 155,  81, 
+  171, 124, 127,  97, 224,  40,  72,  30, 182, 136, 118, 230, 166, 202, 250, 215, 
+    3,  30, 129, 200,  96,  86, 168,  62, 254, 144,  64, 108,  48,  45, 212,  29, 
+  159,  73, 168,  54, 254, 150, 192, 110, 208,  44,  92,  29, 249, 201, 130, 214, 
+  225, 158, 200, 104,  86, 174, 190, 252, 112,  65, 228,  48,  75,  84,  55, 127, 
+   86, 160,  62, 248,  16,  66, 140,  49, 165, 212, 123,  31,  99,  72,  41, 246, 
+  158, 198, 232,  82, 206, 189, 148, 113, 175, 100, 124,  43,  97, 223, 104,  88, 
+   46, 186, 156, 115,  41, 229, 222, 203,  24,  87,  74, 190, 183,  48, 118, 148, 
+   38, 239,  90, 204,  59,  21, 211,  79,  29, 244,   9, 135,  70, 226, 178, 201, 
+  181, 150, 247,  46, 198, 156,  82, 233, 253, 142, 193, 164,  80, 123, 124,  35, 
+   97, 217, 232,  90, 206, 187,  20, 115,  79, 101, 244,  43,   7,  95,  66, 184, 
+   49, 178, 148, 117, 175, 103,  60,  42, 145, 223,  44,  88,  29, 250, 137, 131, 
+   38, 225, 218, 200,  91,  22, 187,  78, 243, 116,  69, 231, 115,  10, 165, 199, 
+   59,  18, 147,  77, 173, 245, 189, 135,  49, 162, 148, 121, 175,  98, 252,  41, 
+  129, 222, 224,  88,  72,  58, 182, 147,  54, 237, 214, 205, 158, 213, 168,  95, 
+   62, 184,  16, 114, 140,  37, 165, 219,  59,  27,  83,  75, 125, 247,  97, 134, 
+  168,  98, 254, 169, 128, 126, 224,  32,  72,  24,  54, 138, 150, 231,  46, 202, 
+  156,  87,  41, 254, 158, 192, 104,  80,  46, 188,  28, 113, 201, 228,  86, 203, 
+  126, 215,  96,  94, 168,  56, 126, 146, 160, 109, 184,  45, 178, 157, 181, 169, 
+  183,  62, 246, 144,  70, 236,  50, 205, 213, 149, 159,  47,  40,  28,  30, 137, 
+  200, 102, 214, 170, 222, 255,  24,  64,  10, 176,   7,  52,   2, 151,  65, 174, 
+  176, 124, 116,  33, 231,  88,  74, 186, 183,  51,  54, 149, 214, 239,  30, 204, 
+    8,  85, 198, 191,  18, 240,  13, 132,   5, 163,  67,  57, 241, 210, 196,  93, 
+  147, 121, 173, 226, 253, 137, 129, 166, 224, 122, 200,  35,  22, 153, 206, 234, 
+  212,  79,  31, 116,   8,  39,  70, 154, 178, 235,  53, 143,  87,  36,  62, 155, 
+   80, 107, 124,  47,  97, 220,  40,  89, 222, 186, 216, 115,  26, 165, 203,  59, 
+   23,  83,  78, 189, 244, 113, 135, 100,  98, 171, 105, 191, 110, 240,  44,  68, 
+   29, 243,  73, 133, 246, 227,   6, 201, 194, 214, 209, 158, 220, 104,  89, 238, 
+  186, 204, 115,  21, 229, 207,  11,  20,   7,  79,  66, 180,  49, 183,  84, 118, 
+  191, 102, 240,  42, 196,  31,  19,  72,  13, 246, 133, 134, 227,  34, 201, 217, 
+  150, 218, 238, 219,  12,  91,  69, 251, 115,   3, 101, 193, 235,  16,  79,  76, 
+   52,  53, 215,  87,  30, 190, 136, 112, 102, 164,  42, 251,  95,   3, 120,   1, 
+  226, 128,  73, 160,  54, 248,  22, 194, 142, 209, 164,  92, 123, 121, 227,  98, 
+  201, 233, 150, 206, 238, 212,  76,  95, 117, 248,  39,   2, 154, 129, 171,  32, 
+  127,  88,  32,  58, 152,  19,  42, 141, 223,  37, 152,  27,  42, 139,  95,  39, 
+  120,  26, 162, 139,  57, 167,  82, 250, 189, 131,  49, 161, 212, 120,  95,  98, 
+  184,  41, 178, 158, 245, 168,  71,  62, 178, 144, 117, 172,  39,  61, 218, 145, 
+  155,  44, 107,  93, 239, 121, 140,  34, 229, 217, 139,  26, 231,  75,  10, 183, 
+   71,  54, 178, 150, 245, 174, 199,  60,  82, 145, 253, 172,  65, 189, 240, 113, 
+  132,  36,  99,  91, 105, 251, 110, 195, 108,  81, 237, 252,  77, 129, 245, 160, 
+   71,  56,  50, 146, 149, 173, 175,  61, 188,  17, 177, 204, 116,  85, 231, 127, 
+   10, 160,   7,  56,   2, 146, 129, 173, 160, 125, 184,  33, 178, 152, 117, 170, 
+  167,  63,  58, 144,  19,  44,  13, 221, 197, 153, 147,  42, 237, 223,  13, 152, 
+    5, 170, 131,  63,  33, 208,  24,  92,  10, 185, 199,  50, 210, 149, 157, 175, 
+   41, 188,  30, 241, 200,  68,  86, 179, 126, 245, 224,  71,   8,  50, 134, 149, 
+  162, 239,  57, 140,  18, 229, 205, 139,  21, 167,  79,  58, 180,  19,  55,  77, 
+  214, 181, 158, 247,  40,  70, 158, 178, 232, 117, 142, 167,  36, 122, 155,  99, 
+   43, 105, 223, 110, 216,  44,  90, 157, 251,  41, 131,  94, 225, 248,  72,  66, 
+  182, 177, 182, 244, 118, 199, 102, 210, 170, 221, 191,  25, 176,  10, 244,   7, 
+    7,  66, 130, 177, 161, 180, 120, 119,  98, 166, 169, 186, 254, 243,   0,  69, 
+  192,  51,  16,  21, 204,  15,  21, 196,  15,  19,  68,  13, 243,  69, 133, 243, 
+   35,   5, 217, 195,  26, 209, 203,  28,  87,  73, 254, 182, 192, 118, 208,  38, 
+  220,  26, 217, 203,  26, 215,  75,  30, 183,  72, 118, 182, 166, 246, 250, 198, 
+  195,  18, 209, 205, 156,  85, 169, 255,  62, 192,  16,  80,  12,  60,   5, 209, 
+  195,  28,  81, 201, 252,  86, 193, 254, 208,  64,  92,  48,  57, 212,  18, 223, 
+   77, 152,  53, 170, 151,  63,  46, 144,  28, 108,   9, 237, 198, 205, 146, 213, 
+  173, 159,  61, 168,  17, 190, 140, 112, 101, 228,  43,  11,  95,  71, 120,  50, 
+  162, 149, 185, 175,  50, 252,  21, 129, 207,  32,  84,  24,  63,  74, 144,  55, 
+   44,  22, 157, 206, 233, 148,  78, 239, 116,  76,  39, 117, 218, 167,  27,  58, 
+  139,  83,  39, 125, 218, 161, 155,  56, 107,  82, 175, 125, 188,  33, 177, 216, 
+  116,  90, 167, 123,  58, 163,  83,  57, 253, 210, 193, 157, 144, 105, 172,  46, 
+  253, 220,  65, 153, 240, 106, 196,  47,  19,  92,  13, 249, 197, 130, 211,  33, 
+  157, 216, 105, 154, 174, 235,  60,  79,  81, 244,  60,  71,  81, 242, 188,  69, 
+  177, 243,  52,  69, 215, 115,  30, 165, 200, 123,  22, 163,  78, 249, 244,  66, 
+  199, 113, 146, 164, 109, 187, 109, 179, 109, 181, 237, 183,  13, 182, 133, 182, 
+  227,  54, 201, 214, 214, 222, 222, 216,  88,  90, 186, 187,  51,  51, 255,  63 )
+
+random_mask_vec8 = numpy.array(random_mask_tuple, numpy.uint8)
+
diff --git a/gr-digital/python/pkt.py b/gr-digital/python/pkt.py
new file mode 100644
index 0000000000..aa720d1a52
--- /dev/null
+++ b/gr-digital/python/pkt.py
@@ -0,0 +1,184 @@
+#
+# Copyright 2005, 2006, 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.
+# 
+
+from math import pi
+from gnuradio import gr, packet_utils
+import gnuradio.gr.gr_threading as _threading
+
+
+# /////////////////////////////////////////////////////////////////////////////
+#                   mod/demod with packets as i/o
+# /////////////////////////////////////////////////////////////////////////////
+
+class mod_pkts(gr.hier_block2):
+    """
+    Wrap an arbitrary digital modulator in our packet handling framework.
+
+    Send packets by calling send_pkt
+    """
+    def __init__(self, modulator, access_code=None, msgq_limit=2, pad_for_usrp=True, use_whitener_offset=False,
+                 modulate=True):
+        """
+	Hierarchical block for sending packets
+
+        Packets to be sent are enqueued by calling send_pkt.
+        The output is the complex modulated signal at baseband.
+
+        @param modulator: instance of modulator class (gr_block or hier_block2)
+        @type modulator: complex baseband out
+        @param access_code: AKA sync vector
+        @type access_code: string of 1's and 0's between 1 and 64 long
+        @param msgq_limit: maximum number of messages in message queue
+        @type msgq_limit: int
+        @param pad_for_usrp: If true, packets are padded such that they end up a multiple of 128 samples
+        @param use_whitener_offset: If true, start of whitener XOR string is incremented each packet
+        @param modulate: If false, no modulation will be performed.
+        
+        See gmsk_mod for remaining parameters
+        """
+        if modulate:
+            output_size = gr.sizeof_gr_complex
+        else:
+            output_size = gr.sizeof_char
+
+	gr.hier_block2.__init__(self, "mod_pkts",
+				gr.io_signature(0, 0, 0),                    # Input signature
+				gr.io_signature(1, 1, output_size))          # Output signature
+
+        self._modulator = modulator
+        self._pad_for_usrp = pad_for_usrp
+        self._use_whitener_offset = use_whitener_offset
+        self._whitener_offset = 0
+        
+        if access_code is None:
+            access_code = packet_utils.default_access_code
+        if not packet_utils.is_1_0_string(access_code):
+            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
+        self._access_code = access_code
+
+        # accepts messages from the outside world
+        self._pkt_input = gr.message_source(gr.sizeof_char, msgq_limit)
+        if modulate:
+            self.connect(self._pkt_input, self._modulator, self)
+        else:
+            self.connect(self._pkt_input, self)
+
+    def send_pkt(self, payload='', eof=False):
+        """
+        Send the payload.
+
+        @param payload: data to send
+        @type payload: string
+        """
+        if eof:
+            msg = gr.message(1) # tell self._pkt_input we're not sending any more packets
+        else:
+            # print "original_payload =", string_to_hex_list(payload)
+            pkt = packet_utils.make_packet(payload,
+                                           self._modulator.samples_per_symbol(),
+                                           self._modulator.bits_per_symbol(),
+                                           self._access_code,
+                                           self._pad_for_usrp,
+                                           self._whitener_offset)
+            #print "pkt =", string_to_hex_list(pkt)
+            msg = gr.message_from_string(pkt)
+            if self._use_whitener_offset is True:
+                self._whitener_offset = (self._whitener_offset + 1) % 16
+                
+        self._pkt_input.msgq().insert_tail(msg)
+
+
+
+class demod_pkts(gr.hier_block2):
+    """
+    Wrap an arbitrary digital demodulator in our packet handling framework.
+
+    The input is complex baseband.  When packets are demodulated, they are passed to the
+    app via the callback.
+    """
+
+    def __init__(self, demodulator, access_code=None, callback=None, threshold=-1, demodulate=True):
+        """
+	Hierarchical block for demodulating and deframing packets.
+
+	The input is the complex modulated signal at baseband.
+        Demodulated packets are sent to the handler.
+
+        If demodulator is None it is assumed the input is already demodulated.
+
+        @param demodulator: instance of demodulator class (gr_block or hier_block2)
+        @type demodulator: complex baseband in
+        @param access_code: AKA sync vector
+        @type access_code: string of 1's and 0's
+        @param callback:  function of two args: ok, payload
+        @type callback: ok: bool; payload: string
+        @param threshold: detect access_code with up to threshold bits wrong (-1 -> use default)
+        @type threshold: int
+	"""
+
+        if demodulator is not None:
+            input_size = gr.sizeof_gr_complex
+        else:
+            input_size = gr.sizeof_char
+
+	gr.hier_block2.__init__(self, "demod_pkts",
+				gr.io_signature(1, 1, input_size), # Input signature
+				gr.io_signature(0, 0, 0))          # Output signature
+
+        self._demodulator = demodulator
+        if access_code is None:
+            access_code = packet_utils.default_access_code
+        if not packet_utils.is_1_0_string(access_code):
+            raise ValueError, "Invalid access_code %r. Must be string of 1's and 0's" % (access_code,)
+        self._access_code = access_code
+
+        if threshold == -1:
+            threshold = 12              # FIXME raise exception
+
+        self._rcvd_pktq = gr.msg_queue()          # holds packets from the PHY
+        self.correlator = gr.correlate_access_code_bb(access_code, threshold)
+
+        self.framer_sink = gr.framer_sink_1(self._rcvd_pktq)
+        if self._demodulator is not None:
+            self.connect(self, self._demodulator, self.correlator, self.framer_sink)
+        else:
+            self.connect(self, self.correlator, self.framer_sink)
+        
+        if callback is not None:
+            self._watcher = _queue_watcher_thread(self._rcvd_pktq, callback)
+
+
+class _queue_watcher_thread(_threading.Thread):
+    def __init__(self, rcvd_pktq, callback):
+        _threading.Thread.__init__(self)
+        self.setDaemon(1)
+        self.rcvd_pktq = rcvd_pktq
+        self.callback = callback
+        self.keep_running = True
+        self.start()
+
+
+    def run(self):
+        while self.keep_running:
+            msg = self.rcvd_pktq.delete_head()
+            ok, payload = packet_utils.unmake_packet(msg.to_string(), int(msg.arg1()))
+            if self.callback:
+                self.callback(ok, payload)
diff --git a/gr-digital/python/qa_constellation_receiver.py b/gr-digital/python/qa_constellation_receiver.py
index 70b62c7aab..cb4a0c10e7 100755
--- a/gr-digital/python/qa_constellation_receiver.py
+++ b/gr-digital/python/qa_constellation_receiver.py
@@ -22,9 +22,9 @@
 
 import random
 
-from gnuradio import gr, blks2, packet_utils, gr_unittest
+from gnuradio import gr, blks2, gr_unittest
 from utils import mod_codes, alignment
-import digital_swig
+import digital_swig, packet_utils
 from generic_mod_demod import generic_mod, generic_demod
 
 from qa_constellation import tested_constellations, twod_constell
-- 
cgit v1.2.3