diff options
Diffstat (limited to 'gr-trellis/src/examples/python/test_pccc_turbo1.py')
-rwxr-xr-x | gr-trellis/src/examples/python/test_pccc_turbo1.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gr-trellis/src/examples/python/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py index 0655b972de..bbcce106fb 100755 --- a/gr-trellis/src/examples/python/test_pccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py @@ -8,6 +8,11 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () @@ -20,11 +25,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, #src = gr.vector_source_s([0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1],False) enc = trellis.pccc_encoder_ss(fo,0,fi,0,interleaver,K) code = gr.vector_sink_s() - 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 metrics_in = trellis.metrics_f(fi.O()*fo.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO |