[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 07/25: polar: updated polar code example GR
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 07/25: polar: updated polar code example GRC |
Date: |
Wed, 23 Sep 2015 14:51:37 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit f9a6900c9e3a283c4f050eb7a4d21548346606bf
Author: Johannes Demel <address@hidden>
Date: Fri Aug 28 15:46:16 2015 -0400
polar: updated polar code example GRC
---
gr-fec/examples/polar_code_example.grc | 215 ++++++++++++++++++---
.../python/fec/polar/channel_construction_bec.py | 4 +-
2 files changed, 188 insertions(+), 31 deletions(-)
diff --git a/gr-fec/examples/polar_code_example.grc
b/gr-fec/examples/polar_code_example.grc
index 1e389a5..4429ad2 100644
--- a/gr-fec/examples/polar_code_example.grc
+++ b/gr-fec/examples/polar_code_example.grc
@@ -14,7 +14,7 @@
</param>
<param>
<key>window_size</key>
- <value>1280, 1024</value>
+ <value>1920, 1080</value>
</param>
<param>
<key>category</key>
@@ -85,7 +85,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(440, 11)</value>
+ <value>(560, 267)</value>
</param>
<param>
<key>_rotation</key>
@@ -112,7 +112,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(560, 11)</value>
+ <value>(560, 331)</value>
</param>
<param>
<key>_rotation</key>
@@ -151,7 +151,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(456, 75)</value>
+ <value>(664, 267)</value>
</param>
<param>
<key>_rotation</key>
@@ -194,7 +194,7 @@
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>1</value>
</param>
<param>
<key>frozen_bit_positions</key>
@@ -206,7 +206,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(640, 203)</value>
+ <value>(1040, 267)</value>
</param>
<param>
<key>_rotation</key>
@@ -257,7 +257,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(256, 203)</value>
+ <value>(872, 267)</value>
</param>
<param>
<key>_rotation</key>
@@ -300,7 +300,7 @@
</param>
<param>
<key>_enabled</key>
- <value>True</value>
+ <value>0</value>
</param>
<param>
<key>frozen_bit_positions</key>
@@ -312,7 +312,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(424, 203)</value>
+ <value>(960, 59)</value>
</param>
<param>
<key>_rotation</key>
@@ -378,7 +378,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(40, 467)</value>
+ <value>(512, 419)</value>
</param>
<param>
<key>_rotation</key>
@@ -394,7 +394,7 @@
</param>
<param>
<key>max</key>
- <value>2</value>
+ <value>256</value>
</param>
<param>
<key>minoutbuf</key>
@@ -441,7 +441,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(616, 491)</value>
+ <value>(448, 651)</value>
</param>
<param>
<key>_rotation</key>
@@ -488,7 +488,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(976, 491)</value>
+ <value>(952, 475)</value>
</param>
<param>
<key>_rotation</key>
@@ -535,7 +535,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(480, 491)</value>
+ <value>(312, 651)</value>
</param>
<param>
<key>_rotation</key>
@@ -563,6 +563,139 @@
</param>
</block>
<block>
+ <key>blocks_char_to_float</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(952, 443)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_char_to_float_0_1</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>scale</key>
+ <value>1.0</value>
+ </param>
+ <param>
+ <key>vlen</key>
+ <value>1</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_pack_k_bits_bb</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(808, 651)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_pack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
+ <key>blocks_unpack_k_bits_bb</key>
+ <param>
+ <key>alias</key>
+ <value></value>
+ </param>
+ <param>
+ <key>comment</key>
+ <value></value>
+ </param>
+ <param>
+ <key>affinity</key>
+ <value></value>
+ </param>
+ <param>
+ <key>_enabled</key>
+ <value>True</value>
+ </param>
+ <param>
+ <key>_coordinate</key>
+ <value>(432, 547)</value>
+ </param>
+ <param>
+ <key>_rotation</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>id</key>
+ <value>blocks_unpack_k_bits_bb_0</value>
+ </param>
+ <param>
+ <key>k</key>
+ <value>8</value>
+ </param>
+ <param>
+ <key>maxoutbuf</key>
+ <value>0</value>
+ </param>
+ <param>
+ <key>minoutbuf</key>
+ <value>0</value>
+ </param>
+ </block>
+ <block>
<key>fec_ber_bf</key>
<param>
<key>berlimit</key>
@@ -570,7 +703,7 @@
</param>
<param>
<key>berminerrors</key>
- <value>100</value>
+ <value>10000</value>
</param>
<param>
<key>alias</key>
@@ -590,7 +723,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(728, 361)</value>
+ <value>(952, 625)</value>
</param>
<param>
<key>_rotation</key>
@@ -633,7 +766,7 @@
</param>
<param>
<key>decoder_list</key>
- <value>polar_scld</value>
+ <value>polar_decoder</value>
</param>
<param>
<key>_enabled</key>
@@ -641,7 +774,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(736, 467)</value>
+ <value>(576, 627)</value>
</param>
<param>
<key>_rotation</key>
@@ -696,7 +829,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(224, 475)</value>
+ <value>(576, 531)</value>
</param>
<param>
<key>_rotation</key>
@@ -751,7 +884,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(984, 355)</value>
+ <value>(1096, 619)</value>
</param>
<param>
<key>gui_hint</key>
@@ -986,7 +1119,7 @@
</param>
<param>
<key>_coordinate</key>
- <value>(1112, 475)</value>
+ <value>(1088, 443)</value>
</param>
<param>
<key>gui_hint</key>
@@ -1254,7 +1387,7 @@
</param>
<param>
<key>nconnections</key>
- <value>1</value>
+ <value>2</value>
</param>
<param>
<key>size</key>
@@ -1315,13 +1448,19 @@
</block>
<connection>
<source_block_id>analog_random_source_x_0</source_block_id>
- <sink_block_id>fec_ber_bf_0</sink_block_id>
+ <sink_block_id>blocks_char_to_float_0_1</sink_block_id>
<source_key>0</source_key>
<sink_key>0</sink_key>
</connection>
<connection>
<source_block_id>analog_random_source_x_0</source_block_id>
- <sink_block_id>fec_extended_encoder_0</sink_block_id>
+ <sink_block_id>blocks_unpack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <source_block_id>analog_random_source_x_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>
@@ -1335,7 +1474,7 @@
<source_block_id>blocks_char_to_float_0</source_block_id>
<sink_block_id>qtgui_time_sink_x_0</sink_block_id>
<source_key>0</source_key>
- <sink_key>0</sink_key>
+ <sink_key>1</sink_key>
</connection>
<connection>
<source_block_id>blocks_char_to_float_0_0</source_block_id>
@@ -1344,24 +1483,42 @@
<sink_key>0</sink_key>
</connection>
<connection>
- <source_block_id>fec_ber_bf_0</source_block_id>
- <sink_block_id>qtgui_number_sink_0</sink_block_id>
+ <source_block_id>blocks_char_to_float_0_1</source_block_id>
+ <sink_block_id>qtgui_time_sink_x_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>
+ <source_block_id>blocks_pack_k_bits_bb_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>fec_extended_decoder_0</source_block_id>
+ <source_block_id>blocks_pack_k_bits_bb_0</source_block_id>
<sink_block_id>fec_ber_bf_0</sink_block_id>
<source_key>0</source_key>
<sink_key>1</sink_key>
</connection>
<connection>
+ <source_block_id>blocks_unpack_k_bits_bb_0</source_block_id>
+ <sink_block_id>fec_extended_encoder_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
+ <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>
+ <connection>
+ <source_block_id>fec_extended_decoder_0</source_block_id>
+ <sink_block_id>blocks_pack_k_bits_bb_0</sink_block_id>
+ <source_key>0</source_key>
+ <sink_key>0</sink_key>
+ </connection>
+ <connection>
<source_block_id>fec_extended_encoder_0</source_block_id>
<sink_block_id>blocks_char_to_float_0_0</sink_block_id>
<source_key>0</source_key>
diff --git a/gr-fec/python/fec/polar/channel_construction_bec.py
b/gr-fec/python/fec/polar/channel_construction_bec.py
index c57ca65..f8f960d 100644
--- a/gr-fec/python/fec/polar/channel_construction_bec.py
+++ b/gr-fec/python/fec/polar/channel_construction_bec.py
@@ -55,7 +55,7 @@ def calculate_bec_channel_capacities(eta, block_size):
# compare [0, Arikan] eq. 6
iw = 1 - eta # holds for BEC as stated in paper
iw = np.array([iw, ], dtype=float)
- lw = int(np.log2(block_size))
+ lw = hf.power_of_2_int(block_size)
for i in range(lw):
iw = calc_one_recursion(iw)
return iw
@@ -103,7 +103,7 @@ def bhattacharyya_bounds(design_snr, block_size):
def main():
print 'channel construction main'
- n = 4
+ n = 10
block_size = 2 ** n
design_snr = 1.0
eta = design_snr_to_bec_eta(design_snr)
- [Commit-gnuradio] [gnuradio] 12/25: Fix the VOLKized fft_vcc_fftw and QA code, (continued)
- [Commit-gnuradio] [gnuradio] 12/25: Fix the VOLKized fft_vcc_fftw and QA code, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 23/25: volk: update submodule to latest, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 11/25: grc: defer check for gtk init until after arg parsing, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 18/25: Merge branch 'socis/master' into polar, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 22/25: Merge remote-tracking branch 'geiger/volkize_fft_fix', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 10/25: polar: rebased and fixed branch for merge again., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 19/25: polar: rearranged polar_code_example flowgraph, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 21/25: Merge branch 'maint', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 05/25: polar: VOLK kernel integration, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 24/25: Merge remote-tracking branch 'gnuradio-wg-grc/master_grcwg', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 07/25: polar: updated polar code example GRC,
git <=
- [Commit-gnuradio] [gnuradio] 02/25: polar: encoder implemented in C++, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 25/25: Merge remote-tracking branch 'tom/socis/master', git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 06/25: polar: refarctoring and clean-up, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 03/25: polar: SC and SC List decoder implemented in C++, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 01/25: polar: Python test code for polar codes, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 04/25: polar: Python implementation for channel construction, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 13/25: polar: updated documentation and examples, git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 15/25: fec: polar: moving polar codes into ::code:: namespace like the others., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 16/25: fec: polar: whitespace fixes/tabs to go along with namespace change from last commit., git, 2015/09/23
- [Commit-gnuradio] [gnuradio] 14/25: polar: updated documentation and examples, git, 2015/09/23