commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 17/57: adding ber sink to qt gui


From: git
Subject: [Commit-gnuradio] [gnuradio] 17/57: adding ber sink to qt gui
Date: Wed, 21 May 2014 03:10:26 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch master
in repository gnuradio.

commit e23323e77d33c7e5cf2cd3add323bf15064babc5
Author: Nicholas McCarthy <address@hidden>
Date:   Tue Mar 25 18:05:54 2014 -0400

    adding ber sink to qt gui
---
 gr-fec/examples/cc_bercurve.grc                | 683 +++++++------------------
 gr-fec/include/gnuradio/fec/cc_decoder.h       |   2 +-
 gr-fec/lib/cc_decoder_impl.cc                  |  10 +-
 gr-fec/lib/cc_decoder_impl.h                   |   2 +-
 gr-fec/python/fec/bercurve_generator.py        |   2 +-
 gr-fec/python/fec/extended_encoder.py          |   3 +-
 gr-fec/python/fec/fec_raw_test.py              |   2 +-
 gr-qtgui/grc/qtgui_ber_sink_b.xml              | 109 ++++
 gr-qtgui/grc/qtgui_block_tree.xml              |   1 +
 gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt |   1 +
 gr-qtgui/include/gnuradio/qtgui/ber_sink_b.h   |  91 ++++
 gr-qtgui/lib/CMakeLists.txt                    |   1 +
 gr-qtgui/lib/ber_sink_b_impl.cc                | 408 +++++++++++++++
 gr-qtgui/lib/ber_sink_b_impl.h                 | 110 ++++
 gr-qtgui/swig/qtgui_swig.i                     |   3 +
 volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h   |  13 +-
 16 files changed, 939 insertions(+), 502 deletions(-)

diff --git a/gr-fec/examples/cc_bercurve.grc b/gr-fec/examples/cc_bercurve.grc
index a9c1bfb..f991b20 100644
--- a/gr-fec/examples/cc_bercurve.grc
+++ b/gr-fec/examples/cc_bercurve.grc
@@ -1,6 +1,6 @@
 <?xml version='1.0' encoding='ASCII'?>
 <flow_graph>
-  <timestamp>Tue Mar 25 13:27:18 2014</timestamp>
+  <timestamp>Tue Mar 25 15:21:46 2014</timestamp>
   <block>
     <key>options</key>
     <param>
@@ -64,7 +64,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>polys</value>
+      <value>esno_0</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -72,11 +72,11 @@
     </param>
     <param>
       <key>value</key>
-      <value>[79, 109]</value>
+      <value>numpy.arange(0, 4, .5) </value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(248, 86)</value>
+      <value>(14, 232)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -87,7 +87,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>framebits</value>
+      <value>polys</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -95,11 +95,11 @@
     </param>
     <param>
       <key>value</key>
-      <value>4096</value>
+      <value>[79, 109]</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(136, 85)</value>
+      <value>(248, 86)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -110,7 +110,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>samp_rate_0</value>
+      <value>framebits</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -118,11 +118,11 @@
     </param>
     <param>
       <key>value</key>
-      <value>35000000</value>
+      <value>4096</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(12, 85)</value>
+      <value>(136, 85)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -133,7 +133,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>rate</value>
+      <value>samp_rate_0</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -141,11 +141,11 @@
     </param>
     <param>
       <key>value</key>
-      <value>2</value>
+      <value>35000000</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(288, 12)</value>
+      <value>(12, 85)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -156,7 +156,7 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>k</value>
+      <value>rate</value>
     </param>
     <param>
       <key>_enabled</key>
@@ -164,11 +164,11 @@
     </param>
     <param>
       <key>value</key>
-      <value>7</value>
+      <value>2</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(205, 11)</value>
+      <value>(288, 12)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -179,19 +179,19 @@
     <key>variable</key>
     <param>
       <key>id</key>
-      <value>esno_0</value>
+      <value>k</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>False</value>
+      <value>True</value>
     </param>
     <param>
       <key>value</key>
-      <value>numpy.arange(0, 8, .5) </value>
+      <value>7</value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(13, 158)</value>
+      <value>(205, 11)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -206,15 +206,15 @@
     </param>
     <param>
       <key>_enabled</key>
-      <value>True</value>
+      <value>False</value>
     </param>
     <param>
       <key>value</key>
-      <value>numpy.arange(0, 2, .5) </value>
+      <value>numpy.arange(0, 8, .5) </value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(14, 232)</value>
+      <value>(13, 158)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -351,11 +351,11 @@
     <key>fec_bercurve_generator</key>
     <param>
       <key>id</key>
-      <value>fec_bercurve_generator_0_0</value>
+      <value>fec_bercurve_generator_0</value>
     </param>
     <param>
       <key>_enabled</key>
-      <value>False</value>
+      <value>True</value>
     </param>
     <param>
       <key>esno</key>
@@ -367,11 +367,11 @@
     </param>
     <param>
       <key>encoder_list</key>
-      <value>None</value>
+      <value>enc</value>
     </param>
     <param>
       <key>decoder_list</key>
-      <value>None</value>
+      <value>dec</value>
     </param>
     <param>
       <key>puncpat</key>
@@ -391,7 +391,7 @@
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(383, 131)</value>
+      <value>(384, 15)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -400,65 +400,34 @@
     <bus_source>1</bus_source>
   </block>
   <block>
-    <key>blocks_char_to_float</key>
+    <key>fec_bercurve_generator</key>
     <param>
       <key>id</key>
-      <value>blocks_char_to_float_0</value>
+      <value>fec_bercurve_generator_0_0</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>scale</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>affinity</key>
-      <value></value>
-    </param>
-    <param>
-      <key>minoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>maxoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(914, 42)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-  </block>
-  <block>
-    <key>blocks_stream_to_streams</key>
-    <param>
-      <key>id</key>
-      <value>blocks_stream_to_streams_0</value>
+      <key>esno</key>
+      <value>esno_0</value>
     </param>
     <param>
-      <key>_enabled</key>
-      <value>True</value>
+      <key>samp_rate</key>
+      <value>samp_rate_0</value>
     </param>
     <param>
-      <key>type</key>
-      <value>float</value>
+      <key>encoder_list</key>
+      <value>None</value>
     </param>
     <param>
