summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gr-blocks/grc/blocks_block_tree.xml1
-rw-r--r--gr-blocks/grc/blocks_tag_gate.xml68
-rw-r--r--gr-blocks/include/gnuradio/blocks/CMakeLists.txt1
-rw-r--r--gr-blocks/include/gnuradio/blocks/tag_gate.h56
-rw-r--r--gr-blocks/lib/CMakeLists.txt3
-rw-r--r--gr-blocks/lib/tag_gate_impl.cc79
-rw-r--r--gr-blocks/lib/tag_gate_impl.h52
-rwxr-xr-xgr-blocks/python/qa_tag_gate.py47
-rw-r--r--gr-blocks/swig/blocks_swig5.i3
-rw-r--r--gr-digital/examples/ofdm/ofdm_loopback.grc861
-rw-r--r--gr-digital/examples/ofdm/rx_ofdm.grc1336
-rw-r--r--gr-digital/examples/ofdm/tx_ofdm.grc1467
-rw-r--r--gr-digital/grc/digital_block_tree.xml2
-rw-r--r--gr-digital/grc/digital_header_payload_demux.xml2
-rw-r--r--gr-digital/grc/digital_ofdm_chanest_vcvc.xml2
-rw-r--r--gr-digital/grc/digital_ofdm_rx.xml174
-rw-r--r--gr-digital/grc/digital_ofdm_sync_sc_cfb.xml17
-rw-r--r--gr-digital/grc/digital_ofdm_tx.xml180
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h9
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h16
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h7
-rw-r--r--gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h5
-rw-r--r--gr-digital/lib/header_payload_demux_impl.cc6
-rw-r--r--gr-digital/lib/ofdm_chanest_vcvc_impl.cc53
-rw-r--r--gr-digital/lib/ofdm_equalizer_base.cc7
-rw-r--r--gr-digital/lib/ofdm_equalizer_simpledfe.cc10
-rw-r--r--gr-digital/lib/ofdm_equalizer_static.cc6
-rw-r--r--gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc78
-rw-r--r--gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h9
-rw-r--r--gr-digital/lib/ofdm_serializer_vcc_impl.cc31
-rw-r--r--gr-digital/lib/ofdm_serializer_vcc_impl.h2
-rw-r--r--gr-digital/lib/ofdm_sync_sc_cfb_impl.cc10
-rw-r--r--gr-digital/lib/ofdm_sync_sc_cfb_impl.h2
-rw-r--r--gr-digital/lib/packet_header_default.cc20
-rw-r--r--gr-digital/lib/packet_header_ofdm.cc9
-rw-r--r--gr-digital/lib/packet_headerparser_b_impl.cc6
-rw-r--r--gr-digital/python/CMakeLists.txt2
-rw-r--r--gr-digital/python/ofdm_txrx.py280
-rwxr-xr-xgr-digital/python/qa_ofdm_chanest_vcvc.py26
-rwxr-xr-xgr-digital/python/qa_ofdm_frame_equalizer_vcvc.py219
-rwxr-xr-xgr-digital/python/qa_ofdm_serializer_vcc.py108
-rwxr-xr-xgr-digital/python/qa_ofdm_sync_sc_cfb.py117
-rwxr-xr-xgr-digital/python/qa_ofdm_txrx.py120
-rwxr-xr-xgr-digital/python/qa_packet_headerparser_b.py16
-rw-r--r--gr-utils/python/modtool/templates.py2
45 files changed, 4666 insertions, 861 deletions
diff --git a/gr-blocks/grc/blocks_block_tree.xml b/gr-blocks/grc/blocks_block_tree.xml
index a24e5b4231..150b3f1c93 100644
--- a/gr-blocks/grc/blocks_block_tree.xml
+++ b/gr-blocks/grc/blocks_block_tree.xml
@@ -177,6 +177,7 @@
<cat>
<name>Stream Tag Tools</name>
<block>blocks_tag_debug</block>
+ <block>blocks_tag_gate</block>
<block>blocks_tagged_file_sink</block>
<block>blocks_tagged_stream_mux</block>
</cat>
diff --git a/gr-blocks/grc/blocks_tag_gate.xml b/gr-blocks/grc/blocks_tag_gate.xml
new file mode 100644
index 0000000000..5c748f27cf
--- /dev/null
+++ b/gr-blocks/grc/blocks_tag_gate.xml
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<block>
+ <name>Tag Gate</name>
+ <key>blocks_tag_gate</key>
+ <import>from gnuradio import blocks</import>
+ <make>blocks.tag_gate($type.size * $vlen, $propagate_tags)</make>
+ <param>
+ <name>Item Type</name>
+ <key>type</key>
+ <type>enum</type>
+ <option>
+ <name>Complex</name>
+ <key>complex</key>
+ <opt>size:gr.sizeof_gr_complex</opt>
+ </option>
+ <option>
+ <name>Float</name>
+ <key>float</key>
+ <opt>size:gr.sizeof_float</opt>
+ </option>
+ <option>
+ <name>Int</name>
+ <key>int</key>
+ <opt>size:gr.sizeof_int</opt>
+ </option>
+ <option>
+ <name>Short</name>
+ <key>short</key>
+ <opt>size:gr.sizeof_short</opt>
+ </option>
+ <option>
+ <name>Byte</name>
+ <key>byte</key>
+ <opt>size:gr.sizeof_char</opt>
+ </option>
+ </param>
+ <param>
+ <name>Vec Length</name>
+ <key>vlen</key>
+ <value>1</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Propagate_tags</name>
+ <key>propagate_tags</key>
+ <value>False</value>
+ <type>enum</type>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ </param>
+ <check>$vlen &gt; 0</check>
+ <sink>
+ <name>in</name>
+ <type>$type</type>
+ <vlen>$vlen</vlen>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>$type</type>
+ <vlen>$vlen</vlen>
+ </source>
+</block>
diff --git a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
index 14346f9c15..13e1ac71b8 100644
--- a/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
+++ b/gr-blocks/include/gnuradio/blocks/CMakeLists.txt
@@ -187,6 +187,7 @@ install(FILES
streams_to_vector.h
stretch_ff.h
tag_debug.h
+ tag_gate.h
tagged_file_sink.h
tagged_stream_mux.h
tagged_stream_to_pdu.h
diff --git a/gr-blocks/include/gnuradio/blocks/tag_gate.h b/gr-blocks/include/gnuradio/blocks/tag_gate.h
new file mode 100644
index 0000000000..5363301192
--- /dev/null
+++ b/gr-blocks/include/gnuradio/blocks/tag_gate.h
@@ -0,0 +1,56 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_TAG_GATE_H
+#define INCLUDED_BLOCKS_TAG_GATE_H
+
+#include <gnuradio/blocks/api.h>
+#include <gnuradio/sync_block.h>
+
+namespace gr {
+ namespace blocks {
+
+ /*!
+ * \brief Control tag propagation.
+ * \ingroup blocks
+ *
+ * Use this block to stop tags from propagating.
+ */
+ class BLOCKS_API tag_gate : virtual public gr::sync_block
+ {
+ public:
+ typedef boost::shared_ptr<tag_gate> sptr;
+
+ virtual void set_propagation(bool propagate_tags) = 0;
+
+ /*!
+ * \param item_size Item size
+ * \param propagate_tags Set this to true to allow tags to pass through this block.
+ */
+ static sptr make(size_t item_size, bool propagate_tags=false);
+ };
+
+ } // namespace blocks
+} // namespace gr
+
+#endif /* INCLUDED_BLOCKS_TAG_GATE_H */
+
diff --git a/gr-blocks/lib/CMakeLists.txt b/gr-blocks/lib/CMakeLists.txt
index bdd7ca77a6..34453bca50 100644
--- a/gr-blocks/lib/CMakeLists.txt
+++ b/gr-blocks/lib/CMakeLists.txt
@@ -278,7 +278,8 @@ list(APPEND blocks_libs
${LOG4CPP_LIBRARIES}
)
-add_library(gnuradio-blocks SHARED ${gr_blocks_sources})
+add_library(gnuradio-blocks SHARED ${gr_blocks_sources}
+ tag_gate_impl.cc)
add_dependencies(gnuradio-blocks blocks_generated_includes)
target_link_libraries(gnuradio-blocks ${blocks_libs})
diff --git a/gr-blocks/lib/tag_gate_impl.cc b/gr-blocks/lib/tag_gate_impl.cc
new file mode 100644
index 0000000000..643ec6748f
--- /dev/null
+++ b/gr-blocks/lib/tag_gate_impl.cc
@@ -0,0 +1,79 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <gnuradio/io_signature.h>
+#include "tag_gate_impl.h"
+
+namespace gr {
+ namespace blocks {
+
+ tag_gate::sptr
+ tag_gate::make(size_t item_size, bool propagate_tags)
+ {
+ return gnuradio::get_initial_sptr (new tag_gate_impl(item_size, propagate_tags));
+ }
+
+ tag_gate_impl::tag_gate_impl(size_t item_size, bool propagate_tags)
+ : gr::sync_block("tag_gate",
+ gr::io_signature::make(1, 1, item_size),
+ gr::io_signature::make(1, 1, item_size)),
+ d_item_size(item_size),
+ d_propagate_tags(propagate_tags)
+ {
+ if (!d_propagate_tags) {
+ set_tag_propagation_policy(TPP_DONT);
+ }
+ }
+
+ tag_gate_impl::~tag_gate_impl()
+ {
+ }
+
+ void tag_gate_impl::set_propagation(bool propagate_tags)
+ {
+ if (propagate_tags) {
+ set_tag_propagation_policy(TPP_ALL_TO_ALL);
+ } else {
+ set_tag_propagation_policy(TPP_DONT);
+ }
+ }
+
+ int
+ tag_gate_impl::work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items)
+ {
+ const unsigned char *in = (const unsigned char *) input_items[0];
+ unsigned char *out = (unsigned char *) output_items[0];
+
+ memcpy((void *) out, (void *) in, d_item_size * noutput_items);
+
+ return noutput_items;
+ }
+
+ } /* namespace blocks */
+} /* namespace gr */
+
diff --git a/gr-blocks/lib/tag_gate_impl.h b/gr-blocks/lib/tag_gate_impl.h
new file mode 100644
index 0000000000..4983ba10b4
--- /dev/null
+++ b/gr-blocks/lib/tag_gate_impl.h
@@ -0,0 +1,52 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_BLOCKS_TAG_GATE_IMPL_H
+#define INCLUDED_BLOCKS_TAG_GATE_IMPL_H
+
+#include <gnuradio/blocks/tag_gate.h>
+
+namespace gr {
+ namespace blocks {
+
+ class tag_gate_impl : public tag_gate
+ {
+ private:
+ size_t d_item_size;
+ bool d_propagate_tags;
+
+ public:
+ tag_gate_impl(size_t item_size, bool propagate_tags);
+ ~tag_gate_impl();
+
+ void set_propagation(bool propagate_tags);
+
+ int work(int noutput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
+ };
+
+ } // namespace blocks
+} // namespace gr
+
+#endif /* INCLUDED_BLOCKS_TAG_GATE_IMPL_H */
+
diff --git a/gr-blocks/python/qa_tag_gate.py b/gr-blocks/python/qa_tag_gate.py
new file mode 100755
index 0000000000..1999f7a35d
--- /dev/null
+++ b/gr-blocks/python/qa_tag_gate.py
@@ -0,0 +1,47 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 <+YOU OR YOUR COMPANY+>.
+#
+# This 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.
+#
+# This software 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 this software; 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, gr_unittest
+import pmt
+import blocks_swig as blocks
+
+
+class qa_tag_gate (gr_unittest.TestCase):
+
+ def setUp (self):
+ self.tb = gr.top_block ()
+
+ def tearDown (self):
+ self.tb = None
+
+ def test_001_t (self):
+ tag = gr.tag_t()
+ tag.key = pmt.string_to_symbol('key')
+ tag.value = pmt.from_long(42)
+ tag.offset = 0
+ src = blocks.vector_source_f(range(20), False, 1, (tag,))
+ gate = blocks.tag_gate(gr.sizeof_float, False)
+ sink = blocks.vector_sink_f()
+ self.tb.run ()
+ self.assertEqual(len(sink.tags()), 0)
+
+if __name__ == '__main__':
+ gr_unittest.run(qa_tag_gate, "qa_tag_gate.xml")
+
diff --git a/gr-blocks/swig/blocks_swig5.i b/gr-blocks/swig/blocks_swig5.i
index 2eefe88d05..c04af1ed78 100644
--- a/gr-blocks/swig/blocks_swig5.i
+++ b/gr-blocks/swig/blocks_swig5.i
@@ -49,6 +49,7 @@
#include "gnuradio/blocks/sub_ss.h"
#include "gnuradio/blocks/sub_ii.h"
#include "gnuradio/blocks/sub_cc.h"
+#include "gnuradio/blocks/tag_gate.h"
#include "gnuradio/blocks/tagged_stream_mux.h"
#include "gnuradio/blocks/tagged_stream_to_pdu.h"
#include "gnuradio/blocks/threshold_ff.h"
@@ -85,6 +86,7 @@
%include "gnuradio/blocks/sub_ss.h"
%include "gnuradio/blocks/sub_ii.h"
%include "gnuradio/blocks/sub_cc.h"
+%include "gnuradio/blocks/tag_gate.h"
%include "gnuradio/blocks/tagged_stream_mux.h"
%include "gnuradio/blocks/tagged_stream_to_pdu.h"
%include "gnuradio/blocks/threshold_ff.h"
@@ -120,6 +122,7 @@ GR_SWIG_BLOCK_MAGIC2(blocks, sub_ff);
GR_SWIG_BLOCK_MAGIC2(blocks, sub_ss);
GR_SWIG_BLOCK_MAGIC2(blocks, sub_ii);
GR_SWIG_BLOCK_MAGIC2(blocks, sub_cc);
+GR_SWIG_BLOCK_MAGIC2(blocks, tag_gate);
GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_mux);
GR_SWIG_BLOCK_MAGIC2(blocks, tagged_stream_to_pdu);
GR_SWIG_BLOCK_MAGIC2(blocks, threshold_ff);
diff --git a/gr-digital/examples/ofdm/ofdm_loopback.grc b/gr-digital/examples/ofdm/ofdm_loopback.grc
new file mode 100644
index 0000000000..45a6ca0869
--- /dev/null
+++ b/gr-digital/examples/ofdm/ofdm_loopback.grc
@@ -0,0 +1,861 @@
+<?xml version='1.0' encoding='ASCII'?>
+<flow_graph>
+ <timestamp>Tue May 7 15:42:23 2013</timestamp>
+ <block>
+ <key>options</key>
+ <param>
+ <key>id</key>
+ <value>ofdm_loopback_example</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>OFDM Loopback Example</value>
+ </param>
+ <param>
+ <key>author</key>
+ <value></value>
+ </param>
+ <param>
+ <key>description</key>
+ <value>Transmit a pre-defined signal (a complex sine) as OFDM packets.</value>
+ </param>
+ <param>
+ <key>window_size</key>
+ <value>1280, 1024</value>
+ </param>
+ <param>
+ <key>generate_options</key>
+ <value>wx_gui</value>
+ </param>
+ <param>
+ <key>category</key>
+ <value>Custom</value>
+ </param>
+ <param>
+ <key>run_options</key>
+ <value>prompt</value>
+ </param>
+ <param>
+ <key>run</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>max_nouts</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>realtime_scheduling</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(0, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>len_tag_key</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>"packet_len"</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(345, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>64</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(464, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>freq_offset</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Frequency Offset (Multiples of Sub-carrier spacing)</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>-3</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(652, 285)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_slider</key>
+ <param>
+ <key>id</key>
+ <value>noise_voltage</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Noise Amplitude</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0.01</value>
+ </param>
+ <param>
+ <key>min</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>max</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_steps</key>
+ <value>100</value>
+ </param>
+ <param>
+ <key>style</key>
+ <value>wx.SL_HORIZONTAL</value>
+ </param>
+ <param>
+ <key>converver</key>
+ <value>float_converter</value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(651, 416)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import numpy</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(536, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(633, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_tx</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_tx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>packet_len_key</key>
+ <value>len_tag_key</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word1</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word2</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>header_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>payload_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>rolloff</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>log</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(390, 78)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_float_to_uchar</key>
+ <param>
+ <key>id</key>
+ <value>blocks_float_to_uchar_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(230, 119)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>tx_signal</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>[numpy.sin(2 * numpy.pi * 1.0/8 * x) for x in range(8*2)]</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(176, -1)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_vector_source_x</key>
+ <param>
+ <key>id</key>
+ <value>blocks_vector_source_x_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>tx_signal</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((8*2*gr.sizeof_float,), (0,), tagname=len_tag_key)</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(-1, 101)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>100e3</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(354, 230)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tag_gate</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tag_gate_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>propagate_tags</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(539, 230)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>180</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Rx Spectrum</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>100e3</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>2.0</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>15</value>
+ </param>
+ <param>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(92, 463)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>channel_model</key>
+ <param>
+ <key>id</key>
+ <value>chan_model</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>noise_voltage</key>
+ <value>noise_voltage</value>
+ </param>
+ <param>
+ <key>freq_offset</key>
+ <value>1.0/fft_len * freq_offset</value>
+ </param>
+ <param>
+ <key>epsilon</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>taps</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(615, 86)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_ofdm_rx</key>
+ <param>
+ <key>id</key>
+ <value>digital_ofdm_rx_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>packet_len_key</key>
+ <value>"rx_len"</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word1</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>sync_word2</key>
+ <value>()</value>
+ </param>
+ <param>
+ <key>header_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>payload_mod</key>
+ <value>"BPSK"</value>
+ </param>
+ <param>
+ <key>log</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(92, 307)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_uchar_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_uchar_to_float_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(332, 340)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tag_debug</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tag_debug_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>Rx Packets</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>display</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(336, 412)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_scopesink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_scopesink2_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>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <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>(504, 314)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <connection>
+ <source_block_id>blocks_vector_source_x_0</source_block_id>
+ <sink_block_id>blocks_float_to_uchar_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_tx_0</source_block_id>
+ <sink_block_id>chan_model</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_float_to_uchar_0</source_block_id>
+ <sink_block_id>digital_ofdm_tx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>digital_ofdm_rx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_ofdm_rx_0</source_block_id>
+ <sink_block_id>blocks_uchar_to_float_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_uchar_to_float_0</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>digital_ofdm_rx_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>chan_model</source_block_id>
+ <sink_block_id>blocks_tag_gate_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_tag_gate_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+</flow_graph>
diff --git a/gr-digital/examples/ofdm/rx_ofdm.grc b/gr-digital/examples/ofdm/rx_ofdm.grc
index 47e165508c..c2d080c338 100644
--- a/gr-digital/examples/ofdm/rx_ofdm.grc
+++ b/gr-digital/examples/ofdm/rx_ofdm.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Thu Feb 14 15:49:35 2013</timestamp>
+ <timestamp>Fri May 10 12:21:07 2013</timestamp>
<block>
<key>options</key>
<param>
@@ -61,10 +61,33 @@
</param>
</block>
<block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(163, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
<key>variable</key>
<param>
<key>id</key>
- <value>pilot_symbols_0</value>
+ <value>fft_len</value>
</param>
<param>
<key>_enabled</key>
@@ -72,11 +95,11 @@
</param>
<param>
<key>value</key>
- <value>((100,),)</value>
+ <value>64</value>
</param>
<param>
<key>_coordinate</key>
- <value>(762, 64)</value>
+ <value>(301, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -87,7 +110,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>pilot_carriers</value>
+ <value>length_tag_name</value>
</param>
<param>
<key>_enabled</key>
@@ -95,11 +118,11 @@
</param>
<param>
<key>value</key>
- <value>((0,),)</value>
+ <value>"frame_len"</value>
</param>
<param>
<key>_coordinate</key>
- <value>(557, 64)</value>
+ <value>(367, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -110,7 +133,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>header_formatter</value>
+ <value>payload_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -118,11 +141,11 @@
</param>
<param>
<key>value</key>
- <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
+ <value>digital.constellation_qpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(876, 64)</value>
+ <value>(648, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -133,7 +156,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>pilot_symbols</value>
+ <value>header_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -141,11 +164,34 @@
</param>
<param>
<key>value</key>
- <value>((100,),)</value>
+ <value>digital.constellation_bpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(659, 64)</value>
+ <value>(490, 0)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>header_formatter</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(811, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -168,7 +214,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(404, 64)</value>
+ <value>(598, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -176,34 +222,45 @@
</param>
</block>
<block>
- <key>analog_noise_source_x</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>analog_noise_source_x_0</value>
+ <value>pilot_carriers</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>value</key>
+ <value>((-21, -7, 7, 21,),)</value>
</param>
<param>
- <key>noise_type</key>
- <value>analog.GR_GAUSSIAN</value>
+ <key>_coordinate</key>
+ <value>(751, 64)</value>
</param>
<param>
- <key>amp</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>seed</key>
- <value>0</value>
+ <key>id</key>
+ <value>pilot_symbols</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>((1, 1, 1, -1,),)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(-1, 185)</value>
+ <value>(875, 65)</value>
</param>
<param>
<key>_rotation</key>
@@ -211,26 +268,45 @@
</param>
</block>
<block>
- <key>digital_ofdm_sync_sc_cfb</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>digital_ofdm_sync_sc_cfb_0</value>
+ <value>sync_word2</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 1, 1, -1.0, -1, 1.0, 1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 1, 1.0, 1, -1.0, -1, -1.0, -1, 1.0, -1, 1.0, -1, 1.0, 1, -1.0, 0, 1.0, 1, -1.0, 1, 1.0, -1, -1.0, 1, -1.0, -1, -1.0, 1, 1.0, 1, -1.0, 1, 1.0, -1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
- <key>cp_len</key>
- <value>fft_len/4</value>
+ <key>_coordinate</key>
+ <value>(457, 64)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable</key>
+ <param>
+ <key>id</key>
+ <value>sync_word1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(368, 178)</value>
+ <value>(313, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -238,22 +314,22 @@
</param>
</block>
<block>
- <key>analog_frequency_modulator_fc</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>analog_frequency_modulator_fc_0</value>
+ <value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>sensitivity</key>
- <value>-2.0/fft_len</value>
+ <key>value</key>
+ <value>3200000</value>
</param>
<param>
<key>_coordinate</key>
- <value>(692, 175)</value>
+ <value>(218, 64)</value>
</param>
<param>
<key>_rotation</key>
@@ -261,10 +337,10 @@
</param>
</block>
<block>
- <key>blocks_multiply_xx</key>
+ <key>blocks_tag_debug</key>
<param>
<key>id</key>
- <value>blocks_multiply_xx_0</value>
+ <value>blocks_tag_debug_0</value>
</param>
<param>
<key>_enabled</key>
@@ -272,19 +348,27 @@
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>Rx Packets</value>
</param>
<param>
<key>num_inputs</key>
- <value>2</value>
+ <value>1</value>
</param>
<param>
<key>vlen</key>
<value>1</value>
</param>
<param>
+ <key>display</key>
+ <value>True</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(885, 223)</value>
+ <value>(1101, 791)</value>
</param>
<param>
<key>_rotation</key>
@@ -292,34 +376,65 @@
</param>
</block>
<block>
- <key>blocks_delay</key>
+ <key>digital_constellation_decoder_cb</key>
<param>
<key>id</key>
- <value>blocks_delay_0</value>
+ <value>digital_constellation_decoder_cb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>constellation</key>
+ <value>payload_mod.base()</value>
</param>
<param>
- <key>delay</key>
- <value>fft_len+fft_len/4</value>
+ <key>_coordinate</key>
+ <value>(879, 799)</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>digital_ofdm_serializer_vcc</key>
<param>
- <key>vlen</key>
+ <key>id</key>
+ <value>digital_ofdm_serializer_vcc_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>occupied_carriers</key>
+ <value>occupied_carriers</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag_key</value>
+ </param>
+ <param>
+ <key>packet_len_tag_key</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>symbols_skipped</key>
<value>1</value>
</param>
<param>
+ <key>input_is_shifted</key>
+ <value>True</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(368, 253)</value>
+ <value>(653, 761)</value>
</param>
<param>
<key>_rotation</key>
@@ -327,22 +442,42 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>fft_vxx</key>
<param>
<key>id</key>
- <value>samp_rate</value>
+ <value>fft_vxx_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>3200000</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>forward</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>window</key>
+ <value></value>
+ </param>
+ <param>
+ <key>shift</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>nthreads</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(0, 91)</value>
+ <value>(214, 769)</value>
</param>
<param>
<key>_rotation</key>
@@ -350,22 +485,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>import_1</value>
+ <value>virtual_source_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>from gnuradio.digital.utils import tagged_streams</value>
+ <key>stream_id</key>
+ <value>Payload Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(163, 0)</value>
+ <value>(0, 799)</value>
</param>
<param>
<key>_rotation</key>
@@ -373,22 +508,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>sync_word</value>
+ <value>virtual_sink_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>[0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0]</value>
+ <key>stream_id</key>
+ <value>Payload Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(165, 46)</value>
+ <value>(968, 374)</value>
</param>
<param>
<key>_rotation</key>
@@ -396,22 +531,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>header_mod</value>
+ <value>virtual_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_bpsk()</value>
+ <key>stream_id</key>
+ <value>Header Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(655, 0)</value>
+ <value>(969, 305)</value>
</param>
<param>
<key>_rotation</key>
@@ -419,22 +554,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>analog_frequency_modulator_fc</key>
<param>
<key>id</key>
- <value>payload_mod</value>
+ <value>analog_frequency_modulator_fc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_qpsk()</value>
+ <key>sensitivity</key>
+ <value>-2.0/fft_len</value>
</param>
<param>
<key>_coordinate</key>
- <value>(813, 0)</value>
+ <value>(579, 134)</value>
</param>
<param>
<key>_rotation</key>
@@ -442,22 +577,30 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_ofdm_sync_sc_cfb</key>
<param>
<key>id</key>
- <value>n_sync_symbols</value>
+ <value>digital_ofdm_sync_sc_cfb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>1</value>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>cp_len</key>
+ <value>fft_len/4</value>
+ </param>
+ <param>
+ <key>use_even_carriers</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(168, 108)</value>
+ <value>(244, 137)</value>
</param>
<param>
<key>_rotation</key>
@@ -465,10 +608,10 @@
</param>
</block>
<block>
- <key>blocks_throttle</key>
+ <key>analog_noise_source_x</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>analog_noise_source_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -479,16 +622,20 @@
<value>complex</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>samp_rate</value>
+ <key>noise_type</key>
+ <value>analog.GR_GAUSSIAN</value>
</param>
<param>
- <key>vlen</key>
+ <key>amp</key>
<value>1</value>
</param>
<param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(181, 200)</value>
+ <value>(0, 220)</value>
</param>
<param>
<key>_rotation</key>
@@ -496,22 +643,34 @@
</param>
</block>
<block>
- <key>digital_constellation_decoder_cb</key>
+ <key>digital_ofdm_frame_equalizer_vcvc</key>
<param>
<key>id</key>
- <value>digital_constellation_decoder_cb_0_0</value>
+ <value>digital_ofdm_frame_equalizer_vcvc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>constellation</key>
- <value>header_mod.base()</value>
+ <key>fft_len</key>
+ <value>fft_len</value>
+ </param>
+ <param>
+ <key>equalizer</key>
+ <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols, 2).base()</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag_key</value>
+ </param>
+ <param>
+ <key>propagate_channel_state</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(854, 343)</value>
+ <value>(422, 776)</value>
</param>
<param>
<key>_rotation</key>
@@ -519,34 +678,46 @@
</param>
</block>
<block>
- <key>digital_ofdm_frame_equalizer_vcvc</key>
+ <key>digital_header_payload_demux</key>
<param>
<key>id</key>
- <value>digital_ofdm_frame_equalizer_vcvc_0_0</value>
+ <value>digital_header_payload_demux_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>fft_len</key>
+ <key>header_len</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>items_per_symbol</key>
<value>fft_len</value>
</param>
<param>
- <key>equalizer</key>
- <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols).base()</value>
+ <key>guard_interval</key>
+ <value>fft_len/4</value>
</param>
<param>
- <key>len_tag_key</key>
+ <key>length_tag_key</key>
<value>length_tag_name</value>
</param>
<param>
- <key>propagate_channel_state</key>
+ <key>trigger_tag_key</key>
+ <value>""</value>
+ </param>
+ <param>
+ <key>output_symbols</key>
<value>True</value>
</param>
<param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(421, 320)</value>
+ <value>(678, 298)</value>
</param>
<param>
<key>_rotation</key>
@@ -569,73 +740,73 @@
</param>
<param>
<key>_coordinate</key>
- <value>(651, 466)</value>
+ <value>(915, 495)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>90</value>
</param>
</block>
<block>
- <key>fft_vxx</key>
+ <key>digital_ofdm_serializer_vcc</key>
<param>
<key>id</key>
- <value>fft_vxx_0</value>
+ <value>digital_ofdm_serializer_vcc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>fft_len</key>
+ <value>fft_len</value>
</param>
<param>
- <key>fft_size</key>
- <value>fft_len</value>
+ <key>occupied_carriers</key>
+ <value>occupied_carriers</value>
</param>
<param>
- <key>forward</key>
- <value>True</value>
+ <key>len_tag_key</key>
+ <value>length_tag_name</value>
</param>
<param>
- <key>window</key>
- <value></value>
+ <key>packet_len_tag_key</key>
+ <value>""</value>
</param>
<param>
- <key>shift</key>
- <value>True</value>
+ <key>symbols_skipped</key>
+ <value>0</value>
</param>
<param>
- <key>nthreads</key>
- <value>1</value>
+ <key>input_is_shifted</key>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(53, 429)</value>
+ <value>(245, 643)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_constellation_decoder_cb</key>
<param>
<key>id</key>
- <value>fft_len</value>
+ <value>digital_constellation_decoder_cb_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>64</value>
+ <key>constellation</key>
+ <value>header_mod.base()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(301, -1)</value>
+ <value>(461, 681)</value>
</param>
<param>
<key>_rotation</key>
@@ -643,22 +814,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>length_tag_name</value>
+ <value>virtual_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>"frame_len"</value>
+ <key>stream_id</key>
+ <value>Header Stream</value>
</param>
<param>
<key>_coordinate</key>
- <value>(367, -1)</value>
+ <value>(0, 543)</value>
</param>
<param>
<key>_rotation</key>
@@ -666,49 +837,42 @@
</param>
</block>
<block>
- <key>digital_constellation_decoder_cb</key>
+ <key>digital_ofdm_chanest_vcvc</key>
<param>
<key>id</key>
- <value>digital_constellation_decoder_cb_0</value>
+ <value>digital_ofdm_chanest_vcvc_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>constellation</key>
- <value>payload_mod.base()</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(718, 635)</value>
+ <key>sync_symbol1</key>
+ <value>sync_word1</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>sync_symbol2</key>
+ <value>sync_word2</value>
</param>
- </block>
- <block>
- <key>blocks_null_sink</key>
<param>
- <key>id</key>
- <value>blocks_null_sink_0</value>
+ <key>n_data_symbols</key>
+ <value>2</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>eq_noise_red_len</key>
+ <value>0</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
+ <key>max_carr_offset</key>
+ <value>-1</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>force_one_symbol</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(938, 638)</value>
+ <value>(427, 505)</value>
</param>
<param>
<key>_rotation</key>
@@ -719,7 +883,7 @@
<key>digital_ofdm_frame_equalizer_vcvc</key>
<param>
<key>id</key>
- <value>digital_ofdm_frame_equalizer_vcvc_0</value>
+ <value>digital_ofdm_frame_equalizer_vcvc_0_0</value>
</param>
<param>
<key>_enabled</key>
@@ -731,19 +895,19 @@
</param>
<param>
<key>equalizer</key>
- <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols, n_sync_symbols).base()</value>
+ <value>digital.ofdm_equalizer_simpledfe(fft_len, header_mod.base(), occupied_carriers, pilot_carriers, pilot_symbols).base()</value>
</param>
<param>
<key>len_tag_key</key>
- <value>length_tag_key</value>
+ <value>length_tag_name</value>
</param>
<param>
<key>propagate_channel_state</key>
- <value>False</value>
+ <value>True</value>
</param>
<param>
<key>_coordinate</key>
- <value>(265, 612)</value>
+ <value>(704, 520)</value>
</param>
<param>
<key>_rotation</key>
@@ -751,10 +915,10 @@
</param>
</block>
<block>
- <key>fft_vxx</key>
+ <key>blocks_multiply_xx</key>
<param>
<key>id</key>
- <value>fft_vxx_0_0</value>
+ <value>blocks_multiply_xx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -765,28 +929,47 @@
<value>complex</value>
</param>
<param>
- <key>fft_size</key>
- <value>fft_len</value>
+ <key>num_inputs</key>
+ <value>2</value>
</param>
<param>
- <key>forward</key>
- <value>True</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>window</key>
- <value></value>
+ <key>_coordinate</key>
+ <value>(798, 137)</value>
</param>
<param>
- <key>shift</key>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_throttle</key>
+ <param>
+ <key>id</key>
+ <value>blocks_throttle_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>nthreads</key>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(57, 605)</value>
+ <value>(186, 235)</value>
</param>
<param>
<key>_rotation</key>
@@ -794,128 +977,662 @@
</param>
</block>
<block>
- <key>digital_ofdm_serializer_vcc</key>
+ <key>uhd_usrp_source</key>
<param>
<key>id</key>
- <value>digital_ofdm_serializer_vcc_0</value>
+ <value>uhd_usrp_source_0</value>
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>False</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>type</key>
+ <value>fc32</value>
</param>
<param>
- <key>occupied_carriers</key>
- <value>occupied_carriers</value>
+ <key>otw</key>
+ <value></value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_name</value>
+ <key>stream_args</key>
+ <value></value>
</param>
<param>
- <key>packet_len_tag_key</key>
- <value>""</value>
+ <key>dev_addr</key>
+ <value></value>
</param>
<param>
- <key>symbols_skipped</key>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>center_freq0</key>
<value>0</value>
</param>
<param>
- <key>input_is_shifted</key>
- <value>True</value>
+ <key>gain0</key>
+ <value>0</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(649, 305)</value>
+ <key>ant0</key>
+ <value></value>
</param>
<param>
- <key>_rotation</key>
+ <key>bw0</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>digital_ofdm_serializer_vcc</key>
<param>
- <key>id</key>
- <value>digital_ofdm_serializer_vcc_1</value>
+ <key>center_freq1</key>
+ <value>0</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>gain1</key>
+ <value>0</value>
</param>
<param>
- <key>fft_len</key>
- <value>fft_len</value>
+ <key>ant1</key>
+ <value></value>
</param>
<param>
- <key>occupied_carriers</key>
- <value>occupied_carriers</value>
+ <key>bw1</key>
+ <value>0</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_key</value>
+ <key>center_freq2</key>
+ <value>0</value>
</param>
<param>
- <key>packet_len_tag_key</key>
- <value>""</value>
+ <key>gain2</key>
+ <value>0</value>
</param>
<param>
- <key>symbols_skipped</key>
- <value>1</value>
+ <key>ant2</key>
+ <value></value>
</param>
<param>
- <key>input_is_shifted</key>
- <value>True</value>
+ <key>bw2</key>
+ <value>0</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(496, 597)</value>
+ <key>center_freq3</key>
+ <value>0</value>
</param>
<param>
- <key>_rotation</key>
+ <key>gain3</key>
<value>0</value>
</param>
- </block>
- <block>
- <key>digital_ofdm_chanest_vcvc</key>
<param>
- <key>id</key>
- <value>digital_ofdm_chanest_vcvc_0</value>
+ <key>ant3</key>
+ <value></value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>bw3</key>
+ <value>0</value>
</param>
<param>
- <key>sync_symbol1</key>
- <value>sync_word</value>
+ <key>center_freq4</key>
+ <value>0</value>
</param>
<param>
- <key>sync_symbol2</key>
- <value>()</value>
+ <key>gain4</key>
+ <value>0</value>
</param>
<param>
- <key>n_data_symbols</key>
- <value>n_sync_symbols</value>
+ <key>ant4</key>
+ <value></value>
</param>
<param>
- <key>eq_noise_red_len</key>
+ <key>bw4</key>
<value>0</value>
</param>
<param>
- <key>max_carr_offset</key>
- <value>-1</value>
+ <key>center_freq5</key>
+ <value>0</value>
</param>
<param>
- <key>force_one_symbol</key>
- <value>False</value>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(52, 305)</value>
+ <value>(0, 135)</value>
</param>
<param>
<key>_rotation</key>
@@ -923,37 +1640,56 @@
</param>
</block>
<block>
- <key>digital_header_payload_demux</key>
+ <key>fft_vxx</key>
<param>
<key>id</key>
- <value>digital_header_payload_demux_0</value>
+ <value>fft_vxx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>header_len</key>
- <value>2</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>items_per_symbol</key>
+ <key>fft_size</key>
<value>fft_len</value>
</param>
<param>
- <key>guard_interval</key>
- <value>fft_len/4</value>
+ <key>forward</key>
+ <value>True</value>
</param>
<param>
- <key>length_tag_key</key>
- <value>length_tag_name</value>
+ <key>window</key>
+ <value></value>
</param>
<param>
- <key>trigger_tag_key</key>
- <value>""</value>
+ <key>shift</key>
+ <value>True</value>
</param>
<param>
- <key>output_symbols</key>
+ <key>nthreads</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(213, 513)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_delay</key>
+ <param>
+ <key>id</key>
+ <value>blocks_delay_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
@@ -961,131 +1697,167 @@
<value>complex</value>
</param>
<param>
+ <key>delay</key>
+ <value>fft_len+fft_len/4</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(340, 461)</value>
+ <value>(398, 235)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<connection>
+ <source_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</source_block_id>
+ <sink_block_id>digital_ofdm_serializer_vcc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0</source_block_id>
+ <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
<source_block_id>fft_vxx_0</source_block_id>
<sink_block_id>digital_ofdm_chanest_vcvc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>analog_frequency_modulator_fc_0</source_block_id>
- <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+ <source_block_id>digital_ofdm_chanest_vcvc_0</source_block_id>
+ <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
- <sink_block_id>analog_frequency_modulator_fc_0</sink_block_id>
+ <source_block_id>digital_packet_headerparser_b_0</source_block_id>
+ <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_key>header_data</source_key>
+ <sink_key>header_data</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_constellation_decoder_cb_0_0</source_block_id>
+ <sink_block_id>digital_packet_headerparser_b_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>blocks_throttle_0</sink_block_id>
+ <source_block_id>digital_ofdm_serializer_vcc_0</source_block_id>
+ <sink_block_id>digital_constellation_decoder_cb_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>digital_ofdm_sync_sc_cfb_0</sink_block_id>
+ <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
+ <sink_block_id>blocks_tag_debug_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>blocks_delay_0</sink_block_id>
+ <source_block_id>fft_vxx_0_0</source_block_id>
+ <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_delay_0</source_block_id>
- <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+ <source_block_id>digital_ofdm_frame_equalizer_vcvc_0</source_block_id>
+ <sink_block_id>digital_ofdm_serializer_vcc_1</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_constellation_decoder_cb_0_0</source_block_id>
- <sink_block_id>digital_packet_headerparser_b_0</sink_block_id>
+ <source_block_id>virtual_source_0_0</source_block_id>
+ <sink_block_id>fft_vxx_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_serializer_vcc_0</source_block_id>
- <sink_block_id>digital_constellation_decoder_cb_0_0</sink_block_id>
+ <source_block_id>digital_ofdm_serializer_vcc_1</source_block_id>
+ <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
- <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_block_id>digital_header_payload_demux_0</source_block_id>
+ <sink_block_id>virtual_sink_0_0</sink_block_id>
<source_key>1</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_chanest_vcvc_0</source_block_id>
- <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</sink_block_id>
+ <source_block_id>digital_header_payload_demux_0</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_frame_equalizer_vcvc_0_0</source_block_id>
- <sink_block_id>digital_ofdm_serializer_vcc_0</sink_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>digital_ofdm_sync_sc_cfb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_packet_headerparser_b_0</source_block_id>
- <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_block_id>uhd_usrp_source_0</source_block_id>
+ <sink_block_id>digital_ofdm_sync_sc_cfb_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>2</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_header_payload_demux_0</source_block_id>
- <sink_block_id>fft_vxx_0</sink_block_id>
+ <source_block_id>analog_noise_source_x_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_header_payload_demux_0</source_block_id>
- <sink_block_id>fft_vxx_0_0</sink_block_id>
- <source_key>1</source_key>
+ <source_block_id>analog_frequency_modulator_fc_0</source_block_id>
+ <sink_block_id>blocks_multiply_xx_0</sink_block_id>
+ <source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_multiply_xx_0</source_block_id>
- <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
+ <sink_block_id>analog_frequency_modulator_fc_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_constellation_decoder_cb_0</source_block_id>
- <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <source_block_id>digital_ofdm_sync_sc_cfb_0</source_block_id>
+ <sink_block_id>digital_header_payload_demux_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_multiply_xx_0</source_block_id>
+ <sink_block_id>digital_header_payload_demux_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_frame_equalizer_vcvc_0</source_block_id>
- <sink_block_id>digital_ofdm_serializer_vcc_1</sink_block_id>
+ <source_block_id>blocks_delay_0</source_block_id>
+ <sink_block_id>blocks_multiply_xx_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_serializer_vcc_1</source_block_id>
- <sink_block_id>digital_constellation_decoder_cb_0</sink_block_id>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>blocks_delay_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>fft_vxx_0_0</source_block_id>
- <sink_block_id>digital_ofdm_frame_equalizer_vcvc_0</sink_block_id>
+ <source_block_id>uhd_usrp_source_0</source_block_id>
+ <sink_block_id>blocks_delay_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-digital/examples/ofdm/tx_ofdm.grc b/gr-digital/examples/ofdm/tx_ofdm.grc
index a2deb05f9f..e7fd3b36cb 100644
--- a/gr-digital/examples/ofdm/tx_ofdm.grc
+++ b/gr-digital/examples/ofdm/tx_ofdm.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Tue Feb 5 14:47:32 2013</timestamp>
+ <timestamp>Fri May 10 12:24:21 2013</timestamp>
<block>
<key>options</key>
<param>
@@ -29,7 +29,7 @@
</param>
<param>
<key>generate_options</key>
- <value>no_gui</value>
+ <value>wx_gui</value>
</param>
<param>
<key>category</key>
@@ -61,22 +61,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>import_1</value>
+ <value>virtual_source_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>from gnuradio.digital.utils import tagged_streams</value>
+ <key>stream_id</key>
+ <value>Payload Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(164, 45)</value>
+ <value>(0, 458)</value>
</param>
<param>
<key>_rotation</key>
@@ -84,22 +84,80 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
+ <value>virtual_sink_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>stream_id</key>
+ <value>Frame Symbols</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(745, 441)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_mux</key>
+ <param>
+ <key>id</key>
+ <value>blocks_tagged_stream_mux_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>ninputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
<value>length_tag_name</value>
</param>
<param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(510, 428)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>virtual_sink</key>
+ <param>
+ <key>id</key>
+ <value>virtual_sink_0_0</value>
+ </param>
+ <param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>"packet_len"</value>
+ <key>stream_id</key>
+ <value>Payload Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(399, 0)</value>
+ <value>(746, 312)</value>
</param>
<param>
<key>_rotation</key>
@@ -107,22 +165,38 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>pilot_symbols_0</value>
+ <value>digital_chunks_to_symbols_xx_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((100,),)</value>
+ <key>in_type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>header_mod.points()</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(735, 63)</value>
+ <value>(195, 375)</value>
</param>
<param>
<key>_rotation</key>
@@ -130,22 +204,38 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_chunks_to_symbols_xx</key>
<param>
<key>id</key>
- <value>occupied_carriers</value>
+ <value>digital_chunks_to_symbols_xx_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>(range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)</value>
+ <key>in_type</key>
+ <value>byte</value>
+ </param>
+ <param>
+ <key>out_type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>symbol_table</key>
+ <value>payload_mod.points()</value>
+ </param>
+ <param>
+ <key>dimension</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>num_ports</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(377, 63)</value>
+ <value>(195, 450)</value>
</param>
<param>
<key>_rotation</key>
@@ -153,22 +243,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>pilot_symbols</value>
+ <value>virtual_source_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((100,),)</value>
+ <key>stream_id</key>
+ <value>Header Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(632, 63)</value>
+ <value>(0, 384)</value>
</param>
<param>
<key>_rotation</key>
@@ -176,22 +266,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_packet_headergenerator_bb</key>
<param>
<key>id</key>
- <value>pilot_carriers</value>
+ <value>digital_packet_headergenerator_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>((0,),)</value>
+ <key>header_formatter</key>
+ <value>header_formatter.formatter()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(530, 63)</value>
+ <value>(514, 231)</value>
</param>
<param>
<key>_rotation</key>
@@ -199,22 +289,34 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>blocks_repack_bits_bb</key>
<param>
<key>id</key>
- <value>fft_len</value>
+ <value>blocks_repack_bits_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>64</value>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>l</key>
+ <value>payload_mod.bits_per_symbol()</value>
+ </param>
+ <param>
+ <key>len_tag_key</key>
+ <value>length_tag_name</value>
+ </param>
+ <param>
+ <key>align_output</key>
+ <value>False</value>
</param>
<param>
<key>_coordinate</key>
- <value>(311, 63)</value>
+ <value>(522, 289)</value>
</param>
<param>
<key>_rotation</key>
@@ -222,22 +324,22 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>header_mod</value>
+ <value>header_bits</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_bpsk()</value>
+ <key>stream_id</key>
+ <value>Header Bits</value>
</param>
<param>
<key>_coordinate</key>
- <value>(620, 0)</value>
+ <value>(748, 231)</value>
</param>
<param>
<key>_rotation</key>
@@ -245,22 +347,26 @@
</param>
</block>
<block>
- <key>variable</key>
+ <key>digital_crc32_bb</key>
<param>
<key>id</key>
- <value>payload_mod</value>
+ <value>digital_crc32_bb_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>digital.constellation_qpsk()</value>
+ <key>check</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
+ <value>length_tag_name</value>
</param>
<param>
<key>_coordinate</key>
- <value>(783, 0)</value>
+ <value>(242, 223)</value>
</param>
<param>
<key>_rotation</key>
@@ -268,10 +374,10 @@
</param>
</block>
<block>
- <key>blocks_throttle</key>
+ <key>blocks_vector_source_x</key>
<param>
<key>id</key>
- <value>blocks_throttle_0</value>
+ <value>blocks_vector_source_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -282,8 +388,16 @@
<value>byte</value>
</param>
<param>
- <key>samples_per_second</key>
- <value>bit_rate/8</value>
+ <key>vector</key>
+ <value>range(packet_len)</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((packet_len,), (0,), length_tag_name)</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
</param>
<param>
<key>vlen</key>
@@ -291,7 +405,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(234, 167)</value>
+ <value>(0, 216)</value>
</param>
<param>
<key>_rotation</key>
@@ -299,22 +413,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import_0</value>
+ <value>fft_len</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import numpy</value>
+ <key>value</key>
+ <value>64</value>
</param>
<param>
<key>_coordinate</key>
- <value>(164, 0)</value>
+ <value>(181, -1)</value>
</param>
<param>
<key>_rotation</key>
@@ -322,22 +436,22 @@
</param>
</block>
<block>
- <key>import</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>import_0_0</value>
+ <value>length_tag_name</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>import</key>
- <value>import random</value>
+ <key>value</key>
+ <value>"packet_len"</value>
</param>
<param>
<key>_coordinate</key>
- <value>(-1, 90)</value>
+ <value>(352, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -348,7 +462,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>sync_word</value>
+ <value>packet_len</value>
</param>
<param>
<key>_enabled</key>
@@ -356,11 +470,11 @@
</param>
<param>
<key>value</key>
- <value>[0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0]</value>
+ <value>96</value>
</param>
<param>
<key>_coordinate</key>
- <value>(95, 90)</value>
+ <value>(476, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -371,7 +485,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>rolloff</value>
+ <value>header_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -379,11 +493,11 @@
</param>
<param>
<key>value</key>
- <value>0</value>
+ <value>digital.constellation_bpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(234, 91)</value>
+ <value>(567, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -394,7 +508,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>header_formatter</value>
+ <value>payload_mod</value>
</param>
<param>
<key>_enabled</key>
@@ -402,11 +516,11 @@
</param>
<param>
<key>value</key>
- <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
+ <value>digital.constellation_qpsk()</value>
</param>
<param>
<key>_coordinate</key>
- <value>(849, 63)</value>
+ <value>(734, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -414,38 +528,57 @@
</param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>blocks_vector_source_x_1</value>
+ <value>rolloff</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>byte</value>
+ <key>value</key>
+ <value>0</value>
</param>
<param>
- <key>vector</key>
- <value>range(packet_len)</value>
+ <key>_coordinate</key>
+ <value>(898, -1)</value>
</param>
<param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((packet_len,), (0,), length_tag_name)</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>blocks_tagged_stream_mux</key>
<param>
- <key>repeat</key>
+ <key>id</key>
+ <value>blocks_tagged_stream_mux_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
<value>True</value>
</param>
<param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>ninputs</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>lengthtagname</key>
+ <value>length_tag_name</value>
+ </param>
+ <param>
<key>vlen</key>
- <value>1</value>
+ <value>fft_len</value>
</param>
<param>
<key>_coordinate</key>
- <value>(-1, 152)</value>
+ <value>(445, 600)</value>
</param>
<param>
<key>_rotation</key>
@@ -456,7 +589,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>packet_len</value>
+ <value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
@@ -464,11 +597,11 @@
</param>
<param>
<key>value</key>
- <value>96</value>
+ <value>100000</value>
</param>
<param>
<key>_coordinate</key>
- <value>(528, 0)</value>
+ <value>(255, 0)</value>
</param>
<param>
<key>_rotation</key>
@@ -476,22 +609,38 @@
</param>
</block>
<block>
- <key>digital_packet_headergenerator_bb</key>
+ <key>blocks_vector_source_x</key>
<param>
<key>id</key>
- <value>digital_packet_headergenerator_bb_0</value>
+ <value>blocks_vector_source_x_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>header_formatter</key>
- <value>header_formatter.formatter()</value>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>vector</key>
+ <value>tuple(numpy.array(sync_word1) * numpy.sqrt(2)) + sync_word2</value>
+ </param>
+ <param>
+ <key>tags</key>
+ <value>tagged_streams.make_lengthtags((2,), (0,), length_tag_name)</value>
+ </param>
+ <param>
+ <key>repeat</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>fft_len</value>
</param>
<param>
<key>_coordinate</key>
- <value>(761, 167)</value>
+ <value>(1, 532)</value>
</param>
<param>
<key>_rotation</key>
@@ -502,7 +651,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>bit_rate</value>
+ <value>sync_word2</value>
</param>
<param>
<key>_enabled</key>
@@ -510,11 +659,11 @@
</param>
<param>
<key>value</key>
- <value>3200000</value>
+ <value>(0, 0, 0, 0, 0, 1, 1, -1.0, -1, 1.0, 1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 1, 1.0, 1, -1.0, -1, -1.0, -1, 1.0, -1, 1.0, -1, 1.0, 1, -1.0, 0, 1.0, 1, -1.0, 1, 1.0, -1, -1.0, 1, -1.0, -1, -1.0, 1, 1.0, 1, -1.0, 1, 1.0, -1, 1.0, -1, -1.0, -1, 1.0, 1, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(311, 0)</value>
+ <value>(496, 128)</value>
</param>
<param>
<key>_rotation</key>
@@ -522,151 +671,187 @@
</param>
</block>
<block>
- <key>blocks_repack_bits_bb</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>blocks_repack_bits_bb_0</value>
+ <value>sync_word1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>k</key>
- <value>8</value>
+ <key>value</key>
+ <value>(0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, -1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, 1.0, 0, -1.0, 0, 1.0, 0, -1.0, 0, 0, 0, 0, 0, 0)</value>
</param>
<param>
- <key>l</key>
- <value>payload_mod.bits_per_symbol()</value>
+ <key>_coordinate</key>
+ <value>(352, 128)</value>
</param>
<param>
- <key>len_tag_key</key>
- <value>length_tag_name</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>align_output</key>
- <value>False</value>
+ <key>id</key>
+ <value>occupied_carriers</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>(range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(516, 228)</value>
+ <value>(329, 64)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_chunks_to_symbols_xx</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>digital_chunks_to_symbols_xx_0_0</value>
+ <value>pilot_carriers</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>in_type</key>
- <value>byte</value>
+ <key>value</key>
+ <value>((-21, -7, 7, 21,),)</value>
</param>
<param>
- <key>out_type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(480, 64)</value>
</param>
<param>
- <key>symbol_table</key>
- <value>payload_mod.points()</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable</key>
<param>
- <key>dimension</key>
- <value>1</value>
+ <key>id</key>
+ <value>header_formatter</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>digital.packet_header_ofdm(occupied_carriers, 1, length_tag_name)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(279, 243)</value>
+ <value>(708, 64)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_chunks_to_symbols_xx</key>
+ <key>variable</key>
<param>
<key>id</key>
- <value>digital_chunks_to_symbols_xx_0</value>
+ <value>pilot_symbols</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>in_type</key>
- <value>byte</value>
+ <key>value</key>
+ <value>((1, 1, 1, -1,),)</value>
</param>
<param>
- <key>out_type</key>
- <value>complex</value>
+ <key>_coordinate</key>
+ <value>(601, 64)</value>
</param>
<param>
- <key>symbol_table</key>
- <value>header_mod.points()</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>import</key>
<param>
- <key>dimension</key>
- <value>1</value>
+ <key>id</key>
+ <value>import_0</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import numpy</value>
</param>
<param>
<key>_coordinate</key>
- <value>(319, 305)</value>
+ <value>(237, 93)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>blocks_tagged_stream_mux</key>
+ <key>import</key>
<param>
<key>id</key>
- <value>blocks_tagged_stream_mux_0</value>
+ <value>import_1</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>import</key>
+ <value>from gnuradio.digital.utils import tagged_streams</value>
</param>
<param>
- <key>ninputs</key>
- <value>2</value>
+ <key>_coordinate</key>
+ <value>(99, 93)</value>
</param>
<param>
- <key>lengthtagname</key>
- <value>length_tag_name</value>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>import</key>
+ <param>
+ <key>id</key>
+ <value>import_0_0</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>import</key>
+ <value>import random</value>
</param>
<param>
<key>_coordinate</key>
- <value>(44, 254)</value>
+ <value>(3, 94)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
@@ -696,12 +881,16 @@
<value>pilot_symbols</value>
</param>
<param>
+ <key>sync_words</key>
+ <value>()</value>
+ </param>
+ <param>
<key>len_tag_key</key>
<value>length_tag_name</value>
</param>
<param>
<key>_coordinate</key>
- <value>(56, 453)</value>
+ <value>(205, 616)</value>
</param>
<param>
<key>_rotation</key>
@@ -709,38 +898,22 @@
</param>
</block>
<block>
- <key>blocks_vector_source_x</key>
+ <key>virtual_source</key>
<param>
<key>id</key>
- <value>sync_word_source</value>
+ <value>virtual_source_0_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>vector</key>
- <value>numpy.array(sync_word) * numpy.sqrt(2)</value>
- </param>
- <param>
- <key>tags</key>
- <value>tagged_streams.make_lengthtags((len(sync_word)/fft_len,), (0,), length_tag_name)</value>
- </param>
- <param>
- <key>repeat</key>
- <value>True</value>
- </param>
- <param>
- <key>vlen</key>
- <value>fft_len</value>
+ <key>stream_id</key>
+ <value>Frame Symbols</value>
</param>
<param>
<key>_coordinate</key>
- <value>(56, 356)</value>
+ <value>(1, 654)</value>
</param>
<param>
<key>_rotation</key>
@@ -748,10 +921,10 @@
</param>
</block>
<block>
- <key>blocks_tagged_stream_mux</key>
+ <key>fft_vxx</key>
<param>
<key>id</key>
- <value>blocks_tagged_stream_mux_1</value>
+ <value>fft_vxx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -762,20 +935,28 @@
<value>complex</value>
</param>
<param>
- <key>ninputs</key>
- <value>2</value>
+ <key>fft_size</key>
+ <value>fft_len</value>
</param>
<param>
- <key>lengthtagname</key>
- <value>length_tag_name</value>
+ <key>forward</key>
+ <value>False</value>
</param>
<param>
- <key>vlen</key>
- <value>fft_len</value>
+ <key>window</key>
+ <value></value>
+ </param>
+ <param>
+ <key>shift</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>nthreads</key>
+ <value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(374, 382)</value>
+ <value>(671, 583)</value>
</param>
<param>
<key>_rotation</key>
@@ -783,46 +964,49 @@
</param>
</block>
<block>
- <key>fft_vxx</key>
+ <key>virtual_sink</key>
<param>
<key>id</key>
- <value>fft_vxx_0</value>
+ <value>virtual_sink_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>type</key>
- <value>complex</value>
+ <key>stream_id</key>
+ <value>Time Domain</value>
</param>
<param>
- <key>fft_size</key>
- <value>fft_len</value>
+ <key>_coordinate</key>
+ <value>(878, 613)</value>
</param>
<param>
- <key>forward</key>
- <value>False</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>virtual_source</key>
<param>
- <key>window</key>
- <value></value>
+ <key>id</key>
+ <value>virtual_source_0_0_0_0</value>
</param>
<param>
- <key>shift</key>
- <value>False</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>nthreads</key>
- <value>1</value>
+ <key>stream_id</key>
+ <value>Time Domain</value>
</param>
<param>
<key>_coordinate</key>
- <value>(765, 498)</value>
+ <value>(3, 788)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
@@ -853,18 +1037,18 @@
</param>
<param>
<key>_coordinate</key>
- <value>(488, 505)</value>
+ <value>(204, 765)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>wxgui_fftsink2</key>
+ <key>uhd_usrp_sink</key>
<param>
<key>id</key>
- <value>wxgui_fftsink2_0</value>
+ <value>uhd_usrp_sink_0</value>
</param>
<param>
<key>_enabled</key>
@@ -872,90 +1056,662 @@
</param>
<param>
<key>type</key>
- <value>complex</value>
+ <value>fc32</value>
</param>
<param>
- <key>title</key>
- <value>FFT Plot</value>
+ <key>otw</key>
+ <value></value>
+ </param>
+ <param>
+ <key>stream_args</key>
+ <value></value>
+ </param>
+ <param>
+ <key>dev_addr</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sync</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_rate</key>
+ <value>0.0</value>
+ </param>
+ <param>
+ <key>num_mboards</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>clock_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec0</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec1</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec2</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec3</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec4</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec5</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>clock_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>time_source7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>sd_spec7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>nchan</key>
+ <value>1</value>
</param>
<param>
<key>samp_rate</key>
- <value>1.0</value>
+ <value>samp_rate</value>
</param>
<param>
- <key>baseband_freq</key>
+ <key>center_freq0</key>
<value>0</value>
</param>
<param>
- <key>y_per_div</key>
- <value>10</value>
+ <key>gain0</key>
+ <value>0</value>
</param>
<param>
- <key>y_divs</key>
- <value>10</value>
+ <key>ant0</key>
+ <value></value>
</param>
<param>
- <key>ref_level</key>
- <value>50</value>
+ <key>bw0</key>
+ <value>0</value>
</param>
<param>
- <key>ref_scale</key>
- <value>2.0</value>
+ <key>center_freq1</key>
+ <value>0</value>
</param>
<param>
- <key>fft_size</key>
- <value>1024</value>
+ <key>gain1</key>
+ <value>0</value>
</param>
<param>
- <key>fft_rate</key>
- <value>15</value>
+ <key>ant1</key>
+ <value></value>
</param>
<param>
- <key>peak_hold</key>
- <value>False</value>
+ <key>bw1</key>
+ <value>0</value>
</param>
<param>
- <key>average</key>
- <value>False</value>
+ <key>center_freq2</key>
+ <value>0</value>
</param>
<param>
- <key>avg_alpha</key>
+ <key>gain2</key>
<value>0</value>
</param>
<param>
- <key>win</key>
- <value>None</value>
+ <key>ant2</key>
+ <value></value>
</param>
<param>
- <key>win_size</key>
+ <key>bw2</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant3</key>
<value></value>
</param>
<param>
- <key>grid_pos</key>
+ <key>bw3</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant4</key>
<value></value>
</param>
<param>
- <key>notebook</key>
+ <key>bw4</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant5</key>
<value></value>
</param>
<param>
- <key>freqvar</key>
- <value>None</value>
+ <key>bw5</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant6</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw6</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant7</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw7</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant8</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw8</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant9</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw9</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant10</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw10</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant11</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw11</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant12</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw12</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant13</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw13</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant14</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw14</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant15</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw15</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant16</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw16</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant17</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw17</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant18</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw18</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant19</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw19</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant20</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw20</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant21</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw21</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant22</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw22</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant23</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw23</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant24</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw24</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant25</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw25</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant26</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw26</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant27</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw27</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant28</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw28</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant29</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw29</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant30</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw30</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>center_freq31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>gain31</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ant31</key>
+ <value></value>
+ </param>
+ <param>
+ <key>bw31</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(291, 460)</value>
+ <value>(679, 711)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>blocks_null_sink</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>blocks_null_sink_0</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
@@ -966,39 +1722,91 @@
<value>complex</value>
</param>
<param>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
<key>vlen</key>
<value>1</value>
</param>
<param>
<key>_coordinate</key>
- <value>(438, 633)</value>
+ <value>(680, 788)</value>
</param>
<param>
<key>_rotation</key>
- <value>180</value>
+ <value>0</value>
</param>
</block>
<block>
- <key>digital_crc32_bb</key>
+ <key>wxgui_scopesink2</key>
<param>
<key>id</key>
- <value>digital_crc32_bb_0</value>
+ <value>wxgui_scopesink2_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>check</key>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>Scope Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>v_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>v_offset</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>t_scale</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ac_couple</key>
<value>False</value>
</param>
<param>
- <key>lengthtagname</key>
- <value>length_tag_name</value>
+ <key>xy_mode</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>num_inputs</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>trig_mode</key>
+ <value>wxgui.TRIG_MODE_AUTO</value>
+ </param>
+ <param>
+ <key>y_axis_label</key>
+ <value>Counts</value>
</param>
<param>
<key>_coordinate</key>
- <value>(472, 159)</value>
+ <value>(862, 765)</value>
</param>
<param>
<key>_rotation</key>
@@ -1006,10 +1814,10 @@
</param>
</block>
<block>
- <key>blocks_tag_debug</key>
+ <key>blocks_multiply_const_vxx</key>
<param>
<key>id</key>
- <value>blocks_tag_debug_0</value>
+ <value>blocks_multiply_const_vxx_0</value>
</param>
<param>
<key>_enabled</key>
@@ -1017,27 +1825,110 @@
</param>
<param>
<key>type</key>
- <value>byte</value>
+ <value>complex</value>
</param>
<param>
- <key>name</key>
- <value>tdb</value>
+ <key>const</key>
+ <value>0.05</value>
</param>
<param>
- <key>num_inputs</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>_coordinate</key>
+ <value>(487, 788)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>wxgui_fftsink2</key>
+ <param>
+ <key>id</key>
+ <value>wxgui_fftsink2_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>complex</value>
+ </param>
+ <param>
+ <key>title</key>
+ <value>FFT Plot</value>
+ </param>
+ <param>
+ <key>samp_rate</key>
+ <value>samp_rate</value>
+ </param>
+ <param>
+ <key>baseband_freq</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>y_per_div</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>y_divs</key>
+ <value>10</value>
+ </param>
+ <param>
+ <key>ref_level</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>ref_scale</key>
+ <value>2.0</value>
+ </param>
+ <param>
+ <key>fft_size</key>
+ <value>1024</value>
+ </param>
+ <param>
+ <key>fft_rate</key>
+ <value>15</value>
</param>
<param>
- <key>display</key>
+ <key>peak_hold</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>average</key>
<value>False</value>
</param>
<param>
+ <key>avg_alpha</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>win</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>win_size</key>
+ <value></value>
+ </param>
+ <param>
+ <key>grid_pos</key>
+ <value></value>
+ </param>
+ <param>
+ <key>notebook</key>
+ <value></value>
+ </param>
+ <param>
+ <key>freqvar</key>
+ <value>None</value>
+ </param>
+ <param>
<key>_coordinate</key>
- <value>(819, 232)</value>
+ <value>(680, 832)</value>
</param>
<param>
<key>_rotation</key>
@@ -1045,56 +1936,50 @@
</param>
</block>
<connection>
- <source_block_id>blocks_vector_source_x_1</source_block_id>
- <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_block_id>blocks_tagged_stream_mux_0</source_block_id>
+ <sink_block_id>virtual_sink_0_0_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_throttle_0</source_block_id>
- <sink_block_id>digital_crc32_bb_0</sink_block_id>
+ <source_block_id>virtual_source_0_0</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>digital_crc32_bb_0</source_block_id>
- <sink_block_id>digital_packet_headergenerator_bb_0</sink_block_id>
+ <source_block_id>virtual_source_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>blocks_tagged_stream_mux_0</source_block_id>
- <sink_block_id>digital_ofdm_carrier_allocator_cvc_0</sink_block_id>
+ <source_block_id>digital_crc32_bb_0</source_block_id>
+ <sink_block_id>digital_packet_headergenerator_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_carrier_allocator_cvc_0</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
- <source_key>0</source_key>
- <sink_key>1</sink_key>
- </connection>
- <connection>
- <source_block_id>sync_word_source</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
+ <source_block_id>digital_crc32_bb_0</source_block_id>
+ <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>digital_packet_headergenerator_bb_0</source_block_id>
- <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id>
+ <sink_block_id>header_bits</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>blocks_repack_bits_bb_0</source_block_id>
- <sink_block_id>digital_chunks_to_symbols_xx_0_0</sink_block_id>
+ <sink_block_id>virtual_sink_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</source_block_id>
- <sink_block_id>blocks_tagged_stream_mux_0</sink_block_id>
+ <source_block_id>blocks_vector_source_x_0</source_block_id>
+ <sink_block_id>digital_crc32_bb_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
@@ -1105,38 +1990,74 @@
<sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>digital_crc32_bb_0</source_block_id>
- <sink_block_id>blocks_repack_bits_bb_0</sink_block_id>
+ <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_mux_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
+ <source_block_id>digital_ofdm_carrier_allocator_cvc_0</source_block_id>
+ <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>1</sink_key>
+ </connection>
+ <connection>
<source_block_id>blocks_tagged_stream_mux_1</source_block_id>
<sink_block_id>fft_vxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
- <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_block_id>virtual_source_0_0_0</source_block_id>
+ <sink_block_id>digital_ofdm_carrier_allocator_cvc_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_vector_source_x_1</source_block_id>
+ <sink_block_id>blocks_tagged_stream_mux_1</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>fft_vxx_0</source_block_id>
+ <sink_block_id>virtual_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>virtual_source_0_0_0_0</source_block_id>
<sink_block_id>digital_ofdm_cyclic_prefixer_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>uhd_usrp_sink_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
<source_block_id>digital_ofdm_cyclic_prefixer_0</source_block_id>
- <sink_block_id>blocks_null_sink_0</sink_block_id>
+ <sink_block_id>blocks_multiply_const_vxx_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>digital_crc32_bb_0</source_block_id>
- <sink_block_id>blocks_tag_debug_0</sink_block_id>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>wxgui_fftsink2_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_multiply_const_vxx_0</source_block_id>
+ <sink_block_id>blocks_throttle_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>blocks_throttle_0</source_block_id>
+ <sink_block_id>wxgui_scopesink2_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-digital/grc/digital_block_tree.xml b/gr-digital/grc/digital_block_tree.xml
index 048348f7c5..d1033e8572 100644
--- a/gr-digital/grc/digital_block_tree.xml
+++ b/gr-digital/grc/digital_block_tree.xml
@@ -87,10 +87,12 @@
<block>digital_ofdm_frame_equalizer_vcvc</block>
<block>digital_ofdm_frame_sink</block>
<block>digital_ofdm_insert_preamble</block>
+ <block>digital_ofdm_rx</block>
<block>digital_ofdm_sampler</block>
<block>digital_ofdm_serializer_vcc</block>
<block>digital_ofdm_sync_pn</block>
<block>digital_ofdm_sync_sc_cfb</block>
+ <block>digital_ofdm_tx</block>
</cat>
<cat>
<name>Symbol Coding</name>
diff --git a/gr-digital/grc/digital_header_payload_demux.xml b/gr-digital/grc/digital_header_payload_demux.xml
index b29d86435b..f5be5dc6e2 100644
--- a/gr-digital/grc/digital_header_payload_demux.xml
+++ b/gr-digital/grc/digital_header_payload_demux.xml
@@ -1,5 +1,5 @@
<block>
- <name>Header payload demux</name>
+ <name>Header/Payload Demux</name>
<key>digital_header_payload_demux</key>
<import>from gnuradio import digital</import>
<make>digital.header_payload_demux($header_len, $items_per_symbol, $guard_interval, $length_tag_key, $trigger_tag_key, $output_symbols, $(type.itemsize))</make>
diff --git a/gr-digital/grc/digital_ofdm_chanest_vcvc.xml b/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
index e8b1571eb6..ea9855fdb6 100644
--- a/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
+++ b/gr-digital/grc/digital_ofdm_chanest_vcvc.xml
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<block>
- <name>OFDM channel &amp; coarse frequency offset estimation</name>
+ <name>OFDM Channel Estimation</name>
<key>digital_ofdm_chanest_vcvc</key>
<import>from gnuradio import digital</import>
<make>digital.ofdm_chanest_vcvc($sync_symbol1, $sync_symbol2, $n_data_symbols, $eq_noise_red_len, $max_carr_offset, $force_one_symbol)</make>
diff --git a/gr-digital/grc/digital_ofdm_rx.xml b/gr-digital/grc/digital_ofdm_rx.xml
new file mode 100644
index 0000000000..38222265a7
--- /dev/null
+++ b/gr-digital/grc/digital_ofdm_rx.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0"?>
+<block>
+ <name>OFDM Receiver</name>
+ <key>digital_ofdm_rx</key>
+ <import>from gnuradio import digital</import>
+ <make>digital.ofdm_rx(
+ fft_len=$fft_len, cp_len=$cp_len,
+ frame_length_tag_key='frame_'+$packet_len_key,
+ packet_length_tag_key=$packet_len_key,
+ #if $occupied_carriers()
+ occupied_carriers=$occupied_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_carriers=$pilot_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_symbols=$pilot_symbols,
+ #end if
+ #if $sync_word1()
+ sync_word1=$sync_word1,
+ #end if
+ #if $sync_word2()
+ sync_word2=$sync_word2,
+ #end if
+ bps_header=$header_mod.bps,
+ bps_payload=$payload_mod.bps,
+ debug_log=$log
+ )</make>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_len</key>
+ <value>64</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_len</key>
+ <value>16</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Packet Length Tag Key</name>
+ <key>packet_len_key</key>
+ <value>"length"</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Occupied Carriers</name>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $occupied_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Carriers</name>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Symbols</name>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_symbols()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 1</name>
+ <key>sync_word1</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word1()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 2</name>
+ <key>sync_word2</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word2()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Header Modulation</name>
+ <key>header_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Payload Modulation</name>
+ <key>payload_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ <option>
+ <name>8-PSK</name>
+ <key>"8-PSK"</key>
+ <opt>bps:3</opt>
+ </option>
+ </param>
+ <param>
+ <name>Log Debug Info</name>
+ <key>log</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide> #if $log then 'none' else 'part'#</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+ <check>$fft_len &gt; 0</check>
+ <check>$cp_len &gt; 0</check>
+ <check>$cp_len &lt; $fft_len</check>
+ <sink>
+ <name>in</name>
+ <type>complex</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>byte</type>
+ </source>
+</block>
+
diff --git a/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml b/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
index 7865d248d5..4705c1027a 100644
--- a/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
+++ b/gr-digital/grc/digital_ofdm_sync_sc_cfb.xml
@@ -3,7 +3,7 @@
<name>Schmidl &amp; Cox OFDM synchronisation</name>
<key>digital_ofdm_sync_sc_cfb</key>
<import>from gnuradio import digital</import>
- <make>digital.ofdm_sync_sc_cfb($fft_len, $cp_len)</make>
+ <make>digital.ofdm_sync_sc_cfb($fft_len, $cp_len, $use_even_carriers)</make>
<param>
<name>FFT length</name>
<key>fft_len</key>
@@ -14,6 +14,21 @@
<key>cp_len</key>
<type>int</type>
</param>
+ <param>
+ <name>Preamble Carriers</name>
+ <key>use_even_carriers</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Odd</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Even</name>
+ <key>True</key>
+ </option>
+ </param>
<sink>
<name>in</name>
<type>complex</type>
diff --git a/gr-digital/grc/digital_ofdm_tx.xml b/gr-digital/grc/digital_ofdm_tx.xml
new file mode 100644
index 0000000000..034d34a2a5
--- /dev/null
+++ b/gr-digital/grc/digital_ofdm_tx.xml
@@ -0,0 +1,180 @@
+<?xml version="1.0"?>
+<block>
+ <name>OFDM Transmitter</name>
+ <key>digital_ofdm_tx</key>
+ <import>from gnuradio import digital</import>
+ <make>digital.ofdm_tx(
+ fft_len=$fft_len, cp_len=$cp_len,
+ packet_length_tag_key=$packet_len_key,
+ #if $occupied_carriers()
+ occupied_carriers=$occupied_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_carriers=$pilot_carriers,
+ #end if
+ #if $occupied_carriers()
+ pilot_symbols=$pilot_symbols,
+ #end if
+ #if $sync_word1()
+ sync_word1=$sync_word1,
+ #end if
+ #if $sync_word2()
+ sync_word2=$sync_word2,
+ #end if
+ bps_header=$header_mod.bps,
+ bps_payload=$payload_mod.bps,
+ rolloff=$rolloff,
+ debug_log=$log
+ )</make>
+ <param>
+ <name>FFT Length</name>
+ <key>fft_len</key>
+ <value>64</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Cyclic Prefix Length</name>
+ <key>cp_len</key>
+ <value>16</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Length Tag Name</name>
+ <key>packet_len_key</key>
+ <value>length</value>
+ <type>string</type>
+ </param>
+ <param>
+ <name>Occupied Carriers</name>
+ <key>occupied_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $occupied_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Carriers</name>
+ <key>pilot_carriers</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_carriers()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Pilot Symbols</name>
+ <key>pilot_symbols</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $pilot_symbols()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 1</name>
+ <key>sync_word1</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word1()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Sync Word 2</name>
+ <key>sync_word2</key>
+ <value>()</value>
+ <type>raw</type>
+ <hide>
+ #if $sync_word2()
+ none
+ #else
+ part
+ #end if
+ </hide>
+ </param>
+ <param>
+ <name>Header Modulation</name>
+ <key>header_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ </param>
+ <param>
+ <name>Payload Modulation</name>
+ <key>payload_mod</key>
+ <type>enum</type>
+ <option>
+ <name>BPSK</name>
+ <key>"BPSK"</key>
+ <opt>bps:1</opt>
+ </option>
+ <option>
+ <name>QPSK</name>
+ <key>"QPSK"</key>
+ <opt>bps:2</opt>
+ </option>
+ <option>
+ <name>8-PSK</name>
+ <key>"8-PSK"</key>
+ <opt>bps:3</opt>
+ </option>
+ </param>
+ <param>
+ <name>Rolloff length (samples)</name>
+ <key>rolloff</key>
+ <value>0</value>
+ <type>int</type>
+ </param>
+ <param>
+ <name>Log Debug Info</name>
+ <key>log</key>
+ <value>False</value>
+ <type>enum</type>
+ <hide> #if $log then 'none' else 'part'#</hide>
+ <option>
+ <name>No</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>Yes</name>
+ <key>True</key>
+ </option>
+ </param>
+ <check>$fft_len &gt; 0</check>
+ <check>$cp_len &gt; 0</check>
+ <check>$cp_len &lt; $fft_len</check>
+ <check>$rolloff &gt;= 0</check>
+ <sink>
+ <name>in</name>
+ <type>byte</type>
+ </sink>
+ <source>
+ <name>out</name>
+ <type>complex</type>
+ </source>
+</block>
diff --git a/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h b/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h
index e3f9975d8f..4ccc3896c9 100644
--- a/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_chanest_vcvc.h
@@ -32,9 +32,8 @@ namespace gr {
/*!
* \brief Estimate channel and coarse frequency offset for OFDM from preambles
* \ingroup ofdm_blk
- * \ingroup synchronizers_blk
+ * \ingroup syncronizers_blk
*
- * \details
* Input: OFDM symbols (in frequency domain). The first one (or two) symbols are expected
* to be synchronisation symbols, which are used to estimate the coarse freq offset
* and the initial equalizer taps (these symbols are removed from the stream).
@@ -45,7 +44,9 @@ namespace gr {
* 'ofdm_sync_carr_offset' (integer), the coarse frequency offset as number of carriers,
* and 'ofdm_sync_eq_taps' (complex vector).
* Any tags attached to the synchronisation symbols are attached to the first data
- * symbol. All other tags are propagated normally.
+ * symbol. All other tags are propagated as expected.
+ *
+ * Note: The vector on ofdm_sync_eq_taps is already frequency-corrected, whereas the rest is not.
*
* This block assumes the frequency offset is even (i.e. an integer multiple of 2).
*
@@ -58,7 +59,7 @@ namespace gr {
public:
typedef boost::shared_ptr<ofdm_chanest_vcvc> sptr;
- /*
+ /*!
* \param sync_symbol1 First synchronisation symbol in the frequency domain. Its length must be
* the FFT length. For Schmidl & Cox synchronisation, every second sub-carrier
* has to be zero.
diff --git a/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h b/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h
index afc8b0ff6e..2715316a93 100644
--- a/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_frame_equalizer_vcvc.h
@@ -35,8 +35,20 @@ namespace gr {
*
* \details
* Performs equalization in one or two dimensions on a tagged OFDM frame.
+ *
+ * This does two things:
+ * First, it removes the coarse carrier offset. If a tag is found on the first
+ * item with the key 'ofdm_sync_carr_offset', this is interpreted as the coarse
+ * frequency offset in number of carriers.
+ * Next, it performs equalization in one or two dimensions on a tagged OFDM frame.
+ * The actual equalization is done by a ofdm_frame_equalizer object, outside of
+ * the block.
+ *
+ * Note that the tag with the coarse carrier offset is not removed. Blocks
+ * downstream from this block must not attempt to also correct this offset.
+ *
* Input: a tagged series of OFDM symbols.
- * Output: The same as the input, but equalized.
+ * Output: The same as the input, but equalized and frequency-corrected.
*/
class DIGITAL_API ofdm_frame_equalizer_vcvc : virtual public tagged_stream_block
{
@@ -45,6 +57,7 @@ namespace gr {
/*!
* \param equalizer The equalizer object that will do the actual work
+ * \param cp_len Length of the cyclic prefix in samples (required to correct the frequency offset)
* \param len_tag_key Length tag key
* \param propagate_channel_state If true, the channel state after the last symbol
* will be added to the first symbol as a tag
@@ -53,6 +66,7 @@ namespace gr {
*/
static sptr make(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key = "frame_len",
bool propagate_channel_state=false,
int fixed_frame_len=0
diff --git a/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h b/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h
index bfaefbc96e..a445118678 100644
--- a/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_serializer_vcc.h
@@ -46,6 +46,9 @@ namespace gr {
* output items, and the frame length specifies the exact number of
* consumed input items.
*
+ * It is possible to correct a carrier offset in this function by passing
+ * another tag with said offset.
+ *
* Input: Complex vectors of length \p fft_len
* Output: Complex scalars, in the same order as specified in occupied_carriers.
*/
@@ -60,6 +63,7 @@ namespace gr {
* \param len_tag_key The key of the tag identifying the length of the input frame in OFDM symbols.
* \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
* \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
+ * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
* \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
*/
static sptr make(
@@ -68,6 +72,7 @@ namespace gr {
const std::string &len_tag_key="frame_len",
const std::string &packet_len_tag_key="",
int symbols_skipped=0,
+ const std::string &carr_offset_key="",
bool input_is_shifted=true
);
@@ -75,12 +80,14 @@ namespace gr {
* \param allocator The carrier allocator block of which this shall be the inverse
* \param packet_len_tag_key The key of the tag identifying the number of complex symbols in this packet.
* \param symbols_skipped If the first symbol is not allocated as in \p occupied_carriers[0], set this
+ * \param carr_offset_key When this block should correct a carrier offset, specify the tag key of the offset here (not necessary if following an ofdm_frame_equalizer_vcvc)
* \param input_is_shifted If the input has the DC carrier on index 0 (i.e. it is not FFT shifted), set this to false
*/
static sptr make(
const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator,
const std::string &packet_len_tag_key="",
int symbols_skipped=0,
+ const std::string &carr_offset_key="",
bool input_is_shifted=true
);
};
diff --git a/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h b/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h
index 822e109221..d0dcfde7d9 100644
--- a/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h
+++ b/gr-digital/include/gnuradio/digital/ofdm_sync_sc_cfb.h
@@ -68,8 +68,11 @@ namespace gr {
/*! \param fft_len FFT length
* \param cp_len Length of the guard interval (cyclic prefix) in samples
+ * \param use_even_carriers If true, the carriers in the sync preamble are occupied such
+ * that the even carriers are used (0, 2, 4, ...). If you use all
+ * carriers, that would include the DC carrier, so be careful.
*/
- static sptr make(int fft_len, int cp_len);
+ static sptr make(int fft_len, int cp_len, bool use_even_carriers=false);
};
} // namespace digital
diff --git a/gr-digital/lib/header_payload_demux_impl.cc b/gr-digital/lib/header_payload_demux_impl.cc
index 79e2d3770d..affbc92125 100644
--- a/gr-digital/lib/header_payload_demux_impl.cc
+++ b/gr-digital/lib/header_payload_demux_impl.cc
@@ -123,7 +123,8 @@ namespace gr {
int produced_hdr = 0;
int produced_payload = 0;
- while (nread < noutput_items && !exit_loop) {
+ // FIXME ninput_items[1] does not have to be defined O_o
+ while (nread < noutput_items && nread < ninput_items[0] && nread < ninput_items[1] && !exit_loop) {
switch (d_state) {
case STATE_IDLE:
// 1) Search for a trigger signal on input 1 (if present)
@@ -154,6 +155,7 @@ namespace gr {
// 4) fall through to next state
d_remaining_symbols = -1;
if (!parse_header_data_msg()) {
+ d_state = STATE_IDLE;
exit_loop = true;
break;
}
@@ -241,6 +243,8 @@ namespace gr {
}
} else if (pmt::is_null(msg)) { // Blocking call was interrupted
return false;
+ } else if (msg == pmt::PMT_F) { // Header was invalid
+ return false;
} else {
throw std::runtime_error("Received illegal header data");
}
diff --git a/gr-digital/lib/ofdm_chanest_vcvc_impl.cc b/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
index a4025cc381..f8aebec60d 100644
--- a/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
+++ b/gr-digital/lib/ofdm_chanest_vcvc_impl.cc
@@ -45,10 +45,16 @@ namespace gr {
);
}
- ofdm_chanest_vcvc_impl::ofdm_chanest_vcvc_impl(const std::vector<gr_complex> &sync_symbol1, const std::vector<gr_complex> &sync_symbol2, int n_data_symbols, int eq_noise_red_len, int max_carr_offset, bool force_one_sync_symbol)
- : block("ofdm_chanest_vcvc",
- io_signature::make(1, 1, sizeof (gr_complex) * sync_symbol1.size()),
- io_signature::make(1, 1, sizeof (gr_complex) * sync_symbol1.size())),
+ ofdm_chanest_vcvc_impl::ofdm_chanest_vcvc_impl(
+ const std::vector<gr_complex> &sync_symbol1,
+ const std::vector<gr_complex> &sync_symbol2,
+ int n_data_symbols,
+ int eq_noise_red_len,
+ int max_carr_offset,
+ bool force_one_sync_symbol
+ ) : block("ofdm_chanest_vcvc",
+ io_signature::make(1, 1, sizeof (gr_complex) * sync_symbol1.size()),
+ io_signature::make(1, 2, sizeof (gr_complex) * sync_symbol1.size())),
d_fft_len(sync_symbol1.size()),
d_n_data_syms(n_data_symbols),
d_n_sync_syms(1),
@@ -197,13 +203,13 @@ namespace gr {
}
for (int i = loop_start; i < loop_end; i++) {
if ((d_ref_sym[i-carr_offset] != gr_complex(0, 0))) {
- taps[i] = sym[i] / d_ref_sym[i-carr_offset];
+ taps[i-carr_offset] = sym[i] / d_ref_sym[i-carr_offset];
}
}
if (d_interpolate) {
for (int i = d_first_active_carrier + 1; i < d_last_active_carrier; i += 2) {
- taps[i] = (taps[i-1] + taps[i+1]) / gr_complex(2.0, 0);
+ taps[i] = taps[i-1];
}
taps[d_last_active_carrier] = taps[d_last_active_carrier-1];
}
@@ -217,6 +223,13 @@ namespace gr {
}
+ // 1) Go through all the frames available on the input buffer
+ // 2) Estimate the coarse freq. offset and the eq. taps from the
+ // input symbol(s)
+ // 3) Copy the data symbols to the output
+ // 4) Copy all other tags onto the output. A tag that was on
+ // a sync symbol is copied onto the first data symbol.
+ // 5) Add the new tags for carrier offset and eq. taps
int
ofdm_chanest_vcvc_impl::general_work (int noutput_items,
gr_vector_int &ninput_items,
@@ -235,6 +248,12 @@ namespace gr {
std::vector<gr_complex> chan_taps(d_fft_len, 0);
get_chan_taps(in, in+d_fft_len, carr_offset, chan_taps);
+ if (output_items.size() == 2) {
+ gr_complex *out_chantaps = ((gr_complex *) output_items[1]) + i * d_fft_len;
+ memcpy((void *) out_chantaps, (void *) &chan_taps[0], sizeof(gr_complex) * d_fft_len);
+ produce(1, 1);
+ }
+
memcpy((void *) out,
(void *) &in[d_n_sync_syms * d_fft_len],
sizeof(gr_complex) * d_fft_len * d_n_data_syms);
@@ -242,30 +261,32 @@ namespace gr {
out += d_n_data_syms * d_fft_len;
std::vector<tag_t> tags;
- this->get_tags_in_range(tags, 0,
- this->nitems_read(0)+i*framesize,
- this->nitems_read(0)+(i+1)*framesize);
+ get_tags_in_range(tags, 0,
+ nitems_read(0)+i*framesize,
+ nitems_read(0)+(i+1)*framesize);
+
for (unsigned t = 0; t < tags.size(); t++) {
- int offset = tags[t].offset - (this->nitems_read(0) + i*framesize);
+ int offset = tags[t].offset - (nitems_read(0) + i*framesize);
if (offset < d_n_sync_syms) {
offset = 0;
} else {
offset -= d_n_sync_syms;
}
- tags[t].offset = offset + this->nitems_written(0) + i*d_n_data_syms;
- this->add_item_tag(0, tags[t]);
+ tags[t].offset = offset + nitems_written(0) + i*d_n_data_syms;
+ add_item_tag(0, tags[t]);
}
- this->add_item_tag(0, this->nitems_written(0) + i*d_n_data_syms,
+ add_item_tag(0, nitems_written(0) + i*d_n_data_syms,
pmt::string_to_symbol("ofdm_sync_carr_offset"),
pmt::from_long(carr_offset));
- this->add_item_tag(0, this->nitems_written(0) + i*d_n_data_syms,
+ add_item_tag(0, nitems_written(0) + i*d_n_data_syms,
pmt::string_to_symbol("ofdm_sync_chan_taps"),
pmt::init_c32vector(d_fft_len, chan_taps));
}
-
+ produce(0, n_frames * d_n_data_syms);
consume_each(n_frames * framesize);
- return n_frames * d_n_data_syms;
+
+ return WORK_CALLED_PRODUCE;
}
} /* namespace digital */
diff --git a/gr-digital/lib/ofdm_equalizer_base.cc b/gr-digital/lib/ofdm_equalizer_base.cc
index 7e69b07634..27ba9e99e9 100644
--- a/gr-digital/lib/ofdm_equalizer_base.cc
+++ b/gr-digital/lib/ofdm_equalizer_base.cc
@@ -30,8 +30,7 @@ namespace gr {
// *** Base class ****************************************************
ofdm_equalizer_base::ofdm_equalizer_base(int fft_len) :
- d_fft_len(fft_len),
- d_carr_offset(0)
+ d_fft_len(fft_len)
{
}
@@ -54,7 +53,7 @@ namespace gr {
d_pilot_carriers(pilot_carriers.size(), std::vector<bool>(fft_len, false)),
d_pilot_symbols(pilot_symbols.size(), std::vector<gr_complex>(fft_len, gr_complex(0, 0))),
d_symbols_skipped(symbols_skipped),
- d_pilot_carr_set(symbols_skipped),
+ d_pilot_carr_set(pilot_carriers.empty() ? 0 : symbols_skipped % pilot_carriers.size()),
d_channel_state(fft_len, gr_complex(1, 0))
{
int fft_shift_width = 0;
@@ -107,7 +106,7 @@ namespace gr {
ofdm_equalizer_1d_pilots::reset()
{
std::fill(d_channel_state.begin(), d_channel_state.end(), gr_complex(1, 0));
- d_pilot_carr_set = d_symbols_skipped;
+ d_pilot_carr_set = d_pilot_carriers.empty() ? 0 : d_symbols_skipped % d_pilot_carriers.size();
}
diff --git a/gr-digital/lib/ofdm_equalizer_simpledfe.cc b/gr-digital/lib/ofdm_equalizer_simpledfe.cc
index 8f518aa454..9483683a25 100644
--- a/gr-digital/lib/ofdm_equalizer_simpledfe.cc
+++ b/gr-digital/lib/ofdm_equalizer_simpledfe.cc
@@ -90,10 +90,10 @@ namespace gr {
if (!d_occupied_carriers[k]) {
continue;
}
- if (d_pilot_carriers.size() && d_pilot_carriers[d_pilot_carr_set][k-d_carr_offset]) {
+ if (!d_pilot_carriers.empty() && d_pilot_carriers[d_pilot_carr_set][k]) {
d_channel_state[k] = d_alpha * d_channel_state[k]
- + (1-d_alpha) * frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
- frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
+ + (1-d_alpha) * frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k];
+ frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k];
} else {
sym_eq = frame[i*d_fft_len+k] / d_channel_state[k];
d_constellation->map_to_points(d_constellation->decision_maker(&sym_eq), &sym_est);
@@ -101,7 +101,9 @@ namespace gr {
frame[i*d_fft_len+k] = sym_est;
}
}
- d_pilot_carr_set = (d_pilot_carr_set + 1) % d_pilot_carriers.size();
+ if (!d_pilot_carriers.empty()) {
+ d_pilot_carr_set = (d_pilot_carr_set + 1) % d_pilot_carriers.size();
+ }
}
}
diff --git a/gr-digital/lib/ofdm_equalizer_static.cc b/gr-digital/lib/ofdm_equalizer_static.cc
index ed24f1fe26..a407fe9413 100644
--- a/gr-digital/lib/ofdm_equalizer_static.cc
+++ b/gr-digital/lib/ofdm_equalizer_static.cc
@@ -79,9 +79,9 @@ namespace gr {
if (!d_occupied_carriers[k]) {
continue;
}
- if (d_pilot_carriers.size() && d_pilot_carriers[d_pilot_carr_set][k-d_carr_offset]) {
- d_channel_state[k] = frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
- frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k-d_carr_offset];
+ if (!d_pilot_carriers.empty() && d_pilot_carriers[d_pilot_carr_set][k]) {
+ d_channel_state[k] = frame[i*d_fft_len + k] / d_pilot_symbols[d_pilot_carr_set][k];
+ frame[i*d_fft_len+k] = d_pilot_symbols[d_pilot_carr_set][k];
} else {
frame[i*d_fft_len+k] /= d_channel_state[k];
}
diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
index 8546eb119b..4446306a8b 100644
--- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
+++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.cc
@@ -23,15 +23,19 @@
#include "config.h"
#endif
+#include <gnuradio/expj.h>
#include <gnuradio/io_signature.h>
#include "ofdm_frame_equalizer_vcvc_impl.h"
+#define M_TWOPI (2*M_PI)
+
namespace gr {
namespace digital {
ofdm_frame_equalizer_vcvc::sptr
ofdm_frame_equalizer_vcvc::make(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
@@ -39,13 +43,14 @@ namespace gr {
{
return gnuradio::get_initial_sptr (
new ofdm_frame_equalizer_vcvc_impl(
- equalizer, len_tag_key, propagate_channel_state, fixed_frame_len
+ equalizer, cp_len, len_tag_key, propagate_channel_state, fixed_frame_len
)
);
}
ofdm_frame_equalizer_vcvc_impl::ofdm_frame_equalizer_vcvc_impl(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
@@ -54,26 +59,49 @@ namespace gr {
io_signature::make(1, 1, sizeof (gr_complex) * equalizer->fft_len()),
len_tag_key),
d_fft_len(equalizer->fft_len()),
+ d_cp_len(cp_len),
d_eq(equalizer),
d_propagate_channel_state(propagate_channel_state),
- d_fixed_frame_len(len_tag_key.empty() ? fixed_frame_len : 0),
+ d_fixed_frame_len(fixed_frame_len),
d_channel_state(equalizer->fft_len(), gr_complex(1, 0))
{
+ if (len_tag_key.empty() && fixed_frame_len == 0) {
+ throw std::invalid_argument("Either specify a length tag or a frame length!");
+ }
+ if (d_fixed_frame_len < 0) {
+ throw std::invalid_argument("Invalid frame length!");
+ }
if (d_fixed_frame_len) {
set_output_multiple(d_fixed_frame_len);
}
+ set_relative_rate(1.0);
}
ofdm_frame_equalizer_vcvc_impl::~ofdm_frame_equalizer_vcvc_impl()
{
}
+ void
+ ofdm_frame_equalizer_vcvc_impl::parse_length_tags(
+ const std::vector<std::vector<tag_t> > &tags,
+ gr_vector_int &n_input_items_reqd
+ ){
+ if (d_fixed_frame_len) {
+ n_input_items_reqd[0] = d_fixed_frame_len;
+ } else {
+ for (unsigned k = 0; k < tags[0].size(); k++) {
+ if (tags[0][k].key == pmt::string_to_symbol(d_length_tag_key_str)) {
+ n_input_items_reqd[0] = pmt::to_long(tags[0][k].value);
+ remove_item_tag(0, tags[0][k]);
+ }
+ }
+ }
+ }
+
int
ofdm_frame_equalizer_vcvc_impl::work(int noutput_items,
- gr_vector_int &ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items)
+ gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items)
{
const gr_complex *in = (const gr_complex *) input_items[0];
gr_complex *out = (gr_complex *) output_items[0];
@@ -92,20 +120,54 @@ namespace gr {
d_channel_state = pmt::c32vector_elements(tags[i].value);
remove_item_tag(0, tags[i]);
}
+ if (pmt::symbol_to_string(tags[i].key) == "ofdm_sync_carr_offset") {
+ carrier_offset = pmt::to_long(tags[i].value);
+ }
}
- memcpy((void *) out, (void *) in, sizeof(gr_complex) * d_fft_len * frame_len);
+ // Copy the frame and the channel state vector such that the symbols are shifted to the correct position
+ if (carrier_offset < 0) {
+ memset((void *) out, 0x00, sizeof(gr_complex) * (-carrier_offset));
+ memcpy(
+ (void *) &out[-carrier_offset], (void *) in,
+ sizeof(gr_complex) * (d_fft_len * frame_len + carrier_offset)
+ );
+ } else {
+ memset((void *) (out + d_fft_len * frame_len - carrier_offset), 0x00, sizeof(gr_complex) * carrier_offset);
+ memcpy(
+ (void *) out, (void *) (in+carrier_offset),
+ sizeof(gr_complex) * (d_fft_len * frame_len - carrier_offset)
+ );
+ }
+
+ // Correct the frequency shift on the symbols
+ gr_complex phase_correction;
+ for (int i = 0; i < frame_len; i++) {
+ phase_correction = gr_expj(-M_TWOPI * carrier_offset * d_cp_len / d_fft_len * (i+1));
+ for (int k = 0; k < d_fft_len; k++) {
+ out[i*d_fft_len+k] *= phase_correction;
+ }
+ }
+
+ // Do the equalizing
d_eq->reset();
- d_eq->set_carrier_offset(carrier_offset);
d_eq->equalize(out, frame_len, d_channel_state);
d_eq->get_channel_state(d_channel_state);
+
+ // Update the channel state regarding the frequency offset
+ phase_correction = gr_expj(M_TWOPI * carrier_offset * d_cp_len / d_fft_len * frame_len);
+ for (int k = 0; k < d_fft_len; k++) {
+ d_channel_state[k] *= phase_correction;
+ }
+
+ // Housekeeping
if (d_propagate_channel_state) {
add_item_tag(0, nitems_written(0),
pmt::string_to_symbol("ofdm_sync_chan_taps"),
pmt::init_c32vector(d_fft_len, d_channel_state));
}
- if (d_fixed_frame_len) {
+ if (d_fixed_frame_len && d_length_tag_key_str.empty()) {
consume_each(frame_len);
}
diff --git a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
index c5f039d1a6..77dae39e1b 100644
--- a/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
+++ b/gr-digital/lib/ofdm_frame_equalizer_vcvc_impl.h
@@ -31,19 +31,22 @@ namespace gr {
{
private:
const int d_fft_len;
+ const int d_cp_len;
ofdm_equalizer_base::sptr d_eq;
bool d_propagate_channel_state;
const int d_fixed_frame_len;
std::vector<gr_complex> d_channel_state;
protected:
- // These aren't really necessary, so let's override them with nuthin'
- void remove_length_tags(const std::vector<std::vector<tag_t> > &tags) {};
- void update_length_tags(int n_produced, int n_ports) {};
+ void parse_length_tags(
+ const std::vector<std::vector<tag_t> > &tags,
+ gr_vector_int &n_input_items_reqd
+ );
public:
ofdm_frame_equalizer_vcvc_impl(
ofdm_equalizer_base::sptr equalizer,
+ int cp_len,
const std::string &len_tag_key,
bool propagate_channel_state,
int fixed_frame_len
diff --git a/gr-digital/lib/ofdm_serializer_vcc_impl.cc b/gr-digital/lib/ofdm_serializer_vcc_impl.cc
index 9ca6d59ec9..261111f22a 100644
--- a/gr-digital/lib/ofdm_serializer_vcc_impl.cc
+++ b/gr-digital/lib/ofdm_serializer_vcc_impl.cc
@@ -36,6 +36,7 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
)
{
@@ -43,7 +44,9 @@ namespace gr {
new ofdm_serializer_vcc_impl(
fft_len, occupied_carriers,
len_tag_key, packet_len_tag_key,
- symbols_skipped, input_is_shifted
+ symbols_skipped,
+ carr_offset_key,
+ input_is_shifted
)
);
}
@@ -53,6 +56,7 @@ namespace gr {
const gr::digital::ofdm_carrier_allocator_cvc::sptr &allocator,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
)
{
@@ -63,7 +67,8 @@ namespace gr {
allocator->len_tag_key(),
packet_len_tag_key,
symbols_skipped,
- input_is_shifted
+ carr_offset_key,
+ !input_is_shifted
)
);
}
@@ -74,6 +79,7 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted)
: tagged_stream_block ("ofdm_serializer_vcc",
io_signature::make(1, 1, sizeof (gr_complex) * fft_len),
@@ -84,20 +90,25 @@ namespace gr {
d_packet_len_tag_key(pmt::string_to_symbol(packet_len_tag_key)),
d_out_len_tag_key(pmt::string_to_symbol((packet_len_tag_key.empty() ? len_tag_key : packet_len_tag_key))),
d_symbols_skipped(symbols_skipped % occupied_carriers.size()),
+ d_carr_offset_key(pmt::string_to_symbol(carr_offset_key)),
d_curr_set(symbols_skipped % occupied_carriers.size()),
d_symbols_per_set(0)
{
for (unsigned i = 0; i < d_occupied_carriers.size(); i++) {
for (unsigned k = 0; k < d_occupied_carriers[i].size(); k++) {
- if (d_occupied_carriers[i][k] < 0) {
- d_occupied_carriers[i][k] += fft_len;
+ if (input_is_shifted) {
+ d_occupied_carriers[i][k] += fft_len/2;
+ if (d_occupied_carriers[i][k] > fft_len) {
+ d_occupied_carriers[i][k] -= fft_len;
+ }
+ } else {
+ if (d_occupied_carriers[i][k] < 0) {
+ d_occupied_carriers[i][k] += fft_len;
+ }
}
if (d_occupied_carriers[i][k] >= fft_len || d_occupied_carriers[i][k] < 0) {
throw std::invalid_argument("ofdm_serializer_vcc: trying to occupy a carrier outside the fft length.");
}
- if (input_is_shifted) {
- d_occupied_carriers[i][k] = (d_occupied_carriers[i][k] + fft_len) % fft_len;
- }
}
}
@@ -148,7 +159,7 @@ namespace gr {
if (!d_length_tag_key_str.empty()) {
get_tags_in_range(tags, 0, nitems_read(0), nitems_read(0)+1);
for (unsigned i = 0; i < tags.size(); i++) {
- if (pmt::symbol_to_string(tags[i].key) == "ofdm_sync_carr_offset") {
+ if (tags[i].key == d_carr_offset_key) {
carr_offset = pmt::to_long(tags[i].value);
}
if (tags[i].key == d_packet_len_tag_key) {
@@ -176,8 +187,8 @@ namespace gr {
);
for (unsigned t = 0; t < tags.size(); t++) {
add_item_tag(0, nitems_written(0)+n_out_symbols,
- tags[i].key,
- tags[i].value
+ tags[t].key,
+ tags[t].value
);
}
for (unsigned k = 0; k < d_occupied_carriers[d_curr_set].size(); k++) {
diff --git a/gr-digital/lib/ofdm_serializer_vcc_impl.h b/gr-digital/lib/ofdm_serializer_vcc_impl.h
index 0ec0ec3505..b61c6596d5 100644
--- a/gr-digital/lib/ofdm_serializer_vcc_impl.h
+++ b/gr-digital/lib/ofdm_serializer_vcc_impl.h
@@ -35,6 +35,7 @@ namespace gr {
pmt::pmt_t d_packet_len_tag_key; //!< Key of the length tag
pmt::pmt_t d_out_len_tag_key; //!< Key of the length tag
const int d_symbols_skipped; //!< Start position in d_occupied_carriers
+ pmt::pmt_t d_carr_offset_key; //!< Key of the carrier offset tag
int d_curr_set; //!< Current position in d_occupied_carriers
int d_symbols_per_set;
@@ -53,6 +54,7 @@ namespace gr {
const std::string &len_tag_key,
const std::string &packet_len_tag_key,
int symbols_skipped,
+ const std::string &carr_offset_key,
bool input_is_shifted
);
~ofdm_serializer_vcc_impl();
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
index 1a75883de7..9b3e9687bc 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.cc
@@ -43,14 +43,14 @@ namespace gr {
namespace digital {
ofdm_sync_sc_cfb::sptr
- ofdm_sync_sc_cfb::make(int fft_len, int cp_len)
+ ofdm_sync_sc_cfb::make(int fft_len, int cp_len, bool use_even_carriers)
{
- return gnuradio::get_initial_sptr (new ofdm_sync_sc_cfb_impl(fft_len, cp_len));
+ return gnuradio::get_initial_sptr (new ofdm_sync_sc_cfb_impl(fft_len, cp_len, use_even_carriers));
}
- ofdm_sync_sc_cfb_impl::ofdm_sync_sc_cfb_impl(int fft_len, int cp_len)
+ ofdm_sync_sc_cfb_impl::ofdm_sync_sc_cfb_impl(int fft_len, int cp_len, bool use_even_carriers)
: hier_block2 ("ofdm_sync_sc_cfb",
- io_signature::make(1, 1, sizeof (gr_complex)),
+ io_signature::make(1, 1, sizeof (gr_complex)),
#ifndef SYNC_ADD_DEBUG_OUTPUT
io_signature::make2(2, 2, sizeof (float), sizeof (unsigned char)))
#else
@@ -61,7 +61,7 @@ namespace gr {
gr::blocks::delay::sptr delay(gr::blocks::delay::make(sizeof(gr_complex), fft_len/2));
gr::blocks::conjugate_cc::sptr delay_conjugate(gr::blocks::conjugate_cc::make());
gr::blocks::multiply_cc::sptr delay_corr(gr::blocks::multiply_cc::make());
- gr::filter::fir_filter_ccf::sptr delay_ma(gr::filter::fir_filter_ccf::make(1, std::vector<float>(fft_len/2, 1.0)));
+ gr::filter::fir_filter_ccf::sptr delay_ma(gr::filter::fir_filter_ccf::make(1, std::vector<float>(fft_len/2, use_even_carriers ? 1.0 : -1.0)));
gr::blocks::complex_to_mag_squared::sptr delay_magsquare(gr::blocks::complex_to_mag_squared::make());
gr::blocks::divide_ff::sptr delay_normalize(gr::blocks::divide_ff::make());
diff --git a/gr-digital/lib/ofdm_sync_sc_cfb_impl.h b/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
index b217002038..af767e2a2b 100644
--- a/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
+++ b/gr-digital/lib/ofdm_sync_sc_cfb_impl.h
@@ -31,7 +31,7 @@ namespace gr {
class ofdm_sync_sc_cfb_impl : public ofdm_sync_sc_cfb
{
public:
- ofdm_sync_sc_cfb_impl(int fft_len, int cp_len);
+ ofdm_sync_sc_cfb_impl(int fft_len, int cp_len, bool use_even_carriers);
~ofdm_sync_sc_cfb_impl();
};
diff --git a/gr-digital/lib/packet_header_default.cc b/gr-digital/lib/packet_header_default.cc
index eb639260c6..ef5f39dc97 100644
--- a/gr-digital/lib/packet_header_default.cc
+++ b/gr-digital/lib/packet_header_default.cc
@@ -47,7 +47,7 @@ namespace gr {
int bits_per_byte)
: d_header_len(header_len),
d_len_tag_key(pmt::string_to_symbol(len_tag_key)),
- d_num_tag_key(pmt::string_to_symbol(num_tag_key)),
+ d_num_tag_key(num_tag_key.empty() ? pmt::PMT_NIL : pmt::string_to_symbol(num_tag_key)),
d_bits_per_byte(bits_per_byte),
d_header_number(0)
{
@@ -64,8 +64,9 @@ namespace gr {
bool packet_header_default::header_formatter(
long packet_len,
unsigned char *out,
+
const std::vector<tag_t> &tags
- )
+ )
{
packet_len &= 0x0FFF;
@@ -107,12 +108,17 @@ namespace gr {
if (k >= d_header_len) {
return true;
}
- for (int i = 0; i < 16 && k < d_header_len; i += d_bits_per_byte, k++) {
- header_num |= (((int) in[k]) & d_mask) << i;
+ if (d_num_tag_key == pmt::PMT_NIL) {
+ k += 16;
+ } else {
+ for (int i = 0; i < 16 && k < d_header_len; i += d_bits_per_byte, k++) {
+ header_num |= (((int) in[k]) & d_mask) << i;
+ }
+ tag.key = d_num_tag_key;
+ tag.value = pmt::from_long(header_num);
+ tags.push_back(tag);
}
- tag.key = d_num_tag_key;
- tag.value = pmt::from_long(header_num);
- tags.push_back(tag);
+
if (k >= d_header_len) {
return true;
}
diff --git a/gr-digital/lib/packet_header_ofdm.cc b/gr-digital/lib/packet_header_ofdm.cc
index 03a9581a6c..f163657bab 100644
--- a/gr-digital/lib/packet_header_ofdm.cc
+++ b/gr-digital/lib/packet_header_ofdm.cc
@@ -93,12 +93,15 @@ namespace gr {
int packet_len = 0; // # of bytes in this frame
for (unsigned i = 0; i < tags.size(); i++) {
if (pmt::equal(tags[i].key, d_len_tag_key)) {
- packet_len = pmt::to_long(tags[i].value);
+ // Convert bytes to complex symbols:
+ packet_len = pmt::to_long(tags[i].value) * 8 / d_bits_per_payload_sym;
+ if (pmt::to_long(tags[i].value) * 8 % d_bits_per_payload_sym) {
+ packet_len++;
+ }
+ tags[i].value = pmt::from_long(packet_len);
break;
}
}
- // Convert bytes to complex symbols:
- packet_len = packet_len * 8 / d_bits_per_payload_sym;
// frame_len == # of OFDM symbols in this frame
int frame_len = packet_len / d_syms_per_set;
diff --git a/gr-digital/lib/packet_headerparser_b_impl.cc b/gr-digital/lib/packet_headerparser_b_impl.cc
index d55a3bd303..f7593d5fb2 100644
--- a/gr-digital/lib/packet_headerparser_b_impl.cc
+++ b/gr-digital/lib/packet_headerparser_b_impl.cc
@@ -73,6 +73,12 @@ namespace gr {
}
std::vector<tag_t> tags;
+ get_tags_in_range(
+ tags, 0,
+ nitems_read(0),
+ nitems_read(0)+d_header_formatter->header_len()
+ );
+
if (!d_header_formatter->header_parser(in, tags)) {
GR_LOG_INFO(d_logger, boost::format("Detected an invalid packet at item %1%") % nitems_read(0));
message_port_pub(msg_port_id, pmt::PMT_F);
diff --git a/gr-digital/python/CMakeLists.txt b/gr-digital/python/CMakeLists.txt
index 7846345970..e73efb70f8 100644
--- a/gr-digital/python/CMakeLists.txt
+++ b/gr-digital/python/CMakeLists.txt
@@ -77,6 +77,8 @@ list(APPEND GR_TEST_PYTHON_DIRS
${CMAKE_BINARY_DIR}/gr-blocks/swig
${CMAKE_BINARY_DIR}/gr-fft/python
${CMAKE_BINARY_DIR}/gr-fft/swig
+ ${CMAKE_BINARY_DIR}/gr-channels/python
+ ${CMAKE_BINARY_DIR}/gr-channels/swig
)
list(APPEND GR_TEST_TARGET_DEPS gnuradio-digital gnuradio-filter gnuradio-fft gnuradio-analog gnuradio-blocks)
diff --git a/gr-digital/python/ofdm_txrx.py b/gr-digital/python/ofdm_txrx.py
index 37c4086cc3..8f1b4c5f02 100644
--- a/gr-digital/python/ofdm_txrx.py
+++ b/gr-digital/python/ofdm_txrx.py
@@ -1,5 +1,5 @@
#
-# Copyright 2005-2007,2013 Free Software Foundation, Inc.
+# Copyright 2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
@@ -25,6 +25,9 @@ For simple configurations, no need to connect all the relevant OFDM blocks
to form an OFDM Tx/Rx--simply use these.
"""
+# Reminder: All frequency-domain stuff is in shifted form, i.e. DC carrier
+# in the middle!
+
import numpy
from gnuradio import gr
import digital_swig as digital
@@ -44,20 +47,59 @@ except ImportError:
_def_fft_len = 64
_def_cp_len = 16
_def_frame_length_tag_key = "frame_length"
-_def_packet_length_tag_key = "frame_length"
-_def_packet_num_tag_key = ""
-_def_occupied_carriers=(range(1, 27) + range(38, 64),)
-_def_pilot_carriers=((0,),)
-_def_pilot_symbols=((100,),)
+_def_packet_length_tag_key = "packet_length"
+_def_packet_num_tag_key = "packet_num"
+# Data and pilot carriers are same as in 802.11a
+_def_occupied_carriers = (range(-26, -21) + range(-20, -7) + range(-6, 0) + range(1, 7) + range(8, 21) + range(22, 27),)
+_def_pilot_carriers=((-21, -7, 7, 21,),)
+_pilot_sym_scramble_seq = (
+ 1,1,1,1, -1,-1,-1,1, -1,-1,-1,-1, 1,1,-1,1, -1,-1,1,1, -1,1,1,-1, 1,1,1,1, 1,1,-1,1,
+ 1,1,-1,1, 1,-1,-1,1, 1,1,-1,1, -1,-1,-1,1, -1,1,-1,-1, 1,-1,-1,1, 1,1,1,1, -1,-1,1,1,
+ -1,-1,1,-1, 1,-1,1,1, -1,-1,-1,1, 1,-1,-1,-1, -1,1,-1,-1, 1,-1,1,1, 1,1,-1,1, -1,1,-1,1,
+ -1,-1,-1,-1, -1,1,-1,1, 1,-1,1,-1, 1,1,1,-1, -1,1,-1,-1, -1,1,1,1, -1,-1,-1,-1, -1,-1,-1
+)
+_def_pilot_symbols= tuple([(x, x, x, -x) for x in _pilot_sym_scramble_seq])
_seq_seed = 42
-def _make_sync_word(fft_len, occupied_carriers, constellation):
- """ Makes a random sync sequence """
- occupied_carriers = list(occupied_carriers[0])
- occupied_carriers = [occupied_carriers[x] + fft_len if occupied_carriers[x] < 0 else occupied_carriers[x] for x in range(len(occupied_carriers))]
+
+def _get_active_carriers(fft_len, occupied_carriers, pilot_carriers):
+ active_carriers = list()
+ for carrier in list(occupied_carriers[0]) + list(pilot_carriers[0]):
+ if carrier < 0:
+ carrier += fft_len
+ active_carriers.append(carrier)
+ return active_carriers
+
+def _make_sync_word1(fft_len, occupied_carriers, pilot_carriers):
+ """ Creates a random sync sequence for fine frequency offset and timing
+ estimation. This is the first of typically two sync preamble symbols
+ for the Schmidl & Cox sync algorithm.
+ The relevant feature of this symbols is that every second sub-carrier
+ is zero. In the time domain, this results in two identical halves of
+ the OFDM symbols.
+ Symbols are always BPSK symbols. Carriers are scaled by sqrt(2) to keep
+ total energy constant.
+ Carrier 0 (DC carrier) is always zero. If used, carrier 1 is non-zero.
+ This means the sync algorithm has to check on odd carriers!
+ """
+ active_carriers = _get_active_carriers(fft_len, occupied_carriers, pilot_carriers)
numpy.random.seed(_seq_seed)
- sync_sequence = [constellation.map_to_points_v(numpy.random.randint(constellation.arity()))[0] * numpy.sqrt(2) if x in occupied_carriers and x % 3 else 0 for x in range(fft_len)]
- return sync_sequence
+ bpsk = {0: numpy.sqrt(2), 1: -numpy.sqrt(2)}
+ sw1 = [bpsk[numpy.random.randint(2)] if x in active_carriers and x % 2 else 0 for x in range(fft_len)]
+ return numpy.fft.fftshift(sw1)
+
+def _make_sync_word2(fft_len, occupied_carriers, pilot_carriers):
+ """ Creates a random sync sequence for coarse frequency offset and channel
+ estimation. This is the second of typically two sync preamble symbols
+ for the Schmidl & Cox sync algorithm.
+ Symbols are always BPSK symbols.
+ """
+ active_carriers = _get_active_carriers(fft_len, occupied_carriers, pilot_carriers)
+ numpy.random.seed(_seq_seed)
+ bpsk = {0: 1, 1: -1}
+ sw2 = [bpsk[numpy.random.randint(2)] if x in active_carriers else 0 for x in range(fft_len)]
+ sw2[0] = 0j
+ return numpy.fft.fftshift(sw2)
def _get_constellation(bps):
""" Returns a modulator block for a given number of bits per symbol """
@@ -73,22 +115,28 @@ def _get_constellation(bps):
exit(1)
class ofdm_tx(gr.hier_block2):
- """
- Hierarchical block for OFDM modulation.
+ """ Hierarchical block for OFDM modulation.
The input is a byte stream (unsigned char) and the
output is the complex modulated signal at baseband.
Args:
fft_len: The length of FFT (integer).
- cp_len: The length of cyclic prefix (integer).
- occupied_carriers: ??
- pilot_carriers: ??
- pilot_symbols: ??
- length_tag_key: The name of the tag giving packet length.
+ cp_len: The length of cyclic prefix in total samples (integer).
+ packet_length_tag_key: The name of the tag giving packet length at the input.
+ occupied_carriers: A vector of vectors describing which OFDM carriers are occupied.
+ pilot_carriers: A vector of vectors describing which OFDM carriers are occupied with pilot symbols.
+ pilot_symbols: The pilot symbols.
+ bps_header: Bits per symbol (header).
+ bps_payload: Bits per symbol (payload).
+ sync_word1: The first sync preamble symbol. This has to be with zeros on alternating carriers.
+ Used for fine and coarse frequency offset and timing estimation.
+ sync_word2: The second sync preamble symbol. This has to be filled entirely. Also used for
+ coarse frequency offset and channel estimation.
+ rolloff: The rolloff length in samples. Must be smaller than the CP.
"""
def __init__(self, fft_len=_def_fft_len, cp_len=_def_cp_len,
- frame_length_tag_key=_def_frame_length_tag_key,
+ packet_length_tag_key=_def_packet_length_tag_key,
occupied_carriers=_def_occupied_carriers,
pilot_carriers=_def_pilot_carriers,
pilot_symbols=_def_pilot_symbols,
@@ -96,84 +144,112 @@ class ofdm_tx(gr.hier_block2):
bps_payload=1,
sync_word1=None,
sync_word2=None,
- rolloff=0
+ rolloff=0,
+ debug_log=False
):
gr.hier_block2.__init__(self, "ofdm_tx",
gr.io_signature(1, 1, gr.sizeof_char),
gr.io_signature(1, 1, gr.sizeof_gr_complex))
+ ### Param init / sanity check ########################################
self.fft_len = fft_len
self.cp_len = cp_len
- self.frame_length_tag_key = frame_length_tag_key
+ self.packet_length_tag_key = packet_length_tag_key
self.occupied_carriers = occupied_carriers
self.pilot_carriers = pilot_carriers
self.pilot_symbols = pilot_symbols
self.bps_header = bps_header
self.bps_payload = bps_payload
n_sync_words = 1
- header_constellation = _get_constellation(bps_header)
- header_mod = digital.chunks_to_symbols_bc(header_constellation.points())
self.sync_word1 = sync_word1
if sync_word1 is None:
- self.sync_word1 = _make_sync_word(fft_len, occupied_carriers, header_constellation)
+ self.sync_word1 = _make_sync_word1(fft_len, occupied_carriers, pilot_carriers)
else:
if len(sync_word1) != self.fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
- self.sync_words = [sync_word1,]
+ self.sync_words = [self.sync_word1,]
self.sync_word2 = ()
- if sync_word2 is not None:
- if len(sync_word2) != fft_len:
+ if sync_word2 is None:
+ self.sync_word2 = _make_sync_word2(fft_len, occupied_carriers, pilot_carriers)
+ if len(self.sync_word2):
+ if len(self.sync_word2) != fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
- self.sync_word2 = sync_word2
+ self.sync_word2 = list(self.sync_word2)
n_sync_words = 2
self.sync_words.append(self.sync_word2)
- crc = digital.crc32_bb(False, self.frame_length_tag_key)
+ ### Header modulation ################################################
+ crc = digital.crc32_bb(False, self.packet_length_tag_key)
+ header_constellation = _get_constellation(bps_header)
+ header_mod = digital.chunks_to_symbols_bc(header_constellation.points())
formatter_object = digital.packet_header_ofdm(
occupied_carriers=occupied_carriers, n_syms=1,
- bits_per_sym=self.bps_header
+ bits_per_header_sym=self.bps_header,
+ bits_per_payload_sym=self.bps_payload
)
- header_gen = digital.packet_headergenerator_bb(formatter_object.base(), self.frame_length_tag_key)
- header_payload_mux = blocks.tagged_stream_mux(gr.sizeof_gr_complex*1, self.frame_length_tag_key)
+ header_gen = digital.packet_headergenerator_bb(formatter_object.base(), self.packet_length_tag_key)
+ header_payload_mux = blocks.tagged_stream_mux(gr.sizeof_gr_complex*1, self.packet_length_tag_key)
self.connect(self, crc, header_gen, header_mod, (header_payload_mux, 0))
+ if debug_log:
+ self.connect(header_gen, blocks.file_sink(1, 'tx-hdr.dat'))
+ ### Payload modulation ###############################################
payload_constellation = _get_constellation(bps_payload)
payload_mod = digital.chunks_to_symbols_bc(payload_constellation.points())
self.connect(
crc,
- blocks.repack_bits_bb(8, bps_payload, frame_length_tag_key),
+ blocks.repack_bits_bb(
+ 8, # Unpack 8 bits per byte
+ bps_payload,
+ self.packet_length_tag_key
+ ),
payload_mod,
(header_payload_mux, 1)
)
+ ### Create OFDM frame ################################################
allocator = digital.ofdm_carrier_allocator_cvc(
self.fft_len,
occupied_carriers=self.occupied_carriers,
pilot_carriers=self.pilot_carriers,
pilot_symbols=self.pilot_symbols,
sync_words=self.sync_words,
- len_tag_key=self.frame_length_tag_key
+ len_tag_key=self.packet_length_tag_key
+ )
+ ffter = fft.fft_vcc(
+ self.fft_len,
+ False, # Inverse FFT
+ (), # No window
+ True # Shift
)
- ffter = fft.fft_vcc(self.fft_len, False, (), True)
cyclic_prefixer = digital.ofdm_cyclic_prefixer(
self.fft_len,
self.fft_len+self.cp_len,
rolloff,
- self.frame_length_tag_key
+ self.packet_length_tag_key
)
self.connect(header_payload_mux, allocator, ffter, cyclic_prefixer, self)
+ if debug_log:
+ self.connect(allocator, blocks.file_sink(8*64, 'tx-post-allocator.dat'))
+ self.connect(cyclic_prefixer, blocks.file_sink(8, 'tx-signal.dat'))
class ofdm_rx(gr.hier_block2):
- """
- Hierarchical block for OFDM demodulation.
+ """ Hierarchical block for OFDM demodulation.
- The input is a byte stream (unsigned char) and the
- output is the complex modulated signal at baseband.
+ The input is a complex baseband signal (e.g. from a UHD source).
+ The detected packets are output as a stream of packed bits on the output.
Args:
fft_len: The length of FFT (integer).
- cp_len: The length of cyclic prefix (integer).
- occupied_carriers: ??
- pilot_carriers: ??
- pilot_symbols: ??
- length_tag_key: The name of the tag giving packet length.
+ cp_len: The length of cyclic prefix in total samples (integer).
+ frame_length_tag_key: Used internally to tag the length of the OFDM frame.
+ packet_length_tag_key: The name of the tag giving packet length at the input.
+ occupied_carriers: A vector of vectors describing which OFDM carriers are occupied.
+ pilot_carriers: A vector of vectors describing which OFDM carriers are occupied with pilot symbols.
+ pilot_symbols: The pilot symbols.
+ bps_header: Bits per symbol (header).
+ bps_payload: Bits per symbol (payload).
+ sync_word1: The first sync preamble symbol. This has to be with zeros on alternating carriers.
+ Used for fine and coarse frequency offset and timing estimation.
+ sync_word2: The second sync preamble symbol. This has to be filled entirely. Also used for
+ coarse frequency offset and channel estimation.
"""
def __init__(self, fft_len=_def_fft_len, cp_len=_def_cp_len,
frame_length_tag_key=_def_frame_length_tag_key,
@@ -185,11 +261,13 @@ class ofdm_rx(gr.hier_block2):
bps_header=1,
bps_payload=1,
sync_word1=None,
- sync_word2=None
+ sync_word2=None,
+ debug_log=False
):
gr.hier_block2.__init__(self, "ofdm_rx",
gr.io_signature(1, 1, gr.sizeof_gr_complex),
gr.io_signature(1, 1, gr.sizeof_char))
+ ### Param init / sanity check ########################################
self.fft_len = fft_len
self.cp_len = cp_len
self.frame_length_tag_key = frame_length_tag_key
@@ -198,44 +276,60 @@ class ofdm_rx(gr.hier_block2):
self.bps_header = bps_header
self.bps_payload = bps_payload
n_sync_words = 1
- header_constellation = _get_constellation(bps_header)
if sync_word1 is None:
- self.sync_word1 = _make_sync_word(fft_len, occupied_carriers, header_constellation)
+ self.sync_word1 = _make_sync_word1(fft_len, occupied_carriers, pilot_carriers)
else:
if len(sync_word1) != self.fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
self.sync_word1 = sync_word1
self.sync_word2 = ()
- if sync_word2 is not None:
+ if sync_word2 is None:
+ self.sync_word2 = _make_sync_word2(fft_len, occupied_carriers, pilot_carriers)
+ n_sync_words = 2
+ elif len(sync_word2):
if len(sync_word2) != fft_len:
raise ValueError("Length of sync sequence(s) must be FFT length.")
self.sync_word2 = sync_word2
n_sync_words = 2
- else:
- sync_word2 = ()
- # Receiver path
+ ### Sync ############################################################
sync_detect = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ delay = blocks.delay(gr.sizeof_gr_complex, fft_len+cp_len)
oscillator = analog.frequency_modulator_fc(-2.0 / fft_len)
- delay = gr.delay(gr.sizeof_gr_complex, fft_len+cp_len)
- mixer = gr.multiply_cc()
- hpd = digital.header_payload_demux(n_sync_words, fft_len, cp_len,
- frame_length_tag_key, "", True)
+ mixer = blocks.multiply_cc()
+ hpd = digital.header_payload_demux(
+ n_sync_words+1, # Number of OFDM symbols before payload (sync + 1 sym header)
+ fft_len, cp_len, # FFT length, guard interval
+ frame_length_tag_key, # Frame length tag key
+ "", # We're not using trigger tags
+ True # One output item is one OFDM symbol (False would output complex scalars)
+ )
self.connect(self, sync_detect)
- self.connect((sync_detect, 0), oscillator, (mixer, 0))
- self.connect(self, delay, (mixer, 1))
- self.connect(mixer, (hpd, 0))
+ self.connect(self, delay, (mixer, 0), (hpd, 0))
+ self.connect((sync_detect, 0), oscillator, (mixer, 1))
self.connect((sync_detect, 1), (hpd, 1))
- # Header demodulation
- header_fft = fft.fft_vcc(self.fft_len, True, (), True)
- chanest = digital.ofdm_chanest_vcvc(self.sync_word1, self.sync_word2, 1)
- header_equalizer = digital.ofdm_equalizer_simpledfe(
- fft_len, header_constellation.base(),
- occupied_carriers, pilot_carriers, pilot_symbols
- )
- header_eq = digital.ofdm_frame_equalizer_vcvc(header_equalizer.base(), frame_length_tag_key, True)
- header_serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers)
+ if debug_log:
+ self.connect((sync_detect, 0), blocks.file_sink(gr.sizeof_float, 'freq-offset.dat'))
+ self.connect((sync_detect, 1), blocks.file_sink(gr.sizeof_char, 'sync-detect.dat'))
+ ### Header demodulation ##############################################
+ header_fft = fft.fft_vcc(self.fft_len, True, (), True)
+ chanest = digital.ofdm_chanest_vcvc(self.sync_word1, self.sync_word2, 1)
header_constellation = _get_constellation(bps_header)
- header_demod = digital.constellation_decoder_cb(header_constellation.base())
+ header_equalizer = digital.ofdm_equalizer_simpledfe(
+ fft_len, header_constellation.base(),
+ occupied_carriers, pilot_carriers, pilot_symbols, 0, 0
+ )
+ header_eq = digital.ofdm_frame_equalizer_vcvc(
+ header_equalizer.base(),
+ cp_len,
+ self.frame_length_tag_key,
+ True,
+ 1 # Header is 1 symbol long
+ )
+ header_serializer = digital.ofdm_serializer_vcc(
+ fft_len, occupied_carriers,
+ self.frame_length_tag_key
+ )
+ header_demod = digital.constellation_decoder_cb(header_constellation.base())
header_formatter = digital.packet_header_ofdm(
occupied_carriers, 1,
packet_length_tag_key,
@@ -246,16 +340,46 @@ class ofdm_rx(gr.hier_block2):
header_parser = digital.packet_headerparser_b(header_formatter.formatter())
self.connect((hpd, 0), header_fft, chanest, header_eq, header_serializer, header_demod, header_parser)
self.msg_connect(header_parser, "header_data", hpd, "header_data")
- # Payload demodulation
+ if debug_log:
+ self.connect((chanest, 1), blocks.file_sink(512, 'channel-estimate.dat'))
+ self.connect((chanest, 0), blocks.file_sink(512, 'post-hdr-chanest.dat'))
+ self.connect(header_eq, blocks.file_sink(512, 'post-hdr-eq.dat'))
+ self.connect(header_serializer, blocks.file_sink(8, 'post-hdr-serializer.dat'))
+ self.connect(header_demod, blocks.file_sink(1, 'post-hdr-demod.dat'))
+ self.connect(header_demod, blocks.tag_debug(1, 'post-hdr-demod.dat'))
+ ### Payload demod ####################################################
payload_fft = fft.fft_vcc(self.fft_len, True, (), True)
+ payload_constellation = _get_constellation(bps_payload)
payload_equalizer = digital.ofdm_equalizer_simpledfe(
- fft_len, header_constellation.base(),
- occupied_carriers, pilot_carriers, pilot_symbols, 1
+ fft_len, payload_constellation.base(),
+ occupied_carriers,
+ pilot_carriers,
+ pilot_symbols,
+ 1 # Skip 1 symbol (that was already in the header)
+ )
+ payload_eq = digital.ofdm_frame_equalizer_vcvc(
+ payload_equalizer.base(),
+ cp_len,
+ self.frame_length_tag_key
+ )
+ payload_serializer = digital.ofdm_serializer_vcc(
+ fft_len, occupied_carriers,
+ self.frame_length_tag_key,
+ self.packet_length_tag_key,
+ 1 # Skip 1 symbol (that was already in the header)
)
- payload_eq = digital.ofdm_frame_equalizer_vcvc(payload_equalizer.base(), frame_length_tag_key)
- payload_serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers)
- payload_constellation = _get_constellation(bps_payload)
payload_demod = digital.constellation_decoder_cb(payload_constellation.base())
- bit_packer = blocks.repack_bits_bb(bps_payload, 8, packet_length_tag_key, True)
- self.connect((hpd, 1), payload_fft, payload_eq, payload_serializer, payload_demod, bit_packer, self)
+ repack = blocks.repack_bits_bb(bps_payload, 8, self.packet_length_tag_key, True)
+ crc = digital.crc32_bb(True, self.packet_length_tag_key)
+ self.connect((hpd, 1), payload_fft, payload_eq, payload_serializer, payload_demod, repack, crc, self)
+ if debug_log:
+ self.connect((hpd, 1), blocks.tag_debug(8*64, 'post-hpd'));
+ self.connect(payload_fft, blocks.file_sink(8*64, 'post-payload-fft.dat'))
+ self.connect(payload_eq, blocks.file_sink(8*64, 'post-payload-eq.dat'))
+ self.connect(payload_serializer, blocks.file_sink(8, 'post-payload-serializer.dat'))
+ self.connect(payload_demod, blocks.file_sink(1, 'post-payload-demod.dat'))
+ self.connect(repack, blocks.file_sink(1, 'post-payload-repack.dat'))
+ self.connect(crc, blocks.file_sink(1, 'post-payload-crc.dat'))
+ self.connect(crc, blocks.tag_debug(1, 'post-payload-crc'))
+
diff --git a/gr-digital/python/qa_ofdm_chanest_vcvc.py b/gr-digital/python/qa_ofdm_chanest_vcvc.py
index b11bb4c556..ae11c0534c 100755
--- a/gr-digital/python/qa_ofdm_chanest_vcvc.py
+++ b/gr-digital/python/qa_ofdm_chanest_vcvc.py
@@ -19,14 +19,16 @@
# Boston, MA 02110-1301, USA.
#
+import sys
+import numpy
+import random
from gnuradio import gr, gr_unittest
import pmt
import blocks_swig as blocks
import analog_swig as analog
import digital_swig as digital
-import sys
-import numpy
-import random
+import blocks_swig as blocks
+from ofdm_txrx import ofdm_tx
def shift_tuple(vec, N):
""" Shifts a vector by N elements. Fills up with zeros. """
@@ -129,7 +131,9 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
chan = blocks.multiply_const_vcc(channel)
chanest = digital.ofdm_chanest_vcvc(sync_symbol1, sync_symbol2, 1)
sink = blocks.vector_sink_c(fft_len)
+ sink_chanest = blocks.vector_sink_c(fft_len)
self.tb.connect(src, chan, chanest, sink)
+ self.tb.connect((chanest, 1), sink_chanest)
self.tb.run()
tags = sink.tags()
self.assertEqual(shift_tuple(sink.data(), -carr_offset), tuple(numpy.multiply(data_symbol, channel)))
@@ -138,6 +142,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
self.assertEqual(pmt.to_long(tag.value), carr_offset)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
self.assertEqual(pmt.c32vector_elements(tag.value), channel)
+ self.assertEqual(sink_chanest.data(), channel)
def test_004_channel_no_carroffset_1sym (self):
""" Add a channel, check if it's correctly estimated.
@@ -147,13 +152,17 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
sync_symbol = (0, 0, 0, 1, 0, 1, 0, -1, 0, 1, 0, -1, 0, 1, 0, 0)
data_symbol = (0, 0, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 0)
tx_data = sync_symbol + data_symbol
- channel = (0, 0, 0, 2, 2, 2, 2.5, 3, 2.5, 2, 2.5, 3, 2, 1, 1, 0)
+ channel = (0, 0, 0, 2, 2, 2, 2, 3, 3, 2.5, 2.5, -3, -3, 1j, 1j, 0)
+ #channel = (0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0)
src = blocks.vector_source_c(tx_data, False, fft_len)
chan = blocks.multiply_const_vcc(channel)
chanest = digital.ofdm_chanest_vcvc(sync_symbol, (), 1)
sink = blocks.vector_sink_c(fft_len)
+ sink_chanest = blocks.vector_sink_c(fft_len)
self.tb.connect(src, chan, chanest, sink)
+ self.tb.connect((chanest, 1), sink_chanest)
self.tb.run()
+ self.assertEqual(sink_chanest.data(), channel)
tags = sink.tags()
for tag in tags:
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_carr_offset':
@@ -194,6 +203,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
data_symbol = (0, 0, 0, 1, -1, 1, -1, 1, 0, 1, -1, -1, -1, 1, 0, 0)
# Channel 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
# Shifted (0, 0, 0, 0, 0, 1j, -1, 1, -1j, 1j, 0, 1, -1j, -1, -1j, 1)
+ chanest_exp = (0, 0, 0, 5, 6, 7, 8, 9, 0, 11, 12, 13, 14, 15, 0, 0)
tx_data = shift_tuple(sync_symbol1, carr_offset) + \
shift_tuple(sync_symbol2, carr_offset) + \
shift_tuple(data_symbol, carr_offset)
@@ -211,9 +221,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
self.assertEqual(pmt.to_long(tag.value), carr_offset)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
chan_est = pmt.c32vector_elements(tag.value)
- for i in range(fft_len):
- if shift_tuple(sync_symbol2, carr_offset)[i]: # Only here the channel can be estimated
- self.assertEqual(chan_est[i], channel[i])
+ self.assertEqual(chan_est, chanest_exp)
self.assertEqual(sink.data(), tuple(numpy.multiply(shift_tuple(data_symbol, carr_offset), channel)))
@@ -227,7 +235,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
wgn_amplitude = 0.05
min_chan_ampl = 0.1
max_chan_ampl = 5
- n_iter = 20
+ n_iter = 20 # The more the accurater
def run_flow_graph(sync_sym1, sync_sym2, data_sym):
top_block = gr.top_block()
carr_offset = random.randint(-max_offset/2, max_offset/2) * 2
@@ -253,7 +261,7 @@ class qa_ofdm_sync_eqinit_vcvc (gr_unittest.TestCase):
carr_offset_hat = pmt.to_long(tag.value)
self.assertEqual(carr_offset, carr_offset_hat)
if pmt.symbol_to_string(tag.key) == 'ofdm_sync_chan_taps':
- channel_est = pmt.c32vector_elements(tag.value)
+ channel_est = shift_tuple(pmt.c32vector_elements(tag.value), carr_offset)
shifted_carrier_mask = shift_tuple(carrier_mask, carr_offset)
for i in range(fft_len):
if shifted_carrier_mask[i] and channel_est[i]:
diff --git a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
index a7cf78e928..0c79125669 100755
--- a/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
+++ b/gr-digital/python/qa_ofdm_frame_equalizer_vcvc.py
@@ -34,7 +34,14 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
self.tb = None
def test_001_simple (self):
- """ Very simple functionality testing """
+ """ Very simple functionality testing:
+ - static equalizer
+ - init channel state with all ones
+ - transmit all ones
+ - make sure we rx all ones
+ - Tag check: put in frame length tag and one other random tag,
+ make sure they're propagated
+ """
fft_len = 8
equalizer = digital.ofdm_equalizer_static(fft_len)
n_syms = 3
@@ -48,18 +55,135 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
chan_tag.offset = 0
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, (1,) * fft_len)
- src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key)
+ random_tag = gr.tag_t()
+ random_tag.offset = 1
+ random_tag.key = pmt.string_to_symbol("foo")
+ random_tag.value = pmt.from_long(42)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, random_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key)
sink = blocks.vector_sink_c(fft_len)
self.tb.connect(src, eq, sink)
self.tb.run ()
# Check data
self.assertEqual(tx_data, sink.data())
+ # Check tags
+ tag_dict = dict()
for tag in sink.tags():
- self.assertEqual(pmt.symbol_to_string(tag.key), len_tag_key)
- self.assertEqual(pmt.to_long(tag.value), n_syms)
+ ptag = gr.tag_to_python(tag)
+ tag_dict[ptag.key] = ptag.value
+ expected_dict = {
+ 'frame_len': n_syms,
+ 'foo': 42
+ }
+ self.assertEqual(tag_dict, expected_dict)
+
+ def test_001b_simple_skip_nothing (self):
+ """
+ Same as before, but put a skip-header in there
+ """
+ fft_len = 8
+ equalizer = digital.ofdm_equalizer_static(fft_len, symbols_skipped=1)
+ n_syms = 3
+ len_tag_key = "frame_len"
+ tx_data = (1,) * fft_len * n_syms
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ chan_tag.value = pmt.init_c32vector(fft_len, (1,) * fft_len)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertEqual(tx_data, sink.data())
+
+ def test_001c_carrier_offset_no_cp (self):
+ """
+ Same as before, but put a carrier offset in there
+ """
+ fft_len = 8
+ cp_len = 0
+ n_syms = 1
+ carr_offset = 1
+ occupied_carriers = ((-2, -1, 1, 2),)
+ tx_data = (
+ 0, 0, 0, -1j, -1j, 0, -1j, -1j,
+ )
+ # The rx'd signal is shifted
+ rx_expected = (0, 0, 1, 1, 0, 1, 1, 0) * n_syms
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers)
+ len_tag_key = "frame_len"
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ # Note: this is shifted to the correct position!
+ chan_tag.value = pmt.init_c32vector(fft_len, (0, 0, -1j, -1j, 0, -1j, -1j, 0))
+ offset_tag = gr.tag_t()
+ offset_tag.offset = 0
+ offset_tag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
+ offset_tag.value = pmt.from_long(carr_offset)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, offset_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), cp_len, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertComplexTuplesAlmostEqual(rx_expected, sink.data(), places=4)
+
+ def test_001c_carrier_offset_cp (self):
+ """
+ Same as before, but put a carrier offset in there and a CP
+ """
+ fft_len = 8
+ cp_len = 2
+ n_syms = 3
+ # cp_len/fft_len == 1/4, therefore, the phase is rotated by
+ # carr_offset * \pi/2 in every symbol
+ occupied_carriers = ((-2, -1, 1, 2),)
+ carr_offset = -1
+ tx_data = (
+ 0,-1j,-1j, 0,-1j,-1j, 0, 0,
+ 0, -1, -1, 0, -1, -1, 0, 0,
+ 0, 1j, 1j, 0, 1j, 1j, 0, 0,
+ )
+ # Rx'd signal is corrected
+ rx_expected = (0, 0, 1, 1, 0, 1, 1, 0) * n_syms
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers)
+ len_tag_key = "frame_len"
+ len_tag = gr.tag_t()
+ len_tag.offset = 0
+ len_tag.key = pmt.string_to_symbol(len_tag_key)
+ len_tag.value = pmt.from_long(n_syms)
+ chan_tag = gr.tag_t()
+ chan_tag.offset = 0
+ chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
+ chan_tag.value = pmt.init_c32vector(fft_len, (0, 0, 1, 1, 0, 1, 1, 0))
+ offset_tag = gr.tag_t()
+ offset_tag.offset = 0
+ offset_tag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
+ offset_tag.value = pmt.from_long(carr_offset)
+ src = blocks.vector_source_c(tx_data, False, fft_len, (len_tag, chan_tag, offset_tag))
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), cp_len, len_tag_key)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ # Check data
+ self.assertComplexTuplesAlmostEqual(rx_expected, sink.data(), places=4)
def test_002_static (self):
+ """
+ - Add a simple channel
+ - Make symbols QPSK
+ """
fft_len = 8
# 4 5 6 7 0 1 2 3
tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
@@ -76,14 +200,18 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers, pilot_carriers, pilot_symbols)
channel = [
0, 0, 1, 1, 0, 1, 1, 0,
- 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly...
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (but less than \pi/2)
0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
- 0, 0, 1j, 1j, 0, 1j, 1j, 0 # ...and again here.
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0
+ ]
+ channel = [
+ 0, 0, 1, 1, 0, 1, 1, 0,
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (but less than \pi/2)
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0
]
for idx in range(fft_len, 2*fft_len):
channel[idx] = channel[idx-fft_len] * numpy.exp(1j * .1 * numpy.pi * (numpy.random.rand()-.5))
- idx2 = idx+2*fft_len
- channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
len_tag_key = "frame_len"
len_tag = gr.tag_t()
len_tag.offset = 0
@@ -94,17 +222,75 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, channel[:fft_len])
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key, True)
sink = blocks.vector_sink_c(fft_len)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key, True)
self.tb.connect(src, eq, sink)
self.tb.run ()
rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
+ # Check data
self.assertEqual(tx_data, rx_data)
+ # Check tags
+ tag_dict = dict()
for tag in sink.tags():
- if pmt.symbol_to_string(tag.key) == len_tag_key:
- self.assertEqual(pmt.to_long(tag.value), 4)
- if pmt.symbol_to_string(tag.key) == "ofdm_sync_chan_taps":
- self.assertEqual(list(pmt.c32vector_elements(tag.value)), channel[-fft_len:])
+ ptag = gr.tag_to_python(tag)
+ tag_dict[ptag.key] = ptag.value
+ if ptag.key == 'ofdm_sync_chan_taps':
+ tag_dict[ptag.key] = list(pmt.c32vector_elements(tag.value))
+ else:
+ tag_dict[ptag.key] = pmt.to_python(tag.value)
+ expected_dict = {
+ 'frame_len': 4,
+ 'ofdm_sync_chan_taps': channel[-fft_len:]
+ }
+ self.assertEqual(tag_dict, expected_dict)
+
+ def test_002_static_wo_tags (self):
+ """ Same as before, but the input stream has no tag.
+ We specify the frame size in the constructor.
+ We also specify a tag key, so the output stream *should* have
+ a length tag.
+ """
+ fft_len = 8
+ n_syms = 4
+ # 4 5 6 7 0 1 2 3
+ tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
+ -1, -1, 0, 2, -1, 2, 0, -1, # 8
+ -1, -1, 3, 0, -1, 1, 0, -1, # 16 (Pilot symbols)
+ -1, -1, 1, 1, -1, 0, 2, -1] # 24
+ cnst = digital.constellation_qpsk()
+ tx_signal = [cnst.map_to_points_v(x)[0] if x != -1 else 0 for x in tx_data]
+ occupied_carriers = ((1, 2, 6, 7),)
+ pilot_carriers = ((), (), (1, 2, 6, 7), ())
+ pilot_symbols = (
+ [], [], [cnst.map_to_points_v(x)[0] for x in (1, 0, 3, 0)], []
+ )
+ equalizer = digital.ofdm_equalizer_static(fft_len, occupied_carriers, pilot_carriers, pilot_symbols)
+ channel = [
+ 0, 0, 1, 1, 0, 1, 1, 0,
+ 0, 0, 1, 1, 0, 1, 1, 0, # These coefficients will be rotated slightly (below)...
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0, # Go crazy here!
+ 0, 0, 1j, 1j, 0, 1j, 1j, 0 # ...and again here.
+ ]
+ for idx in range(fft_len, 2*fft_len):
+ channel[idx] = channel[idx-fft_len] * numpy.exp(1j * .1 * numpy.pi * (numpy.random.rand()-.5))
+ idx2 = idx+2*fft_len
+ channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
+ src = gr.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len)
+ # We do specify a length tag, it should then appear at the output
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, "frame_len", False, n_syms)
+ sink = blocks.vector_sink_c(fft_len)
+ self.tb.connect(src, eq, sink)
+ self.tb.run ()
+ rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
+ self.assertEqual(tx_data, rx_data)
+ # Check len tag
+ tags = sink.tags()
+ len_tag = dict()
+ for tag in tags:
+ ptag = gr.tag_to_python(tag)
+ if ptag.key == 'frame_len':
+ len_tag[ptag.key] = ptag.value
+ self.assertEqual(len_tag, {'frame_len': 4})
def test_002_static_wo_tags (self):
fft_len = 8
@@ -132,14 +318,15 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
idx2 = idx+2*fft_len
channel[idx2] = channel[idx2] * numpy.exp(1j * 0 * numpy.pi * (numpy.random.rand()-.5))
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len)
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), "", False, 4)
sink = blocks.vector_sink_c(fft_len)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, "", False, 4)
self.tb.connect(src, eq, sink)
self.tb.run ()
rx_data = [cnst.decision_maker_v((x,)) if x != 0 else -1 for x in sink.data()]
self.assertEqual(tx_data, rx_data)
def test_002_simpledfe (self):
+ """ Use the simple DFE equalizer. """
fft_len = 8
# 4 5 6 7 0 1 2 3
tx_data = [-1, -1, 1, 2, -1, 3, 0, -1, # 0
@@ -176,7 +363,7 @@ class qa_ofdm_frame_equalizer_vcvc (gr_unittest.TestCase):
chan_tag.key = pmt.string_to_symbol("ofdm_sync_chan_taps")
chan_tag.value = pmt.init_c32vector(fft_len, channel[:fft_len])
src = blocks.vector_source_c(numpy.multiply(tx_signal, channel), False, fft_len, (len_tag, chan_tag))
- eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), len_tag_key, True)
+ eq = digital.ofdm_frame_equalizer_vcvc(equalizer.base(), 0, len_tag_key, True)
sink = blocks.vector_sink_c(fft_len)
self.tb.connect(src, eq, sink)
self.tb.run ()
diff --git a/gr-digital/python/qa_ofdm_serializer_vcc.py b/gr-digital/python/qa_ofdm_serializer_vcc.py
index 4449c1a24d..c53b4e4955 100755
--- a/gr-digital/python/qa_ofdm_serializer_vcc.py
+++ b/gr-digital/python/qa_ofdm_serializer_vcc.py
@@ -20,13 +20,13 @@
# Boston, MA 02110-1301, USA.
#
+import numpy
from gnuradio import gr, gr_unittest
+import pmt
import blocks_swig as blocks
import fft_swig as fft
import analog_swig as analog
import digital_swig as digital
-import pmt
-import numpy
class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
@@ -39,7 +39,6 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_001_simple (self):
""" Standard test """
fft_len = 16
- tx_symbols = range(1, 16);
tx_symbols = (0, 1, 1j, 2, 3, 0, 0, 0, 0, 0, 0, 4, 5, 2j, 6, 0,
0, 7, 8, 3j, 9, 0, 0, 0, 0, 0, 0, 10, 4j, 11, 12, 0,
0, 13, 1j, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 2j, 0, 0)
@@ -52,7 +51,34 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(n_syms)
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag,))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, False)
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, "", False)
+ sink = blocks.vector_sink_c()
+ self.tb.connect(src, serializer, sink)
+ self.tb.run ()
+ self.assertEqual(sink.data(), expected_result)
+ self.assertEqual(len(sink.tags()), 1)
+ result_tag = sink.tags()[0]
+ self.assertEqual(pmt.symbol_to_string(result_tag.key), tag_name)
+ self.assertEqual(pmt.to_long(result_tag.value), n_syms * len(occupied_carriers[0]))
+
+ def test_001b_shifted (self):
+ """ Same as before, but shifted, because that's the normal mode in OFDM Rx """
+ fft_len = 16
+ tx_symbols = (
+ 0, 0, 0, 0, 0, 0, 1, 2, 0, 3, 4, 5, 0, 0, 0, 0,
+ 0, 0, 0, 0, 6, 1j, 7, 8, 0, 9, 10, 1j, 11, 0, 0, 0,
+ 0, 0, 0, 0, 0, 12, 13, 14, 0, 15, 16, 17, 0, 0, 0, 0,
+ )
+ expected_result = tuple(range(18))
+ occupied_carriers = ((13, 14, 15, 1, 2, 3), (-4, -2, -1, 1, 2, 4),)
+ n_syms = len(tx_symbols)/fft_len
+ tag_name = "len"
+ tag = gr.tag_t()
+ tag.offset = 0
+ tag.key = pmt.string_to_symbol(tag_name)
+ tag.value = pmt.from_long(n_syms)
+ src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag,))
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name)
sink = blocks.vector_sink_c()
self.tb.connect(src, serializer, sink)
self.tb.run ()
@@ -83,8 +109,15 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
offsettag.key = pmt.string_to_symbol("ofdm_sync_carr_offset")
offsettag.value = pmt.from_long(carr_offset)
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag, offsettag))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "", 0, False)
sink = blocks.vector_sink_c()
+ serializer = digital.ofdm_serializer_vcc(
+ fft_len,
+ occupied_carriers,
+ tag_name,
+ "", 0,
+ "ofdm_sync_carr_offset",
+ False
+ )
self.tb.connect(src, serializer, sink)
self.tb.run ()
self.assertEqual(sink.data(), expected_result)
@@ -96,29 +129,39 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_003_connect (self):
""" Connect carrier_allocator to ofdm_serializer,
make sure output==input """
- fft_len = 32
- n_syms = 10
+ fft_len = 8
+ n_syms = 1
occupied_carriers = ((1, 2, 6, 7),)
pilot_carriers = ((3,),(5,))
pilot_symbols = ((1j,),(-1j,))
- sync_word = (range(fft_len),)
- tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
+ #tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
+ tx_data = (1, 2, 3, 4)
tag_name = "len"
tag = gr.tag_t()
tag.offset = 0
tag.key = pmt.string_to_symbol(tag_name)
tag.value = pmt.from_long(len(tx_data))
src = blocks.vector_source_c(tx_data, False, 1, (tag,))
- alloc = digital.ofdm_carrier_allocator_cvc(fft_len,
- occupied_carriers,
- pilot_carriers,
- pilot_symbols, sync_word,
- tag_name)
- serializer = digital.ofdm_serializer_vcc(alloc)
+ alloc = digital.ofdm_carrier_allocator_cvc(
+ fft_len,
+ occupied_carriers,
+ pilot_carriers,
+ pilot_symbols,
+ (), # No sync word
+ tag_name,
+ True # Output is shifted (default)
+ )
+ serializer = digital.ofdm_serializer_vcc(
+ alloc,
+ "", # Len tag key
+ 0, # Symbols skipped
+ "", # Carrier offset key
+ True # Input is shifted (default)
+ )
sink = blocks.vector_sink_c()
self.tb.connect(src, alloc, serializer, sink)
self.tb.run ()
- self.assertEqual(sink.data()[4:], tx_data)
+ self.assertEqual(sink.data(), tx_data)
def test_004_connect (self):
"""
@@ -129,15 +172,13 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
- Frequency offset is -2 carriers
"""
fft_len = 8
- n_syms = 2
+ n_syms = 1
carr_offset = -2
- freq_offset = 2 * numpy.pi * carr_offset / fft_len # If the sampling rate == 1
- occupied_carriers = ((1, 2, -2, -1),)
- pilot_carriers = ((3,),(5,))
+ freq_offset = 1.0 / fft_len * carr_offset # Normalized frequency
+ occupied_carriers = ((-2, -1, 1, 2),)
+ pilot_carriers = ((-3,),(3,))
pilot_symbols = ((1j,),(-1j,))
- sync_word = (range(fft_len),)
- tx_data = tuple([numpy.random.randint(0, 10) for x in range(4 * n_syms)])
- #tx_data = (1,) * occupied_carriers[0] * n_syms
+ tx_data = (1, 2, 3, 4)
tag_name = "len"
tag = gr.tag_t()
tag.offset = 0
@@ -151,13 +192,17 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
alloc = digital.ofdm_carrier_allocator_cvc(fft_len,
occupied_carriers,
pilot_carriers,
- pilot_symbols, sync_word,
+ pilot_symbols, (),
tag_name)
- tx_ifft = fft.fft_vcc(fft_len, False, ())
- offset_sig = analog.sig_source_c(1.0, analog.GR_COS_WAVE, freq_offset, 1.0)
+ tx_ifft = fft.fft_vcc(fft_len, False, (1.0/fft_len,)*fft_len, True)
+ oscillator = analog.sig_source_c(1.0, analog.GR_COS_WAVE, freq_offset, 1.0/fft_len)
mixer = blocks.multiply_cc()
rx_fft = fft.fft_vcc(fft_len, True, (), True)
- serializer = digital.ofdm_serializer_vcc(alloc)
+ sink2 = blocks.vector_sink_c(fft_len)
+ self.tb.connect(rx_fft, sink2)
+ serializer = digital.ofdm_serializer_vcc(
+ alloc, "", 0, "ofdm_sync_carr_offset", True
+ )
sink = blocks.vector_sink_c()
self.tb.connect(
src, alloc, tx_ifft,
@@ -166,10 +211,9 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
blocks.stream_to_vector(gr.sizeof_gr_complex, fft_len),
rx_fft, serializer, sink
)
- self.tb.connect(offset_sig, (mixer, 1))
+ self.tb.connect(oscillator, (mixer, 1))
self.tb.run ()
- # FIXME check this
- #self.assertEqual(sink.data(), tx_data)
+ self.assertComplexTuplesAlmostEqual(sink.data()[-len(occupied_carriers[0]):], tx_data, places=4)
def test_005_packet_len_tag (self):
""" Standard test """
@@ -191,7 +235,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
tag2.key = pmt.string_to_symbol("packet_len")
tag2.value = pmt.from_long(len(expected_result))
src = blocks.vector_source_c(tx_symbols, False, fft_len, (tag, tag2))
- serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "packet_len", 0, False)
+ serializer = digital.ofdm_serializer_vcc(fft_len, occupied_carriers, tag_name, "packet_len", 0, "", False)
sink = blocks.vector_sink_c()
self.tb.connect(src, serializer, sink)
self.tb.run ()
@@ -204,7 +248,7 @@ class qa_ofdm_serializer_vcc (gr_unittest.TestCase):
def test_099 (self):
""" Make sure it fails if it should """
fft_len = 16
- occupied_carriers = ((1, 3, 4, 11, 12, 17),)
+ occupied_carriers = ((1, 3, 4, 11, 12, 112),)
tag_name = "len"
self.assertRaises(RuntimeError, digital.ofdm_serializer_vcc, fft_len, occupied_carriers, tag_name)
diff --git a/gr-digital/python/qa_ofdm_sync_sc_cfb.py b/gr-digital/python/qa_ofdm_sync_sc_cfb.py
index 06c5a9dc35..3a9bdb5d14 100755
--- a/gr-digital/python/qa_ofdm_sync_sc_cfb.py
+++ b/gr-digital/python/qa_ofdm_sync_sc_cfb.py
@@ -26,6 +26,7 @@ import random
from gnuradio import gr, gr_unittest
import blocks_swig as blocks
import analog_swig as analog
+import channels_swig as channels
try:
# This will work when feature #505 is added.
@@ -78,26 +79,23 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
self.assertEqual(numpy.sum(sig1_detect), 1)
self.assertEqual(numpy.sum(sig2_detect), 1)
-
def test_002_freq (self):
""" Add a fine frequency offset and see if that get's detected properly """
fft_len = 32
cp_len = 4
- freq_offset = 0.1 # Must stay < 2*pi/fft_len = 0.196 (otherwise, it's coarse)
+ # This frequency offset is normalized to rads, i.e. \pi == f_s/2
+ max_freq_offset = 2*numpy.pi/fft_len # Otherwise, it's coarse
+ freq_offset = ((2 * random.random()) - 1) * max_freq_offset
sig_len = (fft_len + cp_len) * 10
sync_symbol = [(random.randint(0, 1)*2)-1 for x in range(fft_len/2)] * 2
tx_signal = sync_symbol[-cp_len:] + \
sync_symbol + \
[(random.randint(0, 1)*2)-1 for x in range(sig_len)]
- mult = blocks.multiply_cc()
- add = blocks.add_cc()
- sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len, True)
sink_freq = blocks.vector_sink_f()
sink_detect = blocks.vector_sink_b()
- self.tb.connect(blocks.vector_source_c(tx_signal), (mult, 0), (add, 0))
- self.tb.connect(analog.sig_source_c(2 * numpy.pi, analog.GR_SIN_WAVE, freq_offset, 1.0), (mult, 1))
- self.tb.connect(analog.noise_source_c(analog.GR_GAUSSIAN, .01), (add, 1))
- self.tb.connect(add, sync)
+ channel = channels.channel_model(0.005, freq_offset / 2.0 / numpy.pi)
+ self.tb.connect(blocks.vector_source_c(tx_signal), channel, sync)
self.tb.connect((sync, 0), sink_freq)
self.tb.connect((sync, 1), sink_detect)
self.tb.run()
@@ -105,7 +103,6 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
est_freq_offset = 2 * phi_hat / fft_len
self.assertAlmostEqual(est_freq_offset, freq_offset, places=2)
-
def test_003_multiburst (self):
""" Send several bursts, see if the number of detects is correct.
Burst lengths and content are random.
@@ -124,75 +121,55 @@ class qa_ofdm_sync_sc_cfb (gr_unittest.TestCase):
sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
sink_freq = blocks.vector_sink_f()
sink_detect = blocks.vector_sink_b()
- self.tb.connect(blocks.vector_source_c(tx_signal), (add, 0))
- self.tb.connect(analog.noise_source_c(analog.GR_GAUSSIAN, .005), (add, 1))
- self.tb.connect(add, sync)
+ channel = channels.channel_model(0.005)
+ self.tb.connect(blocks.vector_source_c(tx_signal), channel, sync)
self.tb.connect((sync, 0), sink_freq)
self.tb.connect((sync, 1), sink_detect)
self.tb.run()
- self.assertEqual(numpy.sum(sink_detect.data()), n_bursts,
+ n_bursts_detected = numpy.sum(sink_detect.data())
+ # We allow for one false alarm or missed burst
+ self.assertTrue(abs(n_bursts_detected - n_bursts) <= 1,
msg="""Because of statistics, it is possible (though unlikely)
that the number of detected bursts differs slightly. If the number of detects is
off by one or two, run the test again and see what happen.
Detection error was: %d """ % (numpy.sum(sink_detect.data()) - n_bursts)
)
- # FIXME ofdm_mod is currently not working
- #def test_004_ofdm_packets (self):
- #"""
- #Send several bursts, see if the number of detects is correct.
- #Burst lengths and content are random.
- #"""
- #n_bursts = 42
- #fft_len = 64
- #cp_len = 12
- #tx_signal = []
- #packets = []
- #tagname = "length"
- #min_packet_length = 100
- #max_packet_length = 100
- #sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len/2)]
- #for i in xrange(n_bursts):
- #packet_length = random.randint(min_packet_length,
- #max_packet_length+1)
- #packet = [random.randint(0, 255) for i in range(packet_length)]
- #packets.append(packet)
- #data, tags = tagged_streams.packets_to_vectors(
- #packets, tagname, vlen=1)
- #total_length = len(data)
-
- #src = blocks.vector_source_b(data, False, 1, tags)
- #mod = ofdm_tx(
- #fft_len=fft_len,
- #cp_len=cp_len,
- #length_tag_name=tagname,
- #occupied_carriers=(range(1, 27) + range(38, 64),),
- #pilot_carriers=((0,),),
- #pilot_symbols=((100,),),
- #)
- #rate_in = 16000
- #rate_out = 48000
- #ratio = float(rate_out) / rate_in
- #throttle1 = gr.throttle(gr.sizeof_gr_complex, rate_in)
- #sink_countbursts = gr.vector_sink_c()
- #head = gr.head(gr.sizeof_gr_complex, int(total_length * ratio*2))
- #add = gr.add_cc()
- #sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
- #sink_freq = blocks.vector_sink_f()
- #sink_detect = blocks.vector_sink_b()
- #noise_level = 0.01
- #noise = gr.noise_source_c(gr.GR_GAUSSIAN, noise_level)
- #self.tb.connect(src, mod, blocks.null_sink(gr.sizeof_gr_complex))
- #self.tb.connect(insert_zeros, sink_countbursts)
- #self.tb.connect(noise, (add, 1))
- #self.tb.connect(add, sync)
- #self.tb.connect((sync, 0), sink_freq)
- #self.tb.connect((sync, 1), sink_detect)
- #self.tb.run()
- #count_data = sink_countbursts.data()
- #count_tags = sink_countbursts.tags()
- #burstcount = tagged_streams.count_bursts(count_data, count_tags, tagname)
- #self.assertEqual(numpy.sum(sink_detect.data()), burstcount)
+ def test_004_ofdm_packets (self):
+ """
+ Send several bursts using ofdm_tx, see if the number of detects is correct.
+ Burst lengths and content are random.
+ """
+ n_bursts = 42
+ fft_len = 64
+ cp_len = 16
+ # Here, coarse freq offset is allowed
+ max_freq_offset = 2*numpy.pi/fft_len * 4
+ freq_offset = ((2 * random.random()) - 1) * max_freq_offset
+ tx_signal = []
+ packets = []
+ tagname = "packet_length"
+ min_packet_length = 10
+ max_packet_length = 50
+ sync_sequence = [random.randint(0, 1)*2-1 for x in range(fft_len/2)]
+ for i in xrange(n_bursts):
+ packet_length = random.randint(min_packet_length,
+ max_packet_length+1)
+ packet = [random.randint(0, 255) for i in range(packet_length)]
+ packets.append(packet)
+ data, tags = tagged_streams.packets_to_vectors(packets, tagname, vlen=1)
+ total_length = len(data)
+ src = blocks.vector_source_b(data, False, 1, tags)
+ mod = ofdm_tx(packet_length_tag_key=tagname)
+ sync = digital.ofdm_sync_sc_cfb(fft_len, cp_len)
+ sink_freq = blocks.vector_sink_f()
+ sink_detect = blocks.vector_sink_b()
+ noise_level = 0.005
+ channel = channels.channel_model(noise_level, freq_offset / 2 / numpy.pi)
+ self.tb.connect(src, mod, channel, sync, sink_freq)
+ self.tb.connect((sync, 1), sink_detect)
+ self.tb.run()
+ self.assertEqual(numpy.sum(sink_detect.data()), n_bursts)
if __name__ == '__main__':
diff --git a/gr-digital/python/qa_ofdm_txrx.py b/gr-digital/python/qa_ofdm_txrx.py
index 15c5b90fe9..568ae0d40a 100755
--- a/gr-digital/python/qa_ofdm_txrx.py
+++ b/gr-digital/python/qa_ofdm_txrx.py
@@ -21,13 +21,47 @@
#
import numpy
+import scipy
import random
from gnuradio import gr, gr_unittest
-import digital_swig as digital
import blocks_swig as blocks
+import digital_swig as digital
+import channels_swig as channels
from ofdm_txrx import ofdm_tx, ofdm_rx
from utils import tagged_streams
+# Set this to true if you need to write out data
+LOG_DEBUG_INFO=False
+
+class ofdm_tx_fg (gr.top_block):
+ def __init__(self, data, len_tag_key):
+ gr.top_block.__init__(self, "ofdm_tx")
+ tx_data, tags = tagged_streams.packets_to_vectors((data,), len_tag_key)
+ src = blocks.vector_source_b(data, False, 1, tags)
+ self.tx = ofdm_tx(packet_length_tag_key=len_tag_key, debug_log=LOG_DEBUG_INFO)
+ self.sink = blocks.vector_sink_c()
+ self.connect(src, self.tx, self.sink)
+
+ def get_tx_samples(self):
+ return self.sink.data()
+
+class ofdm_rx_fg (gr.top_block):
+ def __init__(self, samples, len_tag_key, channel=None, prepend_zeros=100):
+ gr.top_block.__init__(self, "ofdm_rx")
+ if prepend_zeros:
+ samples = (0,) * prepend_zeros + tuple(samples)
+ src = blocks.vector_source_c(tuple(samples) + (0,) * 1000)
+ self.rx = ofdm_rx(frame_length_tag_key=len_tag_key, debug_log=LOG_DEBUG_INFO)
+ if channel is not None:
+ self.connect(src, channel, self.rx)
+ else:
+ self.connect(src, self.rx)
+ self.sink = blocks.vector_sink_b()
+ self.connect(self.rx, self.sink)
+
+ def get_rx_bytes(self):
+ return self.sink.data()
+
class test_ofdm_txrx (gr_unittest.TestCase):
def setUp (self):
@@ -36,26 +70,72 @@ class test_ofdm_txrx (gr_unittest.TestCase):
def tearDown (self):
self.tb = None
- def test_001 (self):
- pass
- #len_tag_key = 'frame_len'
- #n_bytes = 100
- #test_data = [random.randint(0, 255) for x in range(n_bytes)]
- #tx_data, tags = tagged_streams.packets_to_vectors((test_data,), len_tag_key)
- #src = blocks.vector_source_b(test_data, False, 1, tags)
- #tx = ofdm_tx(frame_length_tag_key=len_tag_key)
- #rx = ofdm_rx(frame_length_tag_key=len_tag_key)
- #self.assertEqual(tx.sync_word1, rx.sync_word1)
- #self.assertEqual(tx.sync_word2, rx.sync_word2)
- #delay = blocks.delay(gr.sizeof_gr_complex, 100)
- #noise = analog.noise_source_c(analog.GR_GAUSSIAN, 0.05)
- #add = blocks.add_cc()
- #sink = blocks.vector_sink_b()
- ##self.tb.connect(src, tx, add, rx, sink)
- ##self.tb.connect(noise, (add, 1))
- #self.tb.connect(src, tx, blocks.null_sink(gr.sizeof_gr_complex))
- #self.tb.run()
+ def test_001_tx (self):
+ """ Just make sure the Tx works in general """
+ len_tag_key = 'frame_len'
+ n_bytes = 52
+ n_samples_expected = (numpy.ceil(1.0 * (n_bytes + 4) / 6) + 3) * 80
+ test_data = [random.randint(0, 255) for x in range(n_bytes)]
+ tx_data, tags = tagged_streams.packets_to_vectors((test_data,), len_tag_key)
+ src = blocks.vector_source_b(test_data, False, 1, tags)
+ tx = ofdm_tx(packet_length_tag_key=len_tag_key)
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ self.assertEqual(len(tx_fg.get_tx_samples()), n_samples_expected)
+
+ def test_002_rx_only_noise(self):
+ """ Run the RX with only noise, check it doesn't crash
+ or return a burst. """
+ len_tag_key = 'frame_len'
+ samples = (0,) * 1000
+ channel = channels.channel_model(0.1)
+ rx_fg = ofdm_rx_fg(samples, len_tag_key, channel)
+ rx_fg.run()
+ self.assertEqual(len(rx_fg.get_rx_bytes()), 0)
+
+ def test_003_tx1packet(self):
+ """ Transmit one packet, with slight AWGN and slight frequency + timing offset.
+ Check packet is received and no bit errors have occurred. """
+ len_tag_key = 'frame_len'
+ n_bytes = 21
+ fft_len = 64
+ test_data = tuple([random.randint(0, 255) for x in range(n_bytes)])
+ # 1.0/fft_len is one sub-carrier, a fine freq offset stays below that
+ freq_offset = 1.0 / fft_len * 0.7
+ #channel = channels.channel_model(0.01, freq_offset)
+ channel = None
+ # Tx
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ tx_samples = tx_fg.get_tx_samples()
+ # Rx
+ rx_fg = ofdm_rx_fg(tx_samples, len_tag_key, channel, prepend_zeros=100)
+ rx_fg.run()
+ rx_data = rx_fg.get_rx_bytes()
+ self.assertEqual(tuple(tx_fg.tx.sync_word1), tuple(rx_fg.rx.sync_word1))
+ self.assertEqual(tuple(tx_fg.tx.sync_word2), tuple(rx_fg.rx.sync_word2))
+ self.assertEqual(test_data, rx_data)
+ def test_004_tx1packet_large_fO(self):
+ """ Transmit one packet, with slight AWGN and large frequency offset.
+ Check packet is received and no bit errors have occurred. """
+ fft_len = 64
+ len_tag_key = 'frame_len'
+ n_bytes = 21
+ test_data = tuple([random.randint(0, 255) for x in range(n_bytes)])
+ #test_data = tuple([255 for x in range(n_bytes)])
+ # 1.0/fft_len is one sub-carrier
+ frequency_offset = 1.0 / fft_len * 2.5
+ channel = channels.channel_model(0.00001, frequency_offset)
+ # Tx
+ tx_fg = ofdm_tx_fg(test_data, len_tag_key)
+ tx_fg.run()
+ tx_samples = tx_fg.get_tx_samples()
+ # Rx
+ rx_fg = ofdm_rx_fg(tx_samples, len_tag_key, channel, prepend_zeros=100)
+ rx_fg.run()
+ rx_data = rx_fg.get_rx_bytes()
+ self.assertEqual(test_data, rx_data)
if __name__ == '__main__':
gr_unittest.run(test_ofdm_txrx, "test_ofdm_txrx.xml")
diff --git a/gr-digital/python/qa_packet_headerparser_b.py b/gr-digital/python/qa_packet_headerparser_b.py
index ff74da5657..cf8e1e932e 100755
--- a/gr-digital/python/qa_packet_headerparser_b.py
+++ b/gr-digital/python/qa_packet_headerparser_b.py
@@ -48,8 +48,11 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0
)
packet_len_tagname = "packet_len"
-
- src = blocks.vector_source_b(encoded_headers)
+ random_tag = gr.tag_t()
+ random_tag.offset = 5
+ random_tag.key = pmt.string_to_symbol("foo")
+ random_tag.value = pmt.from_long(42)
+ src = blocks.vector_source_b(encoded_headers, tags=(random_tag,))
parser = digital.packet_headerparser_b(32, packet_len_tagname)
sink = blocks.message_debug()
self.tb.connect(src, parser)
@@ -62,7 +65,7 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
msg1 = pmt.to_python(sink.get_message(0))
msg2 = pmt.to_python(sink.get_message(1))
msg3 = pmt.to_python(sink.get_message(2))
- self.assertEqual(msg1, {'packet_len': 4, 'packet_num': 0})
+ self.assertEqual(msg1, {'packet_len': 4, 'packet_num': 0, 'foo': 42})
self.assertEqual(msg2, {'packet_len': 2, 'packet_num': 1})
self.assertEqual(msg3, False)
@@ -124,8 +127,11 @@ class qa_packet_headerparser_b (gr_unittest.TestCase):
self.assertEqual(sink.num_messages(), 2)
msg1 = pmt.to_python(sink.get_message(0))
msg2 = pmt.to_python(sink.get_message(1))
- self.assertEqual(msg1, {'packet_len': 193, 'frame_len': 25, 'packet_num': 0})
- self.assertEqual(msg2, {'packet_len': 8, 'frame_len': 1, 'packet_num': 1})
+ # Multiply with 4 because unpacked bytes have only two bits
+ self.assertEqual(msg1, {'packet_len': 193*4, 'frame_len': 25, 'packet_num': 0})
+ self.assertEqual(msg2, {'packet_len': 8*4, 'frame_len': 1, 'packet_num': 1})
if __name__ == '__main__':
gr_unittest.run(qa_packet_headerparser_b, "qa_packet_headerparser_b.xml")
+
+
diff --git a/gr-utils/python/modtool/templates.py b/gr-utils/python/modtool/templates.py
index 0b6176a513..7fef3f5b4e 100644
--- a/gr-utils/python/modtool/templates.py
+++ b/gr-utils/python/modtool/templates.py
@@ -147,7 +147,7 @@ namespace gr {
#if $blocktype == 'sink'
#set $outputsig = '0, 0, 0'
#else
-#set $outputsig = '<+MIN_IN+>, <+MAX_IN+>, sizeof (<+float+>)'
+#set $outputsig = '<+MIN_OUT+>, <+MAX_OUT+>, sizeof (<+float+>)'
#end if
/*
* The private constructor