summaryrefslogtreecommitdiff
path: root/gr-trellis/src
diff options
context:
space:
mode:
Diffstat (limited to 'gr-trellis/src')
-rw-r--r--gr-trellis/src/CMakeLists.txt28
-rw-r--r--gr-trellis/src/examples/grc/interference_cancellation.grc1120
-rw-r--r--gr-trellis/src/examples/grc/pccc.grc310
-rw-r--r--gr-trellis/src/examples/grc/pccc1.grc324
-rw-r--r--gr-trellis/src/examples/grc/sccc.grc324
-rw-r--r--gr-trellis/src/examples/grc/sccc1.grc226
-rwxr-xr-xgr-trellis/src/examples/python/test_cpm.py29
-rwxr-xr-xgr-trellis/src/examples/python/test_pccc_turbo1.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_hard.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_soft.py11
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo1.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_sccc_turbo2.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_bit.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_combined.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_tcm_parallel.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization.py9
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization1.py14
-rwxr-xr-xgr-trellis/src/examples/python/test_turbo_equalization2.py14
-rwxr-xr-xgr-trellis/src/examples/python/test_viterbi_equalization.py10
-rwxr-xr-xgr-trellis/src/examples/python/test_viterbi_equalization1.py14
-rw-r--r--gr-trellis/src/lib/CMakeLists.txt3
-rw-r--r--gr-trellis/src/lib/calc_metric.cc54
-rw-r--r--gr-trellis/src/lib/calc_metric.h14
-rw-r--r--gr-trellis/src/lib/core_algorithms.cc64
-rw-r--r--gr-trellis/src/lib/core_algorithms.h10
-rw-r--r--gr-trellis/src/lib/trellis.i16
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.cc22
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.h31
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.i8
-rw-r--r--gr-trellis/src/lib/trellis_metrics_X.cc.t49
-rw-r--r--gr-trellis/src/lib/trellis_metrics_X.h.t34
-rw-r--r--gr-trellis/src/lib/trellis_metrics_X.i.t8
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t4
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t6
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t4
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.i.t6
-rw-r--r--gr-trellis/src/lib/trellis_siso_combined_f.cc6
-rw-r--r--gr-trellis/src/lib/trellis_siso_combined_f.h10
-rw-r--r--gr-trellis/src/lib/trellis_siso_combined_f.i6
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t10
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_combined_XX.i.t6
-rw-r--r--gr-trellis/src/python/CMakeLists.txt3
-rwxr-xr-xgr-trellis/src/python/qa_trellis.py13
48 files changed, 1577 insertions, 1357 deletions
diff --git a/gr-trellis/src/CMakeLists.txt b/gr-trellis/src/CMakeLists.txt
new file mode 100644
index 0000000000..56db84a3e4
--- /dev/null
+++ b/gr-trellis/src/CMakeLists.txt
@@ -0,0 +1,28 @@
+# Copyright 2012 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.
+
+########################################################################
+# Add subdirectories
+########################################################################
+add_subdirectory(lib)
+if(ENABLE_PYTHON)
+ add_subdirectory(python)
+ add_subdirectory(examples/python)
+ add_subdirectory(examples/grc)
+endif(ENABLE_PYTHON)
diff --git a/gr-trellis/src/examples/grc/interference_cancellation.grc b/gr-trellis/src/examples/grc/interference_cancellation.grc
index 7674b4bf16..129ee87905 100644
--- a/gr-trellis/src/examples/grc/interference_cancellation.grc
+++ b/gr-trellis/src/examples/grc/interference_cancellation.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Wed Aug 31 17:40:25 2011</timestamp>
+ <timestamp>Sat Nov 10 15:39:57 2012</timestamp>
<block>
<key>options</key>
<param>
@@ -44,6 +44,10 @@
<value>True</value>
</param>
<param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
<key>realtime_scheduling</key>
<value></value>
</param>
@@ -229,37 +233,6 @@
</param>
</block>
<block>
- <key>gr_multiply_const_vxx</key>
- <param>
- <key>id</key>
- <value>gr_multiply_const_vxx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>const</key>
- <value>alpha**0.5</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(988, 196)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>random_source_x</key>
<param>
<key>id</key>
@@ -299,142 +272,6 @@
</param>
</block>
<block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>complex</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>1,1j,-1j,-1</value>
- </param>
- <param>
- <key>dimension</key>
- <value>1</value>
- </param>
- <param>
- <key>num_ports</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(660, 311)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_multiply_const_vxx</key>
- <param>
- <key>id</key>
- <value>gr_multiply_const_vxx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>const</key>
- <value>(1-alpha)**0.5</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(994, 319)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_add_xx</key>
- <param>
- <key>id</key>
- <value>gr_add_xx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1224, 244)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_noise_source_x</key>
- <param>
- <key>id</key>
- <value>gr_noise_source_x_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>noise_type</key>
- <value>gr.GR_GAUSSIAN</value>
- </param>
- <param>
- <key>amp</key>
- <value>noisevar</value>
- </param>
- <param>
- <key>seed</key>
- <value>42</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1146, 369)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_sub_xx</key>
<param>
<key>id</key>
@@ -507,6 +344,14 @@
<value>True</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(994, 545)</value>
</param>
@@ -588,78 +433,16 @@
<value>True</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(1005, 798)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_2</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>complex</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>1,1j,-1j,-1</value>
- </param>
- <param>
- <key>dimension</key>
- <value>1</value>
- </param>
- <param>
- <key>num_ports</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(405, 998)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_multiply_const_vxx</key>
- <param>
- <key>id</key>
- <value>gr_multiply_const_vxx_2</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>const</key>
- <value>alpha**0.5</value>
- </param>
- <param>
- <key>vlen</key>
+ <key>scale</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(710, 1008)</value>
+ <value>(1005, 798)</value>
</param>
<param>
<key>_rotation</key>
@@ -770,78 +553,16 @@
<value>True</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(1009, 1156)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_2_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>complex</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>1,1j,-1j,-1</value>
- </param>
- <param>
- <key>dimension</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>num_ports</key>
+ <key>scale</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(420, 1368)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_multiply_const_vxx</key>
- <param>
- <key>id</key>
- <value>gr_multiply_const_vxx_2_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>const</key>
- <value>(1-alpha)**0.5</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(733, 1374)</value>
+ <value>(1009, 1156)</value>
</param>
<param>
<key>_rotation</key>
@@ -952,39 +673,16 @@
<value>True</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(1010, 1551)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>trellis_encoder_xx</key>
- <param>
- <key>id</key>
- <value>trellis_encoder_xx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>ss</value>
- </param>
- <param>
- <key>fsm_args</key>
- <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>init_state</key>
- <value>0</value>
+ <key>scale</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(336, 311)</value>
+ <value>(1010, 1551)</value>
</param>
<param>
<key>_rotation</key>
@@ -1035,7 +733,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
@@ -1090,7 +788,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
@@ -1102,37 +800,6 @@
</param>
</block>
<block>
- <key>trellis_encoder_xx</key>
- <param>
- <key>id</key>
- <value>trellis_encoder_xx_2</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>ss</value>
- </param>
- <param>
- <key>fsm_args</key>
- <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
- </param>
- <param>
- <key>init_state</key>
- <value>0</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(89, 998)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>trellis_viterbi_combined_xx</key>
<param>
<key>id</key>
@@ -1176,7 +843,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
@@ -1188,37 +855,6 @@
</param>
</block>
<block>
- <key>trellis_encoder_xx</key>
- <param>
- <key>id</key>
- <value>trellis_encoder_xx_2_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>ss</value>
- </param>
- <param>
- <key>fsm_args</key>
- <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
- </param>
- <param>
- <key>init_state</key>
- <value>0</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(105, 1367)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>trellis_viterbi_combined_xx</key>
<param>
<key>id</key>
@@ -1262,7 +898,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
@@ -1274,37 +910,6 @@
</param>
</block>
<block>
- <key>gr_add_xx</key>
- <param>
- <key>id</key>
- <value>gr_add_xx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(1400, 262)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
@@ -1434,76 +1039,6 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
- <param>
- <key>id</key>
- <value>gr_throttle_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>short</value>
- </param>
- <param>
- <key>samples_per_second</key>
- <value>R</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(534, 149)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>complex</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>1,1j,-1j,-1</value>
- </param>
- <param>
- <key>dimension</key>
- <value>1</value>
- </param>
- <param>
- <key>num_ports</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(682, 186)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>variable</key>
<param>
<key>id</key>
@@ -1874,6 +1409,507 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_add_xx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_xx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1400, 262)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_add_xx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1224, 245)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_noise_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_noise_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>noisevar</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-42</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(1178, 321)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_throttle</key>
+ <param>
+ <key>id</key>
+ <value>gr_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>R</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(579, 143)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_multiply_const_vxx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>alpha**0.5</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(988, 196)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>1,1j,-1j,-1</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(703, 211)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_multiply_const_vxx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>(1-alpha)**0.5</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(994, 319)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>trellis_encoder_xx</key>
+ <param>
+ <key>id</key>
+ <value>trellis_encoder_xx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>ss</value>
+ </param>
+ <param>
+ <key>fsm_args</key>
+ <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+ </param>
+ <param>
+ <key>init_state</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(336, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>1,1j,-1j,-1</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(703, 311)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>1,1j,-1j,-1</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(418, 1000)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_multiply_const_vxx_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>alpha**0.5</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(710, 1008)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>trellis_encoder_xx</key>
+ <param>
+ <key>id</key>
+ <value>trellis_encoder_xx_2</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>ss</value>
+ </param>
+ <param>
+ <key>fsm_args</key>
+ <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+ </param>
+ <param>
+ <key>init_state</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(89, 1000)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_multiply_const_vxx</key>
+ <param>
+ <key>id</key>
+ <value>gr_multiply_const_vxx_2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>const</key>
+ <value>(1-alpha)**0.5</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(733, 1374)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>trellis_encoder_xx</key>
+ <param>
+ <key>id</key>
+ <value>trellis_encoder_xx_2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>ss</value>
+ </param>
+ <param>
+ <key>fsm_args</key>
+ <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value>
+ </param>
+ <param>
+ <key>init_state</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(103, 1366)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>1,1j,-1j,-1</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(420, 1366)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>random_source_x_1</source_block_id>
<sink_block_id>trellis_encoder_xx_1</sink_block_id>
@@ -1881,18 +1917,6 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>trellis_encoder_xx_1</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_multiply_const_vxx_0</source_block_id>
<sink_block_id>gr_add_xx_0</sink_block_id>
<source_key>0</source_key>
@@ -1905,18 +1929,6 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_noise_source_x_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_1</source_block_id>
- <sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_multiply_const_vxx_1</source_block_id>
<sink_block_id>gr_add_xx_0</sink_block_id>
<source_key>0</source_key>
@@ -2013,18 +2025,6 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>trellis_encoder_xx_2</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_2</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_2</source_block_id>
- <sink_block_id>gr_multiply_const_vxx_2</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_multiply_const_vxx_2</source_block_id>
<sink_block_id>gr_sub_xx_2</sink_block_id>
<source_key>0</source_key>
@@ -2085,18 +2085,6 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>trellis_encoder_xx_2_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_2_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_2_0</source_block_id>
- <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>trellis_viterbi_combined_xx_2</source_block_id>
<sink_block_id>trellis_encoder_xx_2_0</sink_block_id>
<source_key>0</source_key>
@@ -2169,8 +2157,56 @@
<sink_key>0</sink_key>
</connection>
<connection>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
<source_block_id>gr_throttle_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>gr_multiply_const_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0_0</source_block_id>
+ <sink_block_id>gr_multiply_const_vxx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>trellis_encoder_xx_1</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>trellis_encoder_xx_2</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0_0_0</source_block_id>
+ <sink_block_id>gr_multiply_const_vxx_2</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>trellis_encoder_xx_2_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0_0_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0_0_1</source_block_id>
+ <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-trellis/src/examples/grc/pccc.grc b/gr-trellis/src/examples/grc/pccc.grc
index c3111c3211..06fa9cd69f 100644
--- a/gr-trellis/src/examples/grc/pccc.grc
+++ b/gr-trellis/src/examples/grc/pccc.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Thu Sep 1 12:53:13 2011</timestamp>
+ <timestamp>Sat Nov 10 15:37:00 2012</timestamp>
<block>
<key>options</key>
<param>
@@ -44,6 +44,10 @@
<value>True</value>
</param>
<param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
<key>realtime_scheduling</key>
<value></value>
</param>
@@ -222,6 +226,14 @@
<value>True</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(535, 609)</value>
</param>
@@ -318,41 +330,6 @@
</param>
</block>
<block>
- <key>gr_noise_source_x</key>
- <param>
- <key>id</key>
- <value>gr_noise_source_x_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>noise_type</key>
- <value>gr.GR_GAUSSIAN</value>
- </param>
- <param>
- <key>amp</key>
- <value>noisevar</value>
- </param>
- <param>
- <key>seed</key>
- <value>42</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(672, 290)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
@@ -467,10 +444,10 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
+ <key>trellis_pccc_encoder_xx</key>
<param>
<key>id</key>
- <value>gr_throttle_0</value>
+ <value>trellis_pccc_encoder_xx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -478,58 +455,58 @@
</param>
<param>
<key>type</key>
- <value>short</value>
+ <value>ss</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>R</value>
+ <key>o_fsm_args</key>
+ <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>o_init_state</key>
+ <value>0</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(517, 103)</value>
+ <key>i_fsm_args</key>
+ <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value>
</param>
<param>
- <key>_rotation</key>
+ <key>i_init_state</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>gr_chunks_to_symbols_xx</key>
<param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_0</value>
+ <key>interleaver_args</key>
+ <value>trellis.interleaver(block,666)</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>bl</key>
+ <value>block</value>
</param>
<param>
- <key>in_type</key>
- <value>short</value>
+ <key>_coordinate</key>
+ <value>(236, 147)</value>
</param>
<param>
- <key>out_type</key>
- <value>float</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>symbol_table</key>
- <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value>
+ <key>id</key>
+ <value>R</value>
</param>
<param>
- <key>dimension</key>
- <value>2</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>value</key>
+ <value>100e3</value>
</param>
<param>
<key>_coordinate</key>
- <value>(551, 184)</value>
+ <value>(482, 17)</value>
</param>
<param>
<key>_rotation</key>
@@ -537,10 +514,10 @@
</param>
</block>
<block>
- <key>trellis_pccc_encoder_xx</key>
+ <key>trellis_pccc_decoder_combined_xx</key>
<param>
<key>id</key>
- <value>trellis_pccc_encoder_xx_0</value>
+ <value>trellis_pccc_decoder_combined_xx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -548,7 +525,11 @@
</param>
<param>
<key>type</key>
- <value>ss</value>
+ <value>f</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>s</value>
</param>
<param>
<key>o_fsm_args</key>
@@ -559,6 +540,10 @@
<value>0</value>
</param>
<param>
+ <key>o_final_state</key>
+ <value>-1</value>
+ </param>
+ <param>
<key>i_fsm_args</key>
<value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value>
</param>
@@ -567,16 +552,44 @@
<value>0</value>
</param>
<param>
- <key>interleaver_args</key>
+ <key>i_final_state</key>
+ <value>-1</value>
+ </param>
+ <param>
+ <key>interleaver</key>
<value>trellis.interleaver(block,666)</value>
</param>
<param>
- <key>bl</key>
+ <key>block_size</key>
<value>block</value>
</param>
<param>
+ <key>iterations</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>dim</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>table</key>
+ <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value>
+ </param>
+ <param>
+ <key>metric_type</key>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
+ </param>
+ <param>
+ <key>siso_type</key>
+ <value>trellis.TRELLIS_MIN_SUM</value>
+ </param>
+ <param>
+ <key>scaling</key>
+ <value>1.0</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(236, 147)</value>
+ <value>(196, 274)</value>
</param>
<param>
<key>_rotation</key>
@@ -584,22 +597,30 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>gr_sub_xx</key>
<param>
<key>id</key>
- <value>R</value>
+ <value>gr_sub_xx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>100e3</value>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
</param>
<param>
<key>_coordinate</key>
- <value>(482, 17)</value>
+ <value>(217, 597)</value>
</param>
<param>
<key>_rotation</key>
@@ -607,10 +628,10 @@
</param>
</block>
<block>
- <key>gr_add_xx</key>
+ <key>analog_noise_source_x</key>
<param>
<key>id</key>
- <value>gr_add_xx_1</value>
+ <value>analog_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -621,16 +642,20 @@
<value>float</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>amp</key>
+ <value>noisevar</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-42</value>
</param>
<param>
<key>_coordinate</key>
- <value>(951, 256)</value>
+ <value>(584, 259)</value>
</param>
<param>
<key>_rotation</key>
@@ -638,10 +663,10 @@
</param>
</block>
<block>
- <key>trellis_pccc_decoder_combined_xx</key>
+ <key>gr_throttle</key>
<param>
<key>id</key>
- <value>trellis_pccc_decoder_combined_xx_0</value>
+ <value>gr_throttle_0</value>
</param>
<param>
<key>_enabled</key>
@@ -649,71 +674,58 @@
</param>
<param>
<key>type</key>
- <value>f</value>
- </param>
- <param>
- <key>out_type</key>
- <value>s</value>
- </param>
- <param>
- <key>o_fsm_args</key>
- <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value>
+ <value>short</value>
</param>
<param>
- <key>o_init_state</key>
- <value>0</value>
+ <key>samples_per_second</key>
+ <value>R</value>
</param>
<param>
- <key>o_final_state</key>
- <value>-1</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>i_fsm_args</key>
- <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value>
+ <key>_coordinate</key>
+ <value>(517, 103)</value>
</param>
<param>
- <key>i_init_state</key>
+ <key>_rotation</key>
<value>0</value>
</param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
- <key>i_final_state</key>
- <value>-1</value>
- </param>
- <param>
- <key>interleaver</key>
- <value>trellis.interleaver(block,666)</value>
- </param>
- <param>
- <key>block_size</key>
- <value>block</value>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0</value>
</param>
<param>
- <key>iterations</key>
- <value>10</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>dim</key>
- <value>2</value>
+ <key>in_type</key>
+ <value>short</value>
</param>
<param>
- <key>table</key>
- <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value>
+ <key>out_type</key>
+ <value>float</value>
</param>
<param>
- <key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <key>symbol_table</key>
+ <value>-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7,0,-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7</value>
</param>
<param>
- <key>siso_type</key>
- <value>trellis.TRELLIS_MIN_SUM</value>
+ <key>dimension</key>
+ <value>2</value>
</param>
<param>
- <key>scaling</key>
- <value>1.0</value>
+ <key>num_ports</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(196, 274)</value>
+ <value>(559, 180)</value>
</param>
<param>
<key>_rotation</key>
@@ -721,10 +733,10 @@
</param>
</block>
<block>
- <key>gr_sub_xx</key>
+ <key>gr_add_xx</key>
<param>
<key>id</key>
- <value>gr_sub_xx_0</value>
+ <value>gr_add_xx_1</value>
</param>
<param>
<key>_enabled</key>
@@ -732,19 +744,19 @@
</param>
<param>
<key>type</key>
- <value>short</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
+ <value>float</value>
</param>
<param>
<key>num_inputs</key>
<value>2</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(217, 597)</value>
+ <value>(951, 256)</value>
</param>
<param>
<key>_rotation</key>
@@ -758,30 +770,12 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_add_xx_1</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_noise_source_x_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_multiply_xx_2_0</source_block_id>
<sink_block_id>gr_short_to_float_1_0</sink_block_id>
<source_key>0</source_key>
@@ -829,4 +823,22 @@
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
+ <connection>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>gr_throttle_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-trellis/src/examples/grc/pccc1.grc b/gr-trellis/src/examples/grc/pccc1.grc
index 15a63707ee..c111ebd3ec 100644
--- a/gr-trellis/src/examples/grc/pccc1.grc
+++ b/gr-trellis/src/examples/grc/pccc1.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Wed Aug 31 20:34:39 2011</timestamp>
+ <timestamp>Sat Nov 10 15:36:08 2012</timestamp>
<block>
<key>options</key>
<param>
@@ -44,6 +44,10 @@
<value>True</value>
</param>
<param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
<key>realtime_scheduling</key>
<value></value>
</param>
@@ -222,6 +226,14 @@
<value>True</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(535, 609)</value>
</param>
@@ -318,72 +330,6 @@
</param>
</block>
<block>
- <key>gr_noise_source_x</key>
- <param>
- <key>id</key>
- <value>gr_noise_source_x_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>noise_type</key>
- <value>gr.GR_GAUSSIAN</value>
- </param>
- <param>
- <key>amp</key>
- <value>noisevar</value>
- </param>
- <param>
- <key>seed</key>
- <value>42</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(672, 290)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_add_xx</key>
- <param>
- <key>id</key>
- <value>gr_add_xx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(951, 256)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>wxgui_scopesink2</key>
<param>
<key>id</key>
@@ -498,37 +444,6 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
- <param>
- <key>id</key>
- <value>gr_throttle_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>short</value>
- </param>
- <param>
- <key>samples_per_second</key>
- <value>R</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(517, 103)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_sub_xx</key>
<param>
<key>id</key>
@@ -560,45 +475,6 @@
</param>
</block>
<block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>float</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value>
- </param>
- <param>
- <key>dimension</key>
- <value>2</value>
- </param>
- <param>
- <key>num_ports</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(551, 184)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>trellis_pccc_encoder_xx</key>
<param>
<key>id</key>
@@ -736,7 +612,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
@@ -770,6 +646,142 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_throttle</key>
+ <param>
+ <key>id</key>
+ <value>gr_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>R</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(517, 103)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_add_xx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_xx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(951, 256)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7,0,-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(552, 178)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_noise_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_noise_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>noisevar</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-42</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(622, 257)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>random_source_x_0</source_block_id>
<sink_block_id>gr_sub_xx_0</sink_block_id>
@@ -777,30 +789,12 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_add_xx_1</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_noise_source_x_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_multiply_xx_2_0</source_block_id>
<sink_block_id>gr_short_to_float_1_0</sink_block_id>
<source_key>0</source_key>
@@ -854,4 +848,22 @@
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
+ <connection>
+ <source_block_id>gr_throttle_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-trellis/src/examples/grc/sccc.grc b/gr-trellis/src/examples/grc/sccc.grc
index e8f656f637..36657f5441 100644
--- a/gr-trellis/src/examples/grc/sccc.grc
+++ b/gr-trellis/src/examples/grc/sccc.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Wed Aug 31 19:57:09 2011</timestamp>
+ <timestamp>Sat Nov 10 15:34:26 2012</timestamp>
<block>
<key>options</key>
<param>
@@ -44,6 +44,10 @@
<value>True</value>
</param>
<param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
<key>realtime_scheduling</key>
<value></value>
</param>
@@ -165,37 +169,6 @@
</param>
</block>
<block>
- <key>gr_add_xx</key>
- <param>
- <key>id</key>
- <value>gr_add_xx_1</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>num_inputs</key>
- <value>2</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(951, 256)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>gr_sub_xx</key>
<param>
<key>id</key>
@@ -268,6 +241,14 @@
<value>True</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(416, 815)</value>
</param>
@@ -430,111 +411,6 @@
</param>
</block>
<block>
- <key>gr_throttle</key>
- <param>
- <key>id</key>
- <value>gr_throttle_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>short</value>
- </param>
- <param>
- <key>samples_per_second</key>
- <value>R</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(514, 105)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_chunks_to_symbols_xx</key>
- <param>
- <key>id</key>
- <value>gr_chunks_to_symbols_xx_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
- <value>complex</value>
- </param>
- <param>
- <key>symbol_table</key>
- <value>1,0,1j,0,-1j,0,-1,0, 0,1,0,1j,0,-1j,0,-1</value>
- </param>
- <param>
- <key>dimension</key>
- <value>2</value>
- </param>
- <param>
- <key>num_ports</key>
- <value>1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(551, 184)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>gr_noise_source_x</key>
- <param>
- <key>id</key>
- <value>gr_noise_source_x_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>noise_type</key>
- <value>gr.GR_GAUSSIAN</value>
- </param>
- <param>
- <key>amp</key>
- <value>noisevar</value>
- </param>
- <param>
- <key>seed</key>
- <value>42</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(672, 290)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>trellis_sccc_encoder_xx</key>
<param>
<key>id</key>
@@ -732,7 +608,7 @@
</param>
<param>
<key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>siso_type</key>
@@ -751,6 +627,142 @@
<value>0</value>
</param>
</block>
+ <block>
+ <key>gr_throttle</key>
+ <param>
+ <key>id</key>
+ <value>gr_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>R</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(514, 105)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>gr_add_xx</key>
+ <param>
+ <key>id</key>
+ <value>gr_add_xx_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(951, 256)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_chunks_to_symbols_xx</key>
+ <param>
+ <key>id</key>
+ <value>digital_chunks_to_symbols_xx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>in_type</key>
+ <value>short</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>1,0,1j,0,-1j,0,-1,0,0,1,0,1j,0,-1j,0,01</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(551, 181)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>analog_noise_source_x</key>
+ <param>
+ <key>id</key>
+ <value>analog_noise_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
+ </param>
+ <param>
+ <key>amp</key>
+ <value>noisevar</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>-42</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(651, 270)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
<connection>
<source_block_id>random_source_x_0</source_block_id>
<sink_block_id>gr_sub_xx_0</sink_block_id>
@@ -758,30 +770,12 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_add_xx_1</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_noise_source_x_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>random_source_x_0</source_block_id>
<sink_block_id>trellis_sccc_encoder_xx_0</sink_block_id>
<source_key>0</source_key>
@@ -829,4 +823,22 @@
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
+ <connection>
+ <source_block_id>gr_throttle_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-trellis/src/examples/grc/sccc1.grc b/gr-trellis/src/examples/grc/sccc1.grc
index 0be59d0c47..17626e3dce 100644
--- a/gr-trellis/src/examples/grc/sccc1.grc
+++ b/gr-trellis/src/examples/grc/sccc1.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Wed Aug 31 20:09:23 2011</timestamp>
+ <timestamp>Sat Nov 10 15:41:10 2012</timestamp>
<block>
<key>options</key>
<param>
@@ -44,6 +44,10 @@
<value>True</value>
</param>
<param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
<key>realtime_scheduling</key>
<value></value>
</param>
@@ -425,6 +429,14 @@
<value>True</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
<value>(535, 609)</value>
</param>
@@ -521,10 +533,10 @@
</param>
</block>
<block>
- <key>gr_noise_source_x</key>
+ <key>trellis_metrics_x</key>
<param>
<key>id</key>
- <value>gr_noise_source_x_0</value>
+ <value>trellis_metrics_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -532,23 +544,27 @@
</param>
<param>
<key>type</key>
- <value>float</value>
+ <value>f</value>
</param>
<param>
- <key>noise_type</key>
- <value>gr.GR_GAUSSIAN</value>
+ <key>card</key>
+ <value>8</value>
</param>
<param>
- <key>amp</key>
- <value>noisevar</value>
+ <key>dim</key>
+ <value>1</value>
</param>
<param>
- <key>seed</key>
- <value>42</value>
+ <key>table</key>
+ <value>-7, -5, -3, -1, 1, 3, 5, 7</value>
+ </param>
+ <param>
+ <key>metric_type</key>
+ <value>digital.TRELLIS_EUCLIDEAN</value>
</param>
<param>
<key>_coordinate</key>
- <value>(672, 290)</value>
+ <value>(58, 354)</value>
</param>
<param>
<key>_rotation</key>
@@ -556,69 +572,74 @@
</param>
</block>
<block>
- <key>gr_add_xx</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>gr_add_xx_1</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>False</value>
</param>
<param>
<key>type</key>
<value>float</value>
</param>
<param>
- <key>num_inputs</key>
- <value>2</value>
+ <key>title</key>
+ <value>Scope Plot</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>samp_rate</key>
+ <value>R</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(951, 256)</value>
+ <key>v_scale</key>
+ <value>0</value>
</param>
<param>
- <key>_rotation</key>
+ <key>v_offset</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>trellis_metrics_x</key>
<param>
- <key>id</key>
- <value>trellis_metrics_x_0</value>
+ <key>t_scale</key>
+ <value>0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>ac_couple</key>
+ <value>False</value>
</param>
<param>
- <key>type</key>
- <value>f</value>
+ <key>xy_mode</key>
+ <value>False</value>
</param>
<param>
- <key>card</key>
- <value>8</value>
+ <key>num_inputs</key>
+ <value>1</value>
</param>
<param>
- <key>dim</key>
- <value>1</value>
+ <key>win_size</key>
+ <value></value>
</param>
<param>
- <key>table</key>
- <value>-7, -5, -3, -1, 1, 3, 5, 7</value>
+ <key>grid_pos</key>
+ <value></value>
</param>
<param>
- <key>metric_type</key>
- <value>trellis.TRELLIS_EUCLIDEAN</value>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>gr.gr_TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
</param>
<param>
<key>_coordinate</key>
- <value>(58, 354)</value>
+ <value>(952, 73)</value>
</param>
<param>
<key>_rotation</key>
@@ -657,74 +678,69 @@
</param>
</block>
<block>
- <key>wxgui_scopesink2</key>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>wxgui_scopesink2_0</value>
+ <value>digital_chunks_to_symbols_xx_0</value>
</param>
<param>
<key>_enabled</key>
- <value>False</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>title</key>
- <value>Scope Plot</value>
+ <value>True</value>
</param>
<param>
- <key>samp_rate</key>
- <value>R</value>
+ <key>in_type</key>
+ <value>short</value>
</param>
<param>
- <key>v_scale</key>
- <value>0</value>
+ <key>out_type</key>
+ <value>float</value>
</param>
<param>
- <key>v_offset</key>
- <value>0</value>
+ <key>symbol_table</key>
+ <value>-7,-5,-3,-1,1,3,5,7</value>
</param>
<param>
- <key>t_scale</key>
- <value>0</value>
+ <key>dimension</key>
+ <value>1</value>
</param>
<param>
- <key>ac_couple</key>
- <value>False</value>
+ <key>num_ports</key>
+ <value>1</value>
</param>
<param>
- <key>xy_mode</key>
- <value>False</value>
+ <key>_coordinate</key>
+ <value>(607, 175)</value>
</param>
<param>
- <key>num_inputs</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>gr_add_xx</key>
<param>
- <key>win_size</key>
- <value></value>
+ <key>id</key>
+ <value>gr_add_xx_1</value>
</param>
<param>
- <key>grid_pos</key>
- <value></value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>notebook</key>
- <value></value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>trig_mode</key>
- <value>gr.gr_TRIG_MODE_AUTO</value>
+ <key>num_inputs</key>
+ <value>2</value>
</param>
<param>
- <key>y_axis_label</key>
- <value>Counts</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(952, 73)</value>
+ <value>(951, 256)</value>
</param>
<param>
<key>_rotation</key>
@@ -732,38 +748,34 @@
</param>
</block>
<block>
- <key>gr_chunks_to_symbols_xx</key>
+ <key>analog_noise_source_x</key>
<param>
<key>id</key>
- <value>gr_chunks_to_symbols_xx_0</value>
+ <value>analog_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>in_type</key>
- <value>short</value>
- </param>
- <param>
- <key>out_type</key>
+ <key>type</key>
<value>float</value>
</param>
<param>
- <key>symbol_table</key>
- <value>-7, -5, -3, -1, 1, 3, 5, 7</value>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
</param>
<param>
- <key>dimension</key>
- <value>1</value>
+ <key>amp</key>
+ <value>noisevar</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>seed</key>
+ <value>-42</value>
</param>
<param>
<key>_coordinate</key>
- <value>(551, 184)</value>
+ <value>(632, 254)</value>
</param>
<param>
<key>_rotation</key>
@@ -777,30 +789,12 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_throttle_0</source_block_id>
- <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>gr_add_xx_1</source_block_id>
<sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>gr_noise_source_x_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id>
- <sink_block_id>gr_add_xx_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>0</sink_key>
- </connection>
- <connection>
<source_block_id>random_source_x_0</source_block_id>
<sink_block_id>trellis_sccc_encoder_xx_0</sink_block_id>
<source_key>0</source_key>
@@ -854,4 +848,22 @@
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
+ <connection>
+ <source_block_id>gr_throttle_0</source_block_id>
+ <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>gr_add_xx_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
</flow_graph>
diff --git a/gr-trellis/src/examples/python/test_cpm.py b/gr-trellis/src/examples/python/test_cpm.py
index 5342e57e82..6b9b9a4f52 100755
--- a/gr-trellis/src/examples/python/test_cpm.py
+++ b/gr-trellis/src/examples/python/test_cpm.py
@@ -8,8 +8,7 @@
##################################################
from gnuradio import gr
-from gnuradio import trellis, digital
-from gnuradio.gr import firdes
+from gnuradio import trellis, digital, filter
from grc_gnuradio import blks2 as grc_blks2
import math
import numpy
@@ -17,6 +16,12 @@ import fsm_utils
from gnuradio import trellis
try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
+try:
import scipy.stats
except ImportError:
print "Error: Program requires scipy (see: www.scipy.org)."
@@ -45,7 +50,7 @@ def run_test(seed,blocksize):
BT=0.3;
tt=numpy.arange(0,L*Q)/(1.0*Q)-L/2.0;
#print tt
- p=(0.5*scipy.stats.erfc(2*math.pi*BT*(tt-0.5)/math.sqrt(math.log(2.0))/math.sqrt(2.0))-0.5*scipy.stats.erfc(2*math.pi*BT*(tt+0.5)/math.sqrt(math.log(2.0))/math.sqrt(2.0)))/2.0;
+ p=(0.5*scipy.special.erfc(2*math.pi*BT*(tt-0.5)/math.sqrt(math.log(2.0))/math.sqrt(2.0))-0.5*scipy.special.erfc(2*math.pi*BT*(tt+0.5)/math.sqrt(math.log(2.0))/math.sqrt(2.0)))/2.0;
p=p/sum(p)*Q/2.0;
#print p
q=numpy.cumsum(p)/Q;
@@ -89,18 +94,18 @@ def run_test(seed,blocksize):
# Blocks
##################################################
random_source_x_0 = gr.vector_source_b(data.tolist(), False)
- gr_chunks_to_symbols_xx_0 = gr.chunks_to_symbols_bf((-1, 1), 1)
- gr_interp_fir_filter_xxx_0 = gr.interp_fir_filter_fff(Q, p)
- gr_frequency_modulator_fc_0 = gr.frequency_modulator_fc(2*math.pi*h*(1.0/Q))
+ digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bf((-1, 1), 1)
+ gr_interp_fir_filter_xxx_0 = filter.interp_fir_filter_fff(Q, p)
+ gr_frequency_modulator_fc_0 = analog.frequency_modulator_fc(2*math.pi*h*(1.0/Q))
gr_add_vxx_0 = gr.add_vcc(1)
- gr_noise_source_x_0 = gr.noise_source_c(gr.GR_GAUSSIAN, (N0/2.0)**0.5, -long(seed))
+ gr_noise_source_x_0 = analog.noise_source_c(analog.GR_GAUSSIAN, (N0/2.0)**0.5, -long(seed))
gr_multiply_vxx_0 = gr.multiply_vcc(1)
- gr_sig_source_x_0 = gr.sig_source_c(Q, gr.GR_COS_WAVE, -f0T, 1, 0)
+ gr_sig_source_x_0 = analog.sig_source_c(Q, analog.GR_COS_WAVE, -f0T, 1, 0)
# only works for N=2, do it manually for N>2...
- gr_fir_filter_xxx_0_0 = gr.fir_filter_ccc(Q, MF[0].conjugate())
- gr_fir_filter_xxx_0_0_0 = gr.fir_filter_ccc(Q, MF[1].conjugate())
+ gr_fir_filter_xxx_0_0 = filter.fir_filter_ccc(Q, MF[0].conjugate())
+ gr_fir_filter_xxx_0_0_0 = filter.fir_filter_ccc(Q, MF[1].conjugate())
gr_streams_to_stream_0 = gr.streams_to_stream(gr.sizeof_gr_complex*1, int(N))
gr_skiphead_0 = gr.skiphead(gr.sizeof_gr_complex*1, int(N*(1+0)))
viterbi = trellis.viterbi_combined_cb(f, head+blocksize+tail, 0, -1, int(N),
@@ -111,8 +116,8 @@ def run_test(seed,blocksize):
##################################################
# Connections
##################################################
- tb.connect((random_source_x_0, 0), (gr_chunks_to_symbols_xx_0, 0))
- tb.connect((gr_chunks_to_symbols_xx_0, 0), (gr_interp_fir_filter_xxx_0, 0))
+ tb.connect((random_source_x_0, 0), (digital_chunks_to_symbols_xx_0, 0))
+ tb.connect((digital_chunks_to_symbols_xx_0, 0), (gr_interp_fir_filter_xxx_0, 0))
tb.connect((gr_interp_fir_filter_xxx_0, 0), (gr_frequency_modulator_fc_0, 0))
tb.connect((gr_frequency_modulator_fc_0, 0), (gr_add_vxx_0, 0))
tb.connect((gr_noise_source_x_0, 0), (gr_add_vxx_0, 1))
diff --git a/gr-trellis/src/examples/python/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py
index 0655b972de..bbcce106fb 100755
--- a/gr-trellis/src/examples/python/test_pccc_turbo1.py
+++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py
@@ -8,6 +8,11 @@ import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed):
tb = gr.top_block ()
@@ -20,11 +25,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
#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()
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics_in = trellis.metrics_f(fi.O()*fo.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO
diff --git a/gr-trellis/src/examples/python/test_sccc_hard.py b/gr-trellis/src/examples/python/test_sccc_hard.py
index 4eeb94a12d..b75a07b8b0 100755
--- a/gr-trellis/src/examples/python/test_sccc_hard.py
+++ b/gr-trellis/src/examples/python/test_sccc_hard.py
@@ -8,6 +8,12 @@ import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
@@ -19,11 +25,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi
diff --git a/gr-trellis/src/examples/python/test_sccc_soft.py b/gr-trellis/src/examples/python/test_sccc_soft.py
index 10c28419a8..0b10c07bbc 100755
--- a/gr-trellis/src/examples/python/test_sccc_soft.py
+++ b/gr-trellis/src/examples/python/test_sccc_soft.py
@@ -8,8 +8,11 @@ import sys
import random
import fsm_utils
-
-
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
@@ -22,11 +25,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py
index 762a93ba51..979dfeca59 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo.py
@@ -8,7 +8,11 @@ import sys
import random
import fsm_utils
-
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
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
@@ -61,11 +65,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo1.py b/gr-trellis/src/examples/python/test_sccc_turbo1.py
index 187a75185f..60188e4d3b 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo1.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo1.py
@@ -8,6 +8,11 @@ import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed):
tb = gr.top_block ()
@@ -17,11 +22,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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
enc = trellis.sccc_encoder_ss(fo,0,fi,0,interleaver,K)
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# 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)
diff --git a/gr-trellis/src/examples/python/test_sccc_turbo2.py b/gr-trellis/src/examples/python/test_sccc_turbo2.py
index dff1ba93c3..e9f4841e3e 100755
--- a/gr-trellis/src/examples/python/test_sccc_turbo2.py
+++ b/gr-trellis/src/examples/python/test_sccc_turbo2.py
@@ -8,6 +8,11 @@ import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed):
tb = gr.top_block ()
@@ -17,11 +22,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,
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
enc = trellis.sccc_encoder_ss(fo,0,fi,0,interleaver,K)
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO
diff --git a/gr-trellis/src/examples/python/test_tcm.py b/gr-trellis/src/examples/python/test_tcm.py
index a7d6a02d04..fced315260 100755
--- a/gr-trellis/src/examples/python/test_tcm.py
+++ b/gr-trellis/src/examples/python/test_tcm.py
@@ -10,6 +10,12 @@ import fsm_utils
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
@@ -24,11 +30,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
#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
enc = trellis.encoder_ss(f,0) # initial state = 0
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
diff --git a/gr-trellis/src/examples/python/test_tcm_bit.py b/gr-trellis/src/examples/python/test_tcm_bit.py
index 7f69c0e294..873d58684b 100755
--- a/gr-trellis/src/examples/python/test_tcm_bit.py
+++ b/gr-trellis/src/examples/python/test_tcm_bit.py
@@ -10,6 +10,11 @@ import fsm_utils
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
@@ -25,12 +30,12 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
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
enc = trellis.encoder_ss(f,0) # initial state = 0
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
diff --git a/gr-trellis/src/examples/python/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py
index d98e36e27d..8bea1ac86a 100755
--- a/gr-trellis/src/examples/python/test_tcm_combined.py
+++ b/gr-trellis/src/examples/python/test_tcm_combined.py
@@ -9,6 +9,11 @@ import fsm_utils
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
tb = gr.top_block ()
@@ -18,12 +23,12 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed):
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
enc = trellis.encoder_ss(f,0) # initial state = 0
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
diff --git a/gr-trellis/src/examples/python/test_tcm_parallel.py b/gr-trellis/src/examples/python/test_tcm_parallel.py
index 0372351aad..1767cc730f 100755
--- a/gr-trellis/src/examples/python/test_tcm_parallel.py
+++ b/gr-trellis/src/examples/python/test_tcm_parallel.py
@@ -9,6 +9,11 @@ import fsm_utils
from gnuradio.eng_option import eng_option
from optparse import OptionParser
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
tb = gr.top_block ()
@@ -19,14 +24,14 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P):
s2fsmi=gr.packed_to_unpacked_ss(bitspersymbol,gr.GR_MSB_FIRST) # unpack shorts to symbols compatible with the FSM input cardinality
s2p = gr.stream_to_streams(gr.sizeof_short,P) # serial to parallel
enc = trellis.encoder_ss(f,0) # initiali state = 0
- mod = gr.chunks_to_symbols_sf(constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(constellation,dimensionality)
# CHANNEL
add=[]
noise=[]
for i in range(P):
add.append(gr.add_ff())
- noise.append(gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed))
+ noise.append(analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed))
# RX
metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization.py b/gr-trellis/src/examples/python/test_turbo_equalization.py
index 18bfb022a9..baddd7cb50 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization.py
@@ -7,6 +7,11 @@ import math
import sys
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
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
@@ -59,11 +64,11 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat
inter = trellis.permutation(interleaver.K(),interleaver.INTER(),1,gr.sizeof_short)
enc_in = trellis.encoder_ss(fi,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 innner FSM)
- mod = gr.chunks_to_symbols_sf(tot_constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(tot_constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization1.py b/gr-trellis/src/examples/python/test_turbo_equalization1.py
index 17ad430235..dfe1a2d82e 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization1.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization1.py
@@ -1,13 +1,19 @@
#!/usr/bin/env python
from gnuradio import gr
-from gnuradio import trellis, digital
+from gnuradio import trellis, digital, filter
from gnuradio import eng_notation
import math
import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
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 = gr.multiply_const_ff(1.0/N0)
@@ -61,12 +67,12 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
src = gr.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 = gr.chunks_to_symbols_sf(modulation[1],modulation[0])
+ mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
# CHANNEL
- isi = gr.fir_filter_fff(1,channel)
+ isi = filter.fir_filter_fff(1,channel)
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
diff --git a/gr-trellis/src/examples/python/test_turbo_equalization2.py b/gr-trellis/src/examples/python/test_turbo_equalization2.py
index 5a6c77e9d4..fb0a899eba 100755
--- a/gr-trellis/src/examples/python/test_turbo_equalization2.py
+++ b/gr-trellis/src/examples/python/test_turbo_equalization2.py
@@ -1,13 +1,19 @@
#!/usr/bin/env python
from gnuradio import gr
-from gnuradio import trellis, digital
+from gnuradio import trellis, digital, filter
from gnuradio import eng_notation
import math
import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type):
scale = gr.multiply_const_ff(math.sqrt(1.0/N0))
gnd = gr.vector_source_f([0],True);
@@ -59,12 +65,12 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona
src = gr.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 = gr.chunks_to_symbols_sf(modulation[1],modulation[0])
+ mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
# CHANNEL
- isi = gr.fir_filter_fff(1,channel)
+ isi = filter.fir_filter_fff(1,channel)
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
(head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM)
diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization.py b/gr-trellis/src/examples/python/test_viterbi_equalization.py
index 9f3f7e3911..91dc7e36da 100755
--- a/gr-trellis/src/examples/python/test_viterbi_equalization.py
+++ b/gr-trellis/src/examples/python/test_viterbi_equalization.py
@@ -7,6 +7,12 @@ import math
import sys
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
tb = gr.top_block ()
@@ -16,11 +22,11 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed):
s2fsmi = gr.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 = gr.chunks_to_symbols_sf(tot_constellation,dimensionality)
+ mod = digital.chunks_to_symbols_sf(tot_constellation,dimensionality)
# CHANNEL
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi
diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization1.py b/gr-trellis/src/examples/python/test_viterbi_equalization1.py
index 90eb4790e5..4421e370a4 100755
--- a/gr-trellis/src/examples/python/test_viterbi_equalization1.py
+++ b/gr-trellis/src/examples/python/test_viterbi_equalization1.py
@@ -1,13 +1,19 @@
#!/usr/bin/env python
from gnuradio import gr
-from gnuradio import trellis, digital
+from gnuradio import trellis, digital, filter
from gnuradio import eng_notation
import math
import sys
import random
import fsm_utils
+try:
+ from gnuradio import analog
+except ImportError:
+ sys.stderr.write("Error: Program requires gr-analog.\n")
+ sys.exit(1)
+
def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,seed):
tb = gr.top_block ()
L = len(channel)
@@ -22,12 +28,12 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel
packet[i] = 0
packet[len(packet)-i-1] = 0
src = gr.vector_source_s(packet,False)
- mod = gr.chunks_to_symbols_sf(modulation[1],modulation[0])
+ mod = digital.chunks_to_symbols_sf(modulation[1],modulation[0])
# CHANNEL
- isi = gr.fir_filter_fff(1,channel)
+ isi = filter.fir_filter_fff(1,channel)
add = gr.add_ff()
- noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ 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
diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt
index a42aa19cf1..3463ba8037 100644
--- a/gr-trellis/src/lib/CMakeLists.txt
+++ b/gr-trellis/src/lib/CMakeLists.txt
@@ -148,6 +148,7 @@ list(APPEND gr_trellis_sources
list(APPEND trellis_libs
gnuradio-core
+ gnuradio-digital
${Boost_LIBRARIES}
)
@@ -211,7 +212,7 @@ set(GR_SWIG_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)
+set(GR_SWIG_LIBRARIES gnuradio-trellis gnuradio-digital gnuradio-analog gnuradio-fft)
GR_SWIG_MAKE(trellis trellis.i)
GR_SWIG_INSTALL(
diff --git a/gr-trellis/src/lib/calc_metric.cc b/gr-trellis/src/lib/calc_metric.cc
index ce628209b4..4d58a05482 100644
--- a/gr-trellis/src/lib/calc_metric.cc
+++ b/gr-trellis/src/lib/calc_metric.cc
@@ -27,14 +27,15 @@
template <class T>
-void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type)
+void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in,
+ float *metric, gr::digital::trellis_metric_type_t type)
{
float minm = FLT_MAX;
int minmi = 0;
switch (type){
- case TRELLIS_EUCLIDEAN:
+ case gr::digital::TRELLIS_EUCLIDEAN:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -45,7 +46,7 @@ void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *
}
}
break;
- case TRELLIS_HARD_SYMBOL:
+ case gr::digital::TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -63,7 +64,7 @@ void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *
metric[o] = (o==minmi?0.0:1.0);
}
break;
- case TRELLIS_HARD_BIT:
+ case gr::digital::TRELLIS_HARD_BIT:
throw std::runtime_error ("Invalid metric type (not yet implemented).");
break;
default:
@@ -74,23 +75,27 @@ void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *
template
-void calc_metric<short>(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type);
+void calc_metric<short>(int O, int D, const std::vector<short> &TABLE, const short *in,
+ float *metric, gr::digital::trellis_metric_type_t type);
template
-void calc_metric<int>(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type);
+void calc_metric<int>(int O, int D, const std::vector<int> &TABLE, const int *in,
+ float *metric, gr::digital::trellis_metric_type_t type);
template
-void calc_metric<float>(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type);
+void calc_metric<float>(int O, int D, const std::vector<float> &TABLE, const float *in,
+ float *metric, gr::digital::trellis_metric_type_t type);
/*
-void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type)
+void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in,
+ float *metric, gr::digital::trellis_metric_type_t type)
{
float minm = FLT_MAX;
int minmi = 0;
switch (type){
- case TRELLIS_EUCLIDEAN:
+ case gr::digital::TRELLIS_EUCLIDEAN:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -99,7 +104,7 @@ void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in,
}
}
break;
- case TRELLIS_HARD_SYMBOL:
+ case gr::digital::TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -115,7 +120,7 @@ void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in,
metric[o] = (o==minmi?0.0:1.0);
}
break;
- case TRELLIS_HARD_BIT:
+ case gr::digital::TRELLIS_HARD_BIT:
throw std::runtime_error ("Invalid metric type (not yet implemented).");
break;
default:
@@ -124,13 +129,14 @@ void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in,
}
-void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type)
+void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in,
+ float *metric, gr::digital::trellis_metric_type_t type)
{
float minm = FLT_MAX;
int minmi = 0;
switch (type){
- case TRELLIS_EUCLIDEAN:
+ case gr::digital::TRELLIS_EUCLIDEAN:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -139,7 +145,7 @@ void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, flo
}
}
break;
- case TRELLIS_HARD_SYMBOL:
+ case gr::digital::TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -155,7 +161,7 @@ void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, flo
metric[o] = (o==minmi?0.0:1.0);
}
break;
- case TRELLIS_HARD_BIT:
+ case gr::digital::TRELLIS_HARD_BIT:
throw std::runtime_error ("Invalid metric type (not yet implemented).");
break;
default:
@@ -165,13 +171,14 @@ void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, flo
-void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type)
+void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in,
+ float *metric, gr::digital::trellis_metric_type_t type)
{
float minm = FLT_MAX;
int minmi = 0;
switch (type){
- case TRELLIS_EUCLIDEAN:
+ case gr::digital::TRELLIS_EUCLIDEAN:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -180,7 +187,7 @@ void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in,
}
}
break;
- case TRELLIS_HARD_SYMBOL:
+ case gr::digital::TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -196,7 +203,7 @@ void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in,
metric[o] = (o==minmi?0.0:1.0);
}
break;
- case TRELLIS_HARD_BIT:
+ case gr::digital::TRELLIS_HARD_BIT:
throw std::runtime_error ("Invalid metric type (not yet implemented).");
break;
default:
@@ -209,14 +216,15 @@ void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in,
-void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type)
+void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in,
+ float *metric, gr::digital::trellis_metric_type_t type)
{
float minm = FLT_MAX;
int minmi = 0;
switch (type){
- case TRELLIS_EUCLIDEAN:
+ case gr::digital::TRELLIS_EUCLIDEAN:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -225,7 +233,7 @@ void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_co
}
}
break;
- case TRELLIS_HARD_SYMBOL:
+ case gr::digital::TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
metric[o]=0.0;
for (int m=0;m<D;m++) {
@@ -241,7 +249,7 @@ void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_co
metric[o] = (o==minmi?0.0:1.0);
}
break;
- case TRELLIS_HARD_BIT:
+ case gr::digital::TRELLIS_HARD_BIT:
throw std::runtime_error ("Invalid metric type (not yet implemented).");
break;
default:
diff --git a/gr-trellis/src/lib/calc_metric.h b/gr-trellis/src/lib/calc_metric.h
index 7cad6160aa..cc0a12878d 100644
--- a/gr-trellis/src/lib/calc_metric.h
+++ b/gr-trellis/src/lib/calc_metric.h
@@ -25,21 +25,23 @@
#include <vector>
#include <gr_complex.h>
-#include <digital_metric_type.h>
+#include <digital/metric_type.h>
template <class T>
-void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type);
+void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in,
+ float *metric, gr::digital::trellis_metric_type_t type);
/*
-void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type);
+void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, gr::digital::trellis_metric_type_t type);
-void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type);
+void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, gr::digital::trellis_metric_type_t type);
-void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type);
+void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, gr::digital::trellis_metric_type_t type);
*/
-void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type);
+void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in,
+ float *metric, gr::digital::trellis_metric_type_t type);
diff --git a/gr-trellis/src/lib/core_algorithms.cc b/gr-trellis/src/lib/core_algorithms.cc
index 3ed912c08a..442565054a 100644
--- a/gr-trellis/src/lib/core_algorithms.cc
+++ b/gr-trellis/src/lib/core_algorithms.cc
@@ -154,7 +154,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<Ti> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const Ti *in, To *out
)
{
@@ -231,7 +231,7 @@ void viterbi_algorithm_combined<short,unsigned char>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const short *in, unsigned char *out
);
@@ -245,7 +245,7 @@ void viterbi_algorithm_combined<int,unsigned char>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const int *in, unsigned char *out
);
@@ -259,7 +259,7 @@ void viterbi_algorithm_combined<float,unsigned char>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *in, unsigned char *out
);
@@ -273,7 +273,7 @@ void viterbi_algorithm_combined<gr_complex,unsigned char>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const gr_complex *in, unsigned char *out
);
@@ -289,7 +289,7 @@ void viterbi_algorithm_combined<short,short>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const short *in, short *out
);
@@ -303,7 +303,7 @@ void viterbi_algorithm_combined<int,short>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const int *in, short *out
);
@@ -317,7 +317,7 @@ void viterbi_algorithm_combined<float,short>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *in, short *out
);
@@ -331,7 +331,7 @@ void viterbi_algorithm_combined<gr_complex,short>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const gr_complex *in, short *out
);
@@ -347,7 +347,7 @@ void viterbi_algorithm_combined<short,int>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const short *in, int *out
);
@@ -361,7 +361,7 @@ void viterbi_algorithm_combined<int,int>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const int *in, int *out
);
@@ -375,7 +375,7 @@ void viterbi_algorithm_combined<float,int>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *in, int *out
);
@@ -389,7 +389,7 @@ void viterbi_algorithm_combined<gr_complex,int>(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const gr_complex *in, int *out
);
@@ -574,7 +574,7 @@ void siso_algorithm_combined(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<T> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const T *observations, float *post
)
{
@@ -726,7 +726,7 @@ void siso_algorithm_combined<short>(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<short> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const short *observations, float *post
);
@@ -742,7 +742,7 @@ void siso_algorithm_combined<int>(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<int> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const int *observations, float *post
);
@@ -758,7 +758,7 @@ void siso_algorithm_combined<float>(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const float *observations, float *post
);
@@ -774,7 +774,7 @@ void siso_algorithm_combined<gr_complex>(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const gr_complex *observations, float *post
);
@@ -787,7 +787,7 @@ void sccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<Ti> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const Ti *observations, To *data
)
@@ -900,7 +900,7 @@ void sccc_decoder_combined<float,unsigned char>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, unsigned char *data
);
@@ -912,7 +912,7 @@ void sccc_decoder_combined<float,short>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, short *data
);
@@ -924,7 +924,7 @@ void sccc_decoder_combined<float,int>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, int *data
);
@@ -936,7 +936,7 @@ void sccc_decoder_combined<gr_complex,unsigned char>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, unsigned char *data
);
@@ -948,7 +948,7 @@ void sccc_decoder_combined<gr_complex,short>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, short *data
);
@@ -960,7 +960,7 @@ void sccc_decoder_combined<gr_complex,int>(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, int *data
);
@@ -1247,7 +1247,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<Ti> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const Ti *observations, To *data
)
@@ -1366,7 +1366,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, unsigned char *data
);
@@ -1379,7 +1379,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, short *data
);
@@ -1392,7 +1392,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<float> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const float *observations, int *data
);
@@ -1405,7 +1405,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, unsigned char *data
);
@@ -1418,7 +1418,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, short *data
);
@@ -1431,7 +1431,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<gr_complex> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const gr_complex *observations, int *data
);
diff --git a/gr-trellis/src/lib/core_algorithms.h b/gr-trellis/src/lib/core_algorithms.h
index a8765225bf..4efcc91235 100644
--- a/gr-trellis/src/lib/core_algorithms.h
+++ b/gr-trellis/src/lib/core_algorithms.h
@@ -26,7 +26,7 @@
#include <cmath>
#include <vector>
//#include <gr_complex.h>
-#include "digital_metric_type.h"
+#include "digital/metric_type.h"
#include "fsm.h"
#include "interleaver.h"
@@ -55,7 +55,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<Ti> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const Ti *in, To *out
);
@@ -86,7 +86,7 @@ void siso_algorithm_combined(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<T> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const T *observations, float *post
);
@@ -108,7 +108,7 @@ void sccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<Ti> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const Ti *observations, To *data
);
@@ -129,7 +129,7 @@ void pccc_decoder_combined(
const interleaver &INTERLEAVER, int blocklength, int iterations,
float (*p2mymin)(float,float),
int D, const std::vector<Ti> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling,
const Ti *observations, To *data
);
diff --git a/gr-trellis/src/lib/trellis.i b/gr-trellis/src/lib/trellis.i
index 0debf5e5da..d0b3707d05 100644
--- a/gr-trellis/src/lib/trellis.i
+++ b/gr-trellis/src/lib/trellis.i
@@ -19,6 +19,9 @@
* the Free Software Foundation, Inc., 51 Franklin Street,
* Boston, MA 02110-1301, USA.
*/
+%module(docstring="Generic coding/decoding.") trellis
+
+#define DIGITAL_API
%include "gnuradio.i" // the common stuff
@@ -26,15 +29,19 @@
%include "trellis_swig_doc.i"
%{
+#include "digital/constellation.h"
+#include "digital/metric_type.h"
#include "fsm.h"
#include "interleaver.h"
#include "trellis_permutation.h"
#include "trellis_siso_f.h"
#include "trellis_siso_combined_f.h"
#include "trellis_constellation_metrics_cf.h"
-#include "digital_constellation.h"
%}
+%include "digital/constellation.h"
+%include "digital/metric_type.h"
+%include "constellation.i"
// ----------------------------------------------------------------
@@ -49,10 +56,3 @@
%include "trellis_constellation_metrics_cf.i"
%include "trellis_generated.i"
-
-%import "digital_metric_type.h"
-%import "digital_constellation.i"
-
- //%pythoncode %{
- // from gnuradio.gr import TRELLIS_EUCLIDEAN, TRELLIS_HARD_SYMBOL, TRELLIS_HARD_BIT
- // %}
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
index 6e6aa2dd03..d7a7aba1d4 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
@@ -30,17 +30,17 @@
#include <stdexcept>
#include <iostream>
-
-
trellis_constellation_metrics_cf_sptr
-trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE)
+trellis_make_constellation_metrics_cf(constellation_sptr constellation,
+ trellis_metric_type_t TYPE)
{
- return gnuradio::get_initial_sptr (new trellis_constellation_metrics_cf (constellation, TYPE));
+ return gnuradio::get_initial_sptr
+ (new trellis_constellation_metrics_cf(constellation, TYPE));
}
-
-trellis_constellation_metrics_cf::trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE)
+trellis_constellation_metrics_cf::trellis_constellation_metrics_cf(constellation_sptr constellation,
+ trellis_metric_type_t TYPE)
: gr_block ("constellation_metrics_cf",
gr_make_io_signature (1, -1, sizeof (gr_complex)),
gr_make_io_signature (1, -1, sizeof (float))),
@@ -54,7 +54,7 @@ trellis_constellation_metrics_cf::trellis_constellation_metrics_cf (digital_cons
}
void
-trellis_constellation_metrics_cf::forecast (int noutput_items, gr_vector_int &ninput_items_required)
+trellis_constellation_metrics_cf::forecast(int noutput_items, gr_vector_int &ninput_items_required)
{
assert (noutput_items % d_O == 0);
unsigned int input_required = d_D * noutput_items / d_O;
@@ -66,10 +66,10 @@ trellis_constellation_metrics_cf::forecast (int noutput_items, gr_vector_int &ni
int
-trellis_constellation_metrics_cf::general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+trellis_constellation_metrics_cf::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
{
assert (noutput_items % d_O == 0);
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
index 2c2070522c..91ab30986b 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
@@ -25,13 +25,17 @@
#include <trellis_api.h>
#include <gr_block.h>
-#include <digital_constellation.h>
-#include <digital_metric_type.h>
+#include <digital/constellation.h>
+#include <digital/metric_type.h>
+
+using namespace gr::digital;
class trellis_constellation_metrics_cf;
typedef boost::shared_ptr<trellis_constellation_metrics_cf> trellis_constellation_metrics_cf_sptr;
-TRELLIS_API trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
+TRELLIS_API trellis_constellation_metrics_cf_sptr
+ trellis_make_constellation_metrics_cf(constellation_sptr constellation,
+ trellis_metric_type_t TYPE);
/*!
* \brief Evaluate metrics for use by the Viterbi algorithm.
@@ -40,21 +44,24 @@ TRELLIS_API trellis_constellation_metrics_cf_sptr trellis_make_constellation_met
class TRELLIS_API trellis_constellation_metrics_cf : public gr_block
{
public:
- void forecast (int noutput_items,
- gr_vector_int &ninput_items_required);
- int general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
+ void forecast(int noutput_items,
+ gr_vector_int &ninput_items_required);
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
protected:
- trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
+ trellis_constellation_metrics_cf(constellation_sptr constellation,
+ trellis_metric_type_t TYPE);
private:
- digital_constellation_sptr d_constellation;
+ constellation_sptr d_constellation;
trellis_metric_type_t d_TYPE;
unsigned int d_O;
unsigned int d_D;
- friend TRELLIS_API trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
+ friend TRELLIS_API trellis_constellation_metrics_cf_sptr
+ trellis_make_constellation_metrics_cf(constellation_sptr constellation,
+ trellis_metric_type_t TYPE);
};
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.i b/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
index c17522b113..13b11c0b06 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.i
@@ -20,14 +20,12 @@
* Boston, MA 02110-1301, USA.
*/
-// WARNING: this file is machine generated. Edits will be over written
-
GR_SWIG_BLOCK_MAGIC(trellis,constellation_metrics_cf);
-trellis_constellation_metrics_cf_sptr trellis_make_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
+trellis_constellation_metrics_cf_sptr
+trellis_make_constellation_metrics_cf(gr::digital::constellation_sptr constellation,
+ gr::digital::trellis_metric_type_t TYPE);
class trellis_constellation_metrics_cf : public gr_block
{
-private:
- trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
};
diff --git a/gr-trellis/src/lib/trellis_metrics_X.cc.t b/gr-trellis/src/lib/trellis_metrics_X.cc.t
index 77eb8c81b5..756ac92a31 100644
--- a/gr-trellis/src/lib/trellis_metrics_X.cc.t
+++ b/gr-trellis/src/lib/trellis_metrics_X.cc.t
@@ -34,34 +34,36 @@
@SPTR_NAME@
-trellis_make_@BASE_NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE)
+trellis_make_@BASE_NAME@(int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE)
{
- return gnuradio::get_initial_sptr (new @NAME@ (O,D,TABLE,TYPE));
+ return gnuradio::get_initial_sptr(new @NAME@(O,D,TABLE,TYPE));
}
-@NAME@::@NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE)
- : gr_block ("@BASE_NAME@",
- gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
- gr_make_io_signature (1, -1, sizeof (float))),
- d_O (O),
- d_D (D),
- d_TYPE (TYPE),
- d_TABLE (TABLE)
+@NAME@::@NAME@(int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE)
+ : gr_block("@BASE_NAME@",
+ gr_make_io_signature(1, -1, sizeof (@I_TYPE@)),
+ gr_make_io_signature(1, -1, sizeof (float))),
+ d_O (O),
+ d_D (D),
+ d_TYPE (TYPE),
+ d_TABLE (TABLE)
{
set_relative_rate (1.0 * d_O / ((double) d_D));
set_output_multiple ((int)d_O);
}
-void @NAME@::set_TABLE (const std::vector<@I_TYPE@> &table)
+void @NAME@::set_TABLE(const std::vector<@I_TYPE@> &table)
{
d_TABLE = table;
}
void
-@NAME@::forecast (int noutput_items, gr_vector_int &ninput_items_required)
+@NAME@::forecast(int noutput_items, gr_vector_int &ninput_items_required)
{
assert (noutput_items % d_O == 0);
int input_required = d_D * noutput_items / d_O;
@@ -73,25 +75,24 @@ void
int
-@NAME@::general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+@NAME@::general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
{
-
assert (noutput_items % d_O == 0);
assert (input_items.size() == output_items.size());
int nstreams = input_items.size();
-for (int m=0;m<nstreams;m++) {
- const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
- float *out = (float *) output_items[m];
+ for (int m=0;m<nstreams;m++) {
+ const @I_TYPE@ *in = (@I_TYPE@ *) input_items[m];
+ float *out = (float *) output_items[m];
- for (int i = 0; i < noutput_items / d_O ; i++){
- calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
+ for(int i = 0; i < noutput_items / d_O ; i++) {
+ calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
+ }
}
-}
- consume_each (d_D * noutput_items / d_O);
+ consume_each(d_D * noutput_items / d_O);
return noutput_items;
}
diff --git a/gr-trellis/src/lib/trellis_metrics_X.h.t b/gr-trellis/src/lib/trellis_metrics_X.h.t
index ab406c51ea..9a671bc121 100644
--- a/gr-trellis/src/lib/trellis_metrics_X.h.t
+++ b/gr-trellis/src/lib/trellis_metrics_X.h.t
@@ -32,7 +32,8 @@
class @NAME@;
typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
-TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE);
+TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@(int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE);
/*!
* \brief Evaluate metrics for use by the Viterbi algorithm.
@@ -42,24 +43,27 @@ class TRELLIS_API @NAME@ : public gr_block
{
int d_O;
int d_D;
- trellis_metric_type_t d_TYPE;
+ gr::digital::trellis_metric_type_t d_TYPE;
std::vector<@I_TYPE@> d_TABLE;
- friend TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE);
- @NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE);
+ friend TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@(int O, int D,
+ const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE);
+ @NAME@(int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE);
public:
- int O () const { return d_O; }
- int D () const { return d_D; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
- std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- void set_TABLE (const std::vector<@I_TYPE@> &table);
- void forecast (int noutput_items,
- gr_vector_int &ninput_items_required);
- int general_work (int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
+ int O() const { return d_O; }
+ int D() const { return d_D; }
+ gr::digital::trellis_metric_type_t TYPE() const { return d_TYPE; }
+ std::vector<@I_TYPE@> TABLE() const { return d_TABLE; }
+ void set_TABLE(const std::vector<@I_TYPE@> &table);
+ void forecast(int noutput_items,
+ gr_vector_int &ninput_items_required);
+ int general_work(int noutput_items,
+ gr_vector_int &ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
};
diff --git a/gr-trellis/src/lib/trellis_metrics_X.i.t b/gr-trellis/src/lib/trellis_metrics_X.i.t
index 50aa7a7673..b53594f3a6 100644
--- a/gr-trellis/src/lib/trellis_metrics_X.i.t
+++ b/gr-trellis/src/lib/trellis_metrics_X.i.t
@@ -24,17 +24,19 @@
GR_SWIG_BLOCK_MAGIC(trellis,@BASE_NAME@);
-@SPTR_NAME@ trellis_make_@BASE_NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE);
+@SPTR_NAME@ trellis_make_@BASE_NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE);
class @NAME@ : public gr_block
{
private:
- @NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE, trellis_metric_type_t TYPE);
+ @NAME@ (int O, int D, const std::vector<@I_TYPE@> &TABLE,
+ gr::digital::trellis_metric_type_t TYPE);
public:
int O () const { return d_O; }
int D () const { return d_D; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
+ gr::digital::trellis_metric_type_t TYPE () const { return d_TYPE; }
void set_TABLE (const std::vector<@I_TYPE@> &table);
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
};
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
index 03e21de1f5..e8f9f7296e 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
@@ -45,7 +45,7 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
)
{
@@ -71,7 +71,7 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
)
: gr_block ("@BASE_NAME@",
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
index 6e45ea10ac..81d9abbc1f 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
@@ -45,7 +45,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -67,7 +67,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t d_SISO_TYPE;
int d_D;
std::vector<@I_TYPE@> d_TABLE;
- trellis_metric_type_t d_METRIC_TYPE;
+ gr::digital::trellis_metric_type_t d_METRIC_TYPE;
float d_scaling;
std::vector<float> d_buffer;
@@ -80,7 +80,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -93,7 +93,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -109,7 +109,7 @@ public:
int repetitions () const { return d_repetitions; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
+ gr::digital::trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
float scaling () const { return d_scaling; }
void set_scaling (float scaling);
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t
index d841f67b45..8684ff650c 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t
@@ -33,7 +33,7 @@ GR_SWIG_BLOCK_MAGIC(trellis,@BASE_NAME@);
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -50,7 +50,7 @@ private:
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -66,7 +66,7 @@ public:
int repetitions () const { return d_repetitions; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
+ gr::digital::trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
float scaling() const { return d_scaling; }
void set_scaling (float scaling);
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
index 4508ca5cba..0fcfc70a68 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
@@ -45,7 +45,7 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
)
{
@@ -71,7 +71,7 @@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
)
: gr_block ("@BASE_NAME@",
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
index 3fdc53c624..2cf03eaa55 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
@@ -45,7 +45,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -67,7 +67,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t d_SISO_TYPE;
int d_D;
std::vector<@I_TYPE@> d_TABLE;
- trellis_metric_type_t d_METRIC_TYPE;
+ gr::digital::trellis_metric_type_t d_METRIC_TYPE;
float d_scaling;
std::vector<float> d_buffer;
@@ -80,7 +80,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -93,7 +93,7 @@ class TRELLIS_API @NAME@ : public gr_block
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -109,7 +109,7 @@ public:
int repetitions () const { return d_repetitions; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
+ gr::digital::trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
float scaling () const { return d_scaling; }
void set_scaling (float scaling);
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.i.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.i.t
index 84f2eb07d9..872afcad09 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.i.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.i.t
@@ -33,7 +33,7 @@ GR_SWIG_BLOCK_MAGIC(trellis,@BASE_NAME@);
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -50,7 +50,7 @@ private:
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t METRIC_TYPE,
+ gr::digital::trellis_metric_type_t METRIC_TYPE,
float scaling
);
@@ -66,7 +66,7 @@ public:
int repetitions () const { return d_repetitions; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
+ gr::digital::trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; }
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
float scaling() const { return d_scaling; }
void set_scaling (float scaling);
diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.cc b/gr-trellis/src/lib/trellis_siso_combined_f.cc
index d27fe44257..d956c47854 100644
--- a/gr-trellis/src/lib/trellis_siso_combined_f.cc
+++ b/gr-trellis/src/lib/trellis_siso_combined_f.cc
@@ -43,7 +43,7 @@ trellis_make_siso_combined_f (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE)
+ gr::digital::trellis_metric_type_t TYPE)
{
return gnuradio::get_initial_sptr(new trellis_siso_combined_f (FSM,K,S0,SK,POSTI,POSTO,SISO_TYPE,D,TABLE,TYPE));
}
@@ -58,7 +58,7 @@ trellis_siso_combined_f::trellis_siso_combined_f (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE)
+ gr::digital::trellis_metric_type_t TYPE)
: gr_block ("siso_combined_f",
gr_make_io_signature (1, -1, sizeof (float)),
gr_make_io_signature (1, -1, sizeof (float))),
@@ -153,7 +153,7 @@ void siso_algorithm_combined(int I, int S, int O,
float (*p2mymin)(float,float),
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const float *priori, const float *observations, float *post//,
//std::vector<float> &alpha,
//std::vector<float> &beta
diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.h b/gr-trellis/src/lib/trellis_siso_combined_f.h
index 4b28e8de4a..47fa20fb65 100644
--- a/gr-trellis/src/lib/trellis_siso_combined_f.h
+++ b/gr-trellis/src/lib/trellis_siso_combined_f.h
@@ -43,7 +43,7 @@ TRELLIS_API trellis_siso_combined_f_sptr trellis_make_siso_combined_f (
trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE
+ gr::digital::trellis_metric_type_t TYPE
);
/*!
@@ -60,7 +60,7 @@ class TRELLIS_API trellis_siso_combined_f : public gr_block
trellis_siso_type_t d_SISO_TYPE;
int d_D;
std::vector<float> d_TABLE;
- trellis_metric_type_t d_TYPE;
+ gr::digital::trellis_metric_type_t d_TYPE;
//std::vector<float> d_alpha;
//std::vector<float> d_beta;
@@ -74,7 +74,7 @@ class TRELLIS_API trellis_siso_combined_f : public gr_block
trellis_siso_type_t d_SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
trellis_siso_combined_f (
@@ -87,7 +87,7 @@ class TRELLIS_API trellis_siso_combined_f : public gr_block
trellis_siso_type_t d_SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
public:
@@ -100,7 +100,7 @@ public:
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
int D () const { return d_D; }
std::vector<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
+ gr::digital::trellis_metric_type_t TYPE () const { return d_TYPE; }
void forecast (int noutput_items,
gr_vector_int &ninput_items_required);
int general_work (int noutput_items,
diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.i b/gr-trellis/src/lib/trellis_siso_combined_f.i
index 781280d896..228cdd1218 100644
--- a/gr-trellis/src/lib/trellis_siso_combined_f.i
+++ b/gr-trellis/src/lib/trellis_siso_combined_f.i
@@ -32,7 +32,7 @@ trellis_siso_combined_f_sptr trellis_make_siso_combined_f (
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
class trellis_siso_combined_f : public gr_block
@@ -48,7 +48,7 @@ private:
trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<float> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
@@ -60,5 +60,5 @@ public:
trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; }
int D () const { return d_D; }
std::vector<float> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
+ gr::digital::trellis_metric_type_t TYPE () const { return d_TYPE; }
};
diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
index 74611ab8fb..b337b6f16c 100644
--- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
@@ -41,7 +41,7 @@ trellis_make_@BASE_NAME@ (
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE)
+ gr::digital::trellis_metric_type_t TYPE)
{
return gnuradio::get_initial_sptr (new @NAME@ (FSM,K,S0,SK,D,TABLE,TYPE));
}
@@ -53,10 +53,10 @@ trellis_make_@BASE_NAME@ (
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE)
+ gr::digital::trellis_metric_type_t TYPE)
: gr_block ("@BASE_NAME@",
- gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
- gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
+ gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
d_FSM (FSM),
d_K (K),
d_S0 (S0),
@@ -100,7 +100,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
int S0,int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE,
+ gr::digital::trellis_metric_type_t TYPE,
const @I_TYPE@ *in, @O_TYPE@ *out)//,
//std::vector<int> &trace)
{
diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
index c7e468e73b..f0a64c3317 100644
--- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
@@ -41,7 +41,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
/*!
@@ -55,7 +55,7 @@ class TRELLIS_API @NAME@ : public gr_block
int d_SK;
int d_D;
std::vector<@I_TYPE@> d_TABLE;
- trellis_metric_type_t d_TYPE;
+ gr::digital::trellis_metric_type_t d_TYPE;
//std::vector<int> d_trace;
friend TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
@@ -65,7 +65,7 @@ class TRELLIS_API @NAME@ : public gr_block
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
@NAME@ (
@@ -75,7 +75,7 @@ class TRELLIS_API @NAME@ : public gr_block
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
public:
@@ -85,7 +85,7 @@ public:
int SK () const { return d_SK; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
+ gr::digital::trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<int> trace () const { return d_trace; }
void set_TABLE (const std::vector<@I_TYPE@> &table);
void forecast (int noutput_items,
diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.i.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.i.t
index 633ded7707..2687a2056d 100644
--- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.i.t
+++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.i.t
@@ -31,7 +31,7 @@ GR_SWIG_BLOCK_MAGIC(trellis,@BASE_NAME@);
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
class @NAME@ : public gr_block
@@ -44,7 +44,7 @@ private:
int SK,
int D,
const std::vector<@I_TYPE@> &TABLE,
- trellis_metric_type_t TYPE);
+ gr::digital::trellis_metric_type_t TYPE);
public:
fsm FSM () const { return d_FSM; }
@@ -53,7 +53,7 @@ public:
int SK () const { return d_SK; }
int D () const { return d_D; }
std::vector<@I_TYPE@> TABLE () const { return d_TABLE; }
- trellis_metric_type_t TYPE () const { return d_TYPE; }
+ gr::digital::trellis_metric_type_t TYPE () const { return d_TYPE; }
//std::vector<short> trace () const { return d_trace; }
void set_TABLE (const std::vector<@I_TYPE@> &table);
};
diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt
index f8e4d95329..adc6b3a239 100644
--- a/gr-trellis/src/python/CMakeLists.txt
+++ b/gr-trellis/src/python/CMakeLists.txt
@@ -23,10 +23,11 @@
if(ENABLE_TESTING)
list(APPEND GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gr-analog/swig
${CMAKE_BINARY_DIR}/gr-digital/swig
${CMAKE_BINARY_DIR}/gr-trellis/src/lib
)
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-digital gnuradio-trellis)
+list(APPEND GR_TEST_TARGET_DEPS gnuradio-analog gnuradio-digital gnuradio-trellis gnuradio-filter)
include(GrPython)
include(GrTest)
diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py
index fcc651ec6d..53dcf0d8f6 100755
--- a/gr-trellis/src/python/qa_trellis.py
+++ b/gr-trellis/src/python/qa_trellis.py
@@ -29,7 +29,8 @@ from gnuradio import gr, gr_unittest, blks2
import trellis
import os
-import digital_swig
+import digital_swig as digital
+import analog_swig as analog
fsm_args = {"awgn1o2_4": (2, 4, 4,
(0, 2, 0, 2, 1, 3, 1, 3),
@@ -39,8 +40,8 @@ fsm_args = {"awgn1o2_4": (2, 4, 4,
"nothing": (2, 1, 2, (0, 0), (0, 1)),
}
-constells = {2: digital_swig.constellation_bpsk(),
- 4: digital_swig.constellation_qpsk(),
+constells = {2: digital.constellation_bpsk(),
+ 4: digital.constellation_qpsk(),
}
class test_trellis (gr_unittest.TestCase):
@@ -114,15 +115,15 @@ class trellis_tb(gr.top_block):
s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST)
# initial FSM state = 0
enc = trellis.encoder_ss(f, 0)
- mod = gr.chunks_to_symbols_sc(constellation.points(), 1)
+ mod = digital.chunks_to_symbols_sc(constellation.points(), 1)
# CHANNEL
add = gr.add_cc()
- noise = gr.noise_source_c(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)
+ noise = analog.noise_source_c(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)
# RX
# data preprocessing to generate metrics for Viterbi
- metrics = trellis.constellation_metrics_cf(constellation.base(), digital_swig.TRELLIS_EUCLIDEAN)
+ metrics = trellis.constellation_metrics_cf(constellation.base(), digital.TRELLIS_EUCLIDEAN)
# Put -1 if the Initial/Final states are not set.
va = trellis.viterbi_s(f, K, 0, -1)
# pack FSM input symbols to shorts