diff options
Diffstat (limited to 'gr-trellis/src/python/qa_trellis.py')
-rwxr-xr-x | gr-trellis/src/python/qa_trellis.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py index fcc651ec6d..53dcf0d8f6 100755 --- a/gr-trellis/src/python/qa_trellis.py +++ b/gr-trellis/src/python/qa_trellis.py @@ -29,7 +29,8 @@ from gnuradio import gr, gr_unittest, blks2 import trellis import os -import digital_swig +import digital_swig as digital +import analog_swig as analog fsm_args = {"awgn1o2_4": (2, 4, 4, (0, 2, 0, 2, 1, 3, 1, 3), @@ -39,8 +40,8 @@ fsm_args = {"awgn1o2_4": (2, 4, 4, "nothing": (2, 1, 2, (0, 0), (0, 1)), } -constells = {2: digital_swig.constellation_bpsk(), - 4: digital_swig.constellation_qpsk(), +constells = {2: digital.constellation_bpsk(), + 4: digital.constellation_qpsk(), } class test_trellis (gr_unittest.TestCase): @@ -114,15 +115,15 @@ class trellis_tb(gr.top_block): s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST) # initial FSM state = 0 enc = trellis.encoder_ss(f, 0) - mod = gr.chunks_to_symbols_sc(constellation.points(), 1) + mod = digital.chunks_to_symbols_sc(constellation.points(), 1) # CHANNEL add = gr.add_cc() - noise = gr.noise_source_c(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_c(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX # data preprocessing to generate metrics for Viterbi - metrics = trellis.constellation_metrics_cf(constellation.base(), digital_swig.TRELLIS_EUCLIDEAN) + metrics = trellis.constellation_metrics_cf(constellation.base(), digital.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set. va = trellis.viterbi_s(f, K, 0, -1) # pack FSM input symbols to shorts |