diff options
author | Tom Rondeau <trondeau@vt.edu> | 2013-02-21 19:34:27 -0500 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2013-02-21 19:34:27 -0500 |
commit | 4f479665bc9f04e52b047cb270772ee61e319a59 (patch) | |
tree | 09a018da0d2c14f160520707ecc2a2ff6ae8e1f1 /gr-trellis/examples | |
parent | 7b4a518bfe47fb1d0b2a32fc5c93ed0157d2dc6c (diff) |
blocks: removing blocks from gnuradio-core.
delay, rms, packed_to_unpacked, unpacked_to_packed.
Diffstat (limited to 'gr-trellis/examples')
-rwxr-xr-x | gr-trellis/examples/python/test_pccc_turbo1.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_sccc_hard.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_sccc_soft.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_sccc_turbo.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_sccc_turbo1.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_sccc_turbo2.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_tcm.py | 8 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_tcm_bit.py | 8 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_tcm_combined.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_tcm_parallel.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_turbo_equalization.py | 4 | ||||
-rwxr-xr-x | gr-trellis/examples/python/test_viterbi_equalization.py | 4 |
12 files changed, 28 insertions, 28 deletions
diff --git a/gr-trellis/examples/python/test_pccc_turbo1.py b/gr-trellis/examples/python/test_pccc_turbo1.py index 121659ccf5..bb596f1818 100755 --- a/gr-trellis/examples/python/test_pccc_turbo1.py +++ b/gr-trellis/examples/python/test_pccc_turbo1.py @@ -21,7 +21,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality #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() @@ -36,7 +36,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, scale = blocks.multiply_const_ff(1.0/N0) dec = trellis.pccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM) - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() tb.connect (src,src_head,s2fsmi,enc,mod) diff --git a/gr-trellis/examples/python/test_sccc_hard.py b/gr-trellis/examples/python/test_sccc_hard.py index 8676a6064d..ec1fdd1bc5 100755 --- a/gr-trellis/examples/python/test_sccc_hard.py +++ b/gr-trellis/examples/python/test_sccc_hard.py @@ -21,7 +21,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality enc_out = trellis.encoder_ss(fo,0) # initial state = 0 inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short) enc_in = trellis.encoder_ss(fi,0) # initial state = 0 @@ -37,7 +37,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, deinter = trellis.permutation(interleaver.K(),interleaver.DEINTER(),1,gr.sizeof_short) metrics_out = trellis.metrics_s(fo.O(),1,[0,1,2,3],digital.TRELLIS_HARD_SYMBOL) # data preprocessing to generate metrics for outer Viterbi (hard decisions) va_out = trellis.viterbi_s(fo,K,0,-1) # 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 + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_sccc_soft.py b/gr-trellis/examples/python/test_sccc_soft.py index 1885934a46..f663c9befd 100755 --- a/gr-trellis/examples/python/test_sccc_soft.py +++ b/gr-trellis/examples/python/test_sccc_soft.py @@ -21,7 +21,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality enc_out = trellis.encoder_ss(fo,0) # initial state = 0 inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short) enc_in = trellis.encoder_ss(fi,0) # initial state = 0 @@ -37,7 +37,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, siso_in = trellis.siso_f(fi,K,0,-1,True,False,trellis.TRELLIS_MIN_SUM) # Put -1 if the Initial/Final states are not set. deinter = trellis.permutation(interleaver.K(),interleaver.DEINTER(),fi.I(),gr.sizeof_float) va_out = trellis.viterbi_s(fo,K,0,-1) # 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 + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_sccc_turbo.py b/gr-trellis/examples/python/test_sccc_turbo.py index 677c07a05c..cd974e9941 100755 --- a/gr-trellis/examples/python/test_sccc_turbo.py +++ b/gr-trellis/examples/python/test_sccc_turbo.py @@ -61,7 +61,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality enc_out = trellis.encoder_ss(fo,0) # initial state = 0 inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short) enc_in = trellis.encoder_ss(fi,0) # initial state = 0 @@ -74,7 +74,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) #(head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_SUM_PRODUCT) - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_sccc_turbo1.py b/gr-trellis/examples/python/test_sccc_turbo1.py index 62a0b6e318..93833ec7df 100755 --- a/gr-trellis/examples/python/test_sccc_turbo1.py +++ b/gr-trellis/examples/python/test_sccc_turbo1.py @@ -20,7 +20,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality enc = trellis.sccc_encoder_ss(fo,0,fi,0,interleaver,K) mod = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -30,7 +30,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # RX dec = trellis.sccc_decoder_combined_fs(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN,1.0) - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() #tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_sccc_turbo2.py b/gr-trellis/examples/python/test_sccc_turbo2.py index 510748a68a..116a2ca6b2 100755 --- a/gr-trellis/examples/python/test_sccc_turbo2.py +++ b/gr-trellis/examples/python/test_sccc_turbo2.py @@ -20,7 +20,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # TX src = gr.lfsr_32k_source_s() 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 outer FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the outer FSM input cardinality enc = trellis.sccc_encoder_ss(fo,0,fi,0,interleaver,K) mod = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -32,7 +32,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO scale = blocks.multiply_const_ff(1.0/N0) dec = trellis.sccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM) - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() #tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_tcm.py b/gr-trellis/examples/python/test_tcm.py index aca06f783e..8a815ae12a 100755 --- a/gr-trellis/examples/python/test_tcm.py +++ b/gr-trellis/examples/python/test_tcm.py @@ -27,8 +27,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): #src = gr.vector_source_s(packet,False) src = gr.lfsr_32k_source_s() src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts - #b2s = gr.unpacked_to_packed_ss(1,gr.GR_MSB_FIRST) # pack bits in shorts - s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality + #b2s = blocks.unpacked_to_packed_ss(1,gr.GR_MSB_FIRST) # pack bits in shorts + s2fsmi = blocks.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 = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -39,8 +39,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # RX metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # 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 - #s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + #s2b = blocks.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits #dst = gr.vector_sink_s(); dst = gr.check_lfsr_32k_s() diff --git a/gr-trellis/examples/python/test_tcm_bit.py b/gr-trellis/examples/python/test_tcm_bit.py index 4438db91ac..6308df1d09 100755 --- a/gr-trellis/examples/python/test_tcm_bit.py +++ b/gr-trellis/examples/python/test_tcm_bit.py @@ -27,8 +27,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): src = gr.vector_source_s(packet,False) #src = gr.lfsr_32k_source_s() #src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts - b2s = gr.unpacked_to_packed_ss(1,gr.GR_MSB_FIRST) # pack bits in shorts - s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality + b2s = blocks.unpacked_to_packed_ss(1,gr.GR_MSB_FIRST) # pack bits in shorts + s2fsmi = blocks.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 = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -41,8 +41,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # RX metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # 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 - s2b = gr.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + s2b = blocks.packed_to_unpacked_ss(1,gr.GR_MSB_FIRST) # unpack shorts to bits dst = gr.vector_sink_s(); #dst = gr.check_lfsr_32k_s(); diff --git a/gr-trellis/examples/python/test_tcm_combined.py b/gr-trellis/examples/python/test_tcm_combined.py index a0cd58c6df..198d038ce3 100755 --- a/gr-trellis/examples/python/test_tcm_combined.py +++ b/gr-trellis/examples/python/test_tcm_combined.py @@ -21,7 +21,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # TX src = gr.lfsr_32k_source_s() 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 + s2fsmi = blocks.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 = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -33,7 +33,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,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 + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s(); diff --git a/gr-trellis/examples/python/test_tcm_parallel.py b/gr-trellis/examples/python/test_tcm_parallel.py index 0bd6f739c1..d2527956e9 100755 --- a/gr-trellis/examples/python/test_tcm_parallel.py +++ b/gr-trellis/examples/python/test_tcm_parallel.py @@ -21,7 +21,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): # TX src = gr.lfsr_32k_source_s() src_head = gr.head (gr.sizeof_short,Kb/16*P) # 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 + s2fsmi=blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality s2p = blocks.stream_to_streams(gr.sizeof_short,P) # serial to parallel enc = trellis.encoder_ss(f,0) # initiali state = 0 mod = digital.chunks_to_symbols_sf(constellation,dimensionality) @@ -37,7 +37,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set. p2s = block.streams_to_stream(gr.sizeof_short,P) # parallel to serial - fsmi2s=gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s=blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s() tb.connect (src,src_head,s2fsmi,s2p) diff --git a/gr-trellis/examples/python/test_turbo_equalization.py b/gr-trellis/examples/python/test_turbo_equalization.py index b0889bdcef..41361fd3db 100755 --- a/gr-trellis/examples/python/test_turbo_equalization.py +++ b/gr-trellis/examples/python/test_turbo_equalization.py @@ -59,7 +59,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat # TX src = gr.lfsr_32k_source_s() 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 iouter FSM input cardinality + s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the iouter FSM input cardinality enc_out = trellis.encoder_ss(fo,0) # initial state = 0 inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short) enc_in = trellis.encoder_ss(fi,0) # initial state = 0 @@ -72,7 +72,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s(); tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod) diff --git a/gr-trellis/examples/python/test_viterbi_equalization.py b/gr-trellis/examples/python/test_viterbi_equalization.py index 21236d2870..f83125136c 100755 --- a/gr-trellis/examples/python/test_viterbi_equalization.py +++ b/gr-trellis/examples/python/test_viterbi_equalization.py @@ -19,7 +19,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed): # TX src = gr.lfsr_32k_source_s() 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 + s2fsmi = blocks.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 # essentially here we implement the combination of modulation and channel as a memoryless modulation (the memory induced by the channel is hidden in the FSM) mod = digital.chunks_to_symbols_sf(tot_constellation,dimensionality) @@ -31,7 +31,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed): # RX metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi va = trellis.viterbi_s(f,K,0,-1) # 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 + fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts dst = gr.check_lfsr_32k_s(); tb.connect (src,src_head,s2fsmi,enc,mod) |