summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py40
-rw-r--r--gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py37
2 files changed, 57 insertions, 20 deletions
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
index 3147bfa2a..ac2e9323f 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/dbpsk.py
@@ -255,16 +255,34 @@ class dbpsk_demod(gr.hier_block2):
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.1
- fmax = 0.1
+ 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)
-
+ #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)
+
+ self.clock_recov = gr.costas_loop_cc(self._costas_alpha,
+ self._costas_beta,
+ fmax, fmin, arity)
+ if 0:
+ self.time_recov = gr.clock_recovery_mm_cc(self._mm_omega,
+ self._mm_gain_omega,
+ self._mm_mu,
+ self._mm_gain_mu,
+ self._mm_omega_relative_limit)
+ else:
+ nfilts = 8
+ ntaps = nfilts*ntaps
+ taps = gr.firdes.root_raised_cosine(
+ nfilts, 1.0, 0.25/nfilts, self._excess_bw, ntaps)
+ self.time_recov = gr.pfb_clock_sync_ccf(self._mm_omega,
+ self._mm_gain_mu,
+ taps, nfilts)
+
# Do differential decoding based on phase change of symbols
self.diffdec = gr.diff_phasor_cc()
@@ -288,7 +306,9 @@ class dbpsk_demod(gr.hier_block2):
self._setup_logging()
# Connect and Initialize base class
- self.connect(self, self.pre_scaler, self.agc, self.rrc_filter, self.receiver,
+ self.connect(self, self.pre_scaler, self.agc, #self.rrc_filter, self.receiver,
+ #self.clock_recov,
+ self.time_recov,
self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
def samples_per_symbol(self):
diff --git a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
index 8c15d2173..34e6581bf 100644
--- a/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
+++ b/gnuradio-core/src/python/gnuradio/blks2impl/dqpsk.py
@@ -255,16 +255,32 @@ class dqpsk_demod(gr.hier_block2):
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
+ 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)
+ self.clock_recov = gr.costas_loop_cc(self._costas_alpha,
+ self._costas_beta,
+ fmax, fmin, arity)
+ if 0:
+ self.time_recov = gr.clock_recovery_mm_cc(self._mm_omega,
+ self._mm_gain_omega,
+ self._mm_mu,
+ self._mm_gain_mu,
+ self._mm_omega_relative_limit)
+ else:
+ ntaps = 32*ntaps
+ taps = gr.firdes.root_raised_cosine(
+ 32, 1.0, 0.25/32.0, self._excess_bw, ntaps)
+ self.time_recov = gr.pfb_clock_sync_ccf(self._mm_omega,
+ self._mm_gain_mu,
+ taps)
- 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()
@@ -288,7 +304,8 @@ class dqpsk_demod(gr.hier_block2):
self._setup_logging()
# Connect & Initialize base class
- self.connect(self, self.pre_scaler, self.agc, self.rrc_filter, self.receiver,
+ self.connect(self, self.pre_scaler, self.agc, #self.rrc_filter, #self.receiver,
+ self.clock_recov, self.time_recov,
self.diffdec, self.slicer, self.symbol_mapper, self.unpack, self)
def samples_per_symbol(self):