-      <key>num_streams</key>
-      <value>len(esno_0)*2</value>
+      <key>decoder_list</key>
+      <value>None</value>
     </param>
     <param>
-      <key>vlen</key>
-      <value>1</value>
+      <key>puncpat</key>
+      <value>'11'</value>
     </param>
     <param>
       <key>affinity</key>
@@ -474,7 +443,7 @@
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(654, 163)</value>
+      <value>(383, 130)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -483,306 +452,58 @@
     <bus_source>1</bus_source>
   </block>
   <block>
-    <key>qtgui_time_sink_x</key>
+    <key>qtgui_bercurve_sink</key>
     <param>
       <key>id</key>
-      <value>qtgui_time_sink_x_0</value>
+      <value>qtgui_bercurve_sink_0</value>
     </param>
     <param>
       <key>_enabled</key>
       <value>True</value>
     </param>
     <param>
-      <key>type</key>
-      <value>float</value>
+      <key>esno</key>
+      <value>esno_0</value>
     </param>
     <param>
-      <key>name</key>
-      <value>QT GUI Plot</value>
+      <key>berminerrors</key>
+      <value>100</value>
     </param>
     <param>
-      <key>size</key>
-      <value>1024</value>
+      <key>berlimit</key>
+      <value>-7.0</value>
     </param>
     <param>
-      <key>srate</key>
-      <value>samp_rate_0</value>
+      <key>num_curves</key>
+      <value>2</value>
     </param>
     <param>
-      <key>autoscale</key>
-      <value>False</value>
+      <key>curvenames</key>
+      <value>[]</value>
     </param>
     <param>
       <key>ymin</key>
-      <value>-1</value>
+      <value>-10</value>
     </param>
     <param>
       <key>ymax</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>nconnections</key>
-      <value>len(esno_0)*2</value>
+      <value>0</value>
     </param>
     <param>
       <key>update_time</key>
       <value>0.10</value>
     </param>
     <param>
-      <key>entags</key>
-      <value>True</value>
-    </param>
-    <param>
       <key>gui_hint</key>
       <value></value>
     </param>
     <param>
-      <key>tr_mode</key>
-      <value>qtgui.TRIG_MODE_FREE</value>
-    </param>
-    <param>
-      <key>tr_slope</key>
-      <value>qtgui.TRIG_SLOPE_POS</value>
-    </param>
-    <param>
-      <key>tr_level</key>
-      <value>0.0</value>
-    </param>
-    <param>
-      <key>tr_delay</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>tr_chan</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>tr_tag</key>
-      <value>""</value>
-    </param>
-    <param>
-      <key>label1</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width1</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color1</key>
-      <value>"blue"</value>
-    </param>
-    <param>
-      <key>style1</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker1</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha1</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label2</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width2</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color2</key>
-      <value>"red"</value>
-    </param>
-    <param>
-      <key>style2</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker2</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha2</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label3</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width3</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color3</key>
-      <value>"green"</value>
-    </param>
-    <param>
-      <key>style3</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker3</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha3</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label4</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width4</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color4</key>
-      <value>"black"</value>
-    </param>
-    <param>
-      <key>style4</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker4</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha4</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label5</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width5</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color5</key>
-      <value>"cyan"</value>
-    </param>
-    <param>
-      <key>style5</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker5</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha5</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label6</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width6</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color6</key>
-      <value>"magenta"</value>
-    </param>
-    <param>
-      <key>style6</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker6</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha6</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label7</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width7</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color7</key>
-      <value>"yellow"</value>
-    </param>
-    <param>
-      <key>style7</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker7</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha7</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label8</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width8</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color8</key>
-      <value>"dark red"</value>
-    </param>
-    <param>
-      <key>style8</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker8</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha8</key>
-      <value>1.0</value>
-    </param>
-    <param>
-      <key>label9</key>
-      <value></value>
-    </param>
-    <param>
-      <key>width9</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>color9</key>
-      <value>"dark green"</value>
-    </param>
-    <param>
-      <key>style9</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>marker9</key>
-      <value>-1</value>
-    </param>
-    <param>
-      <key>alpha9</key>
-      <value>1.0</value>
-    </param>
-    <param>
       <key>affinity</key>
       <value></value>
     </param>
     <param>
       <key>_coordinate</key>
-      <value>(1005, 183)</value>
+      <value>(774, 26)</value>
     </param>
     <param>
       <key>_rotation</key>
@@ -790,220 +511,208 @@
     </param>
     <bus_sink>1</bus_sink>
   </block>
-  <block>
-    <key>fec_bercurve_generator</key>
-    <param>
-      <key>id</key>
-      <value>fec_bercurve_generator_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>esno</key>
-      <value>esno_0</value>
-    </param>
-    <param>
-      <key>samp_rate</key>
-      <value>samp_rate_0</value>
-    </param>
-    <param>
-      <key>encoder_list</key>
-      <value>enc</value>
-    </param>
-    <param>
-      <key>decoder_list</key>
-      <value>dec</value>
-    </param>
-    <param>
-      <key>puncpat</key>
-      <value>'11'</value>
-    </param>
-    <param>
-      <key>affinity</key>
-      <value></value>
-    </param>
-    <param>
-      <key>minoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>maxoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(384, 15)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-    <bus_source>1</bus_source>
-  </block>
-  <block>
-    <key>blocks_streams_to_stream</key>
-    <param>
-      <key>id</key>
-      <value>blocks_streams_to_stream_0</value>
-    </param>
-    <param>
-      <key>_enabled</key>
-      <value>True</value>
-    </param>
-    <param>
-      <key>type</key>
-      <value>byte</value>
-    </param>
-    <param>
-      <key>num_streams</key>
-      <value>len(esno_0)*2</value>
-    </param>
-    <param>
-      <key>vlen</key>
-      <value>1</value>
-    </param>
-    <param>
-      <key>affinity</key>
-      <value></value>
-    </param>
-    <param>
-      <key>minoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>maxoutbuf</key>
-      <value>0</value>
-    </param>
-    <param>
-      <key>_coordinate</key>
-      <value>(676, 20)</value>
-    </param>
-    <param>
-      <key>_rotation</key>
-      <value>0</value>
-    </param>
-    <bus_sink>1</bus_sink>
-  </block>
-  <connection>
-    <source_block_id>blocks_streams_to_stream_0</source_block_id>
-    <sink_block_id>blocks_char_to_float_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
-  <connection>
-    <source_block_id>blocks_char_to_float_0</source_block_id>
-    <sink_block_id>blocks_stream_to_streams_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
-  </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>0</source_key>
     <sink_key>0</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>1</source_key>
     <sink_key>1</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>2</source_key>
     <sink_key>2</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>3</source_key>
     <sink_key>3</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>4</source_key>
     <sink_key>4</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>5</source_key>
     <sink_key>5</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>6</source_key>
     <sink_key>6</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>7</source_key>
     <sink_key>7</sink_key>
   </connection>
   <connection>
