summaryrefslogtreecommitdiff
path: root/gr-trellis
diff options
context:
space:
mode:
Diffstat (limited to 'gr-trellis')
-rw-r--r--gr-trellis/CMakeLists.txt2
-rw-r--r--gr-trellis/doc/gr-trellis.xml14
-rw-r--r--gr-trellis/doc/test_tcm.py6
-rw-r--r--gr-trellis/doc/test_tcm.py.xml6
-rwxr-xr-xgr-trellis/doc/test_viterbi_equalization1.py6
-rw-r--r--gr-trellis/doc/test_viterbi_equalization1.py.xml6
-rw-r--r--gr-trellis/examples/grc/interference_cancellation.grc2
-rw-r--r--gr-trellis/examples/grc/pccc.grc2
-rw-r--r--gr-trellis/examples/grc/pccc1.grc2
-rw-r--r--gr-trellis/examples/grc/sccc.grc2
-rw-r--r--gr-trellis/examples/grc/sccc1.grc2
-rwxr-xr-xgr-trellis/examples/python/test_cpm.py14
-rwxr-xr-xgr-trellis/examples/python/test_pccc_turbo1.py10
-rwxr-xr-xgr-trellis/examples/python/test_sccc_hard.py6
-rwxr-xr-xgr-trellis/examples/python/test_sccc_soft.py8
-rwxr-xr-xgr-trellis/examples/python/test_sccc_turbo.py8
-rwxr-xr-xgr-trellis/examples/python/test_sccc_turbo1.py6
-rwxr-xr-xgr-trellis/examples/python/test_sccc_turbo2.py6
-rwxr-xr-xgr-trellis/examples/python/test_tcm.py10
-rwxr-xr-xgr-trellis/examples/python/test_tcm_bit.py10
-rwxr-xr-xgr-trellis/examples/python/test_tcm_combined.py6
-rwxr-xr-xgr-trellis/examples/python/test_tcm_parallel.py6
-rwxr-xr-xgr-trellis/examples/python/test_turbo_equalization.py8
-rwxr-xr-xgr-trellis/examples/python/test_turbo_equalization1.py6
-rwxr-xr-xgr-trellis/examples/python/test_turbo_equalization2.py6
-rwxr-xr-xgr-trellis/examples/python/test_viterbi_equalization.py6
-rwxr-xr-xgr-trellis/examples/python/test_viterbi_equalization1.py6
-rw-r--r--gr-trellis/gnuradio-trellis.pc.in2
-rw-r--r--gr-trellis/include/trellis/CMakeLists.txt2
-rw-r--r--gr-trellis/include/trellis/api.h2
-rw-r--r--gr-trellis/lib/CMakeLists.txt23
-rw-r--r--gr-trellis/lib/gnuradio-trellis.rc.in (renamed from gr-trellis/src/lib/gnuradio-trellis.rc.in)0
-rwxr-xr-xgr-trellis/python/trellis/qa_trellis.py6
-rw-r--r--gr-trellis/src/lib/CMakeLists.txt244
-rw-r--r--gr-trellis/swig/CMakeLists.txt6
-rw-r--r--gr-trellis/swig/trellis_swig.i2
36 files changed, 114 insertions, 345 deletions
diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt
index 1ac96e5cd7..584f470e3b 100644
--- a/gr-trellis/CMakeLists.txt
+++ b/gr-trellis/CMakeLists.txt
@@ -28,7 +28,7 @@ include(GrBoost)
include(GrComponent)
GR_REGISTER_COMPONENT("gr-trellis" ENABLE_GR_TRELLIS
Boost_FOUND
- ENABLE_GR_CORE
+ ENABLE_GNURADIO_RUNTIME
ENABLE_GR_ANALOG
ENABLE_GR_BLOCKS
ENABLE_GR_DIGITAL
diff --git a/gr-trellis/doc/gr-trellis.xml b/gr-trellis/doc/gr-trellis.xml
index 42bd54b32c..6ffbb9ec2c 100644
--- a/gr-trellis/doc/gr-trellis.xml
+++ b/gr-trellis/doc/gr-trellis.xml
@@ -570,8 +570,8 @@ and an initial state (which is set to 0 in this example).
</para>
<programlisting>
15 # TX
- 16 src = gr.lfsr_32k_source_s()
- 17 src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ 16 src = blocks.lfsr_32k_source_s()
+ 17 src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
18 s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality
19 enc = trellis.encoder_ss(f,0) # initial state = 0
</programlisting>
@@ -647,7 +647,7 @@ are then packed to shorts and compared with the transmitted sequence.
<programlisting>
28 va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
29 fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- 30 dst = gr.check_lfsr_32k_s();
+ 30 dst = blocks.check_lfsr_32k_s();
</programlisting>
@@ -803,7 +803,7 @@ L being the channel length. This is sufficient to drive the initial and final st
22 for i in range(L): # first/last L symbols set to 0
23 packet[i] = 0
24 packet[len(packet)-i-1] = 0
- 25 src = gr.vector_source_s(packet,False)
+ 25 src = blocks.vector_source_s(packet,False)
26 mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
</programlisting>
@@ -813,7 +813,7 @@ The modulated symbols are filtered by the ISI channel and AWGN with appropriate
</para>
<programlisting>
28 # CHANNEL
- 29 isi = gr.fir_filter_fff(1,channel)
+ 29 isi = filter.fir_filter_fff(1,channel)
30 add = blocks.add_ff()
31 noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
</programlisting>
@@ -826,11 +826,11 @@ Also note that the first L observations are irrelevant and thus can be skipped.
</para>
<programlisting>
33 # RX
- 34 skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
+ 34 skip = blocks.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
35 #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
36 #va = trellis.viterbi_s(f,K+L,0,0) # Put -1 if the Initial/Final states are not set.
37 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...
- 38 dst = gr.vector_sink_s()
+ 38 dst = blocks.vector_sink_s()
</programlisting>
<para>
diff --git a/gr-trellis/doc/test_tcm.py b/gr-trellis/doc/test_tcm.py
index aa84f55bee..61ab00f1c8 100644
--- a/gr-trellis/doc/test_tcm.py
+++ b/gr-trellis/doc/test_tcm.py
@@ -19,8 +19,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size 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)
@@ -33,7 +33,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
+ dst = blocks.check_lfsr_32k_s();
tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/doc/test_tcm.py.xml b/gr-trellis/doc/test_tcm.py.xml
index 96a8042ff7..77009b5859 100644
--- a/gr-trellis/doc/test_tcm.py.xml
+++ b/gr-trellis/doc/test_tcm.py.xml
@@ -15,8 +15,8 @@
13 tb = gr.top_block ()
14
15 # TX
- 16 src = gr.lfsr_32k_source_s()
- 17 src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ 16 src = blocks.lfsr_32k_source_s()
+ 17 src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
18 s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality
19 enc = trellis.encoder_ss(f,0) # initial state = 0
20 mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
@@ -29,7 +29,7 @@
27 metrics = trellis.metrics_f(f.O(),dimensionality,constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
28 va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
29 fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- 30 dst = gr.check_lfsr_32k_s();
+ 30 dst = blocks.check_lfsr_32k_s();
31
32 tb.connect (src,src_head,s2fsmi,enc,mod)
33 tb.connect (mod,(add,0))
diff --git a/gr-trellis/doc/test_viterbi_equalization1.py b/gr-trellis/doc/test_viterbi_equalization1.py
index d53e2b3304..c1a831d0bb 100755
--- a/gr-trellis/doc/test_viterbi_equalization1.py
+++ b/gr-trellis/doc/test_viterbi_equalization1.py
@@ -28,7 +28,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
for i in range(L): # first/last L symbols set to 0
packet[i] = 0
packet[len(packet)-i-1] = 0
- src = gr.vector_source_s(packet,False)
+ src = blocks.vector_source_s(packet,False)
mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
# CHANNEL
@@ -37,11 +37,11 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
- skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
+ skip = blocks.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,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
#va = trellis.viterbi_s(f,K+L,0,0) # Put -1 if the Initial/Final states are not set.
va = trellis.viterbi_combined_s(f,K+L,0,0,dimensionality,tot_constellation,digital.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...
- dst = gr.vector_sink_s()
+ dst = blocks.vector_sink_s()
tb.connect (src,mod)
tb.connect (mod,isi,(add,0))
diff --git a/gr-trellis/doc/test_viterbi_equalization1.py.xml b/gr-trellis/doc/test_viterbi_equalization1.py.xml
index 5aca46ab35..9179f4f156 100644
--- a/gr-trellis/doc/test_viterbi_equalization1.py.xml
+++ b/gr-trellis/doc/test_viterbi_equalization1.py.xml
@@ -24,7 +24,7 @@
22 for i in range(L): # first/last L symbols set to 0
23 packet[i] = 0
24 packet[len(packet)-i-1] = 0
- 25 src = gr.vector_source_s(packet,False)
+ 25 src = blocks.vector_source_s(packet,False)
26 mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
27
28 # CHANNEL
@@ -33,11 +33,11 @@
31 noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
32
33 # RX
- 34 skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
+ 34 skip = blocks.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
35 #metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,trellis.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
36 #va = trellis.viterbi_s(f,K+L,0,0) # Put -1 if the Initial/Final states are not set.
37 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...
- 38 dst = gr.vector_sink_s()
+ 38 dst = blocks.vector_sink_s()
39
40 tb.connect (src,mod)
41 tb.connect (mod,isi,(add,0))
diff --git a/gr-trellis/examples/grc/interference_cancellation.grc b/gr-trellis/examples/grc/interference_cancellation.grc
index 29452311c6..4555a244a9 100644
--- a/gr-trellis/examples/grc/interference_cancellation.grc
+++ b/gr-trellis/examples/grc/interference_cancellation.grc
@@ -969,7 +969,7 @@
</param>
<param>
<key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <value>wxgui.TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
diff --git a/gr-trellis/examples/grc/pccc.grc b/gr-trellis/examples/grc/pccc.grc
index 359cfefc83..c0e587a09e 100644
--- a/gr-trellis/examples/grc/pccc.grc
+++ b/gr-trellis/examples/grc/pccc.grc
@@ -389,7 +389,7 @@
</param>
<param>
<key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <value>wxgui.TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
diff --git a/gr-trellis/examples/grc/pccc1.grc b/gr-trellis/examples/grc/pccc1.grc
index 8f58404794..4507cae890 100644
--- a/gr-trellis/examples/grc/pccc1.grc
+++ b/gr-trellis/examples/grc/pccc1.grc
@@ -389,7 +389,7 @@
</param>
<param>
<key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <value>wxgui.TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
diff --git a/gr-trellis/examples/grc/sccc.grc b/gr-trellis/examples/grc/sccc.grc
index ee532da9fe..ec84665c14 100644
--- a/gr-trellis/examples/grc/sccc.grc
+++ b/gr-trellis/examples/grc/sccc.grc
@@ -395,7 +395,7 @@
</param>
<param>
<key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <value>wxgui.TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
diff --git a/gr-trellis/examples/grc/sccc1.grc b/gr-trellis/examples/grc/sccc1.grc
index fa6506ba18..332ec6bdd7 100644
--- a/gr-trellis/examples/grc/sccc1.grc
+++ b/gr-trellis/examples/grc/sccc1.grc
@@ -631,7 +631,7 @@
</param>
<param>
<key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <value>wxgui.TRIG_MODE_AUTO</value>
</param>
<param>
<key>y_axis_label</key>
diff --git a/gr-trellis/examples/python/test_cpm.py b/gr-trellis/examples/python/test_cpm.py
index 8d1e2024c1..99b75a7dd1 100755
--- a/gr-trellis/examples/python/test_cpm.py
+++ b/gr-trellis/examples/python/test_cpm.py
@@ -93,7 +93,7 @@ def run_test(seed,blocksize):
##################################################
# Blocks
##################################################
- random_source_x_0 = gr.vector_source_b(data.tolist(), False)
+ random_source_x_0 = blocks.vector_source_b(data.tolist(), False)
digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bf((-1, 1), 1)
filter_interp_fir_filter_xxx_0 = filter.interp_fir_filter_fff(Q, p)
analog_frequency_modulator_fc_0 = analog.frequency_modulator_fc(2*math.pi*h*(1.0/Q))
@@ -107,11 +107,11 @@ def run_test(seed,blocksize):
filter_fir_filter_xxx_0_0 = filter.fir_filter_ccc(Q, MF[0].conjugate())
filter_fir_filter_xxx_0_0_0 = filter.fir_filter_ccc(Q, MF[1].conjugate())
blocks_streams_to_stream_0 = blocks.streams_to_stream(gr.sizeof_gr_complex*1, int(N))
- gr_skiphead_0 = gr.skiphead(gr.sizeof_gr_complex*1, int(N*(1+0)))
+ blocks_skiphead_0 = blocks.skiphead(gr.sizeof_gr_complex*1, int(N*(1+0)))
viterbi = trellis.viterbi_combined_cb(f, head+blocksize+tail, 0, -1, int(N),
constellation, digital.TRELLIS_EUCLIDEAN)
- gr_vector_sink_x_0 = gr.vector_sink_b()
+ blocks_vector_sink_x_0 = blocks.vector_sink_b()
##################################################
# Connections
@@ -127,13 +127,13 @@ def run_test(seed,blocksize):
tb.connect((blocks_multiply_vxx_0, 0), (filter_fir_filter_xxx_0_0_0, 0))
tb.connect((filter_fir_filter_xxx_0_0, 0), (blocks_streams_to_stream_0, 0))
tb.connect((filter_fir_filter_xxx_0_0_0, 0), (blocks_streams_to_stream_0, 1))
- tb.connect((blocks_streams_to_stream_0, 0), (gr_skiphead_0, 0))
- tb.connect((gr_skiphead_0, 0), (viterbi, 0))
- tb.connect((viterbi, 0), (gr_vector_sink_x_0, 0))
+ tb.connect((blocks_streams_to_stream_0, 0), (blocks_skiphead_0, 0))
+ tb.connect((blocks_skiphead_0, 0), (viterbi, 0))
+ tb.connect((viterbi, 0), (blocks_vector_sink_x_0, 0))
tb.run()
- dataest = gr_vector_sink_x_0.data()
+ dataest = blocks_vector_sink_x_0.data()
#print data
#print numpy.array(dataest)
perr = 0
diff --git a/gr-trellis/examples/python/test_pccc_turbo1.py b/gr-trellis/examples/python/test_pccc_turbo1.py
index bb596f1818..7104aa5039 100755
--- a/gr-trellis/examples/python/test_pccc_turbo1.py
+++ b/gr-trellis/examples/python/test_pccc_turbo1.py
@@ -19,12 +19,12 @@ 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
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
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)
+ #src = blocks.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()
+ code = blocks.vector_sink_s()
mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
@@ -37,7 +37,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
dec = trellis.pccc_decoder_s(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM)
fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,enc,mod)
#tb.connect (src,enc,mod)
diff --git a/gr-trellis/examples/python/test_sccc_hard.py b/gr-trellis/examples/python/test_sccc_hard.py
index ec1fdd1bc5..83393df4dc 100755
--- a/gr-trellis/examples/python/test_sccc_hard.py
+++ b/gr-trellis/examples/python/test_sccc_hard.py
@@ -19,8 +19,8 @@ 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
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -38,7 +38,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/examples/python/test_sccc_soft.py b/gr-trellis/examples/python/test_sccc_soft.py
index f663c9befd..25d26e0025 100755
--- a/gr-trellis/examples/python/test_sccc_soft.py
+++ b/gr-trellis/examples/python/test_sccc_soft.py
@@ -19,8 +19,8 @@ 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
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -33,12 +33,12 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
# RX
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi
- gnd = gr.vector_source_f([0],True);
+ gnd = blocks.vector_source_f([0],True);
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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/examples/python/test_sccc_turbo.py b/gr-trellis/examples/python/test_sccc_turbo.py
index cd974e9941..08004e8a0d 100755
--- a/gr-trellis/examples/python/test_sccc_turbo.py
+++ b/gr-trellis/examples/python/test_sccc_turbo.py
@@ -17,7 +17,7 @@ except ImportError:
def make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,type):
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi
scale = blocks.multiply_const_ff(1.0/N0)
- gnd = gr.vector_source_f([0],True);
+ gnd = blocks.vector_source_f([0],True);
inter=[]
deinter=[]
@@ -59,8 +59,8 @@ 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
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -75,7 +75,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
(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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/examples/python/test_sccc_turbo1.py b/gr-trellis/examples/python/test_sccc_turbo1.py
index 93833ec7df..528a79d011 100755
--- a/gr-trellis/examples/python/test_sccc_turbo1.py
+++ b/gr-trellis/examples/python/test_sccc_turbo1.py
@@ -18,8 +18,8 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -31,7 +31,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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
#tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (src,src_head,s2fsmi,enc,mod)
diff --git a/gr-trellis/examples/python/test_sccc_turbo2.py b/gr-trellis/examples/python/test_sccc_turbo2.py
index 116a2ca6b2..d7f26c4e13 100755
--- a/gr-trellis/examples/python/test_sccc_turbo2.py
+++ b/gr-trellis/examples/python/test_sccc_turbo2.py
@@ -18,8 +18,8 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -33,7 +33,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
#tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (src,src_head,s2fsmi,enc,mod)
diff --git a/gr-trellis/examples/python/test_tcm.py b/gr-trellis/examples/python/test_tcm.py
index 8a815ae12a..bf9710aa1c 100755
--- a/gr-trellis/examples/python/test_tcm.py
+++ b/gr-trellis/examples/python/test_tcm.py
@@ -24,9 +24,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
#packet = [0]*Kb
#for i in range(Kb-1*16): # last 16 bits = 0 to drive the final state to 0
#packet[i] = random.randint(0, 1) # random 0s and 1s
- #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
+ #src = blocks.vector_source_s(packet,False)
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
#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
@@ -41,8 +41,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
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()
+ #dst = blocks.vector_sink_s();
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,enc,mod)
diff --git a/gr-trellis/examples/python/test_tcm_bit.py b/gr-trellis/examples/python/test_tcm_bit.py
index 6308df1d09..7880f0ea53 100755
--- a/gr-trellis/examples/python/test_tcm_bit.py
+++ b/gr-trellis/examples/python/test_tcm_bit.py
@@ -24,9 +24,9 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
# this for loop is TOO slow!!!
for i in range(Kb-1*16): # last 16 bits = 0 to drive the final state to 0
packet[i] = random.randint(0, 1) # random 0s and 1s
- 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
+ src = blocks.vector_source_s(packet,False)
+ #src = blocks.lfsr_32k_source_s()
+ #src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size in shorts
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
@@ -43,8 +43,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
va = trellis.viterbi_s(f,K,0,-1) # Put -1 if the Initial/Final states are not set.
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();
+ dst = blocks.vector_sink_s();
+ #dst = blocks.check_lfsr_32k_s();
#tb.connect (src,src_head,s2fsmi,enc,mod)
diff --git a/gr-trellis/examples/python/test_tcm_combined.py b/gr-trellis/examples/python/test_tcm_combined.py
index 198d038ce3..697e3cc64a 100755
--- a/gr-trellis/examples/python/test_tcm_combined.py
+++ b/gr-trellis/examples/python/test_tcm_combined.py
@@ -19,8 +19,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size 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)
@@ -34,7 +34,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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
+ dst = blocks.check_lfsr_32k_s();
tb.connect (src,src_head,s2fsmi,enc,mod)
diff --git a/gr-trellis/examples/python/test_tcm_parallel.py b/gr-trellis/examples/python/test_tcm_parallel.py
index d2527956e9..e4456890f0 100755
--- a/gr-trellis/examples/python/test_tcm_parallel.py
+++ b/gr-trellis/examples/python/test_tcm_parallel.py
@@ -19,8 +19,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16*P) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16*P) # packet size in shorts
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
@@ -38,7 +38,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
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=blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s()
+ dst = blocks.check_lfsr_32k_s()
tb.connect (src,src_head,s2fsmi,s2p)
for i in range(P):
diff --git a/gr-trellis/examples/python/test_turbo_equalization.py b/gr-trellis/examples/python/test_turbo_equalization.py
index 41361fd3db..b2d58a6014 100755
--- a/gr-trellis/examples/python/test_turbo_equalization.py
+++ b/gr-trellis/examples/python/test_turbo_equalization.py
@@ -16,7 +16,7 @@ except ImportError:
def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type):
metrics_in = trellis.metrics_f(fi.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO
scale = blocks.multiply_const_ff(1.0/N0)
- gnd = gr.vector_source_f([0],True);
+ gnd = blocks.vector_source_f([0],True);
inter=[]
deinter=[]
@@ -57,8 +57,8 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head(gr.sizeof_short,Kb/16) # packet size in shorts
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)
@@ -73,7 +73,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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
+ dst = blocks.check_lfsr_32k_s();
tb.connect (src,src_head,s2fsmi,enc_out,inter,enc_in,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/examples/python/test_turbo_equalization1.py b/gr-trellis/examples/python/test_turbo_equalization1.py
index ae7e3e374b..5ff21ec757 100755
--- a/gr-trellis/examples/python/test_turbo_equalization1.py
+++ b/gr-trellis/examples/python/test_turbo_equalization1.py
@@ -17,7 +17,7 @@ except ImportError:
def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type):
metrics_in = trellis.metrics_f(fi.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO
scale = blocks.multiply_const_ff(1.0/N0)
- gnd = gr.vector_source_f([0],True);
+ gnd = blocks.vector_source_f([0],True);
inter=[]
deinter=[]
@@ -64,7 +64,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
random.seed(seed)
for i in range(len(packet)):
packet[i] = random.randint(0, 2**bitspersymbol - 1) # random symbols
- src = gr.vector_source_s(packet,False)
+ src = blocks.vector_source_s(packet,False)
enc_out = trellis.encoder_ss(fo,0) # initial state = 0
inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short)
mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
@@ -76,7 +76,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
- dst = gr.vector_sink_s();
+ dst = blocks.vector_sink_s();
tb.connect (src,enc_out,inter,mod)
tb.connect (mod,isi,(add,0))
diff --git a/gr-trellis/examples/python/test_turbo_equalization2.py b/gr-trellis/examples/python/test_turbo_equalization2.py
index eed5675fe5..c2af9fbfca 100755
--- a/gr-trellis/examples/python/test_turbo_equalization2.py
+++ b/gr-trellis/examples/python/test_turbo_equalization2.py
@@ -16,7 +16,7 @@ except ImportError:
def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type):
scale = blocks.multiply_const_ff(math.sqrt(1.0/N0))
- gnd = gr.vector_source_f([0],True);
+ gnd = blocks.vector_source_f([0],True);
inter=[]
deinter=[]
@@ -62,7 +62,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
random.seed(seed)
for i in range(len(packet)):
packet[i] = random.randint(0, 2**bitspersymbol - 1) # random symbols
- src = gr.vector_source_s(packet,False)
+ src = blocks.vector_source_s(packet,False)
enc_out = trellis.encoder_ss(fo,0) # initial state = 0
inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short)
mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
@@ -74,7 +74,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
- dst = gr.vector_sink_s();
+ dst = blocks.vector_sink_s();
tb.connect (src,enc_out,inter,mod)
tb.connect (mod,isi,(add,0))
diff --git a/gr-trellis/examples/python/test_viterbi_equalization.py b/gr-trellis/examples/python/test_viterbi_equalization.py
index f83125136c..987f171b2a 100755
--- a/gr-trellis/examples/python/test_viterbi_equalization.py
+++ b/gr-trellis/examples/python/test_viterbi_equalization.py
@@ -17,8 +17,8 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
tb = gr.top_block ()
# TX
- src = gr.lfsr_32k_source_s()
- src_head = gr.head (gr.sizeof_short,Kb/16) # packet size in shorts
+ src = blocks.lfsr_32k_source_s()
+ src_head = blocks.head (gr.sizeof_short,Kb/16) # packet size 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
# 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)
@@ -32,7 +32,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
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 = blocks.unpacked_to_packed_ss(bitspersymbol,gr.GR_MSB_FIRST) # pack FSM input symbols to shorts
- dst = gr.check_lfsr_32k_s();
+ dst = blocks.check_lfsr_32k_s();
tb.connect (src,src_head,s2fsmi,enc,mod)
tb.connect (mod,(add,0))
diff --git a/gr-trellis/examples/python/test_viterbi_equalization1.py b/gr-trellis/examples/python/test_viterbi_equalization1.py
index df46046ae3..baa6a27f1b 100755
--- a/gr-trellis/examples/python/test_viterbi_equalization1.py
+++ b/gr-trellis/examples/python/test_viterbi_equalization1.py
@@ -27,7 +27,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
for i in range(L): # first/last L symbols set to 0
packet[i] = 0
packet[len(packet)-i-1] = 0
- src = gr.vector_source_s(packet,False)
+ src = blocks.vector_source_s(packet,False)
mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
# CHANNEL
@@ -36,11 +36,11 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
- skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols
+ skip = blocks.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,digital.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_fs(f,K+L,0,0,dimensionality,tot_constellation,digital.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()
+ dst = blocks.vector_sink_s()
tb.connect (src,mod)
tb.connect (mod,isi,(add,0))
diff --git a/gr-trellis/gnuradio-trellis.pc.in b/gr-trellis/gnuradio-trellis.pc.in
index 618667c421..df7e2e2575 100644
--- a/gr-trellis/gnuradio-trellis.pc.in
+++ b/gr-trellis/gnuradio-trellis.pc.in
@@ -5,7 +5,7 @@ includedir=@includedir@
Name: gnuradio-trellis
Description: GNU Radio blocks for trellis coded modulation
-Requires: gnuradio-core
+Requires: gnuradio-runtime
Version: @LIBVER@
Libs: -L${libdir} -lgnuradio-trellis
Cflags: -I${includedir}
diff --git a/gr-trellis/include/trellis/CMakeLists.txt b/gr-trellis/include/trellis/CMakeLists.txt
index 6abb93a6f4..b7ceea179e 100644
--- a/gr-trellis/include/trellis/CMakeLists.txt
+++ b/gr-trellis/include/trellis/CMakeLists.txt
@@ -26,7 +26,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
#!${PYTHON_EXECUTABLE}
import sys, os, re
-sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
diff --git a/gr-trellis/include/trellis/api.h b/gr-trellis/include/trellis/api.h
index c09b340d6d..8b85addd96 100644
--- a/gr-trellis/include/trellis/api.h
+++ b/gr-trellis/include/trellis/api.h
@@ -22,7 +22,7 @@
#ifndef INCLUDED_TRELLIS_API_H
#define INCLUDED_TRELLIS_API_H
-#include <gruel/attributes.h>
+#include <attributes.h>
#ifdef gnuradio_trellis_EXPORTS
# define TRELLIS_API __GR_ATTR_EXPORT
diff --git a/gr-trellis/lib/CMakeLists.txt b/gr-trellis/lib/CMakeLists.txt
index 1d4a9e7080..2fe7d3218c 100644
--- a/gr-trellis/lib/CMakeLists.txt
+++ b/gr-trellis/lib/CMakeLists.txt
@@ -24,8 +24,7 @@ include_directories(
${CMAKE_CURRENT_BINARY_DIR}/../include
${GR_TRELLIS_INCLUDE_DIRS}
${GR_DIGITAL_INCLUDE_DIRS}
- ${GNURADIO_CORE_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_INCLUDE_DIRS}
${LOG4CXX_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -47,7 +46,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
#!${PYTHON_EXECUTABLE}
import sys, os, re
-sys.path.append('${GR_CORE_PYTHONPATH}')
+sys.path.append('${GR_RUNTIME_PYTHONPATH}')
os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
@@ -130,14 +129,28 @@ list(APPEND trellis_sources
)
list(APPEND trellis_libs
- gnuradio-core
+ gnuradio-runtime
gnuradio-digital
${Boost_LIBRARIES}
)
+#Add Windows DLL resource file if using MSVC
+IF(MSVC)
+ include(${CMAKE_SOURCE_DIR}/cmake/Modules/GrVersion.cmake)
+
+ configure_file(
+ ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-trellis.rc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.rc
+ @ONLY)
+
+ list(APPEND trellis_sources
+ ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.rc
+ )
+ENDIF(MSVC)
+
add_library(gnuradio-trellis SHARED ${trellis_sources})
target_link_libraries(gnuradio-trellis ${trellis_libs})
GR_LIBRARY_FOO(gnuradio-trellis RUNTIME_COMPONENT "trellis_runtime" DEVEL_COMPONENT "trellis_devel")
add_dependencies(gnuradio-trellis
trellis_generated_includes trellis_generated_swigs
- gnuradio-core gnuradio-digital)
+ gnuradio-runtime gnuradio-digital)
diff --git a/gr-trellis/src/lib/gnuradio-trellis.rc.in b/gr-trellis/lib/gnuradio-trellis.rc.in
index db9f187947..db9f187947 100644
--- a/gr-trellis/src/lib/gnuradio-trellis.rc.in
+++ b/gr-trellis/lib/gnuradio-trellis.rc.in
diff --git a/gr-trellis/python/trellis/qa_trellis.py b/gr-trellis/python/trellis/qa_trellis.py
index fa591ae631..86c740a730 100755
--- a/gr-trellis/python/trellis/qa_trellis.py
+++ b/gr-trellis/python/trellis/qa_trellis.py
@@ -101,9 +101,9 @@ class trellis_tb(gr.top_block):
K = packet_size/bitspersymbol
# TX
- src = gr.lfsr_32k_source_s()
+ src = blocks.lfsr_32k_source_s()
# packet size in shorts
- src_head = gr.head (gr.sizeof_short, packet_size/16)
+ src_head = blocks.head(gr.sizeof_short, packet_size/16)
# unpack shorts to symbols compatible with the FSM input cardinality
s2fsmi = blocks.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST)
# initial FSM state = 0
@@ -122,7 +122,7 @@ class trellis_tb(gr.top_block):
# pack FSM input symbols to shorts
fsmi2s = blocks.unpacked_to_packed_ss(bitspersymbol, gr.GR_MSB_FIRST)
# check the output
- self.dst = gr.check_lfsr_32k_s()
+ self.dst = blocks.check_lfsr_32k_s()
self.connect (src, src_head, s2fsmi, enc, mod)
self.connect (mod, (add, 0))
diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt
deleted file mode 100644
index 8515aa21a4..0000000000
--- a/gr-trellis/src/lib/CMakeLists.txt
+++ /dev/null
@@ -1,244 +0,0 @@
-# Copyright 2011-2013 Free Software Foundation, Inc.
-#
-# This file is part of GNU Radio
-#
-# GNU Radio is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GNU Radio is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GNU Radio; see the file COPYING. If not, write to
-# the Free Software Foundation, Inc., 51 Franklin Street,
-# Boston, MA 02110-1301, USA.
-
-include(GrPython)
-
-########################################################################
-# Setup the include and linker paths
-########################################################################
-include_directories(
- ${GR_TRELLIS_INCLUDE_DIRS}
- ${GR_DIGITAL_INCLUDE_DIRS}
- ${GNURADIO_CORE_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
-)
-
-link_directories(${Boost_LIBRARY_DIRS})
-
-include_directories(${LOG4CXX_INCLUDE_DIRS})
-link_directories(${LOG4CXX_LIBRARY_DIRS})
-
-########################################################################
-# generate the python helper script which calls into the build utils
-########################################################################
-file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py "
-#!${PYTHON_EXECUTABLE}
-
-import sys, os, re
-sys.path.append('${GR_CORE_PYTHONPATH}')
-sys.path.append('${CMAKE_CURRENT_SOURCE_DIR}')
-os.environ['srcdir'] = '${CMAKE_CURRENT_SOURCE_DIR}'
-os.chdir('${CMAKE_CURRENT_BINARY_DIR}')
-
-if __name__ == '__main__':
- import build_utils, generate_trellis
- root, inp = sys.argv[1:3]
- for sig in sys.argv[3:]:
- name = re.sub ('X+', sig, root)
- d = generate_trellis.standard_dict(name, sig)
- build_utils.expand_template(d, inp)
-
-")
-
-########################################################################
-# generation helper macro to generate various files from template
-########################################################################
-macro(expand_h_cc_i root)
-
- foreach(ext h cc i)
- #make a list of all the generated files
- unset(expanded_files_${ext})
- foreach(sig ${ARGN})
- string(REGEX REPLACE "X+" ${sig} name ${root})
- list(APPEND expanded_files_${ext} ${CMAKE_CURRENT_BINARY_DIR}/${name}.${ext})
- endforeach(sig)
-
- #create a command to generate the files
- add_custom_command(
- OUTPUT ${expanded_files_${ext}}
- DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${root}.${ext}.t
- COMMAND ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B}
- ${CMAKE_CURRENT_BINARY_DIR}/generate_helper.py
- ${root} ${root}.${ext}.t ${ARGN}
- )
- endforeach(ext)
-
- #make source files depends on headers to force generation
- set_source_files_properties(${expanded_files_cc}
- PROPERTIES OBJECT_DEPENDS "${expanded_files_h}"
- )
-
- #install rules for the generated cc, h, and i files
- list(APPEND generated_trellis_sources ${expanded_files_cc})
- list(APPEND generated_trellis_includes ${expanded_files_h})
- list(APPEND generated_trellis_swigs ${expanded_files_i})
-
-endmacro(expand_h_cc_i)
-
-########################################################################
-# Invoke macro to generate various sources
-########################################################################
-expand_h_cc_i(trellis_encoder_XX bb bs bi ss si ii)
-expand_h_cc_i(trellis_sccc_encoder_XX bb bs bi ss si ii)
-expand_h_cc_i(trellis_pccc_encoder_XX bb bs bi ss si ii)
-expand_h_cc_i(trellis_metrics_X s i f c)
-expand_h_cc_i(trellis_viterbi_X b s i)
-expand_h_cc_i(trellis_viterbi_combined_XX sb ss si ib is ii fb fs fi cb cs ci)
-expand_h_cc_i(trellis_sccc_decoder_X b s i)
-expand_h_cc_i(trellis_sccc_decoder_combined_XX fb fs fi cb cs ci)
-expand_h_cc_i(trellis_pccc_decoder_X b s i)
-expand_h_cc_i(trellis_pccc_decoder_combined_XX fb fs fi cb cs ci)
-
-########################################################################
-# Create the master trellis swig include files
-########################################################################
-set(generated_index ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i.in)
-file(WRITE ${generated_index} "
-//
-// This file is machine generated. All edits will be overwritten
-//
-")
-
-file(APPEND ${generated_index} "%{\n")
-foreach(swig_file ${generated_trellis_swigs})
- get_filename_component(name ${swig_file} NAME_WE)
- file(APPEND ${generated_index} "#include<${name}.h>\n")
-endforeach(swig_file)
-file(APPEND ${generated_index} "%}\n")
-
-foreach(swig_file ${generated_trellis_swigs})
- get_filename_component(name ${swig_file} NAME)
- file(APPEND ${generated_index} "%include<${name}>\n")
-endforeach(swig_file)
-
-execute_process(
- COMMAND ${CMAKE_COMMAND} -E copy_if_different
- ${generated_index} ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i
-)
-
-########################################################################
-# Setup library
-########################################################################
-list(APPEND gr_trellis_sources
- fsm.cc
- quicksort_index.cc
- base.cc
- interleaver.cc
- calc_metric.cc
- core_algorithms.cc
- trellis_permutation.cc
- trellis_siso_f.cc
- trellis_siso_combined_f.cc
- trellis_constellation_metrics_cf.cc
- ${generated_trellis_sources}
-)
-
-#Add Windows DLL resource file if using MSVC
-if(MSVC)
- include(${CMAKE_SOURCE_DIR}/cmake/Modules/GrVersion.cmake)
-
- configure_file(
- ${CMAKE_CURRENT_SOURCE_DIR}/gnuradio-trellis.rc.in
- ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.rc
- @ONLY)
-
- list(APPEND gr_trellis_sources
- ${CMAKE_CURRENT_BINARY_DIR}/gnuradio-trellis.rc
- )
-endif(MSVC)
-
-list(APPEND trellis_libs
- gnuradio-core
- ${Boost_LIBRARIES}
- ${LOG4CXX_LIBRARIES}
-)
-
-add_library(gnuradio-trellis SHARED ${gr_trellis_sources})
-target_link_libraries(gnuradio-trellis ${trellis_libs})
-GR_LIBRARY_FOO(gnuradio-trellis RUNTIME_COMPONENT "trellis_runtime" DEVEL_COMPONENT "trellis_devel")
-
-########################################################################
-# Handle the generated sources + a few non-generated ones
-########################################################################
-install(FILES
- ${generated_trellis_includes}
- trellis_api.h
- fsm.h
- quicksort_index.h
- base.h
- interleaver.h
- calc_metric.h
- core_algorithms.h
- trellis_permutation.h
- siso_type.h
- trellis_siso_f.h
- trellis_siso_combined_f.h
- trellis_constellation_metrics_cf.h
- DESTINATION ${GR_INCLUDE_DIR}/gnuradio
- COMPONENT "trellis_devel"
-)
-
-if(ENABLE_PYTHON)
- install(FILES
- trellis.i
- ${generated_trellis_swigs}
- fsm.i
- interleaver.i
- trellis_permutation.i
- trellis_siso_f.i
- trellis_siso_combined_f.i
- trellis_constellation_metrics_cf.i
- ${CMAKE_CURRENT_BINARY_DIR}/trellis_generated.i
- ${CMAKE_CURRENT_BINARY_DIR}/trellis_swig_doc.i
- DESTINATION ${GR_INCLUDE_DIR}/gnuradio/swig
- COMPONENT "trellis_swig"
- )
-
-########################################################################
-# Setup swig generation
-########################################################################
-include(GrPython)
-include(GrSwig)
-
-set(GR_SWIG_SOURCE_DEPS
- ${generated_trellis_includes}
- ${generated_trellis_swigs}
-)
-set(GR_SWIG_INCLUDE_DIRS
- ${GR_TRELLIS_INCLUDE_DIRS}
- ${GR_DIGITAL_SWIG_INCLUDE_DIRS}
- ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
-)
-
-set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/trellis_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
-
-set(GR_SWIG_LIBRARIES gnuradio-trellis)
-GR_SWIG_MAKE(trellis trellis.i)
-
-GR_SWIG_INSTALL(
- TARGETS trellis
- DESTINATION ${GR_PYTHON_DIR}/gnuradio
- COMPONENT "trellis_python"
-)
-
-endif(ENABLE_PYTHON)
diff --git a/gr-trellis/swig/CMakeLists.txt b/gr-trellis/swig/CMakeLists.txt
index c2bbf3bc69..b133ced8f9 100644
--- a/gr-trellis/swig/CMakeLists.txt
+++ b/gr-trellis/swig/CMakeLists.txt
@@ -26,8 +26,7 @@ include(GrSwig)
set(GR_SWIG_INCLUDE_DIRS
${GR_TRELLIS_INCLUDE_DIRS}
${GR_DIGITAL_INCLUDE_DIRS}
- ${GNURADIO_CORE_SWIG_INCLUDE_DIRS}
- ${GRUEL_INCLUDE_DIRS}
+ ${GNURADIO_RUNTIME_SWIG_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS}
)
@@ -41,7 +40,8 @@ endif(ENABLE_GR_CTRLPORT)
# Setup swig docs to depend on includes and pull in from build directory
set(GR_SWIG_TARGET_DEPS trellis_generated_includes)
set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/trellis_swig_doc.i)
-set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
+set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../include/trellis)
+set(GR_SWIG_DOCS_TARGET_DEPS runtime_swig_swig_doc)
GR_SWIG_MAKE(trellis_swig trellis_swig.i)
diff --git a/gr-trellis/swig/trellis_swig.i b/gr-trellis/swig/trellis_swig.i
index 5732aca1fb..d593926b0d 100644
--- a/gr-trellis/swig/trellis_swig.i
+++ b/gr-trellis/swig/trellis_swig.i
@@ -22,7 +22,7 @@
#define TRELLIS_API
#define DIGITAL_API
-%include "gnuradio.i"
+%include "runtime_swig.i"
//load generated python docstrings
%include "trellis_swig_doc.i"