update examples to reflect latest changes in gr-trellis
authoranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 13 Feb 2007 05:26:07 +0000 (05:26 +0000)
committeranastas <anastas@221aa14e-8319-0410-a670-987f0aec2ac5>
Tue, 13 Feb 2007 05:26:07 +0000 (05:26 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4470 221aa14e-8319-0410-a670-987f0aec2ac5

gnuradio-examples/python/channel-coding/test_tcm_combined.py
gnuradio-examples/python/channel-coding/test_turbo_equalization.py
gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py

index e286f88f6f69670ba9756484284fa2803a6fbe7e..92e020bea3d964bcfbbf59e16f2c5e615e8fc490 100755 (executable)
@@ -25,7 +25,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
 
     
     # RX
-    va = trellis.viterbi_combined_s(f,K,0,-1,dimensionality,constellation,trellis.TRELLIS_EUCLIDEAN) # Put -1 if the Initial/Final states are not set.
+    va = trellis.viterbi_combined_fs(f,K,0,-1,dimensionality,constellation,trellis.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(); 
     
index 1138262382ca396254db64ae2d966b99e39d0d69..ff0497e2b05e95a80f7026a090221fdfbd3321c6 100755 (executable)
@@ -110,6 +110,7 @@ def main(args):
         sys.exit (1)
     bitspersymbol = int(round(math.log(fo.I())/math.log(2))) # bits per FSM input symbol
     K=Kb/bitspersymbol # packet size in trellis steps
+    print 'size = ',K
     interleaver=trellis.interleaver(K,666) # construct a random interleaver
     tot_channel = fsm_utils.make_isi_lookup(modulation,channel,True) # generate the lookup table (normalize energy to 1)
     dimensionality = tot_channel[0]
@@ -126,6 +127,7 @@ def main(args):
 
     for i in range(rep):
         (s,e)=run_test(fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellation,1,N0,IT,-long(666+i)) # run experiment with different seed to get different noise realizations
+        print s
         tot_s=tot_s+s
         terr_s=terr_s+e
         terr_p=terr_p+(terr_s!=0)
index 8e197cae9a3bed65ac9e3e671ee161cd1ce3cbea..002d41a76753eeb0e3c0b407db6d6cee89477151 100755 (executable)
@@ -34,7 +34,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
     skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
     #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
     #va = trellis.viterbi_s(f,K+L,-1,0) # Put -1 if the Initial/Final states are not set.
-    va = trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # using viterbi_combined_s instead of metrics_f/viterbi_s allows larger packet lengths because metrics_f is complaining for not being able to allocate large buffers. This is due to the large f.O() in this application...
+    va = trellis.viterbi_combined_fs(f,K+L,0,0,dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # using viterbi_combined_fs instead of metrics_f/viterbi_s allows larger packet lengths because metrics_f is complaining for not being able to allocate large buffers. This is due to the large f.O() in this application...
     dst = gr.vector_sink_s()
 
     fg.connect (src,mod)