-    <source_block_id>blocks_stream_to_streams_0</source_block_id>
-    <sink_block_id>qtgui_time_sink_x_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>8</source_key>
     <sink_key>8</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>0</source_key>
-    <sink_key>0</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>9</source_key>
+    <sink_key>9</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>1</source_key>
-    <sink_key>1</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>10</source_key>
+    <sink_key>10</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>2</source_key>
-    <sink_key>2</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>11</source_key>
+    <sink_key>11</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>3</source_key>
-    <sink_key>3</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>12</source_key>
+    <sink_key>12</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>4</source_key>
-    <sink_key>4</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>13</source_key>
+    <sink_key>13</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>5</source_key>
-    <sink_key>5</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>14</source_key>
+    <sink_key>14</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
-    <source_key>6</source_key>
-    <sink_key>6</sink_key>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>15</source_key>
+    <sink_key>15</sink_key>
   </connection>
   <connection>
     <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>16</source_key>
+    <sink_key>32</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>0</source_key>
+    <sink_key>16</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>1</source_key>
+    <sink_key>17</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>2</source_key>
+    <sink_key>18</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>3</source_key>
+    <sink_key>19</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>4</source_key>
+    <sink_key>20</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>5</source_key>
+    <sink_key>21</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>6</source_key>
+    <sink_key>22</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>7</source_key>
-    <sink_key>7</sink_key>
+    <sink_key>23</sink_key>
   </connection>
   <connection>
-    <source_block_id>fec_bercurve_generator_0</source_block_id>
-    <sink_block_id>blocks_streams_to_stream_0</sink_block_id>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
     <source_key>8</source_key>
-    <sink_key>8</sink_key>
+    <sink_key>24</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>9</source_key>
+    <sink_key>25</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>10</source_key>
+    <sink_key>26</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>11</source_key>
+    <sink_key>27</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>12</source_key>
+    <sink_key>28</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>13</source_key>
+    <sink_key>29</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>14</source_key>
+    <sink_key>30</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>15</source_key>
+    <sink_key>31</sink_key>
+  </connection>
+  <connection>
+    <source_block_id>fec_bercurve_generator_0_0</source_block_id>
+    <sink_block_id>qtgui_bercurve_sink_0</sink_block_id>
+    <source_key>16</source_key>
+    <sink_key>33</sink_key>
   </connection>
 </flow_graph>
diff --git a/gr-fec/include/gnuradio/fec/cc_decoder.h 
b/gr-fec/include/gnuradio/fec/cc_decoder.h
index 821730c..3babb5e 100644
--- a/gr-fec/include/gnuradio/fec/cc_decoder.h
+++ b/gr-fec/include/gnuradio/fec/cc_decoder.h
@@ -34,7 +34,7 @@ namespace gr {
     namespace code {
 
     typedef void(*conv_kernel)(unsigned char  *Y, unsigned char  *X,
-                               const unsigned char *syms, unsigned char *dec,
+                               unsigned char *syms, unsigned char *dec,
                                unsigned int framebits, unsigned int excess,
                                unsigned char  *Branchtab);
 
diff --git a/gr-fec/lib/cc_decoder_impl.cc b/gr-fec/lib/cc_decoder_impl.cc
index 1941306..e09064c 100644
--- a/gr-fec/lib/cc_decoder_impl.cc
+++ b/gr-fec/lib/cc_decoder_impl.cc
@@ -79,7 +79,9 @@ namespace gr {
         if(d_tailbiting) {
           d_end_state = &d_end_state_chaining;
           d_veclen = d_framebits + (6 * (d_k - 1));
-          if(posix_memalign((void**)&d_managed_in, 16, d_veclen * d_rate * 
sizeof(COMPUTETYPE))) {
+          d_managed_in = 
(COMPUTETYPE*)volk_malloc(d_veclen*d_rate*sizeof(COMPUTETYPE),
+                                                   volk_get_alignment());
+          if(d_managed_in) {
             printf("allocation failed\n");
             exit(1);
           }
@@ -341,7 +343,7 @@ namespace gr {
       }
 
       int
-      cc_decoder_impl::update_viterbi_blk(const COMPUTETYPE* syms, int nbits)
+      cc_decoder_impl::update_viterbi_blk(COMPUTETYPE* syms, int nbits)
       {
         DECISIONTYPE *d;
 
@@ -470,7 +472,7 @@ namespace gr {
         */
 
         else if(d_truncated) {
-          update_viterbi_blk(&in[0], d_veclen);
+          update_viterbi_blk((COMPUTETYPE*)(&in[0]), d_veclen);
           d_end_state_chaining = find_endstate();
           //printf("...end %d\n", d_end_state_chaining);
           for(unsigned int i = 0; i < d_k-1; ++i) {
@@ -486,7 +488,7 @@ namespace gr {
         }
         //terminated or streaming
         else {
-          update_viterbi_blk(&in[0], d_veclen);
+          update_viterbi_blk((COMPUTETYPE*)(&in[0]), d_veclen);
           d_end_state_chaining = find_endstate();
           //printf("es: %d\n", d_end_state_chaining);
           d_start_state_chaining = chainback_viterbi(&out[0], d_framebits, 
*d_end_state,
diff --git a/gr-fec/lib/cc_decoder_impl.h b/gr-fec/lib/cc_decoder_impl.h
index cad1df9..7fe0934 100644
--- a/gr-fec/lib/cc_decoder_impl.h
+++ b/gr-fec/lib/cc_decoder_impl.h
@@ -48,7 +48,7 @@ namespace gr {
         void create_viterbi();
         int init_viterbi(struct v* vp, int starting_state);
         int init_viterbi_unbiased(struct v* vp);
-        int update_viterbi_blk(const COMPUTETYPE* syms, int nbits);
+        int update_viterbi_blk(COMPUTETYPE* syms, int nbits);
         int chainback_viterbi(unsigned char* data, unsigned int nbits,
                               unsigned int endstate, unsigned int tailsize);
         int find_endstate();
diff --git a/gr-fec/python/fec/bercurve_generator.py 
b/gr-fec/python/fec/bercurve_generator.py
index 0f0ef7e..9b9aef2 100644
--- a/gr-fec/python/fec/bercurve_generator.py
+++ b/gr-fec/python/fec/bercurve_generator.py
@@ -58,7 +58,7 @@ class bercurve_generator(gr.hier_block2):
                     samp_rate=samp_rate,
                     threading=threading,
                     puncpat=puncpat)
-                self.ber_generators.append(ber_generator_temp);
+            self.ber_generators.append(ber_generator_temp);
 
         for i in range(0, len(esno)):
             self.connect((self.deinterleave, i), (self.ber_generators[i]))
diff --git a/gr-fec/python/fec/extended_encoder.py 
b/gr-fec/python/fec/extended_encoder.py
index e9576fa..b7f414c 100644
--- a/gr-fec/python/fec/extended_encoder.py
+++ b/gr-fec/python/fec/extended_encoder.py
@@ -25,6 +25,7 @@ from gnuradio import gr
 import fec_swig as fec
 from threaded_encoder import threaded_encoder
 from capillary_threaded_encoder import capillary_threaded_encoder
+from bitflip import read_bitlist
 
 class extended_encoder(gr.hier_block2):
     def __init__(self, encoder_obj_list, threading, puncpat=None):
@@ -43,7 +44,7 @@ class extended_encoder(gr.hier_block2):
             self.blocks.append(fec.encoder(encoder_obj_list[0]))
 
         if self.puncpat != '11':
-            self.blocks.append(fec.puncture_ff(0, fec.read_bitlist(puncpat),
+            self.blocks.append(fec.puncture_ff(0, read_bitlist(puncpat),
                                                puncpat.count('0'), 
len(puncpat)))
 
         self.connect((self, 0), (self.blocks[0], 0));
diff --git a/gr-fec/python/fec/fec_raw_test.py 
b/gr-fec/python/fec/fec_raw_test.py
index e6df0f0..e06ff0b 100644
--- a/gr-fec/python/fec/fec_raw_test.py
+++ b/gr-fec/python/fec/fec_raw_test.py
@@ -20,7 +20,7 @@
 # Boston, MA 02110-1301, USA.
 #
 
-from gnuradio import gr, blocks
+from gnuradio import gr, blocks, analog
 import math
 
 class fec_raw_test(gr.hier_block2):
diff --git a/gr-qtgui/grc/qtgui_ber_sink_b.xml 
b/gr-qtgui/grc/qtgui_ber_sink_b.xml
new file mode 100644
index 0000000..c4869f3
--- /dev/null
+++ b/gr-qtgui/grc/qtgui_ber_sink_b.xml
@@ -0,0 +1,109 @@
+<?xml version="1.0"?>
+<!--
+###################################################
+##QT GUI Sink
+###################################################
+ -->
+<block>
+  <name>QT GUI Bercurve Sink</name>
+  <key>qtgui_bercurve_sink</key>
+  <import>from PyQt4 import Qt</import>
+  <import>from gnuradio import qtgui</import>
+  <import>import sip</import>
+  <import>import numpy</import>
+  <make>#set $win = 'self._%s_win'%$id
+  qtgui.ber_sink_b(
+    $esno, \#range of esnos
+    $num_curves, \#number of curves
+    $berminerrors, \#ensure at least
+    $berlimit, \#cutoff
+    $curvenames, \#indiv. curve names
+  )
+self.$(id).set_update_time($update_time)
+self.$(id).set_y_axis($ymin, $ymax)
+self.$(id).set_x_axis($(esno)[0], $(esno)[-1])
+self._$(id)_win = sip.wrapinstance(self.$(id).pyqwidget(), Qt.QWidget)
+$(gui_hint()($win))</make>
+
+  <param>
+    <name>esno</name>
+    <key>esno</key>
+    <value>numpy.arange(0.0, 4.0, .5)</value>
+    <type>raw</type>
+  </param>
+
+  <param>
+    <name>BERMINERRORS</name>
+    <key>berminerrors</key>
+    <value>100</value>
+    <type>int</type>
+  </param>
+
+  <param>
+    <name>BERLIMIT</name>
+    <key>berlimit</key>
+    <value>-7.0</value>
+    <type>real</type>
+  </param>
+
+  <param>
+    <name>Num Curves</name>
+    <key>num_curves</key>
+    <value>1</value>
+    <type>int</type>
+  </param>
+
+  <param>
+    <name>Curve Names</name>
+    <key>curvenames</key>
+    <value>[]</value>
+    <type>raw</type>
+    <hide>part</hide>
+  </param>
+
+  <param>
+    <name>Y min</name>
+    <key>ymin</key>
+    <value>-10</value>
+    <type>real</type>
+    <hide>part</hide>
+  </param>
+
+  <param>
+    <name>Y max</name>
+    <key>ymax</key>
+    <value>0</value>
+    <type>real</type>
+    <hide>part</hide>
+  </param>
+
+  <param>
+    <name>Update Period</name>
+    <key>update_time</key>
+    <value>0.10</value>
+    <type>real</type>
+    <hide>part</hide>
+  </param>
+
+  <param>
+    <name>GUI Hint</name>
+    <key>gui_hint</key>
+    <value></value>
+    <type>gui_hint</type>
+    <hide>part</hide>
+  </param>
+
+  <sink>
+    <name>out</name>
+    <type>byte</type>
+    <nports>len($esno)*2*$num_curves</nports>
+  </sink>
+
+  <bus_structure_sink>map(lambda b: map(lambda a: b * len($esno) * 2 + a, 
range(len($esno)*2)), range($num_curves))</bus_structure_sink>
+
+  <doc>
+    The GUI hint can be used to position the widget within the application. \
+    The hint is of the form address@hidden: [row, col, row_span, col_span]. \
+    Both the tab specification and the grid position are optional.
+  </doc>
+</block>
diff --git a/gr-qtgui/grc/qtgui_block_tree.xml 
b/gr-qtgui/grc/qtgui_block_tree.xml
index 2fc1b03..4461f82 100644
--- a/gr-qtgui/grc/qtgui_block_tree.xml
+++ b/gr-qtgui/grc/qtgui_block_tree.xml
@@ -37,6 +37,7 @@
       <block>qtgui_const_sink_x</block>
       <block>qtgui_waterfall_sink_x</block>
       <block>qtgui_time_raster_sink_x</block>
+      <block>qtgui_bercurve_sink</block>
       <block>qtgui_histogram_sink_x</block>
       <block>qtgui_number_sink</block>
       <block>qtgui_sink_x</block>
diff --git a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt 
b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
index 2b9af62..e7a4701 100644
--- a/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
+++ b/gr-qtgui/include/gnuradio/qtgui/CMakeLists.txt
@@ -22,6 +22,7 @@
 ########################################################################
 install(FILES
   api.h
+  ber_sink_b.h
   CMakeLists.txt
   constellationdisplayform.h
   ConstellationDisplayPlot.h
diff --git a/gr-qtgui/include/gnuradio/qtgui/ber_sink_b.h 
b/gr-qtgui/include/gnuradio/qtgui/ber_sink_b.h
new file mode 100644
index 0000000..1f10976
--- /dev/null
+++ b/gr-qtgui/include/gnuradio/qtgui/ber_sink_b.h
@@ -0,0 +1,91 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_BER_SINK_B_H
+#define INCLUDED_QTGUI_BER_SINK_B_H
+
+#ifdef ENABLE_PYTHON
+#include <Python.h>
+#endif
+
+#include <gnuradio/qtgui/api.h>
+#include <gnuradio/block.h>
+#include <qapplication.h>
+
+
+
+namespace gr {
+  namespace qtgui {
+
+    class QTGUI_API ber_sink_b : virtual public block
+    {
+    public:
+      // gr::fec::ber_sink_b::sptr
+      typedef boost::shared_ptr<ber_sink_b> sptr;
+
+      static sptr make(std::vector<float> esnos, int curves = 1,
+                       int berminerrors = 100, float berLimit = -7.0,
+                       std::vector<std::string> curvenames = 
std::vector<std::string>(),
+                       QWidget *parent=NULL);
+
+      virtual void exec_() = 0;
+
+#ifdef ENABLE_PYTHON
+      virtual PyObject* pyqwidget() = 0;
+#else
+      virtual void* pyqwidget() = 0;
+#endif
+
+      virtual void set_y_axis(double min, double max) = 0;
+      virtual void set_x_axis(double min, double max) = 0;
+
+      virtual void set_update_time(double t) = 0;
+      virtual void set_title(const std::string &title) = 0;
+      virtual void set_line_label(int which, const std::string &label) = 0;
+      virtual void set_line_color(int which, const std::string &color) = 0;
+      virtual void set_line_width(int which, int width) = 0;
+      virtual void set_line_style(int which, int style) = 0;
+      virtual void set_line_marker(int which, int marker) = 0;
+
+      virtual void set_line_alpha(int which, double alpha) = 0;
+
+      virtual std::string title() = 0;
+      virtual std::string line_label(int which) = 0;
+      virtual std::string line_color(int which) = 0;
+      virtual int line_width(int which) = 0;
+      virtual int line_style(int which) = 0;
+      virtual int line_marker(int which) = 0;
+      virtual double line_alpha(int which) = 0;
+
+      virtual void set_size(int width, int height) = 0;
+
+      virtual void enable_menu(bool en=true) = 0;
+      virtual void enable_autoscale(bool en) = 0;
+      virtual int nsamps() const = 0;
+
+      QApplication *d_qApplication;
+    };
+
+  } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /* INCLUDED_QTGUI_BER_SINK_B_H */
diff --git a/gr-qtgui/lib/CMakeLists.txt b/gr-qtgui/lib/CMakeLists.txt
index 0145dd1..8419f2d 100644
--- a/gr-qtgui/lib/CMakeLists.txt
+++ b/gr-qtgui/lib/CMakeLists.txt
@@ -89,6 +89,7 @@ set(qtgui_srcs
     histogram_sink_f_impl.cc
     number_sink_impl.cc
     qtgui_util.cc
+    ber_sink_b_impl.cc
 )
 
 #Add Windows DLL resource file if using MSVC
diff --git a/gr-qtgui/lib/ber_sink_b_impl.cc b/gr-qtgui/lib/ber_sink_b_impl.cc
new file mode 100644
index 0000000..bd4739e
--- /dev/null
+++ b/gr-qtgui/lib/ber_sink_b_impl.cc
@@ -0,0 +1,408 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "ber_sink_b_impl.h"
+#include <gnuradio/io_signature.h>
+#include <gnuradio/fft/fft.h>
+//#include <fec/libbertools.h>
+#include <math.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+namespace gr {
+  namespace qtgui {
+
+    ber_sink_b::sptr
+    ber_sink_b::make(std::vector<float> esnos, int curves,
+                     int berminerrors, float berLimit,
+                     std::vector<std::string> curvenames,
+                     QWidget *parent)
+    {
+      return gnuradio::get_initial_sptr
+        (new ber_sink_b_impl(esnos, curves,
+                             berminerrors, berLimit,
+                             curvenames, parent));
+    }
+
+    int
+    ber_sink_b_impl::compBER(unsigned char *inBuffer1, unsigned char 
*inBuffer2,int buffSize)
+    { 
+      int i,totalDiff=0;
+      int popCnt[256] =
+        { 
+          0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 
+          1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+          1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+          1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+          2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 
+          3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+          3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 
+          4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8
+        };
+      
+      
+      for (i=0;i<buffSize;i++)
+        {
+          totalDiff += popCnt[inBuffer1[i]^inBuffer2[i]];        
+      
+        }
+
+      return totalDiff;
+    }
+
+    ber_sink_b_impl::ber_sink_b_impl(std::vector<float> esnos, int curves,
+                                     int berminerrors, float berLimit,
+                                     std::vector<std::string> curvenames,
+                                     QWidget *parent)
+      : block("ber_sink_b",
+              io_signature::make(curves*esnos.size()*2, curves*esnos.size()*2, 
sizeof(unsigned char)),
+              io_signature::make(0, 0, 0)),
+        d_berminerrors(berminerrors),
+        d_berLimit(berLimit),
+        d_parent(parent),
+        d_nconnections(esnos.size()),
+        d_last_time(0)
+    {
+      d_main_gui = NULL;
+
+      d_residbufs_real.reserve(curves);
+      d_residbufs_imag.reserve(curves);
+      d_total.reserve(curves * esnos.size());
+      d_totalErrors.reserve(curves * esnos.size());
+
+      for(int j= 0; j < curves; j++) {
+        d_residbufs_real.push_back(fft::malloc_double(esnos.size()));
+        d_residbufs_imag.push_back(fft::malloc_double(esnos.size()));
+        for(int i = 0; i < d_nconnections; i++) {
+          d_residbufs_real[j][i] = esnos[i];
+          d_residbufs_imag[j][i] = 0.0;
+          d_total.push_back(0);
+          d_totalErrors.push_back(1);
+        }
+      }
+
+      initialize();
+      for(int j= 0; j < curves; j++) {
+        set_line_width(j, 1);
+        //35 unique styles supported
+        set_line_style(j, (j%5) + 1);
+        set_line_marker(j, (j%7));
+
+      }
+      if(curvenames.size() == (unsigned int)curves) {
+        for(int j = 0; j < curves; j++) {
+          if(curvenames[j] != "") {
+            set_line_label(j, curvenames[j]);
+          }
+        }
+      }
+    }
+
+    ber_sink_b_impl::~ber_sink_b_impl()
+    {
+      if(!d_main_gui->isClosed()) {
+        d_main_gui->close();
+      }
+
+      for(unsigned int i = 0; i < d_residbufs_real.size(); i++) {
+        gr::fft::free(d_residbufs_real[i]);
+        gr::fft::free(d_residbufs_imag[i]);
+      }
+    }
+
+    bool
+    ber_sink_b_impl::check_topology(int ninputs, int noutputs)
+    {
+      return ninputs == (int)(d_residbufs_real.size() * d_nconnections * 2);
+    }
+
+    void
+    ber_sink_b_impl::initialize()
+    {
+      if(qApp != NULL) {
+        d_qApplication = qApp;
+      }
+      else {
+        int argc=0;
+        char **argv = NULL;
+        d_qApplication = new QApplication(argc, argv);
+      }
+
+      d_main_gui = new ConstellationDisplayForm(d_residbufs_real.size(), 
d_parent);
+
+      d_main_gui->setNPoints(d_nconnections);
+      d_main_gui->getPlot()->setAxisTitle(QwtPlot::yLeft, "LogScale BER");
+      d_main_gui->getPlot()->setAxisTitle(QwtPlot::xBottom, "ESNO");
+      // initialize update time to 10 times a second
+      set_update_time(0.1);
+    }
+
+    void
+    ber_sink_b_impl::exec_()
+    {
+      d_qApplication->exec();
+    }
+
+    QWidget*
+    ber_sink_b_impl::qwidget()
+    {
+      return d_main_gui;
+    }
+
+    //#ifdef ENABLE_PYTHON
+    PyObject*
+    ber_sink_b_impl::pyqwidget()
+    {
+      PyObject *w = PyLong_FromVoidPtr((void*)d_main_gui);
+      PyObject *retarg = Py_BuildValue("N", w);
+      return retarg;
+    }
+    //#endif
+
+    void
+    ber_sink_b_impl::set_y_axis(double min, double max)
+    {
+      d_main_gui->setYaxis(min, max);
+    }
+
+    void
+    ber_sink_b_impl::set_x_axis(double min, double max)
+    {
+      d_main_gui->setXaxis(min, max);
+    }
+
+    void
+    ber_sink_b_impl::set_update_time(double t)
+    {
+      //convert update time to ticks
+      gr::high_res_timer_type tps = gr::high_res_timer_tps();
+      d_update_time = t * tps;
+      d_main_gui->setUpdateTime(t);
+      d_last_time = 0;
+    }
+
+    void
+    ber_sink_b_impl::set_title(const std::string &title)
+    {
+      d_main_gui->setTitle(title.c_str());
+    }
+
+    void
+    ber_sink_b_impl::set_line_label(int which, const std::string &label)
+    {
+      d_main_gui->setLineLabel(which, label.c_str());
+    }
+
+    void
+    ber_sink_b_impl::set_line_color(int which, const std::string &color)
+    {
+      d_main_gui->setLineColor(which, color.c_str());
+    }
+
+    void
+    ber_sink_b_impl::set_line_width(int which, int width)
+    {
+      d_main_gui->setLineWidth(which, width);
+    }
+
+    void
+    ber_sink_b_impl::set_line_style(int which, int style)
+    {
+      d_main_gui->setLineStyle(which, (Qt::PenStyle)style);
+    }
+
+    void
+    ber_sink_b_impl::set_line_marker(int which, int marker)
+    {
+      d_main_gui->setLineMarker(which, (QwtSymbol::Style)marker);
+    }
+
+    void
+    ber_sink_b_impl::set_line_alpha(int which, double alpha)
+    {
+      d_main_gui->setMarkerAlpha(which, (int)(255.0*alpha));
+    }
+
+    void
+    ber_sink_b_impl::set_size(int width, int height)
+    {
+      d_main_gui->resize(QSize(width, height));
+    }
+
+    std::string
+    ber_sink_b_impl::title()
+    {
+      return d_main_gui->title().toStdString();
+    }
+
+    std::string
+    ber_sink_b_impl::line_label(int which)
+    {
+      return d_main_gui->lineLabel(which).toStdString();
+    }
+
+    std::string
+    ber_sink_b_impl::line_color(int which)
+    {
+      return d_main_gui->lineColor(which).toStdString();
+    }
+
+    int
+    ber_sink_b_impl::line_width(int which)
+    {
+      return d_main_gui->lineWidth(which);
+    }
+
+    int
+    ber_sink_b_impl::line_style(int which)
+    {
+      return d_main_gui->lineStyle(which);
+    }
+
+    int
+    ber_sink_b_impl::line_marker(int which)
+    {
+      return d_main_gui->lineMarker(which);
+    }
+
+    double
+    ber_sink_b_impl::line_alpha(int which)
+    {
+      return (double)(d_main_gui->markerAlpha(which))/255.0;
+    }
+
+    int
+    ber_sink_b_impl::nsamps() const
+    {
+      return d_nconnections;
+    }
+
+    void
+    ber_sink_b_impl::enable_menu(bool en)
+    {
+      d_main_gui->enableMenu(en);
+    }
+
+    void
+    ber_sink_b_impl::enable_autoscale(bool en)
+    {
+      d_main_gui->autoScale(en);
+    }
+
+    int
+    ber_sink_b_impl::general_work(int noutput_items,
+                                  gr_vector_int& ninput_items,
+                                  gr_vector_const_void_star &input_items,
+                                  gr_vector_void_star &output_items)
+    {
+      if(gr::high_res_timer_now() - d_last_time > d_update_time) {
+        d_last_time = gr::high_res_timer_now();
+        d_qApplication->postEvent(d_main_gui,
+                                  new ConstUpdateEvent(d_residbufs_real,
+                                                       d_residbufs_imag,
+                                                       d_nconnections));
+      }
+
+      //check stopping condition
+      int done=0, maxed=0;
+      for(unsigned int j = 0; j < d_residbufs_real.size(); ++j) {
+        for(int i = 0; i < d_nconnections; ++i) {
+
+          if (d_totalErrors[j * d_nconnections + i] >= d_berminerrors) {
+            done++;
+          }
+          else if(log10(((double)d_berminerrors)/(d_total[j * d_nconnections + 
i] * 8.0)) < d_berLimit) {
+            maxed++;
+          }
+        }
+      }
+
+      if(done+maxed == (int)(d_nconnections * d_residbufs_real.size())) {
+        d_qApplication->postEvent(d_main_gui,
+                                  new ConstUpdateEvent(d_residbufs_real,
+                                                       d_residbufs_imag,
+                                                       d_nconnections));
+        return -1;
+      }
+
+      /*
+      for(int i = 0; i < d_nconnections; ++i) {
+        printf("%f, ", d_residbufs_imag[0][i]);
+      }
+      printf("\n");
+      for(int i = 0; i < d_nconnections; ++i) {
+        printf("%f, ", d_residbufs_real[0][i]);
+      }
+      printf("\n");
+      */
+
+      for(unsigned int i = 0; i < ninput_items.size(); i += 2) {
+        if((d_totalErrors[i >> 1] < d_berminerrors) && 
(log10(((double)d_berminerrors)/(d_total[i >> 1] * 8.0)) >= d_berLimit)) {
+          int items = ninput_items[i] <= ninput_items[i+1] ? ninput_items[i] : 
ninput_items[i+1];
+
+          unsigned char *inBuffer0 = (unsigned char *)input_items[i];
+          unsigned char *inBuffer1 = (unsigned char *)input_items[i+1];
+
+          if(items > 0) {
+            d_totalErrors[i >> 1] += compBER(inBuffer0, inBuffer1, items);
+            d_total[i >> 1] += items;
+
+            d_residbufs_imag[i/(d_nconnections * 2)][(i%(d_nconnections * 2)) 
>> 1] = log10(((double)d_totalErrors[i >> 1])/(d_total[i >> 1] * 8.0));
+
+          }
+          consume(i, items);
+          consume(i + 1, items);
+
+          if(d_totalErrors[i >> 1] >= d_berminerrors) {
+            printf("    %u over %d\n", d_totalErrors[i >> 1], d_total[i >> 1] 
* 8);
+            //outBuffer[0] = log10(((double)d_totalErrors)/(d_total * 8.0));
+          }
+          else if(log10(((double)d_berminerrors)/(d_total[i >> 1] * 8.0)) < 
d_berLimit) {
+            printf("crapout\n");
+            d_residbufs_imag[i/(d_nconnections * 2)][(i%(d_nconnections * 2)) 
>> 1] = d_berLimit;
+            d_totalErrors[i >> 1] = d_berminerrors + 1;
+          }
+        }
+        else {
+          consume(i, ninput_items[i]);
+          consume(i+1, ninput_items[i+1]);
+        }
+      }
+
+      return 0;
+    }
+
+
+  } /* namespace qtgui */
+} /* namespace gr */
+
+
diff --git a/gr-qtgui/lib/ber_sink_b_impl.h b/gr-qtgui/lib/ber_sink_b_impl.h
new file mode 100644
index 0000000..c7bbfcb
--- /dev/null
+++ b/gr-qtgui/lib/ber_sink_b_impl.h
@@ -0,0 +1,110 @@
+/* -*- c++ -*- */
+/*
+ * Copyright 2013-2014 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING.  If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef INCLUDED_QTGUI_BER_SINK_B_IMPL_H
+#define INCLUDED_QTGUI_BER_SINK_B_IMPL_H
+
+#include <gnuradio/qtgui/ber_sink_b.h>
+#include <gnuradio/high_res_timer.h>
+#include <gnuradio/thread/thread.h>
+#include <gnuradio/qtgui/constellationdisplayform.h>
+
+namespace gr {
+  namespace qtgui {
+
+    class QTGUI_API ber_sink_b_impl : public ber_sink_b
+    {
+    private:
+      void initialize();
+
+      gr::thread::mutex d_mutex;
+
+      std::vector<double*> d_residbufs_real;
+      std::vector<double*> d_residbufs_imag;
+      
+      ConstellationDisplayForm *d_main_gui;
+      gr::high_res_timer_type d_update_time;
+      std::vector<int> d_totalErrors;
+      int d_berminerrors;
+      float d_berLimit;
+      QWidget *d_parent;
+      int d_nconnections;
+      gr::high_res_timer_type d_last_time;
+      std::vector<int> d_total;
+
+      int compBER(unsigned char *inBuffer1, unsigned char *inBuffer2,int 
buffSize);
+
+    public:
+      ber_sink_b_impl(std::vector<float> esnos, int curves = 1,
+                      int berminerrors = 100, float berLimit = -7.0,
+                      std::vector<std::string> curvenames = 
std::vector<std::string>(),
+                      QWidget *parent=NULL);
+      ~ber_sink_b_impl();
+
+      bool check_topology(int ninputs, int noutputs);
+
+      void exec_();
+      QWidget*  qwidget();
+
+#ifdef ENABLE_PYTHON
+      PyObject* pyqwidget();
+#else
+      void* pyqwidget();
+#endif
+
+      void set_y_axis(double min, double max);
+      void set_x_axis(double min, double max);
+
+      void set_update_time(double t);
+      void set_title(const std::string &title);
+      void set_line_label(int which, const std::string &label);
+      void set_line_color(int which, const std::string &color);
+      void set_line_width(int which, int width);
+      void set_line_style(int which, int style);
+      void set_line_marker(int which, int marker);
+
+      void set_line_alpha(int which, double alpha);
+
+      std::string title();
+      std::string line_label(int which);
+      std::string line_color(int which);
+      int line_width(int which);
+      int line_style(int which);
+      int line_marker(int which);
+      double line_alpha(int which);
+
+      void set_size(int width, int height);
+
+      int nsamps() const;
+      void enable_menu(bool en);
+      void enable_autoscale(bool en);
+
+      int general_work(int noutput_items,
+                       gr_vector_int& ninput_items,
+                       gr_vector_const_void_star &input_items,
+                       gr_vector_void_star &output_items);
+    };
+
+  } /* namespace qtgui */
+} /* namespace gr */
+
+#endif /*INCLUDED_QTGUI_BER_SINK_B_IMPL_H*/
diff --git a/gr-qtgui/swig/qtgui_swig.i b/gr-qtgui/swig/qtgui_swig.i
index b753a66..af66d18 100644
--- a/gr-qtgui/swig/qtgui_swig.i
+++ b/gr-qtgui/swig/qtgui_swig.i
@@ -71,6 +71,7 @@ enum{
 #include "gnuradio/qtgui/waterfall_sink_f.h"
 #include "gnuradio/qtgui/histogram_sink_f.h"
 #include "gnuradio/qtgui/number_sink.h"
+#include "gnuradio/qtgui/ber_sink_b.h"
 %}
 
 %include "gnuradio/qtgui/sink_c.h"
@@ -86,6 +87,7 @@ enum{
 %include "gnuradio/qtgui/waterfall_sink_f.h"
 %include "gnuradio/qtgui/histogram_sink_f.h"
 %include "gnuradio/qtgui/number_sink.h"
+%include "gnuradio/qtgui/ber_sink_b.h"
 
 GR_SWIG_BLOCK_MAGIC2(qtgui, sink_c);
 GR_SWIG_BLOCK_MAGIC2(qtgui, sink_f);
@@ -100,3 +102,4 @@ GR_SWIG_BLOCK_MAGIC2(qtgui, waterfall_sink_c);
 GR_SWIG_BLOCK_MAGIC2(qtgui, waterfall_sink_f);
 GR_SWIG_BLOCK_MAGIC2(qtgui, histogram_sink_f);
 GR_SWIG_BLOCK_MAGIC2(qtgui, number_sink);
+GR_SWIG_BLOCK_MAGIC2(qtgui, ber_sink_b);
diff --git a/volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h 
b/volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h
index 39ead5c..db1750e 100644
--- a/volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h
+++ b/volk/kernels/volk/volk_8u_x4_conv_k7_r2_8u.h
@@ -10,8 +10,8 @@
 #include <mmintrin.h>
 #include <stdio.h>
 
-static inline void volk_8u_x4_conv_k7_r2_8u_spiral(unsigned char* Y, unsigned 
char* X, const unsigned char* syms, unsigned char* dec, unsigned int framebits, 
unsigned int excess, unsigned char* Branchtab) {
-  int i9;
+static inline void volk_8u_x4_conv_k7_r2_8u_spiral(unsigned char* Y, unsigned 
char* X, unsigned char* syms, unsigned char* dec, unsigned int framebits, 
unsigned int excess, unsigned char* Branchtab) {
+  unsigned int i9;
   for(i9 = 0; i9 < (framebits >> 1) + (excess >> 1); i9++) {
     unsigned char a75, a81;
     int a73, a92;
@@ -291,7 +291,7 @@ typedef union {
 
 
 //helper BFLY for GENERIC version
-static inline void BFLY(int i, int s, const unsigned char * syms, unsigned 
char *Y, unsigned char *X, decision_t * d, unsigned char* Branchtab) {
+static inline void BFLY(int i, int s, unsigned char * syms, unsigned char *Y, 
unsigned char *X, decision_t * d, unsigned char* Branchtab) {
   int j, decision0, decision1;
   unsigned char metric,m0,m1,m2,m3;
 
@@ -301,10 +301,11 @@ static inline void BFLY(int i, int s, const unsigned char 
* syms, unsigned char
   int PRECISIONSHIFT = 2;
 
   metric =0;
-  for (j=0;j<RATE;j++) metric += (Branchtab[i+j*NUMSTATES/2] ^ 
syms[s*RATE+j])>>METRICSHIFT ;
+  for(j=0;j<RATE;j++)
+    metric += (Branchtab[i+j*NUMSTATES/2] ^ syms[s*RATE+j])>>METRICSHIFT ;
   metric=metric>>PRECISIONSHIFT;
 
-  const unsigned char max = ((RATE*((256 -1)>>METRICSHIFT))>>PRECISIONSHIFT);
+  unsigned char max = ((RATE*((256 -1)>>METRICSHIFT))>>PRECISIONSHIFT);
 
   m0 = X[i] + metric;
   m1 = X[i+NUMSTATES/2] + (max - metric);
@@ -326,7 +327,7 @@ static inline void BFLY(int i, int s, const unsigned char * 
syms, unsigned char
 #if LV_HAVE_GENERIC
 
 
-static inline void volk_8u_x4_conv_k7_r2_8u_generic(unsigned char* Y, unsigned 
char* X, const unsigned char* syms, unsigned char* dec, unsigned int framebits, 
unsigned int excess, unsigned char* Branchtab) {
+static inline void volk_8u_x4_conv_k7_r2_8u_generic(unsigned char* Y, unsigned 
char* X, unsigned char* syms, unsigned char* dec, unsigned int framebits, 
unsigned int excess, unsigned char* Branchtab) {
   int nbits = framebits + excess;
   int NUMSTATES = 64;
   int RENORMALIZE_THRESHOLD = 137;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]