[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 48/57: fec: wip: adding extended encoder fo
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 48/57: fec: wip: adding extended encoder for async version. |
Date: |
Wed, 21 May 2014 03:10:31 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
trondeau pushed a commit to branch master
in repository gnuradio.
commit 15ef5ba664896481faba85c39dc3539f5a4ee5aa
Author: Tom Rondeau <address@hidden>
Date: Fri May 16 15:58:47 2014 -0400
fec: wip: adding extended encoder for async version.
not quite working yet, needs work on the message-passing hier_block and
added async puncturing block.
---
gr-fec/grc/fec_block_tree.xml | 1 +
gr-fec/grc/fec_extended_async_encoder.xml | 38 ++++++++++++++++
gr-fec/lib/CMakeLists.txt | 2 +
gr-fec/python/fec/CMakeLists.txt | 1 +
gr-fec/python/fec/__init__.py | 1 +
gr-fec/python/fec/extended_async_encoder.py | 67 +++++++++++++++++++++++++++++
6 files changed, 110 insertions(+)
diff --git a/gr-fec/grc/fec_block_tree.xml b/gr-fec/grc/fec_block_tree.xml
index 93b2829..c229be2 100644
--- a/gr-fec/grc/fec_block_tree.xml
+++ b/gr-fec/grc/fec_block_tree.xml
@@ -22,6 +22,7 @@
<block>variable_dummy_encoder_def</block>
</cat>
<block>fec_extended_encoder</block>
+ <block>fec_extended_async_encoder</block>
<block>fec_extended_decoder</block>
<block>fec_generic_encoder</block>
<block>fec_generic_decoder</block>
diff --git a/gr-fec/grc/fec_extended_async_encoder.xml
b/gr-fec/grc/fec_extended_async_encoder.xml
new file mode 100644
index 0000000..e61696b
--- /dev/null
+++ b/gr-fec/grc/fec_extended_async_encoder.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<block>
+ <name>FEC Extended Async Encoder</name>
+ <key>fec_extended_async_encoder</key>
+ <import>from gnuradio import fec</import>
+ <make>fec.extended_async_encoder(encoder_obj_list=$encoder_list,
puncpat=$puncpat)</make>
+
+ <param>
+ <name>Encoder Objects</name>
+ <key>encoder_list</key>
+ <value>encoder_variable</value>
+ <type>raw</type>
+ </param>
+
+ <param>
+ <name>Puncture Pattern</name>
+ <key>puncpat</key>
+ <value>'11'</value>
+ <type>string</type>
+ </param>
+
+ <sink>
+ <name>in</name>
+ <type>message</type>
+ <optional>1</optional>
+ </sink>
+
+ <source>
+ <name>out</name>
+ <type>message</type>
+ <optional>1</optional>
+ </source>
+
+ <doc>
+
+ </doc>
+
+</block>
diff --git a/gr-fec/lib/CMakeLists.txt b/gr-fec/lib/CMakeLists.txt
index 16f47c8..1fba94e 100644
--- a/gr-fec/lib/CMakeLists.txt
+++ b/gr-fec/lib/CMakeLists.txt
@@ -29,6 +29,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
${GR_FEC_INCLUDE_DIRS}
+ ${GR_BLOCKS_INCLUDE_DIRS}
${GNURADIO_RUNTIME_INCLUDE_DIRS}
${VOLK_INCLUDE_DIRS}
${LOG4CPP_INCLUDE_DIRS}
@@ -89,6 +90,7 @@ if(MSVC)
endif(MSVC)
list(APPEND gnuradio_fec_libs
+ gnuradio-blocks
gnuradio-runtime
volk
${Boost_LIBRARIES}
diff --git a/gr-fec/python/fec/CMakeLists.txt b/gr-fec/python/fec/CMakeLists.txt
index 2e435ba..d810237 100644
--- a/gr-fec/python/fec/CMakeLists.txt
+++ b/gr-fec/python/fec/CMakeLists.txt
@@ -30,6 +30,7 @@ GR_PYTHON_INSTALL(
capillary_threaded_encoder.py
threaded_decoder.py
threaded_encoder.py
+ extended_async_encoder.py
fec_test.py
bercurve_generator.py
DESTINATION ${GR_PYTHON_DIR}/gnuradio/fec
diff --git a/gr-fec/python/fec/__init__.py b/gr-fec/python/fec/__init__.py
index 96be81c..11f9c29 100644
--- a/gr-fec/python/fec/__init__.py
+++ b/gr-fec/python/fec/__init__.py
@@ -38,6 +38,7 @@ from threaded_encoder import threaded_encoder
from threaded_decoder import threaded_decoder
from capillary_threaded_decoder import capillary_threaded_decoder
from capillary_threaded_encoder import capillary_threaded_encoder
+from extended_async_encoder import extended_async_encoder
from fec_test import fec_test
diff --git a/gr-fec/python/fec/extended_async_encoder.py
b/gr-fec/python/fec/extended_async_encoder.py
new file mode 100644
index 0000000..fffe64a
--- /dev/null
+++ b/gr-fec/python/fec/extended_async_encoder.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+#
+# Copyright 2014 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.
+#
+
+from gnuradio import gr
+import fec_swig as fec
+from bitflip import read_bitlist
+import weakref
+
+class extended_async_encoder(gr.hier_block2):
+ def __init__(self, encoder_obj_list, puncpat=None):
+ gr.hier_block2.__init__(self, "extended_async_encoder",
+ gr.io_signature(0, 0, 0),
+ gr.io_signature(0, 0, 0))
+
+ # Set us up as a message passing block
+ self.message_port_register_hier_in('in')
+ self.message_port_register_hier_out('out')
+
+ self.puncpat=puncpat
+
+ # If it's a list of encoders, take the first one, unless it's
+ # a list of lists of encoders.
+ if(type(encoder_obj_list) == list):
+ # This block doesn't handle parallelism of > 1
+ if(type(encoder_obj_list[0]) == list):
+ gr.log.info("fec.extended_encoder: Parallelism must be 0 or
1.")
+ raise AttributeError
+
+ encoder_obj = encoder_obj_list[0]
+
+ # Otherwise, just take it as is
+ else:
+ encoder_obj = encoder_obj_list
+
+ self.encoder = fec.async_encoder(encoder_obj)
+
+ #self.puncture = None
+ #if self.puncpat != '11':
+ # self.puncture = fec.puncture_bb(len(puncpat),
read_bitlist(puncpat), 0)
+
+ self.msg_connect(weakref.proxy(self), "in", self.encoder, "in")
+
+ #if(self.puncture):
+ # self.msg_connect(self.encoder, "out", self.puncture, "in")
+ # self.msg_connect(self.puncture, "out", weakref.proxy(self), "out")
+ #else:
+ # self.msg_connect(self.encoder, "out", weakref.proxy(self), "out")
+ self.msg_connect(self.encoder, "out", weakref.proxy(self), "out")
- [Commit-gnuradio] [gnuradio] 18/57: volk: added conv kernel puppet and added to QA and profile., (continued)
- [Commit-gnuradio] [gnuradio] 18/57: volk: added conv kernel puppet and added to QA and profile., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 34/57: qtgui: work on ber sink for fecapi, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 35/57: runtime: don't add the log appender --> adds to C++, too., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 43/57: digital: added option to packet_utils.unmake_packet to check or not check the CRC., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 44/57: blocks: adds kernels for pack_k_bits and unpack_k_bits., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 30/57: runtime: configuring loggers in gr Python module for easy use in Python., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 39/57: digital: modified tagged stream correlate access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 37/57: Revert "blocks: add optional argument to deinterleave and interleave ctors to not set relative rate.", git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 42/57: fec: wip: fixing formatting., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 32/57: blocks: add optional argument to deinterleave and interleave ctors to not set relative rate., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 48/57: fec: wip: adding extended encoder for async version.,
git <=
- [Commit-gnuradio] [gnuradio] 47/57: digital: don't need the FEC info for the tagged stream corr access code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 46/57: blocks: adding an option to swap the order of the output bits of a repack_bits block., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 45/57: fec: wip: using unpack/pack k bits kernels instead of copying logic in here., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 56/57: Merge branch 'fecapi', git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 51/57: Revert "blocks: adding an option to swap the order of the output bits of a repack_bits block.", git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 22/57: fec: wip: adding block that correlates against an access code and produces a tagged stream ofthe payload (stripped access code)., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 53/57: fec: wip: adding qa code., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 50/57: fec: wip: adding concept of padding for CC encoder/decoder., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 54/57: fec: mostly documentation updates, spell check, etc., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 55/57: fec: wip: fixing up allocated memory; allowing async encoder deployment to be used with CCSDS (packed input requirement)., git, 2014/05/20