diff options
author | anastas | 2007-02-13 05:26:07 +0000 |
---|---|---|
committer | anastas | 2007-02-13 05:26:07 +0000 |
commit | d1e790baef141358b6a594b375e3b553f2d995eb (patch) | |
tree | 43a8dbddfc15d3f78abbd55c8f047d6ee2d665bb /gnuradio-examples/python/channel-coding | |
parent | 30c2e70fad2fc3fe75cbf9b2cb60399771fd2ba3 (diff) | |
download | gnuradio-d1e790baef141358b6a594b375e3b553f2d995eb.tar.gz gnuradio-d1e790baef141358b6a594b375e3b553f2d995eb.tar.bz2 gnuradio-d1e790baef141358b6a594b375e3b553f2d995eb.zip |
update examples to reflect latest changes in gr-trellis
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4470 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-examples/python/channel-coding')
3 files changed, 4 insertions, 2 deletions
diff --git a/gnuradio-examples/python/channel-coding/test_tcm_combined.py b/gnuradio-examples/python/channel-coding/test_tcm_combined.py index e286f88f6..92e020bea 100755 --- a/gnuradio-examples/python/channel-coding/test_tcm_combined.py +++ b/gnuradio-examples/python/channel-coding/test_tcm_combined.py @@ -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(); diff --git a/gnuradio-examples/python/channel-coding/test_turbo_equalization.py b/gnuradio-examples/python/channel-coding/test_turbo_equalization.py index 113826238..ff0497e2b 100755 --- a/gnuradio-examples/python/channel-coding/test_turbo_equalization.py +++ b/gnuradio-examples/python/channel-coding/test_turbo_equalization.py @@ -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) diff --git a/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py b/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py index 8e197cae9..002d41a76 100755 --- a/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py +++ b/gnuradio-examples/python/channel-coding/test_viterbi_equalization1.py @@ -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) |