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 | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/gr-trellis/src/examples/python/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py index 55a3043b8..d98e36e27 100755 --- a/gr-trellis/src/examples/python/test_tcm_combined.py +++ b/gr-trellis/src/examples/python/test_tcm_combined.py @@ -25,22 +25,22 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): add = gr.add_ff() noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) - + # RX va = trellis.viterbi_combined_fs(f,K,0,-1,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set. fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts - dst = gr.check_lfsr_32k_s(); - + dst = gr.check_lfsr_32k_s(); + tb.connect (src,src_head,s2fsmi,enc,mod) tb.connect (mod,(add,0)) tb.connect (noise,(add,1)) tb.connect (add,va,fsmi2s,dst) - + tb.run() - - # A bit of cheating: run the program once and print the + + # A bit of cheating: run the program once and print the # final encoder state.. # Then put it as the last argument in the viterbi block #print "final state = " , enc.ST() @@ -48,7 +48,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): ntotal = dst.ntotal () nright = dst.nright () runlength = dst.runlength () - + return (ntotal,ntotal-nright) @@ -76,7 +76,7 @@ def main(): K=Kb/bitspersymbol # packet size in trellis steps modulation = fsm_utils.psk4 # see fsm_utils.py for available predefined modulations dimensionality = modulation[0] - constellation = modulation[1] + constellation = modulation[1] if len(constellation)/dimensionality != f.O(): sys.stderr.write ('Incompatible FSM output cardinality and modulation size.\n') sys.exit (1) |