summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-trellis/python/trellis/CMakeLists.txt9
-rw-r--r--gr-trellis/python/trellis/__init__.py6
-rw-r--r--gr-trellis/python/trellis/bindings/CMakeLists.txt36
-rw-r--r--gr-trellis/python/trellis/bindings/base_python.cc51
-rw-r--r--gr-trellis/python/trellis/bindings/calc_metric_python.cc35
-rw-r--r--gr-trellis/python/trellis/bindings/constellation_metrics_cf_python.cc41
-rw-r--r--gr-trellis/python/trellis/bindings/core_algorithms_python.cc51
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/base_pydoc_template.h27
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/calc_metric_pydoc_template.h18
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/constellation_metrics_cf_pydoc_template.h25
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/core_algorithms_pydoc_template.h24
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/encoder_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/fsm_pydoc_template.h81
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/interleaver_pydoc_template.h45
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/metrics_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_blk_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_combined_blk_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/pccc_encoder_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/permutation_pydoc_template.h48
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/quicksort_index_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_blk_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_combined_blk_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/sccc_encoder_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/siso_combined_f_pydoc_template.h87
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/siso_f_pydoc_template.h69
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/siso_type_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/viterbi_combined_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/docstrings/viterbi_pydoc_template.h15
-rw-r--r--gr-trellis/python/trellis/bindings/encoder_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/fsm_python.cc113
-rw-r--r--gr-trellis/python/trellis/bindings/interleaver_python.cc61
-rw-r--r--gr-trellis/python/trellis/bindings/metrics_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/pccc_decoder_blk_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/pccc_decoder_combined_blk_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/pccc_encoder_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/permutation_python.cc73
-rw-r--r--gr-trellis/python/trellis/bindings/python_bindings.cc80
-rw-r--r--gr-trellis/python/trellis/bindings/quicksort_index_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/sccc_decoder_blk_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/sccc_decoder_combined_blk_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/sccc_encoder_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/siso_combined_f_python.cc127
-rw-r--r--gr-trellis/python/trellis/bindings/siso_f_python.cc87
-rw-r--r--gr-trellis/python/trellis/bindings/siso_type_python.cc30
-rw-r--r--gr-trellis/python/trellis/bindings/viterbi_combined_python.cc22
-rw-r--r--gr-trellis/python/trellis/bindings/viterbi_python.cc22
46 files changed, 1636 insertions, 10 deletions
diff --git a/gr-trellis/python/trellis/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index c766f13f37..b4da796630 100644
--- a/gr-trellis/python/trellis/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
@@ -26,13 +26,6 @@ if(ENABLE_TESTING)
set(GR_TEST_LIBRARY_DIRS "")
set(GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
- ${CMAKE_BINARY_DIR}/gnuradio-runtime/swig
- ${CMAKE_BINARY_DIR}/gr-filter/swig
- ${CMAKE_BINARY_DIR}/gr-blocks/swig
- ${CMAKE_BINARY_DIR}/gr-analog/swig
- ${CMAKE_BINARY_DIR}/gr-fft/swig
- ${CMAKE_BINARY_DIR}/gr-digital/swig
- ${CMAKE_BINARY_DIR}/gr-trellis/swig
)
include(GrTest)
@@ -42,3 +35,5 @@ if(ENABLE_TESTING)
GR_ADD_TEST(${py_qa_test_name} ${QA_PYTHON_EXECUTABLE} -B ${py_qa_test_file})
endforeach(py_qa_test_file)
endif(ENABLE_TESTING)
+
+add_subdirectory(bindings)
diff --git a/gr-trellis/python/trellis/__init__.py b/gr-trellis/python/trellis/__init__.py
index e0e2214810..c77a88692c 100644
--- a/gr-trellis/python/trellis/__init__.py
+++ b/gr-trellis/python/trellis/__init__.py
@@ -15,10 +15,10 @@ from __future__ import unicode_literals
import os
try:
- from .trellis_swig import *
+ from .trellis_python import *
except ImportError:
dirname, filename = os.path.split(os.path.abspath(__file__))
- __path__.append(os.path.join(dirname, "..", "..", "swig"))
- from .trellis_swig import *
+ __path__.append(os.path.join(dirname, "bindings"))
+ from .trellis_python import *
# import any pure python here
diff --git a/gr-trellis/python/trellis/bindings/CMakeLists.txt b/gr-trellis/python/trellis/bindings/CMakeLists.txt
new file mode 100644
index 0000000000..25da716c08
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/CMakeLists.txt
@@ -0,0 +1,36 @@
+include(GrPybind)
+
+########################################################################
+# Python Bindings
+########################################################################
+
+list(APPEND trellis_python_files
+ # base_python.cc
+ # calc_metric_python.cc
+ constellation_metrics_cf_python.cc
+ # core_algorithms_python.cc
+ encoder_python.cc
+ fsm_python.cc
+ interleaver_python.cc
+ metrics_python.cc
+ pccc_decoder_blk_python.cc
+ pccc_decoder_combined_blk_python.cc
+ pccc_encoder_python.cc
+ permutation_python.cc
+ quicksort_index_python.cc
+ sccc_decoder_blk_python.cc
+ sccc_decoder_combined_blk_python.cc
+ sccc_encoder_python.cc
+ siso_combined_f_python.cc
+ siso_f_python.cc
+ siso_type_python.cc
+ viterbi_python.cc
+ viterbi_combined_python.cc
+ python_bindings.cc)
+
+GR_PYBIND_MAKE(trellis
+ ../../..
+ gr::trellis
+ "${trellis_python_files}")
+
+install(TARGETS trellis_python DESTINATION ${GR_PYTHON_DIR}/gnuradio/trellis COMPONENT pythonapi)
diff --git a/gr-trellis/python/trellis/bindings/base_python.cc b/gr-trellis/python/trellis/bindings/base_python.cc
new file mode 100644
index 0000000000..71273740a8
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/base_python.cc
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/base.h>
+// pydoc.h is automatically generated in the build directory
+#include <base_pydoc.h>
+
+void bind_base(py::module& m)
+{
+
+
+ m.def("dec2base",
+ &::gr::trellis::dec2base,
+ py::arg("num"),
+ py::arg("base"),
+ py::arg("s"),
+ D(dec2base));
+
+
+ m.def("dec2bases",
+ &::gr::trellis::dec2bases,
+ py::arg("num"),
+ py::arg("bases"),
+ py::arg("s"),
+ D(dec2bases));
+
+
+ m.def(
+ "base2dec", &::gr::trellis::base2dec, py::arg("s"), py::arg("base"), D(base2dec));
+
+
+ m.def("bases2dec",
+ &::gr::trellis::bases2dec,
+ py::arg("s"),
+ py::arg("bases"),
+ D(bases2dec));
+}
diff --git a/gr-trellis/python/trellis/bindings/calc_metric_python.cc b/gr-trellis/python/trellis/bindings/calc_metric_python.cc
new file mode 100644
index 0000000000..38fa682e46
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/calc_metric_python.cc
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/calc_metric.h>
+// pydoc.h is automatically generated in the build directory
+#include <calc_metric_pydoc.h>
+
+void bind_calc_metric(py::module& m)
+{
+
+
+ m.def("calc_metric",
+ &::gr::trellis::calc_metric,
+ py::arg("O"),
+ py::arg("D"),
+ py::arg("TABLE"),
+ py::arg("input"),
+ py::arg("metric"),
+ py::arg("type"),
+ D(calc_metric));
+}
diff --git a/gr-trellis/python/trellis/bindings/constellation_metrics_cf_python.cc b/gr-trellis/python/trellis/bindings/constellation_metrics_cf_python.cc
new file mode 100644
index 0000000000..f8ed3fb9c2
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/constellation_metrics_cf_python.cc
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/constellation_metrics_cf.h>
+// pydoc.h is automatically generated in the build directory
+#include <constellation_metrics_cf_pydoc.h>
+
+void bind_constellation_metrics_cf(py::module& m)
+{
+
+ using constellation_metrics_cf = ::gr::trellis::constellation_metrics_cf;
+
+
+ py::class_<constellation_metrics_cf,
+ gr::block,
+ gr::basic_block,
+ std::shared_ptr<constellation_metrics_cf>>(
+ m, "constellation_metrics_cf", D(constellation_metrics_cf))
+
+ .def(py::init(&constellation_metrics_cf::make),
+ py::arg("constellation"),
+ py::arg("TYPE"),
+ D(constellation_metrics_cf, make))
+
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/core_algorithms_python.cc b/gr-trellis/python/trellis/bindings/core_algorithms_python.cc
new file mode 100644
index 0000000000..7710d866a9
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/core_algorithms_python.cc
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/core_algorithms.h>
+// pydoc.h is automatically generated in the build directory
+#include <core_algorithms_pydoc.h>
+
+void bind_core_algorithms(py::module& m)
+{
+
+
+ m.def("min", &::gr::trellis::min, py::arg("a"), py::arg("b"), D(min));
+
+
+ m.def("min_star", &::gr::trellis::min_star, py::arg("a"), py::arg("b"), D(min_star));
+
+
+ m.def("siso_algorithm",
+ &::gr::trellis::siso_algorithm,
+ py::arg("I"),
+ py::arg("S"),
+ py::arg("O"),
+ py::arg("NS"),
+ py::arg("OS"),
+ py::arg("PS"),
+ py::arg("PI"),
+ py::arg("K"),
+ py::arg("S0"),
+ py::arg("SK"),
+ py::arg("POSTI"),
+ py::arg("POSTO"),
+ py::arg("p2mymin"),
+ py::arg("priori"),
+ py::arg("prioro"),
+ py::arg("post"),
+ D(siso_algorithm));
+}
diff --git a/gr-trellis/python/trellis/bindings/docstrings/base_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/base_pydoc_template.h
new file mode 100644
index 0000000000..1edb9c9609
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/base_pydoc_template.h
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_dec2base = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_dec2bases = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_base2dec = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_bases2dec = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/calc_metric_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/calc_metric_pydoc_template.h
new file mode 100644
index 0000000000..168c170fc2
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/calc_metric_pydoc_template.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_calc_metric = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/constellation_metrics_cf_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/constellation_metrics_cf_pydoc_template.h
new file mode 100644
index 0000000000..8495820ef3
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/constellation_metrics_cf_pydoc_template.h
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_constellation_metrics_cf = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_constellation_metrics_cf_constellation_metrics_cf =
+ R"doc()doc";
+
+
+static const char* __doc_gr_trellis_constellation_metrics_cf_make = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/core_algorithms_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/core_algorithms_pydoc_template.h
new file mode 100644
index 0000000000..b30b50aa06
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/core_algorithms_pydoc_template.h
@@ -0,0 +1,24 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_min = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_min_star = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_algorithm = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/encoder_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/encoder_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/encoder_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/fsm_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/fsm_pydoc_template.h
new file mode 100644
index 0000000000..dbabdf6b85
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/fsm_pydoc_template.h
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_fsm = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_1 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_2 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_3 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_4 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_5 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_6 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_7 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_8 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_fsm_9 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_I = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_S = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_O = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_NS = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_OS = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_PS = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_PI = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_TMi = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_TMl = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_write_trellis_svg = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_fsm_write_fsm_txt = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/interleaver_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/interleaver_pydoc_template.h
new file mode 100644
index 0000000000..4c883ec439
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/interleaver_pydoc_template.h
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_interleaver = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_interleaver_0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_interleaver_1 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_interleaver_2 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_interleaver_3 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_interleaver_4 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_INTER = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_DEINTER = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_interleaver_write_interleaver_txt = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/metrics_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/metrics_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/metrics_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_blk_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_blk_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_blk_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_combined_blk_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_combined_blk_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/pccc_decoder_combined_blk_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/pccc_encoder_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/pccc_encoder_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/pccc_encoder_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/permutation_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/permutation_pydoc_template.h
new file mode 100644
index 0000000000..545a608bc2
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/permutation_pydoc_template.h
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_permutation = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_permutation_0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_permutation_1 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_make = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_TABLE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_SYMS_PER_BLOCK = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_BYTES_PER_SYMBOL = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_set_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_set_TABLE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_permutation_set_SYMS_PER_BLOCK = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/quicksort_index_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/quicksort_index_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/quicksort_index_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_blk_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_blk_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_blk_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_combined_blk_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_combined_blk_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/sccc_decoder_combined_blk_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/sccc_encoder_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/sccc_encoder_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/sccc_encoder_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/siso_combined_f_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/siso_combined_f_pydoc_template.h
new file mode 100644
index 0000000000..f6ecd93b19
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/siso_combined_f_pydoc_template.h
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_siso_combined_f = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_siso_combined_f_0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_siso_combined_f_1 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_make = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_FSM = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_S0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_SK = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_POSTI = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_POSTO = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_SISO_TYPE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_D = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_TABLE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_TYPE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_FSM = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_S0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_SK = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_POSTI = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_POSTO = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_SISO_TYPE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_D = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_TABLE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_combined_f_set_TYPE = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/siso_f_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/siso_f_pydoc_template.h
new file mode 100644
index 0000000000..a585568317
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/siso_f_pydoc_template.h
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
+
+
+static const char* __doc_gr_trellis_siso_f = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_siso_f_0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_siso_f_1 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_make = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_FSM = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_S0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_SK = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_POSTI = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_POSTO = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_SISO_TYPE = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_FSM = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_K = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_S0 = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_SK = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_POSTI = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_POSTO = R"doc()doc";
+
+
+static const char* __doc_gr_trellis_siso_f_set_SISO_TYPE = R"doc()doc";
diff --git a/gr-trellis/python/trellis/bindings/docstrings/siso_type_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/siso_type_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/siso_type_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/viterbi_combined_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/viterbi_combined_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/viterbi_combined_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/docstrings/viterbi_pydoc_template.h b/gr-trellis/python/trellis/bindings/docstrings/viterbi_pydoc_template.h
new file mode 100644
index 0000000000..a90711df10
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/docstrings/viterbi_pydoc_template.h
@@ -0,0 +1,15 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+#include "pydoc_macros.h"
+#define D(...) DOC(gr, trellis, __VA_ARGS__)
+/*
+ This file contains placeholders for docstrings for the Python bindings.
+ Do not edit! These were automatically extracted during the binding process
+ and will be overwritten during the build process
+ */
diff --git a/gr-trellis/python/trellis/bindings/encoder_python.cc b/gr-trellis/python/trellis/bindings/encoder_python.cc
new file mode 100644
index 0000000000..bfa1c5a639
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/encoder_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/encoder.h>
+// pydoc.h is automatically generated in the build directory
+#include <encoder_pydoc.h>
+
+void bind_encoder(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/fsm_python.cc b/gr-trellis/python/trellis/bindings/fsm_python.cc
new file mode 100644
index 0000000000..03f6d7b3ac
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/fsm_python.cc
@@ -0,0 +1,113 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/fsm.h>
+// pydoc.h is automatically generated in the build directory
+#include <fsm_pydoc.h>
+
+void bind_fsm(py::module& m)
+{
+
+ using fsm = ::gr::trellis::fsm;
+
+
+ py::class_<fsm, std::shared_ptr<fsm>>(m, "fsm", D(fsm))
+
+ .def(py::init<>(), D(fsm, fsm, 0))
+ .def(py::init<gr::trellis::fsm const&>(), py::arg("FSM"), D(fsm, fsm, 1))
+ .def(py::init<int,
+ int,
+ int,
+ std::vector<int, std::allocator<int>> const&,
+ std::vector<int, std::allocator<int>> const&>(),
+ py::arg("I"),
+ py::arg("S"),
+ py::arg("O"),
+ py::arg("NS"),
+ py::arg("OS"),
+ D(fsm, fsm, 2))
+ .def(py::init<char const*>(), py::arg("name"), D(fsm, fsm, 3))
+ .def(py::init<int, int, std::vector<int, std::allocator<int>> const&>(),
+ py::arg("k"),
+ py::arg("n"),
+ py::arg("G"),
+ D(fsm, fsm, 4))
+ .def(py::init<int, int>(),
+ py::arg("mod_size"),
+ py::arg("ch_length"),
+ D(fsm, fsm, 5))
+ .def(py::init<int, int, int>(),
+ py::arg("P"),
+ py::arg("M"),
+ py::arg("L"),
+ D(fsm, fsm, 6))
+ .def(py::init<gr::trellis::fsm const&, gr::trellis::fsm const&>(),
+ py::arg("FSM1"),
+ py::arg("FSM2"),
+ D(fsm, fsm, 7))
+ .def(py::init<gr::trellis::fsm const&, gr::trellis::fsm const&, bool>(),
+ py::arg("FSMo"),
+ py::arg("FSMi"),
+ py::arg("serial"),
+ D(fsm, fsm, 8))
+ .def(py::init<gr::trellis::fsm const&, int>(),
+ py::arg("FSM"),
+ py::arg("n"),
+ D(fsm, fsm, 9))
+
+
+ .def("I", &fsm::I, D(fsm, I))
+
+
+ .def("S", &fsm::S, D(fsm, S))
+
+
+ .def("O", &fsm::O, D(fsm, O))
+
+
+ .def("NS", &fsm::NS, D(fsm, NS))
+
+
+ .def("OS", &fsm::OS, D(fsm, OS))
+
+
+ .def("PS", &fsm::PS, D(fsm, PS))
+
+
+ .def("PI", &fsm::PI, D(fsm, PI))
+
+
+ .def("TMi", &fsm::TMi, D(fsm, TMi))
+
+
+ .def("TMl", &fsm::TMl, D(fsm, TMl))
+
+
+ .def("write_trellis_svg",
+ &fsm::write_trellis_svg,
+ py::arg("filename"),
+ py::arg("number_stages"),
+ D(fsm, write_trellis_svg))
+
+
+ .def("write_fsm_txt",
+ &fsm::write_fsm_txt,
+ py::arg("filename"),
+ D(fsm, write_fsm_txt))
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/interleaver_python.cc b/gr-trellis/python/trellis/bindings/interleaver_python.cc
new file mode 100644
index 0000000000..9649194b86
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/interleaver_python.cc
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/interleaver.h>
+// pydoc.h is automatically generated in the build directory
+#include <interleaver_pydoc.h>
+
+void bind_interleaver(py::module& m)
+{
+
+ using interleaver = ::gr::trellis::interleaver;
+
+
+ py::class_<interleaver, std::shared_ptr<interleaver>>(
+ m, "interleaver", D(interleaver))
+
+ .def(py::init<>(), D(interleaver, interleaver, 0))
+ .def(py::init<gr::trellis::interleaver const&>(),
+ py::arg("INTERLEAVER"),
+ D(interleaver, interleaver, 1))
+ .def(py::init<unsigned int, std::vector<int, std::allocator<int>> const&>(),
+ py::arg("K"),
+ py::arg("INTER"),
+ D(interleaver, interleaver, 2))
+ .def(py::init<char const*>(), py::arg("name"), D(interleaver, interleaver, 3))
+ .def(py::init<unsigned int, int>(),
+ py::arg("K"),
+ py::arg("seed"),
+ D(interleaver, interleaver, 4))
+
+
+ .def("K", &interleaver::K, D(interleaver, K))
+
+
+ .def("INTER", &interleaver::INTER, D(interleaver, INTER))
+
+
+ .def("DEINTER", &interleaver::DEINTER, D(interleaver, DEINTER))
+
+
+ .def("write_interleaver_txt",
+ &interleaver::write_interleaver_txt,
+ py::arg("filename"),
+ D(interleaver, write_interleaver_txt))
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/metrics_python.cc b/gr-trellis/python/trellis/bindings/metrics_python.cc
new file mode 100644
index 0000000000..91eb62ee25
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/metrics_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/metrics.h>
+// pydoc.h is automatically generated in the build directory
+#include <metrics_pydoc.h>
+
+void bind_metrics(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/pccc_decoder_blk_python.cc b/gr-trellis/python/trellis/bindings/pccc_decoder_blk_python.cc
new file mode 100644
index 0000000000..16622efc7d
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/pccc_decoder_blk_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/pccc_decoder_blk.h>
+// pydoc.h is automatically generated in the build directory
+#include <pccc_decoder_blk_pydoc.h>
+
+void bind_pccc_decoder_blk(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/pccc_decoder_combined_blk_python.cc b/gr-trellis/python/trellis/bindings/pccc_decoder_combined_blk_python.cc
new file mode 100644
index 0000000000..0ce9aeafa6
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/pccc_decoder_combined_blk_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/pccc_decoder_combined_blk.h>
+// pydoc.h is automatically generated in the build directory
+#include <pccc_decoder_combined_blk_pydoc.h>
+
+void bind_pccc_decoder_combined_blk(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/pccc_encoder_python.cc b/gr-trellis/python/trellis/bindings/pccc_encoder_python.cc
new file mode 100644
index 0000000000..61d7e2f68a
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/pccc_encoder_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/pccc_encoder.h>
+// pydoc.h is automatically generated in the build directory
+#include <pccc_encoder_pydoc.h>
+
+void bind_pccc_encoder(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/permutation_python.cc b/gr-trellis/python/trellis/bindings/permutation_python.cc
new file mode 100644
index 0000000000..5eb933ebd5
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/permutation_python.cc
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/permutation.h>
+// pydoc.h is automatically generated in the build directory
+#include <permutation_pydoc.h>
+
+void bind_permutation(py::module& m)
+{
+
+ using permutation = ::gr::trellis::permutation;
+
+
+ py::class_<permutation,
+ gr::sync_block,
+ gr::block,
+ gr::basic_block,
+ std::shared_ptr<permutation>>(m, "permutation", D(permutation))
+
+ .def(py::init(&permutation::make),
+ py::arg("K"),
+ py::arg("TABLE"),
+ py::arg("SYMS_PER_BLOCK"),
+ py::arg("NBYTES"),
+ D(permutation, make))
+
+
+ .def("K", &permutation::K, D(permutation, K))
+
+
+ .def("TABLE", &permutation::TABLE, D(permutation, TABLE))
+
+
+ .def("SYMS_PER_BLOCK",
+ &permutation::SYMS_PER_BLOCK,
+ D(permutation, SYMS_PER_BLOCK))
+
+
+ .def("BYTES_PER_SYMBOL",
+ &permutation::BYTES_PER_SYMBOL,
+ D(permutation, BYTES_PER_SYMBOL))
+
+
+ .def("set_K", &permutation::set_K, py::arg("K"), D(permutation, set_K))
+
+
+ .def("set_TABLE",
+ &permutation::set_TABLE,
+ py::arg("table"),
+ D(permutation, set_TABLE))
+
+
+ .def("set_SYMS_PER_BLOCK",
+ &permutation::set_SYMS_PER_BLOCK,
+ py::arg("spb"),
+ D(permutation, set_SYMS_PER_BLOCK))
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/python_bindings.cc b/gr-trellis/python/trellis/bindings/python_bindings.cc
new file mode 100644
index 0000000000..16c19951c8
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/python_bindings.cc
@@ -0,0 +1,80 @@
+
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+#include <pybind11/pybind11.h>
+
+#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
+#include <numpy/arrayobject.h>
+
+namespace py = pybind11;
+
+// void bind_base(py::module&);
+// void bind_calc_metric(py::module&);
+void bind_constellation_metrics_cf(py::module&);
+// void bind_core_algorithms(py::module&);
+void bind_encoder(py::module&);
+void bind_fsm(py::module&);
+void bind_interleaver(py::module&);
+void bind_metrics(py::module&);
+void bind_pccc_decoder_blk(py::module&);
+void bind_pccc_decoder_combined_blk(py::module&);
+void bind_pccc_encoder(py::module&);
+void bind_permutation(py::module&);
+void bind_quicksort_index(py::module&);
+void bind_sccc_decoder_blk(py::module&);
+void bind_sccc_decoder_combined_blk(py::module&);
+void bind_sccc_encoder(py::module&);
+void bind_siso_combined_f(py::module&);
+void bind_siso_f(py::module&);
+void bind_siso_type(py::module&);
+void bind_viterbi(py::module&);
+void bind_viterbi_combined(py::module&);
+
+// We need this hack because import_array() returns NULL
+// for newer Python versions.
+// This function is also necessary because it ensures access to the C API
+// and removes a warning.
+void* init_numpy()
+{
+ import_array();
+ return NULL;
+}
+
+PYBIND11_MODULE(trellis_python, m)
+{
+ // Initialize the numpy C API
+ // (otherwise we will see segmentation faults)
+ init_numpy();
+
+ // Allow access to base block methods
+ py::module::import("gnuradio.gr");
+
+ // bind_base(m);
+ // bind_calc_metric(m);
+ bind_constellation_metrics_cf(m);
+ // bind_core_algorithms(m);
+ bind_encoder(m);
+ bind_fsm(m);
+ bind_interleaver(m);
+ bind_metrics(m);
+ bind_pccc_decoder_blk(m);
+ bind_pccc_decoder_combined_blk(m);
+ bind_pccc_encoder(m);
+ bind_permutation(m);
+ bind_quicksort_index(m);
+ bind_sccc_decoder_blk(m);
+ bind_sccc_decoder_combined_blk(m);
+ bind_sccc_encoder(m);
+ bind_siso_combined_f(m);
+ bind_siso_f(m);
+ bind_siso_type(m);
+ bind_viterbi(m);
+ bind_viterbi_combined(m);
+}
diff --git a/gr-trellis/python/trellis/bindings/quicksort_index_python.cc b/gr-trellis/python/trellis/bindings/quicksort_index_python.cc
new file mode 100644
index 0000000000..024b4bde7b
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/quicksort_index_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/quicksort_index.h>
+// pydoc.h is automatically generated in the build directory
+#include <quicksort_index_pydoc.h>
+
+void bind_quicksort_index(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/sccc_decoder_blk_python.cc b/gr-trellis/python/trellis/bindings/sccc_decoder_blk_python.cc
new file mode 100644
index 0000000000..ae573adc7e
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/sccc_decoder_blk_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/sccc_decoder_blk.h>
+// pydoc.h is automatically generated in the build directory
+#include <sccc_decoder_blk_pydoc.h>
+
+void bind_sccc_decoder_blk(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/sccc_decoder_combined_blk_python.cc b/gr-trellis/python/trellis/bindings/sccc_decoder_combined_blk_python.cc
new file mode 100644
index 0000000000..40260d06c4
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/sccc_decoder_combined_blk_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/sccc_decoder_combined_blk.h>
+// pydoc.h is automatically generated in the build directory
+#include <sccc_decoder_combined_blk_pydoc.h>
+
+void bind_sccc_decoder_combined_blk(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/sccc_encoder_python.cc b/gr-trellis/python/trellis/bindings/sccc_encoder_python.cc
new file mode 100644
index 0000000000..bba8c8bd2b
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/sccc_encoder_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/sccc_encoder.h>
+// pydoc.h is automatically generated in the build directory
+#include <sccc_encoder_pydoc.h>
+
+void bind_sccc_encoder(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/siso_combined_f_python.cc b/gr-trellis/python/trellis/bindings/siso_combined_f_python.cc
new file mode 100644
index 0000000000..284c35747c
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/siso_combined_f_python.cc
@@ -0,0 +1,127 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/siso_combined_f.h>
+// pydoc.h is automatically generated in the build directory
+#include <siso_combined_f_pydoc.h>
+
+void bind_siso_combined_f(py::module& m)
+{
+
+ using siso_combined_f = ::gr::trellis::siso_combined_f;
+
+
+ py::class_<siso_combined_f,
+ gr::block,
+ gr::basic_block,
+ std::shared_ptr<siso_combined_f>>(m, "siso_combined_f", D(siso_combined_f))
+
+ .def(py::init(&siso_combined_f::make),
+ py::arg("FSM"),
+ py::arg("K"),
+ py::arg("S0"),
+ py::arg("SK"),
+ py::arg("POSTI"),
+ py::arg("POSTO"),
+ py::arg("d_SISO_TYPE"),
+ py::arg("D"),
+ py::arg("TABLE"),
+ py::arg("TYPE"),
+ D(siso_combined_f, make))
+
+
+ .def("FSM", &siso_combined_f::FSM, D(siso_combined_f, FSM))
+
+
+ .def("K", &siso_combined_f::K, D(siso_combined_f, K))
+
+
+ .def("S0", &siso_combined_f::S0, D(siso_combined_f, S0))
+
+
+ .def("SK", &siso_combined_f::SK, D(siso_combined_f, SK))
+
+
+ .def("POSTI", &siso_combined_f::POSTI, D(siso_combined_f, POSTI))
+
+
+ .def("POSTO", &siso_combined_f::POSTO, D(siso_combined_f, POSTO))
+
+
+ .def("SISO_TYPE", &siso_combined_f::SISO_TYPE, D(siso_combined_f, SISO_TYPE))
+
+
+ .def("D", &siso_combined_f::D, D(siso_combined_f, D))
+
+
+ .def("TABLE", &siso_combined_f::TABLE, D(siso_combined_f, TABLE))
+
+
+ .def("TYPE", &siso_combined_f::TYPE, D(siso_combined_f, TYPE))
+
+
+ .def("set_FSM",
+ &siso_combined_f::set_FSM,
+ py::arg("FSM"),
+ D(siso_combined_f, set_FSM))
+
+
+ .def("set_K", &siso_combined_f::set_K, py::arg("K"), D(siso_combined_f, set_K))
+
+
+ .def(
+ "set_S0", &siso_combined_f::set_S0, py::arg("S0"), D(siso_combined_f, set_S0))
+
+
+ .def(
+ "set_SK", &siso_combined_f::set_SK, py::arg("SK"), D(siso_combined_f, set_SK))
+
+
+ .def("set_POSTI",
+ &siso_combined_f::set_POSTI,
+ py::arg("POSTI"),
+ D(siso_combined_f, set_POSTI))
+
+
+ .def("set_POSTO",
+ &siso_combined_f::set_POSTO,
+ py::arg("POSTO"),
+ D(siso_combined_f, set_POSTO))
+
+
+ .def("set_SISO_TYPE",
+ &siso_combined_f::set_SISO_TYPE,
+ py::arg("type"),
+ D(siso_combined_f, set_SISO_TYPE))
+
+
+ .def("set_D", &siso_combined_f::set_D, py::arg("D"), D(siso_combined_f, set_D))
+
+
+ .def("set_TABLE",
+ &siso_combined_f::set_TABLE,
+ py::arg("table"),
+ D(siso_combined_f, set_TABLE))
+
+
+ .def("set_TYPE",
+ &siso_combined_f::set_TYPE,
+ py::arg("type"),
+ D(siso_combined_f, set_TYPE))
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/siso_f_python.cc b/gr-trellis/python/trellis/bindings/siso_f_python.cc
new file mode 100644
index 0000000000..4ad84ce5ff
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/siso_f_python.cc
@@ -0,0 +1,87 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/siso_f.h>
+// pydoc.h is automatically generated in the build directory
+#include <siso_f_pydoc.h>
+
+void bind_siso_f(py::module& m)
+{
+
+ using siso_f = ::gr::trellis::siso_f;
+
+
+ py::class_<siso_f, gr::block, gr::basic_block, std::shared_ptr<siso_f>>(
+ m, "siso_f", D(siso_f))
+
+ .def(py::init(&siso_f::make),
+ py::arg("FSM"),
+ py::arg("K"),
+ py::arg("S0"),
+ py::arg("SK"),
+ py::arg("POSTI"),
+ py::arg("POSTO"),
+ py::arg("d_SISO_TYPE"),
+ D(siso_f, make))
+
+
+ .def("FSM", &siso_f::FSM, D(siso_f, FSM))
+
+
+ .def("K", &siso_f::K, D(siso_f, K))
+
+
+ .def("S0", &siso_f::S0, D(siso_f, S0))
+
+
+ .def("SK", &siso_f::SK, D(siso_f, SK))
+
+
+ .def("POSTI", &siso_f::POSTI, D(siso_f, POSTI))
+
+
+ .def("POSTO", &siso_f::POSTO, D(siso_f, POSTO))
+
+
+ .def("SISO_TYPE", &siso_f::SISO_TYPE, D(siso_f, SISO_TYPE))
+
+
+ .def("set_FSM", &siso_f::set_FSM, py::arg("FSM"), D(siso_f, set_FSM))
+
+
+ .def("set_K", &siso_f::set_K, py::arg("K"), D(siso_f, set_K))
+
+
+ .def("set_S0", &siso_f::set_S0, py::arg("S0"), D(siso_f, set_S0))
+
+
+ .def("set_SK", &siso_f::set_SK, py::arg("SK"), D(siso_f, set_SK))
+
+
+ .def("set_POSTI", &siso_f::set_POSTI, py::arg("posti"), D(siso_f, set_POSTI))
+
+
+ .def("set_POSTO", &siso_f::set_POSTO, py::arg("posto"), D(siso_f, set_POSTO))
+
+
+ .def("set_SISO_TYPE",
+ &siso_f::set_SISO_TYPE,
+ py::arg("type"),
+ D(siso_f, set_SISO_TYPE))
+
+ ;
+}
diff --git a/gr-trellis/python/trellis/bindings/siso_type_python.cc b/gr-trellis/python/trellis/bindings/siso_type_python.cc
new file mode 100644
index 0000000000..3cd4c00b62
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/siso_type_python.cc
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/siso_type.h>
+// pydoc.h is automatically generated in the build directory
+#include <siso_type_pydoc.h>
+
+void bind_siso_type(py::module& m)
+{
+
+
+ py::enum_<::gr::trellis::siso_type_t>(m, "siso_type_t")
+ .value("TRELLIS_MIN_SUM", ::gr::trellis::TRELLIS_MIN_SUM) // 200
+ .value("TRELLIS_SUM_PRODUCT", ::gr::trellis::TRELLIS_SUM_PRODUCT) // 201
+ .export_values();
+}
diff --git a/gr-trellis/python/trellis/bindings/viterbi_combined_python.cc b/gr-trellis/python/trellis/bindings/viterbi_combined_python.cc
new file mode 100644
index 0000000000..dbecc3254c
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/viterbi_combined_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/viterbi_combined.h>
+// pydoc.h is automatically generated in the build directory
+#include <viterbi_combined_pydoc.h>
+
+void bind_viterbi_combined(py::module& m) {}
diff --git a/gr-trellis/python/trellis/bindings/viterbi_python.cc b/gr-trellis/python/trellis/bindings/viterbi_python.cc
new file mode 100644
index 0000000000..32ba3f3f29
--- /dev/null
+++ b/gr-trellis/python/trellis/bindings/viterbi_python.cc
@@ -0,0 +1,22 @@
+/*
+ * Copyright 2020 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * SPDX-License-Identifier: GPL-3.0-or-later
+ *
+ */
+
+/* This file is automatically generated using bindtool */
+
+#include <pybind11/complex.h>
+#include <pybind11/pybind11.h>
+#include <pybind11/stl.h>
+
+namespace py = pybind11;
+
+#include <gnuradio/trellis/viterbi.h>
+// pydoc.h is automatically generated in the build directory
+#include <viterbi_pydoc.h>
+
+void bind_viterbi(py::module& m) {}