diff options
Diffstat (limited to 'gr-trellis/src/python')
-rw-r--r-- | gr-trellis/src/python/.gitignore | 9 | ||||
-rw-r--r-- | gr-trellis/src/python/CMakeLists.txt | 8 | ||||
-rw-r--r-- | gr-trellis/src/python/Makefile.am | 32 | ||||
-rwxr-xr-x | gr-trellis/src/python/qa_trellis.py | 20 | ||||
-rw-r--r-- | gr-trellis/src/python/run_tests.in | 12 |
5 files changed, 14 insertions, 67 deletions
diff --git a/gr-trellis/src/python/.gitignore b/gr-trellis/src/python/.gitignore deleted file mode 100644 index bf03975bb..000000000 --- a/gr-trellis/src/python/.gitignore +++ /dev/null @@ -1,9 +0,0 @@ -/Makefile -/Makefile.in -/.deps -/.libs -/*.la -/*.lo -/*.pyc -/*.pyo -/run_tests diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt index 66ca3eb13..ae2ab9cb4 100644 --- a/gr-trellis/src/python/CMakeLists.txt +++ b/gr-trellis/src/python/CMakeLists.txt @@ -1,17 +1,17 @@ # Copyright 2011-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, diff --git a/gr-trellis/src/python/Makefile.am b/gr-trellis/src/python/Makefile.am deleted file mode 100644 index 808ac4fb7..000000000 --- a/gr-trellis/src/python/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# -# Copyright 2004,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 3, or (at your option) -# any later version. -# -# GNU Radio is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -include $(top_srcdir)/Makefile.common - -EXTRA_DIST += run_tests.in \ - awgn1o2_4.fsm - - -TESTS = run_tests - - -noinst_PYTHON = \ - qa_trellis.py diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py index b50679f27..fcc651ec6 100755 --- a/gr-trellis/src/python/qa_trellis.py +++ b/gr-trellis/src/python/qa_trellis.py @@ -1,24 +1,24 @@ #!/usr/bin/env python # # Copyright 2004,2010 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. -# +# import math @@ -111,9 +111,9 @@ class trellis_tb(gr.top_block): # packet size in shorts src_head = gr.head (gr.sizeof_short, packet_size/16) # unpack shorts to symbols compatible with the FSM input cardinality - s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST) + s2fsmi = gr.packed_to_unpacked_ss(bitspersymbol, gr.GR_MSB_FIRST) # initial FSM state = 0 - enc = trellis.encoder_ss(f, 0) + enc = trellis.encoder_ss(f, 0) mod = gr.chunks_to_symbols_sc(constellation.points(), 1) # CHANNEL @@ -122,14 +122,14 @@ class trellis_tb(gr.top_block): # 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_swig.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 - fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol, gr.GR_MSB_FIRST) + fsmi2s = gr.unpacked_to_packed_ss(bitspersymbol, gr.GR_MSB_FIRST) # check the output self.dst = gr.check_lfsr_32k_s() - + self.connect (src, src_head, s2fsmi, enc, mod) self.connect (mod, (add, 0)) self.connect (noise, (add, 1)) diff --git a/gr-trellis/src/python/run_tests.in b/gr-trellis/src/python/run_tests.in deleted file mode 100644 index fcb078663..000000000 --- a/gr-trellis/src/python/run_tests.in +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -# 1st parameter is absolute path to component source directory -# 2nd parameter is absolute path to component build directory -# 3rd parameter is path to Python QA directory - -PYTHONPATH=@top_builddir@/gr-digital/swig:@top_builddir@/gr-digital/swig/.libs:@top_srcdir@/gr-digital/swig:$PYTHONPATH - -@top_builddir@/run_tests.sh \ - @abs_top_srcdir@/gr-trellis \ - @abs_top_builddir@/gr-trellis \ - @srcdir@ |