diff options
Diffstat (limited to 'gr-trellis/src/examples/python/test_tcm_combined.py')
-rwxr-xr-x | gr-trellis/src/examples/python/test_tcm_combined.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gr-trellis/src/examples/python/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py index d98e36e27d..8bea1ac86a 100755 --- a/gr-trellis/src/examples/python/test_tcm_combined.py +++ b/gr-trellis/src/examples/python/test_tcm_combined.py @@ -9,6 +9,11 @@ import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -18,12 +23,12 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality enc = trellis.encoder_ss(f,0) # initial state = 0 - mod = gr.chunks_to_symbols_sf(constellation,dimensionality) + mod = digital.chunks_to_symbols_sf(constellation,dimensionality) # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX |