[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 23/57: fec: wip: allowing ber block to be u
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 23/57: fec: wip: allowing ber block to be used as a streaming block. |
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 e6fe7b1151dbf1ff056c267dbb887a81e8504a8e
Author: Tom Rondeau <address@hidden>
Date: Sun Apr 13 15:29:01 2014 -0400
fec: wip: allowing ber block to be used as a streaming block.
---
gr-digital/examples/demod/fec_corr_and_sync.grc | 1245 +++++++++++++----------
gr-fec/grc/fec_ber_bf.xml | 19 +-
gr-fec/include/gnuradio/fec/ber_bf.h | 2 +-
gr-fec/lib/ber_bf_impl.cc | 102 +-
gr-fec/lib/ber_bf_impl.h | 19 +-
5 files changed, 781 insertions(+), 606 deletions(-)
diff --git a/gr-digital/examples/demod/fec_corr_and_sync.grc
b/gr-digital/examples/demod/fec_corr_and_sync.grc
index a9b177f..dae7094 100644
--- a/gr-digital/examples/demod/fec_corr_and_sync.grc
+++ b/gr-digital/examples/demod/fec_corr_and_sync.grc
@@ -1,6 +1,6 @@
<?xml version='1.0' encoding='ASCII'?>
<flow_graph>
- <timestamp>Fri Mar 28 16:25:09 2014</timestamp>
+ <timestamp>Thu Apr 10 11:46:45 2014</timestamp>
<block>
<key>options</key>
<param>
@@ -64,7 +64,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>bb_filter</value>
+ <value>framebits</value>
</param>
<param>
<key>_enabled</key>
@@ -72,11 +72,11 @@
</param>
<param>
<key>value</key>
- <value>firdes.root_raised_cosine(sps, sps, 1, eb, 101)</value>
+ <value>payload_size*8</value>
</param>
<param>
<key>_coordinate</key>
- <value>(509, 16)</value>
+ <value>(148, 1020)</value>
</param>
<param>
<key>_rotation</key>
@@ -87,7 +87,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>matched_filter</value>
+ <value>rate</value>
</param>
<param>
<key>_enabled</key>
@@ -95,11 +95,11 @@
</param>
<param>
<key>value</key>
- <value>firdes.root_raised_cosine(nfilts, nfilts, 1, eb,
int(11*sps*nfilts))</value>
+ <value>2</value>
</param>
<param>
<key>_coordinate</key>
- <value>(510, 87)</value>
+ <value>(175, 948)</value>
</param>
<param>
<key>_rotation</key>
@@ -110,7 +110,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>preamble</value>
+ <value>polys</value>
</param>
<param>
<key>_enabled</key>
@@ -118,11 +118,11 @@
</param>
<param>
<key>value</key>
-
<value>[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]</value>
+ <value>[79, 109]</value>
</param>
<param>
<key>_coordinate</key>
- <value>(317, 16)</value>
+ <value>(34, 1020)</value>
</param>
<param>
<key>_rotation</key>
@@ -133,7 +133,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>sps</value>
+ <value>k</value>
</param>
<param>
<key>_enabled</key>
@@ -141,11 +141,11 @@
</param>
<param>
<key>value</key>
- <value>4</value>
+ <value>7</value>
</param>
<param>
<key>_coordinate</key>
- <value>(328, 87)</value>
+ <value>(93, 947)</value>
</param>
<param>
<key>_rotation</key>
@@ -156,7 +156,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>eb</value>
+ <value>bb_filter</value>
</param>
<param>
<key>_enabled</key>
@@ -164,11 +164,11 @@
</param>
<param>
<key>value</key>
- <value>0.35</value>
+ <value>firdes.root_raised_cosine(sps, sps, 1, eb, 101)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(409, 87)</value>
+ <value>(509, 16)</value>
</param>
<param>
<key>_rotation</key>
@@ -179,7 +179,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>gap</value>
+ <value>matched_filter</value>
</param>
<param>
<key>_enabled</key>
@@ -187,11 +187,11 @@
</param>
<param>
<key>value</key>
- <value>500</value>
+ <value>firdes.root_raised_cosine(nfilts, nfilts, 1, eb,
int(11*sps*nfilts))</value>
</param>
<param>
<key>_coordinate</key>
- <value>(240, 87)</value>
+ <value>(510, 87)</value>
</param>
<param>
<key>_rotation</key>
@@ -202,7 +202,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>payload_size</value>
+ <value>preamble</value>
</param>
<param>
<key>_enabled</key>
@@ -210,11 +210,11 @@
</param>
<param>
<key>value</key>
- <value>120</value>
+
<value>[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]</value>
</param>
<param>
<key>_coordinate</key>
- <value>(119, 87)</value>
+ <value>(317, 16)</value>
</param>
<param>
<key>_rotation</key>
@@ -225,7 +225,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>samp_rate</value>
+ <value>sps</value>
</param>
<param>
<key>_enabled</key>
@@ -233,11 +233,11 @@
</param>
<param>
<key>value</key>
- <value>100000</value>
+ <value>4</value>
</param>
<param>
<key>_coordinate</key>
- <value>(11, 86)</value>
+ <value>(328, 87)</value>
</param>
<param>
<key>_rotation</key>
@@ -248,7 +248,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>rrc_taps</value>
+ <value>eb</value>
</param>
<param>
<key>_enabled</key>
@@ -256,11 +256,11 @@
</param>
<param>
<key>value</key>
- <value>firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), eb,
5*sps*nfilts)</value>
+ <value>0.35</value>
</param>
<param>
<key>_coordinate</key>
- <value>(1301, 82)</value>
+ <value>(409, 87)</value>
</param>
<param>
<key>_rotation</key>
@@ -271,7 +271,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>nfilts</value>
+ <value>gap</value>
</param>
<param>
<key>_enabled</key>
@@ -279,11 +279,11 @@
</param>
<param>
<key>value</key>
- <value>32</value>
+ <value>500</value>
</param>
<param>
<key>_coordinate</key>
- <value>(1301, 12)</value>
+ <value>(240, 87)</value>
</param>
<param>
<key>_rotation</key>
@@ -294,7 +294,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>k</value>
+ <value>payload_size</value>
</param>
<param>
<key>_enabled</key>
@@ -302,11 +302,11 @@
</param>
<param>
<key>value</key>
- <value>7</value>
+ <value>120</value>
</param>
<param>
<key>_coordinate</key>
- <value>(93, 878)</value>
+ <value>(119, 87)</value>
</param>
<param>
<key>_rotation</key>
@@ -317,7 +317,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>polys</value>
+ <value>samp_rate</value>
</param>
<param>
<key>_enabled</key>
@@ -325,11 +325,11 @@
</param>
<param>
<key>value</key>
- <value>[79, 109]</value>
+ <value>100000</value>
</param>
<param>
<key>_coordinate</key>
- <value>(34, 951)</value>
+ <value>(11, 86)</value>
</param>
<param>
<key>_rotation</key>
@@ -340,7 +340,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>rate</value>
+ <value>rrc_taps</value>
</param>
<param>
<key>_enabled</key>
@@ -348,11 +348,11 @@
</param>
<param>
<key>value</key>
- <value>2</value>
+ <value>firdes.root_raised_cosine(nfilts, nfilts, 1.0/float(sps), eb,
5*sps*nfilts)</value>
</param>
<param>
<key>_coordinate</key>
- <value>(175, 879)</value>
+ <value>(1301, 82)</value>
</param>
<param>
<key>_rotation</key>
@@ -363,7 +363,7 @@
<key>variable</key>
<param>
<key>id</key>
- <value>framebits</value>
+ <value>nfilts</value>
</param>
<param>
<key>_enabled</key>
@@ -371,11 +371,11 @@
</param>
<param>
<key>value</key>
- <value>payload_size*8</value>
+ <value>32</value>
</param>
<param>
<key>_coordinate</key>
- <value>(148, 951)</value>
+ <value>(1301, 12)</value>
</param>
<param>
<key>_rotation</key>
@@ -618,108 +618,6 @@
</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>samp_rate</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>ignoretag</key>
- <value>True</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>(321, 188)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>channels_channel_model</key>
- <param>
- <key>id</key>
- <value>channels_channel_model_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>noise_voltage</key>
- <value>noise</value>
- </param>
- <param>
- <key>freq_offset</key>
- <value>freq_offset</value>
- </param>
- <param>
- <key>epsilon</key>
- <value>time_offset</value>
- </param>
- <param>
- <key>taps</key>
- <value>1.0</value>
- </param>
- <param>
- <key>seed</key>
- <value>0</value>
- </param>
- <param>
- <key>block_tags</key>
- <value>False</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>(568, 161)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>digital_correlate_and_sync_cc</key>
<param>
<key>id</key>
@@ -928,61 +826,6 @@
</param>
</block>
<block>
- <key>variable_qtgui_range</key>
- <param>
- <key>id</key>
- <value>noise</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>label</key>
- <value>Noise</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
- </param>
- <param>
- <key>start</key>
- <value>0</value>
- </param>
- <param>
- <key>stop</key>
- <value>2</value>
- </param>
- <param>
- <key>step</key>
- <value>0.005</value>
- </param>
- <param>
- <key>widget</key>
- <value>slider</value>
- </param>
- <param>
- <key>orient</key>
- <value>Qt.Horizontal</value>
- </param>
- <param>
- <key>min_len</key>
- <value>200</value>
- </param>
- <param>
- <key>gui_hint</key>
- <value>3,0,1,1</value>
- </param>
- <param>
- <key>_coordinate</key>
- <value>(704, 14)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
<key>blocks_null_sink</key>
<param>
<key>id</key>
@@ -1151,10 +994,10 @@
</param>
</block>
<block>
- <key>digital_correlate_access_code_xx_ts</key>
+ <key>qtgui_time_sink_x</key>
<param>
<key>id</key>
- <value>digital_correlate_access_code_xx_ts_0</value>
+ <value>qtgui_time_sink_x_0</value>
</param>
<param>
<key>_enabled</key>
@@ -1162,105 +1005,23 @@
</param>
<param>
<key>type</key>
- <value>float</value>
+ <value>complex</value>
</param>
<param>
- <key>access_code</key>
-
<value>0101001100100010010110110001110100001101011100111101111100000011</value>
+ <key>name</key>
+ <value>QT GUI Plot</value>
</param>
<param>
- <key>threshold</key>
- <value>0</value>
+ <key>size</key>
+ <value>5000</value>
</param>
<param>
- <key>tagname</key>
- <value>good</value>
+ <key>srate</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>(688, 604)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>digital_constellation_soft_decoder_cf</key>
- <param>
- <key>id</key>
- <value>digital_constellation_soft_decoder_cf_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>constellation</key>
- <value>constel</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>(348, 622)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
- </param>
- </block>
- <block>
- <key>qtgui_time_sink_x</key>
- <param>
- <key>id</key>
- <value>qtgui_time_sink_x_0</value>
- </param>
- <param>
- <key>_enabled</key>
- <value>True</value>
- </param>
- <param>
- <key>type</key>
- <value>complex</value>
- </param>
- <param>
- <key>name</key>
- <value>QT GUI Plot</value>
- </param>
- <param>
- <key>size</key>
- <value>5000</value>
- </param>
- <param>
- <key>srate</key>
- <value>1</value>
- </param>
- <param>
- <key>autoscale</key>
- <value>False</value>
+ <key>autoscale</key>
+ <value>False</value>
</param>
<param>
<key>ymin</key>
@@ -1823,54 +1584,46 @@
</param>
</block>
<block>
- <key>variable_qtgui_range</key>
+ <key>blocks_throttle</key>
<param>
<key>id</key>
- <value>delay</value>
+ <value>blocks_throttle_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value>delay</value>
- </param>
- <param>
- <key>value</key>
- <value>0</value>
- </param>
- <param>
- <key>start</key>
- <value>0</value>
+ <key>type</key>
+ <value>complex</value>
</param>
<param>
- <key>stop</key>
- <value>200</value>
+ <key>samples_per_second</key>
+ <value>samp_rate</value>
</param>
<param>
- <key>step</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>widget</key>
- <value>counter_slider</value>
+ <key>ignoretag</key>
+ <value>True</value>
</param>
<param>
- <key>orient</key>
- <value>Qt.Horizontal</value>
+ <key>affinity</key>
+ <value></value>
</param>
<param>
- <key>min_len</key>
- <value>200</value>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>gui_hint</key>
- <value>5,0,1,2</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(569, 874)</value>
+ <value>(325, 187)</value>
</param>
<param>
<key>_rotation</key>
@@ -1878,34 +1631,54 @@
</param>
</block>
<block>
- <key>parameter</key>
+ <key>channels_channel_model</key>
<param>
<key>id</key>
- <value>puncpat</value>
+ <value>channels_channel_model_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>label</key>
- <value></value>
+ <key>noise_voltage</key>
+ <value>noise</value>
</param>
<param>
- <key>value</key>
- <value>'11'</value>
+ <key>freq_offset</key>
+ <value>freq_offset</value>
</param>
<param>
- <key>type</key>
- <value>string</value>
+ <key>epsilon</key>
+ <value>time_offset</value>
</param>
<param>
- <key>short_id</key>
+ <key>taps</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>seed</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>block_tags</key>
+ <value>False</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>(159, 1022)</value>
+ <value>(568, 163)</value>
</param>
<param>
<key>_rotation</key>
@@ -1913,114 +1686,470 @@
</param>
</block>
<block>
- <key>qtgui_time_sink_x</key>
+ <key>blocks_ctrlport_monitor_performance</key>
<param>
<key>id</key>
- <value>qtgui_time_sink_x_0_1</value>
+ <value>blocks_ctrlport_monitor_performance_0</value>
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>False</value>
</param>
<param>
- <key>type</key>
- <value>float</value>
+ <key>en</key>
+ <value>True</value>
</param>
<param>
- <key>name</key>
- <value>QT GUI Plot</value>
+ <key>_coordinate</key>
+ <value>(24, 624)</value>
</param>
<param>
- <key>size</key>
- <value>3000</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>digital_constellation_soft_decoder_cf</key>
<param>
- <key>srate</key>
- <value>1</value>
+ <key>id</key>
+ <value>digital_constellation_soft_decoder_cf_0</value>
</param>
<param>
- <key>autoscale</key>
- <value>False</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>ymin</key>
- <value>-0.5</value>
+ <key>constellation</key>
+ <value>constel</value>
</param>
<param>
- <key>ymax</key>
- <value>1.5</value>
+ <key>affinity</key>
+ <value></value>
</param>
<param>
- <key>nconnections</key>
- <value>1</value>
+ <key>minoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>update_time</key>
- <value>0.10</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
- <key>entags</key>
- <value>True</value>
+ <key>_coordinate</key>
+ <value>(367, 572)</value>
</param>
<param>
- <key>gui_hint</key>
- <value>1,0,1,2</value>
+ <key>_rotation</key>
+ <value>0</value>
</param>
+ </block>
+ <block>
+ <key>variable_cc_decoder_def</key>
<param>
- <key>tr_mode</key>
- <value>qtgui.TRIG_MODE_TAG</value>
+ <key>id</key>
+ <value>dec</value>
</param>
<param>
- <key>tr_slope</key>
- <value>qtgui.TRIG_SLOPE_POS</value>
+ <key>_enabled</key>
+ <value>True</value>
</param>
<param>
- <key>tr_level</key>
- <value>0.0</value>
+ <key>value</key>
+ <value>"ok"</value>
</param>
<param>
- <key>tr_delay</key>
- <value>0.00</value>
+ <key>ndim</key>
+ <value>1</value>
</param>
<param>
- <key>tr_chan</key>
- <value>0</value>
+ <key>dim1</key>
+ <value>16</value>
</param>
<param>
- <key>tr_tag</key>
- <value>good</value>
+ <key>dim2</key>
+ <value>1</value>
</param>
<param>
- <key>label1</key>
- <value>After AC</value>
+ <key>framebits</key>
+ <value>framebits</value>
</param>
<param>
- <key>width1</key>
- <value>1</value>
+ <key>k</key>
+ <value>k</value>
</param>
<param>
- <key>color1</key>
- <value>"blue"</value>
+ <key>rate</key>
+ <value>rate</value>
</param>
<param>
- <key>style1</key>
- <value>2</value>
+ <key>polys</key>
+ <value>polys</value>
</param>
<param>
- <key>marker1</key>
+ <key>state_start</key>
<value>0</value>
</param>
<param>
- <key>alpha1</key>
- <value>1.0</value>
+ <key>state_end</key>
+ <value>-1</value>
</param>
<param>
- <key>label2</key>
- <value></value>
+ <key>strb</key>
+ <value>"terminated"</value>
</param>
<param>
- <key>width2</key>
- <value>1</value>
+ <key>_coordinate</key>
+ <value>(257, 947)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>parameter</key>
+ <param>
+ <key>id</key>
+ <value>puncpat</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value></value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>'11'</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>string</value>
+ </param>
+ <param>
+ <key>short_id</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(159, 1091)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_correlate_access_code_xx_ts</key>
+ <param>
+ <key>id</key>
+ <value>digital_correlate_access_code_xx_ts_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>access_code</key>
+
<value>0101001100100010010110110001110100001101011100111101111100000011</value>
+ </param>
+ <param>
+ <key>threshold</key>
+ <value>3</value>
+ </param>
+ <param>
+ <key>tagname</key>
+ <value>good</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>(688, 556)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>mod_with_ac</key>
+ <param>
+ <key>id</key>
+ <value>mod_with_ac_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>constel</key>
+ <value>constel</value>
+ </param>
+ <param>
+ <key>eb</key>
+ <value>eb</value>
+ </param>
+ <param>
+ <key>payload_size</key>
+ <value>payload_size</value>
+ </param>
+ <param>
+ <key>gap</key>
+ <value>gap</value>
+ </param>
+ <param>
+ <key>sps</key>
+ <value>sps</value>
+ </param>
+ <param>
+ <key>preamble</key>
+ <value>preamble</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>(68, 297)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>variable_qtgui_range</key>
+ <param>
+ <key>id</key>
+ <value>noise</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>label</key>
+ <value>Noise</value>
+ </param>
+ <param>
+ <key>value</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>start</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>stop</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>step</key>
+ <value>0.005</value>
+ </param>
+ <param>
+ <key>widget</key>
+ <value>counter_slider</value>
+ </param>
+ <param>
+ <key>orient</key>
+ <value>Qt.Horizontal</value>
+ </param>
+ <param>
+ <key>min_len</key>
+ <value>200</value>
+ </param>
+ <param>
+ <key>gui_hint</key>
+ <value>3,0,1,1</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(704, 14)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_0_0_0</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</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>(1132, 472)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>qtgui_time_sink_x</key>
+ <param>
+ <key>id</key>
+ <value>qtgui_time_sink_x_0_1</value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>type</key>
+ <value>float</value>
+ </param>
+ <param>
+ <key>name</key>
+ <value>QT GUI Plot</value>
+ </param>
+ <param>
+ <key>size</key>
+ <value>3000</value>
+ </param>
+ <param>
+ <key>srate</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>autoscale</key>
+ <value>False</value>
+ </param>
+ <param>
+ <key>ymin</key>
+ <value>-0.5</value>
+ </param>
+ <param>
+ <key>ymax</key>
+ <value>1.5</value>
+ </param>
+ <param>
+ <key>nconnections</key>
+ <value>1</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>1,0,1,2</value>
+ </param>
+ <param>
+ <key>tr_mode</key>
+ <value>qtgui.TRIG_MODE_TAG</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.00</value>
+ </param>
+ <param>
+ <key>tr_chan</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>tr_tag</key>
+ <value>good</value>
+ </param>
+ <param>
+ <key>label1</key>
+ <value>After AC</value>
+ </param>
+ <param>
+ <key>width1</key>
+ <value>1</value>
+ </param>
+ <param>
+ <key>color1</key>
+ <value>"blue"</value>
+ </param>
+ <param>
+ <key>style1</key>
+ <value>2</value>
+ </param>
+ <param>
+ <key>marker1</key>
+ <value>0</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>
@@ -2212,7 +2341,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(1353, 483)</value>
+ <value>(1317, 448)</value>
</param>
<param>
<key>_rotation</key>
@@ -2220,22 +2349,65 @@
</param>
</block>
<block>
- <key>blocks_char_to_float</key>
+ <key>fec_extended_decoder</key>
<param>
<key>id</key>
- <value>blocks_char_to_float_0_0_0_0</value>
+ <value>fec_extended_decoder_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>value</key>
+ <value>fec_extended_decoder</value>
+ </param>
+ <param>
+ <key>decoder_list</key>
+ <value>dec</value>
+ </param>
+ <param>
+ <key>threadtype</key>
+ <value>capillary</value>
+ </param>
+ <param>
+ <key>ann</key>
+ <value>None</value>
+ </param>
+ <param>
+ <key>puncpat</key>
+ <value>puncpat</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>(1079, 570)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>digital_binary_slicer_fb</key>
+ <param>
+ <key>id</key>
+ <value>digital_binary_slicer_fb_0</value>
</param>
<param>
- <key>scale</key>
- <value>1</value>
+ <key>_enabled</key>
+ <value>False</value>
</param>
<param>
<key>affinity</key>
@@ -2251,7 +2423,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(1140, 511)</value>
+ <value>(725, 678)</value>
</param>
<param>
<key>_rotation</key>
@@ -2266,7 +2438,7 @@
</param>
<param>
<key>_enabled</key>
- <value>False</value>
+ <value>True</value>
</param>
<param>
<key>type</key>
@@ -2558,7 +2730,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(941, 755)</value>
+ <value>(1349, 808)</value>
</param>
<param>
<key>_rotation</key>
@@ -2573,7 +2745,7 @@
</param>
<param>
<key>_enabled</key>
- <value>False</value>
+ <value>True</value>
</param>
<param>
<key>type</key>
@@ -2601,7 +2773,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(766, 770)</value>
+ <value>(1192, 819)</value>
</param>
<param>
<key>_rotation</key>
@@ -2609,30 +2781,22 @@
</param>
</block>
<block>
- <key>blocks_delay</key>
+ <key>fec_ber_bf</key>
<param>
<key>id</key>
- <value>blocks_delay_0</value>
+ <value>fec_ber_bf_0</value>
</param>
<param>
<key>_enabled</key>
- <value>False</value>
- </param>
- <param>
- <key>type</key>
- <value>float</value>
- </param>
- <param>
- <key>delay</key>
- <value>int(delay)</value>
+ <value>True</value>
</param>
<param>
- <key>num_ports</key>
- <value>1</value>
+ <key>berminerrors</key>
+ <value>100</value>
</param>
<param>
- <key>vlen</key>
- <value>1</value>
+ <key>berlimit</key>
+ <value>-7.0</value>
</param>
<param>
<key>affinity</key>
@@ -2648,7 +2812,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(576, 808)</value>
+ <value>(1125, 916)</value>
</param>
<param>
<key>_rotation</key>
@@ -2656,159 +2820,130 @@
</param>
</block>
<block>
- <key>blocks_char_to_float</key>
+ <key>qtgui_number_sink</key>
<param>
<key>id</key>
- <value>blocks_char_to_float_0_0_0</value>
+ <value>qtgui_number_sink_0</value>
</param>
<param>
<key>_enabled</key>
- <value>False</value>
- </param>
- <param>
- <key>vlen</key>
- <value>1</value>
- </param>
- <param>
- <key>scale</key>
- <value>1</value>
+ <value>True</value>
</param>
<param>
- <key>affinity</key>
- <value></value>
+ <key>type</key>
+ <value>float</value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
+ <key>autoscale</key>
+ <value>False</value>
</param>
<param>
- <key>maxoutbuf</key>
+ <key>avg</key>
<value>0</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(558, 753)</value>
- </param>
- <param>
- <key>_rotation</key>
- <value>0</value>
+ <key>graph_type</key>
+ <value>qtgui.NUM_GRAPH_HORIZ</value>
</param>
- </block>
- <block>
- <key>blocks_char_to_float</key>
<param>
- <key>id</key>
- <value>blocks_char_to_float_0</value>
+ <key>nconnections</key>
+ <value>1</value>
</param>
<param>
- <key>_enabled</key>
- <value>False</value>
+ <key>min</key>
+ <value>-1</value>
</param>
<param>
- <key>vlen</key>
+ <key>max</key>
<value>1</value>
</param>
<param>
- <key>scale</key>
- <value>1</value>
+ <key>update_time</key>
+ <value>0.10</value>
</param>
<param>
- <key>affinity</key>
+ <key>gui_hint</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
- </param>
- <param>
- <key>maxoutbuf</key>
- <value>0</value>
+ <key>label1</key>
+ <value></value>
</param>
<param>
- <key>_coordinate</key>
- <value>(344, 808)</value>
+ <key>color1</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>label2</key>
+ <value></value>
</param>
- </block>
- <block>
- <key>mod_with_ac</key>
<param>
- <key>id</key>
- <value>mod_with_ac_0</value>
+ <key>color2</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>label3</key>
+ <value></value>
</param>
<param>
- <key>constel</key>
- <value>constel</value>
+ <key>color3</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>eb</key>
- <value>eb</value>
+ <key>label4</key>
+ <value></value>
</param>
<param>
- <key>payload_size</key>
- <value>payload_size</value>
+ <key>color4</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>gap</key>
- <value>gap</value>
+ <key>label5</key>
+ <value></value>
</param>
<param>
- <key>sps</key>
- <value>sps</value>
+ <key>color5</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>preamble</key>
- <value>preamble</value>
+ <key>label6</key>
+ <value></value>
</param>
<param>
- <key>puncpat</key>
- <value>'11'</value>
+ <key>color6</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>affinity</key>
+ <key>label7</key>
<value></value>
</param>
<param>
- <key>minoutbuf</key>
- <value>0</value>
- </param>
- <param>
- <key>maxoutbuf</key>
- <value>0</value>
+ <key>color7</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>_coordinate</key>
- <value>(68, 297)</value>
+ <key>label8</key>
+ <value></value>
</param>
<param>
- <key>_rotation</key>
- <value>0</value>
+ <key>color8</key>
+ <value>("black", "black")</value>
</param>
- </block>
- <block>
- <key>blocks_ctrlport_monitor_performance</key>
<param>
- <key>id</key>
- <value>blocks_ctrlport_monitor_performance_0</value>
+ <key>label9</key>
+ <value></value>
</param>
<param>
- <key>_enabled</key>
- <value>True</value>
+ <key>color9</key>
+ <value>("black", "black")</value>
</param>
<param>
- <key>en</key>
- <value>True</value>
+ <key>affinity</key>
+ <value></value>
</param>
<param>
<key>_coordinate</key>
- <value>(699, 542)</value>
+ <value>(1349, 913)</value>
</param>
<param>
<key>_rotation</key>
@@ -2816,34 +2951,22 @@
</param>
</block>
<block>
- <key>fec_extended_decoder</key>
+ <key>blocks_char_to_float</key>
<param>
<key>id</key>
- <value>fec_extended_decoder_0</value>
+ <value>blocks_char_to_float_0_0_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>fec_extended_decoder</value>
- </param>
- <param>
- <key>decoder_list</key>
- <value>dec</value>
- </param>
- <param>
- <key>threadtype</key>
- <value>capillary</value>
- </param>
- <param>
- <key>ann</key>
- <value>None</value>
+ <key>vlen</key>
+ <value>1</value>
</param>
<param>
- <key>puncpat</key>
- <value>puncpat</value>
+ <key>scale</key>
+ <value>1</value>
</param>
<param>
<key>affinity</key>
@@ -2859,7 +2982,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(1056, 595)</value>
+ <value>(773, 815)</value>
</param>
<param>
<key>_rotation</key>
@@ -2867,62 +2990,38 @@
</param>
</block>
<block>
- <key>variable_cc_decoder_def</key>
+ <key>blocks_char_to_float</key>
<param>
<key>id</key>
- <value>dec</value>
+ <value>blocks_char_to_float_0</value>
</param>
<param>
<key>_enabled</key>
<value>True</value>
</param>
<param>
- <key>value</key>
- <value>"ok"</value>
- </param>
- <param>
- <key>ndim</key>
+ <key>vlen</key>
<value>1</value>
</param>
<param>
- <key>dim1</key>
- <value>16</value>
- </param>
- <param>
- <key>dim2</key>
+ <key>scale</key>
<value>1</value>
</param>
<param>
- <key>framebits</key>
- <value>framebits</value>
- </param>
- <param>
- <key>k</key>
- <value>k</value>
- </param>
- <param>
- <key>rate</key>
- <value>rate</value>
- </param>
- <param>
- <key>polys</key>
- <value>polys</value>
+ <key>affinity</key>
+ <value></value>
</param>
<param>
- <key>state_start</key>
+ <key>minoutbuf</key>
<value>0</value>
</param>
<param>
- <key>state_end</key>
- <value>-1</value>
- </param>
- <param>
- <key>strb</key>
- <value>"terminated"</value>
+ <key>maxoutbuf</key>
+ <value>0</value>
</param>
<param>
<key>_coordinate</key>
- <value>(257, 878)</value>
+ <value>(773, 862)</value>
</param>
<param>
<key>_rotation</key>
@@ -3014,6 +3113,36 @@
<sink_key>0</sink_key>
</connection>
<connection>
+ <source_block_id>fec_extended_decoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>mod_with_ac_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0</sink_block_id>
+ <source_key>1</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_correlate_access_code_xx_ts_0</source_block_id>
+ <sink_block_id>digital_binary_slicer_fb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>digital_binary_slicer_fb_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>fec_extended_decoder_0</source_block_id>
+ <sink_block_id>blocks_char_to_float_0_0_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
<source_block_id>blocks_char_to_float_0_0_0_0</source_block_id>
<sink_block_id>qtgui_time_sink_x_0_1</sink_block_id>
<source_key>0</source_key>
@@ -3021,43 +3150,43 @@
</connection>
<connection>
<source_block_id>fec_extended_decoder_0</source_block_id>
- <sink_block_id>blocks_char_to_float_0_0_0_0</sink_block_id>
+ <sink_block_id>fec_ber_bf_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>mod_with_ac_0</source_block_id>
- <sink_block_id>blocks_char_to_float_0</sink_block_id>
+ <sink_block_id>fec_ber_bf_0</sink_block_id>
<source_key>1</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
- <source_block_id>blocks_sub_xx_0</source_block_id>
- <sink_block_id>qtgui_time_sink_x_0_1_0</sink_block_id>
+ <source_block_id>digital_binary_slicer_fb_0</source_block_id>
+ <sink_block_id>fec_ber_bf_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>
+ <source_block_id>blocks_char_to_float_0_0_0</source_block_id>
<sink_block_id>blocks_sub_xx_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>1</sink_key>
+ <sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>blocks_char_to_float_0_0_0</source_block_id>
- <sink_block_id>blocks_sub_xx_0</sink_block_id>
+ <source_block_id>blocks_sub_xx_0</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_0_1_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_delay_0</sink_block_id>
+ <sink_block_id>blocks_sub_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>fec_extended_decoder_0</source_block_id>
- <sink_block_id>blocks_char_to_float_0_0_0</sink_block_id>
+ <source_block_id>fec_ber_bf_0</source_block_id>
+ <sink_block_id>qtgui_number_sink_0</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
diff --git a/gr-fec/grc/fec_ber_bf.xml b/gr-fec/grc/fec_ber_bf.xml
index e4a070f..6d8d85e 100644
--- a/gr-fec/grc/fec_ber_bf.xml
+++ b/gr-fec/grc/fec_ber_bf.xml
@@ -3,13 +3,29 @@
<name>BER</name>
<key>fec_ber_bf</key>
<import>from gnuradio import fec</import>
- <make>fec.ber_bf($berminerrors, $berlimit)</make>
+ <make>fec.ber_bf($test_mode, $berminerrors, $berlimit)</make>
+
+ <param>
+ <name>Test Mode</name>
+ <key>test_mode</key>
+ <value>False</value>
+ <type>enum</type>
+ <option>
+ <name>False</name>
+ <key>False</key>
+ </option>
+ <option>
+ <name>True</name>
+ <key>True</key>
+ </option>
+ </param>
<param>
<name>BER Min. Errors</name>
<key>berminerrors</key>
<value>100</value>
<type>int</type>
+ <hide>#if $test_mode() then 'part' else 'all'#</hide>
</param>
<param>
@@ -17,6 +33,7 @@
<key>berlimit</key>
<value>-7.0</value>
<type>float</type>
+ <hide>#if $test_mode() then 'part' else 'all'#</hide>
</param>
<sink>
diff --git a/gr-fec/include/gnuradio/fec/ber_bf.h
b/gr-fec/include/gnuradio/fec/ber_bf.h
index 9f3691f..cc42bce 100644
--- a/gr-fec/include/gnuradio/fec/ber_bf.h
+++ b/gr-fec/include/gnuradio/fec/ber_bf.h
@@ -43,7 +43,7 @@ namespace gr {
// gr::fec::ber_bf::sptr
typedef boost::shared_ptr<ber_bf> sptr;
- static sptr make(int berminerrors = 100, float ber_limit = -7.0);
+ static sptr make(bool test_mode = false, int berminerrors=100, float
ber_limit=-7.0);
};
} /* namespace fec */
diff --git a/gr-fec/lib/ber_bf_impl.cc b/gr-fec/lib/ber_bf_impl.cc
index 566b70b..d7282ea 100644
--- a/gr-fec/lib/ber_bf_impl.cc
+++ b/gr-fec/lib/ber_bf_impl.cc
@@ -27,24 +27,25 @@
#include "ber_bf_impl.h"
#include "ber_tools.h"
#include <gnuradio/io_signature.h>
+#include <volk/volk.h>
#include <math.h>
namespace gr {
namespace fec {
ber_bf::sptr
- ber_bf::make(int berminerrors, float ber_limit)
+ ber_bf::make(bool test_mode, int berminerrors, float ber_limit)
{
return gnuradio::get_initial_sptr
- (new ber_bf_impl(berminerrors, ber_limit));
+ (new ber_bf_impl(test_mode, berminerrors, ber_limit));
}
- ber_bf_impl::ber_bf_impl(int berminerrors, float ber_limit)
+ ber_bf_impl::ber_bf_impl(bool test_mode, int berminerrors, float ber_limit)
: block("fec_ber_bf",
io_signature::make(2, 2, sizeof(unsigned char)),
io_signature::make(1, 1, sizeof(float))),
- d_total_errors(0), d_berminerrors(berminerrors),
- d_ber_limit(ber_limit), d_total(0)
+ d_total_errors(0), d_total(0), d_test_mode(test_mode),
+ d_berminerrors(berminerrors), d_ber_limit(ber_limit)
{
}
@@ -66,48 +67,75 @@ namespace gr {
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
- if(d_total_errors >= d_berminerrors) {
- return -1;
+ if(d_test_mode) {
+ if(d_total_errors >= d_berminerrors) {
+ return -1;
+ }
+ else {
+ unsigned char *inbuffer0 = (unsigned char *)input_items[0];
+ unsigned char *inbuffer1 = (unsigned char *)input_items[1];
+ float *outbuffer = (float *)output_items[0];
+
+ int items = ninput_items[0] <= ninput_items[1] ? ninput_items[0] :
ninput_items[1];
+
+ if(items > 0) {
+ /*
+ for(int i = 0; i < items; ++i) {
+ if(inbuffer0[i] != inbuffer1[i]) {
+ GR_LOG_INFO(d_logger, boost::format("%1%/%2%: %3% versus
%4%") \
+ % i % items % inbuffer0[i] % inbuffer1[i]);
+ }
+ }
+ GR_LOG_INFO(d_logger, boost::format("%1% errors") \
+ % (compber(inbuffer0, inbuffer1, items)));
+ */
+
+ d_total_errors += compber(inbuffer0, inbuffer1, items);
+ d_total += items;
+ }
+ consume_each(items);
+
+ if(d_total_errors >= d_berminerrors) {
+ outbuffer[0] = log10(((double)d_total_errors)/(d_total * 8.0));
+ GR_LOG_INFO(d_logger, boost::format(" %1% over %2% --> %3%") \
+ % d_total_errors % (d_total * 8) % outbuffer[0]);
+ return 1;
+ }
+ else if(log10(((double)d_berminerrors)/(d_total * 8.0)) <
d_ber_limit) {
+ GR_LOG_INFO(d_logger, " Min. BER limit reached");
+ outbuffer[0] = d_ber_limit;
+ d_total_errors = d_berminerrors + 1;
+ return 1;
+ }
+ else {
+ return 0;
+ }
+ }
}
- else {
+ else { // streaming mode
unsigned char *inbuffer0 = (unsigned char *)input_items[0];
- unsigned char *inbuffer1 = (unsigned char *)input_items[1];
- float *outbuffer = (float *)output_items[0];
+ unsigned char *inbuffer1 = (unsigned char *)input_items[1];
+ float *outbuffer = (float *)output_items[0];
- int items = ninput_items[0] <= ninput_items[1] ? ninput_items[0] :
ninput_items[1];
+ int items = ninput_items[0] <= ninput_items[1] ? ninput_items[0] :
ninput_items[1];
- if(items > 0) {
- /*
- for(int i = 0; i < items; ++i) {
- if(inbuffer0[i] != inbuffer1[i]) {
- GR_LOG_INFO(d_logger, boost::format("%1%/%2%: %3% versus %4%")
\
- % i % items % inbuffer0[i] % inbuffer1[i]);
- }
+ if(items > 0) {
+ uint32_t ret;
+ for(int i = 0; i < items; i++) {
+ volk_32u_popcnt(&ret,
static_cast<uint32_t>(inbuffer0[i]^inbuffer1[i]));
+ d_total_errors += ret;
}
- GR_LOG_INFO(d_logger, boost::format("%1% errors") \
- % (compber(inbuffer0, inbuffer1, items)));
- */
- d_total_errors += compber(inbuffer0, inbuffer1, items);
d_total += items;
- }
- consume_each(items);
-
- if(d_total_errors >= d_berminerrors) {
outbuffer[0] = log10(((double)d_total_errors)/(d_total * 8.0));
- GR_LOG_INFO(d_logger, boost::format(" %1% over %2% --> %3%") \
- % d_total_errors % (d_total * 8) % outbuffer[0]);
- return 1;
- }
- else if(log10(((double)d_berminerrors)/(d_total * 8.0)) < d_ber_limit) {
- GR_LOG_INFO(d_logger, " Min. BER limit reached");
- outbuffer[0] = d_ber_limit;
- d_total_errors = d_berminerrors + 1;
+
+ consume_each(items);
return 1;
- }
- else {
+ }
+ else {
+ consume_each(0);
return 0;
- }
+ }
}
}
diff --git a/gr-fec/lib/ber_bf_impl.h b/gr-fec/lib/ber_bf_impl.h
index 326c6be..c7faf12 100644
--- a/gr-fec/lib/ber_bf_impl.h
+++ b/gr-fec/lib/ber_bf_impl.h
@@ -32,21 +32,22 @@ namespace gr {
{
private:
int d_total_errors;
+ int d_total;
+ bool d_test_mode;
int d_berminerrors;
float d_ber_limit;
- int d_total;
public:
- ber_bf_impl(int berminerrors = 100, float ber_limit = -7.0);
- ~ber_bf_impl();
+ ber_bf_impl(bool d_test_mode = false, int berminerrors=100, float
ber_limit=-7.0);
+ ~ber_bf_impl();
- int general_work(int noutput_items,
- gr_vector_int& ninput_items,
- gr_vector_const_void_star &input_items,
- gr_vector_void_star &output_items);
+ int general_work(int noutput_items,
+ gr_vector_int& ninput_items,
+ gr_vector_const_void_star &input_items,
+ gr_vector_void_star &output_items);
- void forecast(int noutput_items,
- gr_vector_int& ninput_items_required);
+ void forecast(int noutput_items,
+ gr_vector_int& ninput_items_required);
};
} /* namespace fec */
- [Commit-gnuradio] [gnuradio] 13/57: volk: adding a rate 1/2, K=7 convolutional decoder volk kernel., (continued)
- [Commit-gnuradio] [gnuradio] 13/57: volk: adding a rate 1/2, K=7 convolutional decoder volk kernel., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 14/57: block interleave/deinterleave with statefull deinterleave, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 03/57: controlport: adding a 'toggle' interface for ControlPort., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 20/57: digital: correlate_access_code_tag d_mask was set improperly when access code len = 64., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 09/57: documentation - fix example in case anyone gets confused, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 08/57: Corrected codec2 encoder documentation., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 15/57: tests for block mode, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 19/57: volk: missing updates for volk qa and profile from last checkin., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 25/57: fec: encoder now outputs bytes to make it more easily integratable with modulators., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 21/57: fec: improved fecapi stuff., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 23/57: fec: wip: allowing ber block to be used as a streaming block.,
git <=
- [Commit-gnuradio] [gnuradio] 17/57: adding ber sink to qt gui, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 24/57: digital: use FFT filters for the correlate_and_sync block., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 27/57: grc: adding advanced tab feature to set a block's alias., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 29/57: grc: fixes bug with controlport monitors where true/false enable parameter is not respected., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 02/57: runtime: white space removal., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 31/57: fec: use logger to explain exception when using threading with history., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 26/57: fec: changed puncture block for easier to use API., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 18/57: volk: added conv kernel puppet and added to QA and profile., git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 34/57: qtgui: work on ber sink for fecapi, git, 2014/05/20
- [Commit-gnuradio] [gnuradio] 35/57: runtime: don't add the log appender --> adds to C++, too., git, 2014/05/20