diff options
author | Tom Rondeau | 2011-10-12 19:02:47 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-10-12 19:03:05 -0400 |
commit | 60b3bd32aa145522a1eaf9978e594ed13b9a6bc5 (patch) | |
tree | 8e9c02913a91678bb61eb5a6572544a959d49842 /gr-digital/python | |
parent | 0e16a28047d07afc6e4d31839d804dca0d0de31e (diff) | |
download | gnuradio-60b3bd32aa145522a1eaf9978e594ed13b9a6bc5.tar.gz gnuradio-60b3bd32aa145522a1eaf9978e594ed13b9a6bc5.tar.bz2 gnuradio-60b3bd32aa145522a1eaf9978e594ed13b9a6bc5.zip |
digital: moved over all c++ blocks to gr-digital. Benchmark tx/rx still working.
Diffstat (limited to 'gr-digital/python')
-rw-r--r-- | gr-digital/python/ofdm.py | 20 | ||||
-rw-r--r-- | gr-digital/python/ofdm_receiver.py | 10 |
2 files changed, 18 insertions, 12 deletions
diff --git a/gr-digital/python/ofdm.py b/gr-digital/python/ofdm.py index ba49c6250..c7654f0de 100644 --- a/gr-digital/python/ofdm.py +++ b/gr-digital/python/ofdm.py @@ -94,12 +94,16 @@ class ofdm_mod(gr.hier_block2): elif(self._modulation.find("qam") >= 0): rotated_const = map(lambda pt: pt * rot, qam.constellation[arity]) #print rotated_const - self._pkt_input = gr.ofdm_mapper_bcv(rotated_const, msgq_limit, - options.occupied_tones, options.fft_length) + self._pkt_input = digital_swig.ofdm_mapper_bcv(rotated_const, + msgq_limit, + options.occupied_tones, + options.fft_length) - self.preambles = gr.ofdm_insert_preamble(self._fft_length, padded_preambles) + self.preambles = digital_swig.ofdm_insert_preamble(self._fft_length, + padded_preambles) self.ifft = gr.fft_vcc(self._fft_length, False, win, True) - self.cp_adder = gr.ofdm_cyclic_prefixer(self._fft_length, symbol_length) + self.cp_adder = digital_swig.ofdm_cyclic_prefixer(self._fft_length, + symbol_length) self.scale = gr.multiply_const_cc(1.0 / math.sqrt(self._fft_length)) self.connect((self._pkt_input, 0), (self.preambles, 0)) @@ -230,10 +234,10 @@ class ofdm_demod(gr.hier_block2): phgain = 0.25 frgain = phgain*phgain / 4.0 - self.ofdm_demod = gr.ofdm_frame_sink(rotated_const, range(arity), - self._rcvd_pktq, - self._occupied_tones, - phgain, frgain) + self.ofdm_demod = digital_swig.ofdm_frame_sink(rotated_const, range(arity), + self._rcvd_pktq, + self._occupied_tones, + phgain, frgain) self.connect(self, self.ofdm_recv) self.connect((self.ofdm_recv, 0), (self.ofdm_demod, 0)) diff --git a/gr-digital/python/ofdm_receiver.py b/gr-digital/python/ofdm_receiver.py index 6c19cb32e..9d4d6e559 100644 --- a/gr-digital/python/ofdm_receiver.py +++ b/gr-digital/python/ofdm_receiver.py @@ -23,6 +23,8 @@ import math from numpy import fft from gnuradio import gr + +import digital_swig from ofdm_sync_pn import ofdm_sync_pn from ofdm_sync_fixed import ofdm_sync_fixed from ofdm_sync_pnac import ofdm_sync_pnac @@ -119,11 +121,11 @@ class ofdm_receiver(gr.hier_block2): self.nco = gr.frequency_modulator_fc(nco_sensitivity) # generate a signal proportional to frequency error of sync block self.sigmix = gr.multiply_cc() - self.sampler = gr.ofdm_sampler(fft_length, fft_length+cp_length) + self.sampler = digital_swig.ofdm_sampler(fft_length, fft_length+cp_length) self.fft_demod = gr.fft_vcc(fft_length, True, win, True) - self.ofdm_frame_acq = gr.ofdm_frame_acquisition(occupied_tones, - fft_length, - cp_length, ks[0]) + self.ofdm_frame_acq = digital_swig.ofdm_frame_acquisition(occupied_tones, + fft_length, + cp_length, ks[0]) self.connect(self, self.chan_filt) # filter the input channel self.connect(self.chan_filt, self.ofdm_sync) # into the synchronization alg. |