diff options
author | Tom Rondeau | 2011-09-02 12:14:57 -0400 |
---|---|---|
committer | Tom Rondeau | 2011-09-02 12:14:57 -0400 |
commit | 0f43bdb085f98e1182dbd940db9ed1fb52119186 (patch) | |
tree | b210a92db1abc4fb430ab28fe0e5abd858501bf6 | |
parent | 772518ceb9cebefb8bb8ecc9edd63570f38de514 (diff) | |
parent | 02a32461e2f625f02ecbbe41354d59bf8dd5452b (diff) | |
download | gnuradio-0f43bdb085f98e1182dbd940db9ed1fb52119186.tar.gz gnuradio-0f43bdb085f98e1182dbd940db9ed1fb52119186.tar.bz2 gnuradio-0f43bdb085f98e1182dbd940db9ed1fb52119186.zip |
Merge branch 'turbo'
54 files changed, 7405 insertions, 421 deletions
diff --git a/config/grc_gr_trellis.m4 b/config/grc_gr_trellis.m4 index bc9ca6f49..5d11acc22 100644 --- a/config/grc_gr_trellis.m4 +++ b/config/grc_gr_trellis.m4 @@ -27,6 +27,7 @@ AC_DEFUN([GRC_GR_TRELLIS],[ gr-trellis/Makefile \ gr-trellis/gnuradio-trellis.pc \ gr-trellis/doc/Makefile \ + gr-trellis/grc/Makefile \ gr-trellis/src/Makefile \ gr-trellis/src/lib/Makefile \ gr-trellis/src/lib/run_guile_tests \ diff --git a/gnuradio-examples/grc/trellis/interference_cancellation.grc b/gnuradio-examples/grc/trellis/interference_cancellation.grc index e93babd78..7674b4bf1 100644 --- a/gnuradio-examples/grc/trellis/interference_cancellation.grc +++ b/gnuradio-examples/grc/trellis/interference_cancellation.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Mar 19 11:22:40 2009</timestamp> + <timestamp>Wed Aug 31 17:40:25 2011</timestamp> <block> <key>options</key> <param> @@ -36,6 +36,14 @@ <value>Custom</value> </param> <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -79,18 +87,22 @@ <value>100</value> </param> <param> - <key>slider_length</key> - <value>200</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>slider_type</key> - <value>horizontal</value> + <key>converver</key> + <value>float_converter</value> </param> <param> <key>grid_pos</key> <value></value> </param> <param> + <key>notebook</key> + <value></value> + </param> + <param> <key>_coordinate</key> <value>(243, 11)</value> </param> @@ -130,18 +142,22 @@ <value>100</value> </param> <param> - <key>slider_length</key> - <value>200</value> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> </param> <param> - <key>slider_type</key> - <value>horizontal</value> + <key>converver</key> + <value>float_converter</value> </param> <param> <key>grid_pos</key> <value></value> </param> <param> + <key>notebook</key> + <value></value> + </param> + <param> <key>_coordinate</key> <value>(447, 14)</value> </param> @@ -213,41 +229,6 @@ </param> </block> <block> - <key>gr_chunks_to_symbols_xx</key> - <param> - <key>id</key> - <value>gr_chunks_to_symbols_xx_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>in_type</key> - <value>short</value> - </param> - <param> - <key>out_type</key> - <value>complex</value> - </param> - <param> - <key>symbol_table</key> - <value>1,1j,-1j,-1</value> - </param> - <param> - <key>dimension</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(665, 187)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>gr_multiply_const_vxx</key> <param> <key>id</key> @@ -344,6 +325,10 @@ <value>1</value> </param> <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(660, 311)</value> </param> @@ -638,6 +623,10 @@ <value>1</value> </param> <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(405, 998)</value> </param> @@ -816,6 +805,10 @@ <value>1</value> </param> <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(420, 1368)</value> </param> @@ -968,10 +961,10 @@ </param> </block> <block> - <key>wxgui_numbersink2</key> + <key>trellis_encoder_xx</key> <param> <key>id</key> - <value>wxgui_numbersink2_2</value> + <value>trellis_encoder_xx_1</value> </param> <param> <key>_enabled</key> @@ -979,71 +972,74 @@ </param> <param> <key>type</key> - <value>float</value> + <value>ss</value> </param> <param> - <key>title</key> - <value>BER 2 (raw)</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>units</key> - <value>BER</value> + <key>init_state</key> + <value>0</value> </param> <param> - <key>samp_rate</key> - <value>R</value> + <key>_coordinate</key> + <value>(336, 311)</value> </param> <param> - <key>base_value</key> - <value>0.0</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>trellis_viterbi_combined_xx</key> <param> - <key>min_value</key> - <value>0</value> + <key>id</key> + <value>trellis_viterbi_combined_xx_1</value> </param> <param> - <key>max_value</key> - <value>1.0</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>factor</key> - <value>1.0</value> + <key>type</key> + <value>c</value> </param> <param> - <key>decimal_places</key> - <value>6</value> + <key>out_type</key> + <value>s</value> </param> <param> - <key>ref_level</key> - <value>0</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>number_rate</key> - <value>15</value> + <key>block_size</key> + <value>1000</value> </param> <param> - <key>peak_hold</key> - <value>False</value> + <key>init_state</key> + <value>-1</value> </param> <param> - <key>average</key> - <value>False</value> + <key>final_state</key> + <value>-1</value> </param> <param> - <key>avg_alpha</key> - <value>0.001</value> + <key>dim</key> + <value>1</value> </param> <param> - <key>show_gauge</key> - <value>True</value> + <key>table</key> + <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value> </param> <param> - <key>grid_pos</key> - <value>0,1,1,1</value> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> - <value>(1260, 659)</value> + <value>(79, 501)</value> </param> <param> <key>_rotation</key> @@ -1051,10 +1047,10 @@ </param> </block> <block> - <key>wxgui_numbersink2</key> + <key>trellis_viterbi_combined_xx</key> <param> <key>id</key> - <value>wxgui_numbersink2_3</value> + <value>trellis_viterbi_combined_xx_2</value> </param> <param> <key>_enabled</key> @@ -1062,71 +1058,74 @@ </param> <param> <key>type</key> - <value>float</value> + <value>c</value> </param> <param> - <key>title</key> - <value>BER 2 (after cancelling user 1)</value> + <key>out_type</key> + <value>s</value> </param> <param> - <key>units</key> - <value>BER</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>samp_rate</key> - <value>R</value> + <key>block_size</key> + <value>1000</value> </param> <param> - <key>base_value</key> - <value>0.0</value> + <key>init_state</key> + <value>-1</value> </param> <param> - <key>min_value</key> - <value>0</value> + <key>final_state</key> + <value>-1</value> </param> <param> - <key>max_value</key> - <value>1.0</value> + <key>dim</key> + <value>1</value> </param> <param> - <key>factor</key> - <value>1.0</value> + <key>table</key> + <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value> </param> <param> - <key>decimal_places</key> - <value>6</value> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> </param> <param> - <key>ref_level</key> - <value>0</value> + <key>_coordinate</key> + <value>(82, 766)</value> </param> <param> - <key>number_rate</key> - <value>15</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>trellis_encoder_xx</key> <param> - <key>peak_hold</key> - <value>False</value> + <key>id</key> + <value>trellis_encoder_xx_2</value> </param> <param> - <key>average</key> - <value>False</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>avg_alpha</key> - <value>0.001</value> + <key>type</key> + <value>ss</value> </param> <param> - <key>show_gauge</key> - <value>True</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>grid_pos</key> - <value>1,1,1,1</value> + <key>init_state</key> + <value>0</value> </param> <param> <key>_coordinate</key> - <value>(1262, 1020)</value> + <value>(89, 998)</value> </param> <param> <key>_rotation</key> @@ -1134,10 +1133,10 @@ </param> </block> <block> - <key>wxgui_numbersink2</key> + <key>trellis_viterbi_combined_xx</key> <param> <key>id</key> - <value>wxgui_numbersink2_3_0</value> + <value>trellis_viterbi_combined_xx_0</value> </param> <param> <key>_enabled</key> @@ -1145,71 +1144,74 @@ </param> <param> <key>type</key> - <value>float</value> + <value>c</value> </param> <param> - <key>title</key> - <value>BER 1 (after cancelling user 2)</value> + <key>out_type</key> + <value>s</value> </param> <param> - <key>units</key> - <value>BER</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>samp_rate</key> - <value>R</value> + <key>block_size</key> + <value>1000</value> </param> <param> - <key>base_value</key> - <value>0.0</value> + <key>init_state</key> + <value>-1</value> </param> <param> - <key>min_value</key> - <value>0</value> + <key>final_state</key> + <value>-1</value> </param> <param> - <key>max_value</key> - <value>1.0</value> + <key>dim</key> + <value>1</value> </param> <param> - <key>factor</key> - <value>1.0</value> + <key>table</key> + <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value> </param> <param> - <key>decimal_places</key> - <value>6</value> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> </param> <param> - <key>ref_level</key> - <value>0</value> + <key>_coordinate</key> + <value>(83, 1111)</value> </param> <param> - <key>number_rate</key> - <value>15</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>trellis_encoder_xx</key> <param> - <key>peak_hold</key> - <value>False</value> + <key>id</key> + <value>trellis_encoder_xx_2_0</value> </param> <param> - <key>average</key> - <value>False</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>avg_alpha</key> - <value>0.001</value> + <key>type</key> + <value>ss</value> </param> <param> - <key>show_gauge</key> - <value>True</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>grid_pos</key> - <value>1,0,1,1</value> + <key>init_state</key> + <value>0</value> </param> <param> <key>_coordinate</key> - <value>(1269, 1417)</value> + <value>(105, 1367)</value> </param> <param> <key>_rotation</key> @@ -1217,53 +1219,54 @@ </param> </block> <block> - <key>variable</key> + <key>trellis_viterbi_combined_xx</key> <param> <key>id</key> - <value>R</value> + <value>trellis_viterbi_combined_xx_0_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>10e3</value> + <key>type</key> + <value>c</value> </param> <param> - <key>_coordinate</key> - <value>(748, 12)</value> + <key>out_type</key> + <value>s</value> </param> <param> - <key>_rotation</key> - <value>0</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> - </block> - <block> - <key>trellis_encoder_xx</key> <param> - <key>id</key> - <value>trellis_encoder_xx_0</value> + <key>block_size</key> + <value>1000</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>init_state</key> + <value>-1</value> </param> <param> - <key>type</key> - <value>ss</value> + <key>final_state</key> + <value>-1</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>dim</key> + <value>1</value> </param> <param> - <key>init_state</key> - <value>0</value> + <key>table</key> + <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value> + </param> + <param> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> - <value>(334, 190)</value> + <value>(75, 1495)</value> </param> <param> <key>_rotation</key> @@ -1271,10 +1274,10 @@ </param> </block> <block> - <key>trellis_encoder_xx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>trellis_encoder_xx_1</value> + <value>gr_add_xx_1</value> </param> <param> <key>_enabled</key> @@ -1282,19 +1285,19 @@ </param> <param> <key>type</key> - <value>ss</value> + <value>complex</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>num_inputs</key> + <value>2</value> </param> <param> - <key>init_state</key> - <value>0</value> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(336, 311)</value> + <value>(1400, 262)</value> </param> <param> <key>_rotation</key> @@ -1302,10 +1305,10 @@ </param> </block> <block> - <key>trellis_viterbi_combined_xx</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>trellis_viterbi_combined_xx_1</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> @@ -1313,43 +1316,63 @@ </param> <param> <key>type</key> - <value>c</value> + <value>complex</value> </param> <param> - <key>out_type</key> - <value>s</value> + <key>title</key> + <value>Scope Plot</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>samp_rate</key> + <value>R</value> </param> <param> - <key>block_size</key> - <value>1000</value> + <key>v_scale</key> + <value>0</value> </param> <param> - <key>init_state</key> - <value>-1</value> + <key>v_offset</key> + <value>0</value> </param> <param> - <key>final_state</key> - <value>-1</value> + <key>t_scale</key> + <value>0</value> </param> <param> - <key>dim</key> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> <value>1</value> </param> <param> - <key>table</key> - <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value> + <key>win_size</key> + <value></value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> </param> <param> <key>_coordinate</key> - <value>(79, 501)</value> + <value>(1533, 149)</value> </param> <param> <key>_rotation</key> @@ -1357,54 +1380,53 @@ </param> </block> <block> - <key>trellis_viterbi_combined_xx</key> + <key>variable</key> <param> <key>id</key> - <value>trellis_viterbi_combined_xx_2</value> + <value>prefix</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>c</value> - </param> - <param> - <key>out_type</key> - <value>s</value> + <key>value</key> + <value>"/n/harrisville/x/anastas/gnuradio_trunk/"</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>_coordinate</key> + <value>(871, 14)</value> </param> <param> - <key>block_size</key> - <value>1000</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>trellis_encoder_xx</key> <param> - <key>init_state</key> - <value>-1</value> + <key>id</key> + <value>trellis_encoder_xx_0</value> </param> <param> - <key>final_state</key> - <value>-1</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>dim</key> - <value>1</value> + <key>type</key> + <value>ss</value> </param> <param> - <key>table</key> - <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <key>init_state</key> + <value>0</value> </param> <param> <key>_coordinate</key> - <value>(82, 766)</value> + <value>(340, 187)</value> </param> <param> <key>_rotation</key> @@ -1412,10 +1434,10 @@ </param> </block> <block> - <key>trellis_encoder_xx</key> + <key>gr_throttle</key> <param> <key>id</key> - <value>trellis_encoder_xx_2</value> + <value>gr_throttle_0</value> </param> <param> <key>_enabled</key> @@ -1423,19 +1445,19 @@ </param> <param> <key>type</key> - <value>ss</value> + <value>short</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>samples_per_second</key> + <value>R</value> </param> <param> - <key>init_state</key> - <value>0</value> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(89, 998)</value> + <value>(534, 149)</value> </param> <param> <key>_rotation</key> @@ -1443,54 +1465,61 @@ </param> </block> <block> - <key>trellis_viterbi_combined_xx</key> + <key>gr_chunks_to_symbols_xx</key> <param> <key>id</key> - <value>trellis_viterbi_combined_xx_0</value> + <value>gr_chunks_to_symbols_xx_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>type</key> - <value>c</value> + <key>in_type</key> + <value>short</value> </param> <param> <key>out_type</key> - <value>s</value> + <value>complex</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>symbol_table</key> + <value>1,1j,-1j,-1</value> </param> <param> - <key>block_size</key> - <value>1000</value> + <key>dimension</key> + <value>1</value> </param> <param> - <key>init_state</key> - <value>-1</value> + <key>num_ports</key> + <value>1</value> </param> <param> - <key>final_state</key> - <value>-1</value> + <key>_coordinate</key> + <value>(682, 186)</value> </param> <param> - <key>dim</key> - <value>1</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <param> - <key>table</key> - <value>(1-alpha)**0.5*1,(1-alpha)**0.5*1j,(1-alpha)**0.5*(-1j),(1-alpha)**0.5*(-1)</value> + <key>id</key> + <value>R</value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>100e3</value> </param> <param> <key>_coordinate</key> - <value>(83, 1111)</value> + <value>(748, 12)</value> </param> <param> <key>_rotation</key> @@ -1498,10 +1527,10 @@ </param> </block> <block> - <key>trellis_encoder_xx</key> + <key>wxgui_numbersink2</key> <param> <key>id</key> - <value>trellis_encoder_xx_2_0</value> + <value>wxgui_numbersink2_0</value> </param> <param> <key>_enabled</key> @@ -1509,74 +1538,75 @@ </param> <param> <key>type</key> - <value>ss</value> + <value>float</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>title</key> + <value>BER 1 (raw)</value> </param> <param> - <key>init_state</key> - <value>0</value> + <key>units</key> + <value>BER</value> </param> <param> - <key>_coordinate</key> - <value>(105, 1367)</value> + <key>samp_rate</key> + <value>R</value> </param> <param> - <key>_rotation</key> + <key>min_value</key> <value>0</value> </param> - </block> - <block> - <key>trellis_viterbi_combined_xx</key> <param> - <key>id</key> - <value>trellis_viterbi_combined_xx_0_0</value> + <key>max_value</key> + <value>1</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>factor</key> + <value>1.0</value> </param> <param> - <key>type</key> - <value>c</value> + <key>decimal_places</key> + <value>6</value> </param> <param> - <key>out_type</key> - <value>s</value> + <key>ref_level</key> + <value>0</value> </param> <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>number_rate</key> + <value>15</value> </param> <param> - <key>block_size</key> - <value>1000</value> + <key>peak_hold</key> + <value>False</value> </param> <param> - <key>init_state</key> - <value>-1</value> + <key>average</key> + <value>True</value> </param> <param> - <key>final_state</key> - <value>-1</value> + <key>avg_alpha</key> + <value>0.001</value> </param> <param> - <key>dim</key> - <value>1</value> + <key>show_gauge</key> + <value>True</value> </param> <param> - <key>table</key> - <value>alpha**0.5*1,alpha**0.5*1j,alpha**0.5*(-1j),alpha**0.5*(-1)</value> + <key>win_size</key> + <value></value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <key>grid_pos</key> + <value>0,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(75, 1495)</value> + <value>(1267, 410)</value> </param> <param> <key>_rotation</key> @@ -1584,53 +1614,86 @@ </param> </block> <block> - <key>variable</key> + <key>wxgui_numbersink2</key> <param> <key>id</key> - <value>prefix</value> + <value>wxgui_numbersink2_2</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>"../../../"</value> + <key>type</key> + <value>float</value> </param> <param> - <key>_coordinate</key> - <value>(871, 14)</value> + <key>title</key> + <value>BER 2 (raw)</value> </param> <param> - <key>_rotation</key> + <key>units</key> + <value>BER</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>min_value</key> <value>0</value> </param> - </block> - <block> - <key>gr_add_xx</key> <param> - <key>id</key> - <value>gr_add_xx_1</value> + <key>max_value</key> + <value>1.0</value> </param> <param> - <key>_enabled</key> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> <value>True</value> </param> <param> - <key>type</key> - <value>complex</value> + <key>avg_alpha</key> + <value>0.001</value> </param> <param> - <key>num_inputs</key> - <value>2</value> + <key>show_gauge</key> + <value>True</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>0,1,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(1400, 262)</value> + <value>(1260, 659)</value> </param> <param> <key>_rotation</key> @@ -1641,7 +1704,7 @@ <key>wxgui_numbersink2</key> <param> <key>id</key> - <value>wxgui_numbersink2_0</value> + <value>wxgui_numbersink2_3</value> </param> <param> <key>_enabled</key> @@ -1653,7 +1716,7 @@ </param> <param> <key>title</key> - <value>BER 1 (raw)</value> + <value>BER 2 (after cancelling user 1)</value> </param> <param> <key>units</key> @@ -1664,16 +1727,12 @@ <value>R</value> </param> <param> - <key>base_value</key> - <value>0.0</value> - </param> - <param> <key>min_value</key> <value>0</value> </param> <param> <key>max_value</key> - <value>1</value> + <value>1.0</value> </param> <param> <key>factor</key> @@ -1697,7 +1756,7 @@ </param> <param> <key>average</key> - <value>False</value> + <value>True</value> </param> <param> <key>avg_alpha</key> @@ -1708,12 +1767,20 @@ <value>True</value> </param> <param> + <key>win_size</key> + <value></value> + </param> + <param> <key>grid_pos</key> - <value>0,0,1,1</value> + <value>1,1,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> </param> <param> <key>_coordinate</key> - <value>(1267, 410)</value> + <value>(1262, 1020)</value> </param> <param> <key>_rotation</key> @@ -1721,10 +1788,10 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>wxgui_numbersink2</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>wxgui_numbersink2_3_0</value> </param> <param> <key>_enabled</key> @@ -1732,43 +1799,75 @@ </param> <param> <key>type</key> - <value>complex</value> + <value>float</value> </param> <param> <key>title</key> - <value>Scope Plot</value> + <value>BER 1 (after cancelling user 2)</value> + </param> + <param> + <key>units</key> + <value>BER</value> </param> <param> <key>samp_rate</key> <value>R</value> </param> <param> - <key>v_scale</key> + <key>min_value</key> <value>0</value> </param> <param> - <key>t_scale</key> + <key>max_value</key> + <value>1.0</value> + </param> + <param> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> <value>0</value> </param> <param> - <key>ac_couple</key> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> <value>False</value> </param> <param> - <key>xy_mode</key> + <key>average</key> <value>True</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>avg_alpha</key> + <value>0.001</value> + </param> + <param> + <key>show_gauge</key> + <value>True</value> + </param> + <param> + <key>win_size</key> + <value></value> </param> <param> <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> <value></value> </param> <param> <key>_coordinate</key> - <value>(1533, 149)</value> + <value>(1269, 1417)</value> </param> <param> <key>_rotation</key> @@ -1782,12 +1881,6 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>trellis_encoder_xx_0</source_block_id> - <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>trellis_encoder_xx_1</source_block_id> <sink_block_id>gr_chunks_to_symbols_xx_1</sink_block_id> <source_key>0</source_key> @@ -2069,4 +2162,16 @@ <source_key>0</source_key> <sink_key>0</sink_key> </connection> + <connection> + <source_block_id>trellis_encoder_xx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> </flow_graph> diff --git a/gnuradio-examples/grc/trellis/pccc.grc b/gnuradio-examples/grc/trellis/pccc.grc new file mode 100644 index 000000000..c3111c321 --- /dev/null +++ b/gnuradio-examples/grc/trellis/pccc.grc @@ -0,0 +1,832 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Thu Sep 1 12:53:13 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>sccc1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Serially Concatenated Convolutional Code</value> + </param> + <param> + <key>author</key> + <value>AA</value> + </param> + <param> + <key>description</key> + <value>gnuradio flow graph</value> + </param> + <param> + <key>window_size</key> + <value>2048, 2048</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>noisevar</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10**(-snr_db/10)</value> + </param> + <param> + <key>_coordinate</key> + <value>(389, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>prefix</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>"/n/harrisville/x/anastas/gnuradio_trunk/"</value> + </param> + <param> + <key>_coordinate</key> + <value>(590, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>block</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>1000</value> + </param> + <param> + <key>_coordinate</key> + <value>(764, 16)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>snr_db</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>SNR (dB)</value> + </param> + <param> + <key>value</key> + <value>5</value> + </param> + <param> + <key>min</key> + <value>-10</value> + </param> + <param> + <key>max</key> + <value>10</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(229, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_xx</key> + <param> + <key>id</key> + <value>gr_multiply_xx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(392, 591)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_short_to_float</key> + <param> + <key>id</key> + <value>gr_short_to_float_1_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(535, 609)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_numbersink2</key> + <param> + <key>id</key> + <value>wxgui_numbersink2_3_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>BER</value> + </param> + <param> + <key>units</key> + <value>BER</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>min_value</key> + <value>0</value> + </param> + <param> + <key>max_value</key> + <value>1.0</value> + </param> + <param> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0.001</value> + </param> + <param> + <key>show_gauge</key> + <value>True</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(713, 426)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>noisevar</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(672, 290)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(952, 73)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(21, 170)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>samples_per_second</key> + <value>R</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(517, 103)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>gr_chunks_to_symbols_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>in_type</key> + <value>short</value> + </param> + <param> + <key>out_type</key> + <value>float</value> + </param> + <param> + <key>symbol_table</key> + <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value> + </param> + <param> + <key>dimension</key> + <value>2</value> + </param> + <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(551, 184)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_pccc_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_pccc_encoder_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>interleaver_args</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>bl</key> + <value>block</value> + </param> + <param> + <key>_coordinate</key> + <value>(236, 147)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>R</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>100e3</value> + </param> + <param> + <key>_coordinate</key> + <value>(482, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_xx</key> + <param> + <key>id</key> + <value>gr_add_xx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(951, 256)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_pccc_decoder_combined_xx</key> + <param> + <key>id</key> + <value>trellis_pccc_decoder_combined_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>f</value> + </param> + <param> + <key>out_type</key> + <value>s</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>o_final_state</key> + <value>-1</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>i_final_state</key> + <value>-1</value> + </param> + <param> + <key>interleaver</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>block_size</key> + <value>block</value> + </param> + <param> + <key>iterations</key> + <value>10</value> + </param> + <param> + <key>dim</key> + <value>2</value> + </param> + <param> + <key>table</key> + <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value> + </param> + <param> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> + </param> + <param> + <key>siso_type</key> + <value>trellis.TRELLIS_MIN_SUM</value> + </param> + <param> + <key>scaling</key> + <value>1.0</value> + </param> + <param> + <key>_coordinate</key> + <value>(196, 274)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sub_xx</key> + <param> + <key>id</key> + <value>gr_sub_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>_coordinate</key> + <value>(217, 597)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_noise_source_x_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_xx_2_0</source_block_id> + <sink_block_id>gr_short_to_float_1_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_short_to_float_1_0</source_block_id> + <sink_block_id>wxgui_numbersink2_3_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>trellis_pccc_encoder_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_pccc_encoder_xx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>trellis_pccc_decoder_combined_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_pccc_decoder_combined_xx_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> +</flow_graph> diff --git a/gnuradio-examples/grc/trellis/pccc1.grc b/gnuradio-examples/grc/trellis/pccc1.grc new file mode 100644 index 000000000..15a63707e --- /dev/null +++ b/gnuradio-examples/grc/trellis/pccc1.grc @@ -0,0 +1,857 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Wed Aug 31 20:34:39 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>sccc1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Serially Concatenated Convolutional Code</value> + </param> + <param> + <key>author</key> + <value>AA</value> + </param> + <param> + <key>description</key> + <value>gnuradio flow graph</value> + </param> + <param> + <key>window_size</key> + <value>2048, 2048</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>noisevar</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10**(-snr_db/10)</value> + </param> + <param> + <key>_coordinate</key> + <value>(389, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>prefix</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>"/n/harrisville/x/anastas/gnuradio_trunk/"</value> + </param> + <param> + <key>_coordinate</key> + <value>(590, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>block</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>1000</value> + </param> + <param> + <key>_coordinate</key> + <value>(764, 16)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>snr_db</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>SNR (dB)</value> + </param> + <param> + <key>value</key> + <value>5</value> + </param> + <param> + <key>min</key> + <value>-10</value> + </param> + <param> + <key>max</key> + <value>10</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(229, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_xx</key> + <param> + <key>id</key> + <value>gr_multiply_xx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(392, 591)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_short_to_float</key> + <param> + <key>id</key> + <value>gr_short_to_float_1_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(535, 609)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_numbersink2</key> + <param> + <key>id</key> + <value>wxgui_numbersink2_3_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>BER</value> + </param> + <param> + <key>units</key> + <value>BER</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>min_value</key> + <value>0</value> + </param> + <param> + <key>max_value</key> + <value>1.0</value> + </param> + <param> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0.001</value> + </param> + <param> + <key>show_gauge</key> + <value>True</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(713, 426)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>noisevar</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(672, 290)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_xx</key> + <param> + <key>id</key> + <value>gr_add_xx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(951, 256)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(952, 73)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(21, 170)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>samples_per_second</key> + <value>R</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(517, 103)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sub_xx</key> + <param> + <key>id</key> + <value>gr_sub_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>_coordinate</key> + <value>(217, 597)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>gr_chunks_to_symbols_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>in_type</key> + <value>short</value> + </param> + <param> + <key>out_type</key> + <value>float</value> + </param> + <param> + <key>symbol_table</key> + <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value> + </param> + <param> + <key>dimension</key> + <value>2</value> + </param> + <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(551, 184)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_pccc_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_pccc_encoder_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>interleaver_args</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>bl</key> + <value>block</value> + </param> + <param> + <key>_coordinate</key> + <value>(236, 147)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_pccc_decoder_x</key> + <param> + <key>id</key> + <value>trellis_pccc_decoder_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>out_type</key> + <value>s</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>o_final_state</key> + <value>-1</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>i_final_state</key> + <value>-1</value> + </param> + <param> + <key>interleaver</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>block_size</key> + <value>block</value> + </param> + <param> + <key>iterations</key> + <value>10</value> + </param> + <param> + <key>siso_type</key> + <value>trellis.TRELLIS_MIN_SUM</value> + </param> + <param> + <key>_coordinate</key> + <value>(357, 304)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_metrics_x</key> + <param> + <key>id</key> + <value>trellis_metrics_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>f</value> + </param> + <param> + <key>card</key> + <value>16</value> + </param> + <param> + <key>dim</key> + <value>2</value> + </param> + <param> + <key>table</key> + <value>-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7,0, 0,-7,0, -5,0, -3,0, -1,0, 1,0, 3,0, 5,0, 7</value> + </param> + <param> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> + </param> + <param> + <key>_coordinate</key> + <value>(58, 354)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>R</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>100e3</value> + </param> + <param> + <key>_coordinate</key> + <value>(482, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_noise_source_x_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_xx_2_0</source_block_id> + <sink_block_id>gr_short_to_float_1_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_short_to_float_1_0</source_block_id> + <sink_block_id>wxgui_numbersink2_3_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>trellis_metrics_x_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>trellis_pccc_encoder_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_pccc_encoder_xx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_metrics_x_0</source_block_id> + <sink_block_id>trellis_pccc_decoder_x_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_pccc_decoder_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> +</flow_graph> diff --git a/gnuradio-examples/grc/trellis/readme.txt b/gnuradio-examples/grc/trellis/readme.txt index d620fd628..9c7363af8 100644 --- a/gnuradio-examples/grc/trellis/readme.txt +++ b/gnuradio-examples/grc/trellis/readme.txt @@ -1,5 +1,7 @@ -This is an example of using gr-trellis in grc. +These are examples of using gr-trellis in grc. +INTERFERENCE CANCELLATION +------------------------- Two users are transmitting simultaneously using convolutionally encoded QPSK, each with power P1=alpha*P and P2=(1-alpha)*P. The combined signal is observed in noise and four different receivers are considered: 1) A viterbi decoder decoding user 1 assuming user 2 is noise @@ -13,4 +15,18 @@ The combined signal is observed in noise and four different receivers are consid You can change the signal to noise ratio P/sigma^2 and the allocation of power to the two users, alpha. + +Serially Concatenated Convolutional Codes +----------------------------------------- +An SCCC can be defined by an outer and an inner FSM together with an interleaver +and a modulation type. You can change the SNR and observe the estimated BER. +In sccc.grc the decoding and metric calculation are combined; in sccc1.grc they are separate. + +Parallel Concatenated Convolutional Codes +----------------------------------------- +A PCCC can be defined by two FSMs together with an interleaver +and a modulation type. You can change the SNR and observe the estimated BER. +In pccc1.grc the decoding and metric calculation are separate. + + Enjoy. diff --git a/gnuradio-examples/grc/trellis/sccc.grc b/gnuradio-examples/grc/trellis/sccc.grc new file mode 100644 index 000000000..e8f656f63 --- /dev/null +++ b/gnuradio-examples/grc/trellis/sccc.grc @@ -0,0 +1,832 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Wed Aug 31 19:57:09 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>sccc</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Serially Concatenated Convolutional Code</value> + </param> + <param> + <key>author</key> + <value>AA</value> + </param> + <param> + <key>description</key> + <value>gnuradio flow graph</value> + </param> + <param> + <key>window_size</key> + <value>2048, 2048</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>noisevar</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10**(-snr_db/10)</value> + </param> + <param> + <key>_coordinate</key> + <value>(389, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(21, 170)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>prefix</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>"/n/harrisville/x/anastas/gnuradio_trunk/"</value> + </param> + <param> + <key>_coordinate</key> + <value>(590, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>block</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>1000</value> + </param> + <param> + <key>_coordinate</key> + <value>(764, 16)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_xx</key> + <param> + <key>id</key> + <value>gr_add_xx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(951, 256)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sub_xx</key> + <param> + <key>id</key> + <value>gr_sub_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>_coordinate</key> + <value>(445, 517)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_xx</key> + <param> + <key>id</key> + <value>gr_multiply_xx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(228.25, 798.39170361874085)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_short_to_float</key> + <param> + <key>id</key> + <value>gr_short_to_float_1_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(416, 815)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>snr_db</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>SNR (dB)</value> + </param> + <param> + <key>value</key> + <value>5</value> + </param> + <param> + <key>min</key> + <value>-10</value> + </param> + <param> + <key>max</key> + <value>10</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(229, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>R</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10e3</value> + </param> + <param> + <key>_coordinate</key> + <value>(482, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>True</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(952, 73)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>samples_per_second</key> + <value>R</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(514, 105)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>gr_chunks_to_symbols_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>in_type</key> + <value>short</value> + </param> + <param> + <key>out_type</key> + <value>complex</value> + </param> + <param> + <key>symbol_table</key> + <value>1,0,1j,0,-1j,0,-1,0, 0,1,0,1j,0,-1j,0,-1</value> + </param> + <param> + <key>dimension</key> + <value>2</value> + </param> + <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(551, 184)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>noisevar</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(672, 290)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_sccc_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_sccc_encoder_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>interleaver_args</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>bl</key> + <value>block</value> + </param> + <param> + <key>_coordinate</key> + <value>(242, 154)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_numbersink2</key> + <param> + <key>id</key> + <value>wxgui_numbersink2_3_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>BER</value> + </param> + <param> + <key>units</key> + <value>BER</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>min_value</key> + <value>0</value> + </param> + <param> + <key>max_value</key> + <value>1.0</value> + </param> + <param> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0.001</value> + </param> + <param> + <key>show_gauge</key> + <value>True</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(688, 572)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_sccc_decoder_combined_xx</key> + <param> + <key>id</key> + <value>trellis_sccc_decoder_combined_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>c</value> + </param> + <param> + <key>out_type</key> + <value>s</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>o_final_state</key> + <value>-1</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>i_final_state</key> + <value>-1</value> + </param> + <param> + <key>interleaver</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>block_size</key> + <value>block</value> + </param> + <param> + <key>iterations</key> + <value>5</value> + </param> + <param> + <key>dim</key> + <value>2</value> + </param> + <param> + <key>table</key> + <value>1,0,1j,0,-1j,0,-1,0, 0,1,0,1j,0,-1j,0,-1</value> + </param> + <param> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> + </param> + <param> + <key>siso_type</key> + <value>trellis.TRELLIS_SUM_PRODUCT</value> + </param> + <param> + <key>scaling</key> + <value>1.0</value> + </param> + <param> + <key>_coordinate</key> + <value>(159, 335)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_noise_source_x_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>trellis_sccc_encoder_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_sccc_encoder_xx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>trellis_sccc_decoder_combined_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_sccc_decoder_combined_xx_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_xx_2_0</source_block_id> + <sink_block_id>gr_short_to_float_1_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_short_to_float_1_0</source_block_id> + <sink_block_id>wxgui_numbersink2_3_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> +</flow_graph> diff --git a/gnuradio-examples/grc/trellis/sccc1.grc b/gnuradio-examples/grc/trellis/sccc1.grc new file mode 100644 index 000000000..0be59d0c4 --- /dev/null +++ b/gnuradio-examples/grc/trellis/sccc1.grc @@ -0,0 +1,857 @@ +<?xml version='1.0' encoding='ASCII'?> +<flow_graph> + <timestamp>Wed Aug 31 20:09:23 2011</timestamp> + <block> + <key>options</key> + <param> + <key>id</key> + <value>sccc1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>title</key> + <value>Serially Concatenated Convolutional Code</value> + </param> + <param> + <key>author</key> + <value>AA</value> + </param> + <param> + <key>description</key> + <value>gnuradio flow graph</value> + </param> + <param> + <key>window_size</key> + <value>2048, 2048</value> + </param> + <param> + <key>generate_options</key> + <value>wx_gui</value> + </param> + <param> + <key>category</key> + <value>Custom</value> + </param> + <param> + <key>run_options</key> + <value>prompt</value> + </param> + <param> + <key>run</key> + <value>True</value> + </param> + <param> + <key>realtime_scheduling</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(10, 10)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>noisevar</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10**(-snr_db/10)</value> + </param> + <param> + <key>_coordinate</key> + <value>(389, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>random_source_x</key> + <param> + <key>id</key> + <value>random_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>min</key> + <value>0</value> + </param> + <param> + <key>max</key> + <value>2</value> + </param> + <param> + <key>num_samps</key> + <value>1000</value> + </param> + <param> + <key>repeat</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(21, 170)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>prefix</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>"/n/harrisville/x/anastas/gnuradio_trunk/"</value> + </param> + <param> + <key>_coordinate</key> + <value>(590, 15)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>block</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>1000</value> + </param> + <param> + <key>_coordinate</key> + <value>(764, 16)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable_slider</key> + <param> + <key>id</key> + <value>snr_db</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>label</key> + <value>SNR (dB)</value> + </param> + <param> + <key>value</key> + <value>5</value> + </param> + <param> + <key>min</key> + <value>-10</value> + </param> + <param> + <key>max</key> + <value>10</value> + </param> + <param> + <key>num_steps</key> + <value>100</value> + </param> + <param> + <key>style</key> + <value>wx.SL_HORIZONTAL</value> + </param> + <param> + <key>converver</key> + <value>float_converter</value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(229, 13)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>variable</key> + <param> + <key>id</key> + <value>R</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>value</key> + <value>10e3</value> + </param> + <param> + <key>_coordinate</key> + <value>(482, 17)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_sccc_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_sccc_encoder_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>interleaver_args</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>bl</key> + <value>block</value> + </param> + <param> + <key>_coordinate</key> + <value>(242, 154)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_sccc_decoder_x</key> + <param> + <key>id</key> + <value>trellis_sccc_decoder_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>out_type</key> + <value>s</value> + </param> + <param> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + </param> + <param> + <key>o_init_state</key> + <value>0</value> + </param> + <param> + <key>o_final_state</key> + <value>-1</value> + </param> + <param> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn2o3_4.fsm"</value> + </param> + <param> + <key>i_init_state</key> + <value>0</value> + </param> + <param> + <key>i_final_state</key> + <value>-1</value> + </param> + <param> + <key>interleaver</key> + <value>trellis.interleaver(block,666)</value> + </param> + <param> + <key>block_size</key> + <value>block</value> + </param> + <param> + <key>iterations</key> + <value>10</value> + </param> + <param> + <key>siso_type</key> + <value>trellis.TRELLIS_MIN_SUM</value> + </param> + <param> + <key>_coordinate</key> + <value>(333, 305)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_sub_xx</key> + <param> + <key>id</key> + <value>gr_sub_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>_coordinate</key> + <value>(217, 597)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_xx</key> + <param> + <key>id</key> + <value>gr_multiply_xx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(392, 591)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_short_to_float</key> + <param> + <key>id</key> + <value>gr_short_to_float_1_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>_coordinate</key> + <value>(535, 609)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_numbersink2</key> + <param> + <key>id</key> + <value>wxgui_numbersink2_3_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>BER</value> + </param> + <param> + <key>units</key> + <value>BER</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>min_value</key> + <value>0</value> + </param> + <param> + <key>max_value</key> + <value>1.0</value> + </param> + <param> + <key>factor</key> + <value>1.0</value> + </param> + <param> + <key>decimal_places</key> + <value>6</value> + </param> + <param> + <key>ref_level</key> + <value>0</value> + </param> + <param> + <key>number_rate</key> + <value>15</value> + </param> + <param> + <key>peak_hold</key> + <value>False</value> + </param> + <param> + <key>average</key> + <value>True</value> + </param> + <param> + <key>avg_alpha</key> + <value>0.001</value> + </param> + <param> + <key>show_gauge</key> + <value>True</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value>1,0,1,1</value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>_coordinate</key> + <value>(713, 426)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_noise_source_x</key> + <param> + <key>id</key> + <value>gr_noise_source_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>noise_type</key> + <value>gr.GR_GAUSSIAN</value> + </param> + <param> + <key>amp</key> + <value>noisevar</value> + </param> + <param> + <key>seed</key> + <value>42</value> + </param> + <param> + <key>_coordinate</key> + <value>(672, 290)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_add_xx</key> + <param> + <key>id</key> + <value>gr_add_xx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>num_inputs</key> + <value>2</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(951, 256)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_metrics_x</key> + <param> + <key>id</key> + <value>trellis_metrics_x_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>f</value> + </param> + <param> + <key>card</key> + <value>8</value> + </param> + <param> + <key>dim</key> + <value>1</value> + </param> + <param> + <key>table</key> + <value>-7, -5, -3, -1, 1, 3, 5, 7</value> + </param> + <param> + <key>metric_type</key> + <value>trellis.TRELLIS_EUCLIDEAN</value> + </param> + <param> + <key>_coordinate</key> + <value>(58, 354)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_throttle</key> + <param> + <key>id</key> + <value>gr_throttle_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>short</value> + </param> + <param> + <key>samples_per_second</key> + <value>R</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(517, 103)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>wxgui_scopesink2</key> + <param> + <key>id</key> + <value>wxgui_scopesink2_0</value> + </param> + <param> + <key>_enabled</key> + <value>False</value> + </param> + <param> + <key>type</key> + <value>float</value> + </param> + <param> + <key>title</key> + <value>Scope Plot</value> + </param> + <param> + <key>samp_rate</key> + <value>R</value> + </param> + <param> + <key>v_scale</key> + <value>0</value> + </param> + <param> + <key>v_offset</key> + <value>0</value> + </param> + <param> + <key>t_scale</key> + <value>0</value> + </param> + <param> + <key>ac_couple</key> + <value>False</value> + </param> + <param> + <key>xy_mode</key> + <value>False</value> + </param> + <param> + <key>num_inputs</key> + <value>1</value> + </param> + <param> + <key>win_size</key> + <value></value> + </param> + <param> + <key>grid_pos</key> + <value></value> + </param> + <param> + <key>notebook</key> + <value></value> + </param> + <param> + <key>trig_mode</key> + <value>gr.gr_TRIG_MODE_AUTO</value> + </param> + <param> + <key>y_axis_label</key> + <value>Counts</value> + </param> + <param> + <key>_coordinate</key> + <value>(952, 73)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>gr_chunks_to_symbols_xx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>in_type</key> + <value>short</value> + </param> + <param> + <key>out_type</key> + <value>float</value> + </param> + <param> + <key>symbol_table</key> + <value>-7, -5, -3, -1, 1, 3, 5, 7</value> + </param> + <param> + <key>dimension</key> + <value>1</value> + </param> + <param> + <key>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(551, 184)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>wxgui_scopesink2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_noise_source_x_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id> + <sink_block_id>gr_add_xx_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>random_source_x_0</source_block_id> + <sink_block_id>trellis_sccc_encoder_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_sccc_encoder_xx_0</source_block_id> + <sink_block_id>gr_throttle_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_multiply_xx_2_0</source_block_id> + <sink_block_id>gr_short_to_float_1_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_short_to_float_1_0</source_block_id> + <sink_block_id>wxgui_numbersink2_3_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>gr_sub_xx_0</source_block_id> + <sink_block_id>gr_multiply_xx_2_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> + <connection> + <source_block_id>gr_add_xx_1</source_block_id> + <sink_block_id>trellis_metrics_x_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_metrics_x_0</source_block_id> + <sink_block_id>trellis_sccc_decoder_x_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_sccc_decoder_x_0</source_block_id> + <sink_block_id>gr_sub_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>1</sink_key> + </connection> +</flow_graph> diff --git a/gr-trellis/Makefile.am b/gr-trellis/Makefile.am index d68fb59c9..89d190ecf 100644 --- a/gr-trellis/Makefile.am +++ b/gr-trellis/Makefile.am @@ -21,7 +21,7 @@ include $(top_srcdir)/Makefile.common -SUBDIRS = src doc +SUBDIRS = src grc doc pkgconfigdir = $(libdir)/pkgconfig dist_pkgconfig_DATA = gnuradio-trellis.pc diff --git a/gr-trellis/grc/.gitignore b/gr-trellis/grc/.gitignore new file mode 100644 index 000000000..f3462d009 --- /dev/null +++ b/gr-trellis/grc/.gitignore @@ -0,0 +1,23 @@ +/Makefile +/Makefile.in +/aclocal.m4 +/configure +/config.h.in +/stamp-h.in +/libtool +/config.log +/config.h +/config.cache +/config.status +/missing +/stamp-h +/stamp-h1 +/.deps +/.libs +/*.la +/*.lo +/autom4te.cache +/*.cache +/missing +/make.log +/*.pc diff --git a/gr-trellis/grc/Makefile.am b/gr-trellis/grc/Makefile.am new file mode 100644 index 000000000..518c7f055 --- /dev/null +++ b/gr-trellis/grc/Makefile.am @@ -0,0 +1,39 @@ +# +# Copyright 2009 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 $(top_srcdir)/Makefile.common + +grcblocksdir = $(grc_blocksdir) + +dist_grcblocks_DATA = \ + trellis_encoder_xx.xml \ + trellis_siso_combined_f.xml \ + trellis_viterbi_x.xml \ + trellis_metrics_x.xml \ + trellis_siso_f.xml \ + trellis_permutation.xml \ + trellis_viterbi_combined_xx.xml \ + trellis_sccc_encoder_xx.xml \ + trellis_sccc_decoder_x.xml \ + trellis_sccc_decoder_combined_xx.xml \ + trellis_pccc_encoder_xx.xml \ + trellis_pccc_decoder_x.xml \ + trellis_pccc_decoder_combined_xx.xml diff --git a/grc/blocks/trellis_encoder_xx.xml b/gr-trellis/grc/trellis_encoder_xx.xml index 74a8cc346..639e948ec 100644 --- a/grc/blocks/trellis_encoder_xx.xml +++ b/gr-trellis/grc/trellis_encoder_xx.xml @@ -4,9 +4,11 @@ ##Trellis Encoder ################################################### --> + <block> <name>Trellis Encoder</name> <key>trellis_encoder_xx</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.encoder_$(type)(trellis.fsm($fsm_args), $init_state)</make> <param> @@ -58,6 +60,7 @@ <param> <name>Initial State</name> <key>init_state</key> + <value>0</value> <type>int</type> </param> <sink> diff --git a/grc/blocks/trellis_metrics_x.xml b/gr-trellis/grc/trellis_metrics_x.xml index 2016a34c2..ccb59a36e 100644 --- a/grc/blocks/trellis_metrics_x.xml +++ b/gr-trellis/grc/trellis_metrics_x.xml @@ -4,9 +4,12 @@ ##Trellis Metrics ################################################### --> + + <block> <name>Trellis Metrics</name> <key>trellis_metrics_x</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.metrics_$(type)($card, $dim, $table, $metric_type)</make> <callback>set_TABLE($table)</callback> diff --git a/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml b/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml new file mode 100644 index 000000000..ec58132f8 --- /dev/null +++ b/gr-trellis/grc/trellis_pccc_decoder_combined_xx.xml @@ -0,0 +1,170 @@ +<?xml version="1.0"?> +<!-- +################################################### +## PCCC Decoder Combined +################################################### + --> + + +<block> + <name>PCCC Decoder Combo</name> + <key>trellis_pccc_decoder_combined_xx</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.pccc_decoder_combined_$(type)$(out_type)( + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), + $block_size, + $iterations, + $siso_type, + $dim, $table, $metric_type, + $scaling) + </make> + <callback>set_TABLE($table)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>c</key> + <opt>io:complex</opt> + <opt>table:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>f</key> + <opt>io:float</opt> + <opt>table:real_vector</opt> + </option> + </param> + <param> + <name>Output Type</name> + <key>out_type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>i</key> + <opt>io:int</opt> + </option> + <option> + <name>Short</name> + <key>s</key> + <opt>io:short</opt> + </option> + <option> + <name>Byte</name> + <key>b</key> + <opt>io:byte</opt> + </option> + </param> + <param> + <name>FSM 1</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 1</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Final State 1</name> + <key>o_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>FSM 2</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 2</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Final State 2</name> + <key>i_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver</key> + <type>raw</type> + </param> + <param> + <name>Block Size</name> + <key>block_size</key> + <type>int</type> + </param> + <param> + <name>Iterations</name> + <key>iterations</key> + <value>10</value> + <type>int</type> + </param> + <param> + <name>Dimensionality</name> + <key>dim</key> + <type>int</type> + </param> + <param> + <name>Constellation</name> + <key>table</key> + <type>$type.table</type> + </param> + <param> + <name>Metric Type</name> + <key>metric_type</key> + <type>enum</type> + <option> + <name>Euclidean</name> + <key>trellis.TRELLIS_EUCLIDEAN</key> + </option> + <option> + <name>Hard Symbol</name> + <key>trellis.TRELLIS_HARD_SYMBOL</key> + </option> + <option> + <name>Hard Bit</name> + <key>trellis.TRELLIS_HARD_BIT</key> + </option> + </param> + <param> + <name>SISO Type</name> + <key>siso_type</key> + <type>enum</type> + <option> + <name>Min Sum</name> + <key>trellis.TRELLIS_MIN_SUM</key> + </option> + <option> + <name>Sum Product</name> + <key>trellis.TRELLIS_SUM_PRODUCT</key> + </option> + </param> + <param> + <name>Scaling</name> + <key>scaling</key> + <value>1.0</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.io</type> + </sink> + <source> + <name>out</name> + <type>$out_type.io</type> + </source> + <doc> +PCCC turbo Decoder combined with metric calculation. +The fsm arguments are passed directly to the trellis.fsm() constructor. + </doc> +</block> diff --git a/gr-trellis/grc/trellis_pccc_decoder_x.xml b/gr-trellis/grc/trellis_pccc_decoder_x.xml new file mode 100644 index 000000000..e6eb03f11 --- /dev/null +++ b/gr-trellis/grc/trellis_pccc_decoder_x.xml @@ -0,0 +1,117 @@ +<?xml version="1.0"?> +<!-- +################################################### +## PCCC Decoder +################################################### + --> + + +<block> + <name>PCCC Decoder</name> + <key>trellis_pccc_decoder_x</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.pccc_decoder_$(out_type)( + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), + $block_size, + $iterations, + $siso_type) + </make> + <param> + <name>Output Type</name> + <key>out_type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>i</key> + <opt>io:int</opt> + </option> + <option> + <name>Short</name> + <key>s</key> + <opt>io:short</opt> + </option> + <option> + <name>Byte</name> + <key>b</key> + <opt>io:byte</opt> + </option> + </param> + <param> + <name>FSM 1</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 1</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Final State 1</name> + <key>o_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>FSM 2</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 2</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Final State 2</name> + <key>i_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver</key> + <type>raw</type> + </param> + <param> + <name>Block Size</name> + <key>block_size</key> + <type>int</type> + </param> + <param> + <name>Iterations</name> + <key>iterations</key> + <value>10</value> + <type>int</type> + </param> + <param> + <name>SISO Type</name> + <key>siso_type</key> + <type>enum</type> + <option> + <name>Min Sum</name> + <key>trellis.TRELLIS_MIN_SUM</key> + </option> + <option> + <name>Sum Product</name> + <key>trellis.TRELLIS_SUM_PRODUCT</key> + </option> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>$out_type.io</type> + </source> + <doc> +PCCC turbo Decoder. +The fsm and interleaver arguments are passed directly to the trellis.fsm() and trellis.interleaver() constructors. + </doc> +</block> diff --git a/gr-trellis/grc/trellis_pccc_encoder_xx.xml b/gr-trellis/grc/trellis_pccc_encoder_xx.xml new file mode 100644 index 000000000..6774f18d2 --- /dev/null +++ b/gr-trellis/grc/trellis_pccc_encoder_xx.xml @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<!-- +################################################### +## PCCC Encoder +################################################### + --> + +<block> + <name>PCCC Encoder</name> + <key>trellis_pccc_encoder_xx</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.pccc_encoder_$(type)(trellis.fsm($o_fsm_args), $o_init_state, trellis.fsm($i_fsm_args), $i_init_state, trellis.interleaver($interleaver_args), $bl)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte->Byte</name> + <key>bb</key> + <opt>input:byte</opt> + <opt>output:byte</opt> + </option> + <option> + <name>Byte->Short</name> + <key>bs</key> + <opt>input:byte</opt> + <opt>output:short</opt> + </option> + <option> + <name>Byte->Int</name> + <key>bi</key> + <opt>input:byte</opt> + <opt>output:int</opt> + </option> + <option> + <name>Short->Short</name> + <key>ss</key> + <opt>input:short</opt> + <opt>output:short</opt> + </option> + <option> + <name>Short->Int</name> + <key>si</key> + <opt>input:short</opt> + <opt>output:int</opt> + </option> + <option> + <name>Int->Int</name> + <key>ii</key> + <opt>input:int</opt> + <opt>output:int</opt> + </option> + </param> + <param> + <name>FSM 1</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 1</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>FSM 2</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Initial State 2</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver_args</key> + <type>raw</type> + </param> + <param> + <name>Blocklength</name> + <key>bl</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +The fsm and interleaver arguments are passed directly to the trellis.fsm() and trellis.interleaver() constructors. + </doc> +</block> diff --git a/grc/blocks/trellis_permutation.xml b/gr-trellis/grc/trellis_permutation.xml index 7721cc71d..125a78d4d 100644 --- a/grc/blocks/trellis_permutation.xml +++ b/gr-trellis/grc/trellis_permutation.xml @@ -4,11 +4,14 @@ ##Trellis Permutation ################################################### --> + + <block> <name>Trellis Permutation</name> <key>trellis_permutation</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> - <make>trellis.permutation($block_size, $table, $syms_per_block, $type.size*$vlen)</make> + <make>trellis.permutation($interleaver_size, $table, $syms_per_block, $type.size*$vlen)</make> <param> <name>Type</name> <key>type</key> @@ -40,8 +43,8 @@ </option> </param> <param> - <name>Block Size</name> - <key>block_size</key> + <name>Interleaver Size</name> + <key>interleaver_size</key> <type>int</type> </param> <param> @@ -71,4 +74,8 @@ <type>$type</type> <vlen>$vlen</vlen> </source> + <doc> +Interleaver size is given in blocks. +One Symbol = (in/out type) * (vector length) + </doc> </block> diff --git a/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml b/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml new file mode 100644 index 000000000..81d800902 --- /dev/null +++ b/gr-trellis/grc/trellis_sccc_decoder_combined_xx.xml @@ -0,0 +1,170 @@ +<?xml version="1.0"?> +<!-- +################################################### +## SCCC Decoder Combined +################################################### + --> + + +<block> + <name>SCCC Decoder Combo</name> + <key>trellis_sccc_decoder_combined_xx</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.sccc_decoder_combined_$(type)$(out_type)( + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), + $block_size, + $iterations, + $siso_type, + $dim, $table, $metric_type, + $scaling) + </make> + <callback>set_TABLE($table)</callback> + <param> + <name>Input Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Complex</name> + <key>c</key> + <opt>io:complex</opt> + <opt>table:complex_vector</opt> + </option> + <option> + <name>Float</name> + <key>f</key> + <opt>io:float</opt> + <opt>table:real_vector</opt> + </option> + </param> + <param> + <name>Output Type</name> + <key>out_type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>i</key> + <opt>io:int</opt> + </option> + <option> + <name>Short</name> + <key>s</key> + <opt>io:short</opt> + </option> + <option> + <name>Byte</name> + <key>b</key> + <opt>io:byte</opt> + </option> + </param> + <param> + <name>Outer FSM</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Outer Initial State</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Outer Final State</name> + <key>o_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Inner FSM</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Inner Initial State</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Inner Final State</name> + <key>i_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver</key> + <type>raw</type> + </param> + <param> + <name>Block Size</name> + <key>block_size</key> + <type>int</type> + </param> + <param> + <name>Iterations</name> + <key>iterations</key> + <value>10</value> + <type>int</type> + </param> + <param> + <name>Dimensionality</name> + <key>dim</key> + <type>int</type> + </param> + <param> + <name>Constellation</name> + <key>table</key> + <type>$type.table</type> + </param> + <param> + <name>Metric Type</name> + <key>metric_type</key> + <type>enum</type> + <option> + <name>Euclidean</name> + <key>trellis.TRELLIS_EUCLIDEAN</key> + </option> + <option> + <name>Hard Symbol</name> + <key>trellis.TRELLIS_HARD_SYMBOL</key> + </option> + <option> + <name>Hard Bit</name> + <key>trellis.TRELLIS_HARD_BIT</key> + </option> + </param> + <param> + <name>SISO Type</name> + <key>siso_type</key> + <type>enum</type> + <option> + <name>Min Sum</name> + <key>trellis.TRELLIS_MIN_SUM</key> + </option> + <option> + <name>Sum Product</name> + <key>trellis.TRELLIS_SUM_PRODUCT</key> + </option> + </param> + <param> + <name>Scaling</name> + <key>scaling</key> + <value>1.0</value> + <type>real</type> + </param> + <sink> + <name>in</name> + <type>$type.io</type> + </sink> + <source> + <name>out</name> + <type>$out_type.io</type> + </source> + <doc> +SCCC turbo Decoder combined with metric calculation. +The fsm arguments are passed directly to the trellis.fsm() constructor. + </doc> +</block> diff --git a/gr-trellis/grc/trellis_sccc_decoder_x.xml b/gr-trellis/grc/trellis_sccc_decoder_x.xml new file mode 100644 index 000000000..9fc24927b --- /dev/null +++ b/gr-trellis/grc/trellis_sccc_decoder_x.xml @@ -0,0 +1,117 @@ +<?xml version="1.0"?> +<!-- +################################################### +## SCCC Decoder +################################################### + --> + + +<block> + <name>SCCC Decoder</name> + <key>trellis_sccc_decoder_x</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.sccc_decoder_$(out_type)( + trellis.fsm($o_fsm_args), $o_init_state, $o_final_state, + trellis.fsm($i_fsm_args), $i_init_state, $i_final_state, + trellis.interleaver($interleaver), + $block_size, + $iterations, + $siso_type) + </make> + <param> + <name>Output Type</name> + <key>out_type</key> + <type>enum</type> + <option> + <name>Int</name> + <key>i</key> + <opt>io:int</opt> + </option> + <option> + <name>Short</name> + <key>s</key> + <opt>io:short</opt> + </option> + <option> + <name>Byte</name> + <key>b</key> + <opt>io:byte</opt> + </option> + </param> + <param> + <name>Outer FSM</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Outer Initial State</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Outer Final State</name> + <key>o_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Inner FSM</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Inner Initial State</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Inner Final State</name> + <key>i_final_state</key> + <value>-1</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver</key> + <type>raw</type> + </param> + <param> + <name>Block Size</name> + <key>block_size</key> + <type>int</type> + </param> + <param> + <name>Iterations</name> + <key>iterations</key> + <value>10</value> + <type>int</type> + </param> + <param> + <name>SISO Type</name> + <key>siso_type</key> + <type>enum</type> + <option> + <name>Min Sum</name> + <key>trellis.TRELLIS_MIN_SUM</key> + </option> + <option> + <name>Sum Product</name> + <key>trellis.TRELLIS_SUM_PRODUCT</key> + </option> + </param> + <sink> + <name>in</name> + <type>float</type> + </sink> + <source> + <name>out</name> + <type>$out_type.io</type> + </source> + <doc> +SCCC turbo Decoder. +The fsm and interleaver arguments are passed directly to the trellis.fsm() and trellis.interleaver() constructors. + </doc> +</block> diff --git a/gr-trellis/grc/trellis_sccc_encoder_xx.xml b/gr-trellis/grc/trellis_sccc_encoder_xx.xml new file mode 100644 index 000000000..54d9c1e01 --- /dev/null +++ b/gr-trellis/grc/trellis_sccc_encoder_xx.xml @@ -0,0 +1,98 @@ +<?xml version="1.0"?> +<!-- +################################################### +##SCCC Encoder +################################################### + --> + +<block> + <name>SCCC Encoder</name> + <key>trellis_sccc_encoder_xx</key> + <category>Error Correction/Trellis</category> + <import>from gnuradio import trellis</import> + <make>trellis.sccc_encoder_$(type)(trellis.fsm($o_fsm_args), $o_init_state, trellis.fsm($i_fsm_args), $i_init_state, trellis.interleaver($interleaver_args), $bl)</make> + <param> + <name>Type</name> + <key>type</key> + <type>enum</type> + <option> + <name>Byte->Byte</name> + <key>bb</key> + <opt>input:byte</opt> + <opt>output:byte</opt> + </option> + <option> + <name>Byte->Short</name> + <key>bs</key> + <opt>input:byte</opt> + <opt>output:short</opt> + </option> + <option> + <name>Byte->Int</name> + <key>bi</key> + <opt>input:byte</opt> + <opt>output:int</opt> + </option> + <option> + <name>Short->Short</name> + <key>ss</key> + <opt>input:short</opt> + <opt>output:short</opt> + </option> + <option> + <name>Short->Int</name> + <key>si</key> + <opt>input:short</opt> + <opt>output:int</opt> + </option> + <option> + <name>Int->Int</name> + <key>ii</key> + <opt>input:int</opt> + <opt>output:int</opt> + </option> + </param> + <param> + <name>Outer FSM</name> + <key>o_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Outer Initial State</name> + <key>o_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Inner FSM</name> + <key>i_fsm_args</key> + <type>raw</type> + </param> + <param> + <name>Inner Initial State</name> + <key>i_init_state</key> + <value>0</value> + <type>int</type> + </param> + <param> + <name>Interleaver</name> + <key>interleaver_args</key> + <type>raw</type> + </param> + <param> + <name>Blocklength</name> + <key>bl</key> + <type>int</type> + </param> + <sink> + <name>in</name> + <type>$type.input</type> + </sink> + <source> + <name>out</name> + <type>$type.output</type> + </source> + <doc> +The fsm and interleaver arguments are passed directly to the trellis.fsm() and trellis.interleaver() constructors. + </doc> +</block> diff --git a/grc/blocks/trellis_siso_combined_f.xml b/gr-trellis/grc/trellis_siso_combined_f.xml index 98874d7f4..a39986a86 100644 --- a/grc/blocks/trellis_siso_combined_f.xml +++ b/gr-trellis/grc/trellis_siso_combined_f.xml @@ -4,9 +4,12 @@ ##Trellis SISO Combined ################################################### --> + + <block> - <name>Trellis SISO Combo</name> + <name>SISO Combo</name> <key>trellis_siso_combined_f</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.siso_combined_f(trellis.fsm($fsm_args), $block_size, $init_state, $final_state, $a_post_in, $a_post_out, $siso_type, $dim, $table, $metric_type)</make> <param> @@ -22,7 +25,7 @@ <param> <name>Initial State</name> <key>init_state</key> - <value>-1</value> + <value>0</value> <type>int</type> </param> <param> diff --git a/grc/blocks/trellis_siso_f.xml b/gr-trellis/grc/trellis_siso_f.xml index 2b9cfe5f7..e3fb502b3 100644 --- a/grc/blocks/trellis_siso_f.xml +++ b/gr-trellis/grc/trellis_siso_f.xml @@ -4,9 +4,12 @@ ##Trellis SISO ################################################### --> + + <block> - <name>Trellis SISO</name> + <name>SISO</name> <key>trellis_siso_f</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.siso_f(trellis.fsm($fsm_args), $block_size, $init_state, $final_state, $a_post_in, $a_post_out, $siso_type)</make> <param> @@ -22,7 +25,7 @@ <param> <name>Initial State</name> <key>init_state</key> - <value>-1</value> + <value>0</value> <type>int</type> </param> <param> diff --git a/grc/blocks/trellis_viterbi_combined_xx.xml b/gr-trellis/grc/trellis_viterbi_combined_xx.xml index 33dcaaf73..200f07859 100644 --- a/grc/blocks/trellis_viterbi_combined_xx.xml +++ b/gr-trellis/grc/trellis_viterbi_combined_xx.xml @@ -4,9 +4,12 @@ ##Trellis Viterbi Combined ################################################### --> + + <block> - <name>Trellis Viterbi Combo</name> + <name>Viterbi Combo</name> <key>trellis_viterbi_combined_xx</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.viterbi_combined_$(type)$(out_type)(trellis.fsm($fsm_args), $block_size, $init_state, $final_state, $dim, $table, $metric_type)</make> <callback>set_TABLE($table)</callback> @@ -72,7 +75,7 @@ <param> <name>Initial State</name> <key>init_state</key> - <value>-1</value> + <value>0</value> <type>int</type> </param> <param> diff --git a/grc/blocks/trellis_viterbi_x.xml b/gr-trellis/grc/trellis_viterbi_x.xml index 84b39677c..d97e6707a 100644 --- a/grc/blocks/trellis_viterbi_x.xml +++ b/gr-trellis/grc/trellis_viterbi_x.xml @@ -4,9 +4,12 @@ ##Trellis Viterbi ################################################### --> + + <block> - <name>Trellis Viterbi</name> + <name>Viterbi</name> <key>trellis_viterbi_x</key> + <category>Error Correction/Trellis</category> <import>from gnuradio import trellis</import> <make>trellis.viterbi_$(type)(trellis.fsm($fsm_args), $block_size, $init_state, $final_state)</make> <param> @@ -42,7 +45,7 @@ <param> <name>Initial State</name> <key>init_state</key> - <value>-1</value> + <value>0</value> <type>int</type> </param> <param> diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am index ae7f21f56..8f703c92a 100644 --- a/gr-trellis/src/lib/Makefile.am +++ b/gr-trellis/src/lib/Makefile.am @@ -40,12 +40,12 @@ core_generator = \ trellis_encoder_XX.cc.t \ trellis_encoder_XX.h.t \ trellis_encoder_XX.i.t \ - trellis_sccc_encoder_XX.cc.t \ - trellis_sccc_encoder_XX.h.t \ - trellis_sccc_encoder_XX.i.t \ - trellis_pccc_encoder_XX.cc.t \ - trellis_pccc_encoder_XX.h.t \ - trellis_pccc_encoder_XX.i.t \ + trellis_sccc_encoder_XX.cc.t \ + trellis_sccc_encoder_XX.h.t \ + trellis_sccc_encoder_XX.i.t \ + trellis_pccc_encoder_XX.cc.t \ + trellis_pccc_encoder_XX.h.t \ + trellis_pccc_encoder_XX.i.t \ trellis_metrics_X.cc.t \ trellis_metrics_X.h.t \ trellis_metrics_X.i.t \ @@ -53,14 +53,17 @@ core_generator = \ trellis_viterbi_combined_XX.h.t \ trellis_viterbi_combined_XX.i.t \ trellis_sccc_decoder_combined_XX.cc.t \ - trellis_sccc_decoder_combined_XX.h.t \ - trellis_sccc_decoder_combined_XX.i.t \ - trellis_sccc_decoder_X.cc.t \ + trellis_sccc_decoder_combined_XX.h.t \ + trellis_sccc_decoder_combined_XX.i.t \ + trellis_sccc_decoder_X.cc.t \ trellis_sccc_decoder_X.h.t \ trellis_sccc_decoder_X.i.t \ - trellis_pccc_decoder_X.cc.t \ + trellis_pccc_decoder_X.cc.t \ trellis_pccc_decoder_X.h.t \ trellis_pccc_decoder_X.i.t \ + trellis_pccc_decoder_combined_XX.cc.t \ + trellis_pccc_decoder_combined_XX.h.t \ + trellis_pccc_decoder_combined_XX.i.t \ trellis_viterbi_X.cc.t \ trellis_viterbi_X.h.t \ trellis_viterbi_X.i.t diff --git a/gr-trellis/src/lib/Makefile.gen b/gr-trellis/src/lib/Makefile.gen index 534a7466e..b9b9afb1f 100644 --- a/gr-trellis/src/lib/Makefile.gen +++ b/gr-trellis/src/lib/Makefile.gen @@ -13,6 +13,12 @@ GENERATED_H = \ trellis_metrics_i.h \ trellis_metrics_s.h \ trellis_pccc_decoder_b.h \ + trellis_pccc_decoder_combined_cb.h \ + trellis_pccc_decoder_combined_ci.h \ + trellis_pccc_decoder_combined_cs.h \ + trellis_pccc_decoder_combined_fb.h \ + trellis_pccc_decoder_combined_fi.h \ + trellis_pccc_decoder_combined_fs.h \ trellis_pccc_decoder_i.h \ trellis_pccc_decoder_s.h \ trellis_pccc_encoder_bb.h \ @@ -64,6 +70,12 @@ GENERATED_I = \ trellis_metrics_i.i \ trellis_metrics_s.i \ trellis_pccc_decoder_b.i \ + trellis_pccc_decoder_combined_cb.i \ + trellis_pccc_decoder_combined_ci.i \ + trellis_pccc_decoder_combined_cs.i \ + trellis_pccc_decoder_combined_fb.i \ + trellis_pccc_decoder_combined_fi.i \ + trellis_pccc_decoder_combined_fs.i \ trellis_pccc_decoder_i.i \ trellis_pccc_decoder_s.i \ trellis_pccc_encoder_bb.i \ @@ -115,6 +127,12 @@ GENERATED_CC = \ trellis_metrics_i.cc \ trellis_metrics_s.cc \ trellis_pccc_decoder_b.cc \ + trellis_pccc_decoder_combined_cb.cc \ + trellis_pccc_decoder_combined_ci.cc \ + trellis_pccc_decoder_combined_cs.cc \ + trellis_pccc_decoder_combined_fb.cc \ + trellis_pccc_decoder_combined_fi.cc \ + trellis_pccc_decoder_combined_fs.cc \ trellis_pccc_decoder_i.cc \ trellis_pccc_decoder_s.cc \ trellis_pccc_encoder_bb.cc \ diff --git a/gr-trellis/src/lib/core_algorithms.cc b/gr-trellis/src/lib/core_algorithms.cc index 91ac8fbdf..54193c818 100644 --- a/gr-trellis/src/lib/core_algorithms.cc +++ b/gr-trellis/src/lib/core_algorithms.cc @@ -784,7 +784,7 @@ template<class Ti, class To> void sccc_decoder_combined( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<Ti> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -810,7 +810,7 @@ for(int k=0;k<blocklength;k++) { iprioro[k*FSMi.O()] *= scaling; } -for(int rep=0;rep<repetitions;rep++) { +for(int rep=0;rep<iterations;rep++) { // run inner SISO siso_algorithm(FSMi.I(),FSMi.S(),FSMi.O(), FSMi.NS(), FSMi.OS(), FSMi.PS(), FSMi.PI(), @@ -832,7 +832,7 @@ for(int rep=0;rep<repetitions;rep++) { // run outer SISO - if(rep<repetitions-1) { // do not produce posti + if(rep<iterations-1) { // do not produce posti siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), blocklength, @@ -897,7 +897,7 @@ template void sccc_decoder_combined<float,unsigned char>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<float> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -909,7 +909,7 @@ template void sccc_decoder_combined<float,short>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<float> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -921,7 +921,7 @@ template void sccc_decoder_combined<float,int>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<float> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -933,7 +933,7 @@ template void sccc_decoder_combined<gr_complex,unsigned char>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<gr_complex> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -945,7 +945,7 @@ template void sccc_decoder_combined<gr_complex,short>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<gr_complex> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -957,7 +957,7 @@ template void sccc_decoder_combined<gr_complex,int>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<gr_complex> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -973,7 +973,7 @@ template<class T> void sccc_decoder( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *iprioro, T *data ) @@ -988,7 +988,7 @@ void sccc_decoder( std::vector<float> oposti(blocklength*FSMo.I()); std::vector<float> oposto(blocklength*FSMo.O()); - for(int rep=0;rep<repetitions;rep++) { + for(int rep=0;rep<iterations;rep++) { // run inner SISO siso_algorithm(FSMi.I(),FSMi.S(),FSMi.O(), FSMi.NS(), FSMi.OS(), FSMi.PS(), FSMi.PI(), @@ -1010,7 +1010,7 @@ void sccc_decoder( // run outer SISO - if(rep<repetitions-1) { // do not produce posti + if(rep<iterations-1) { // do not produce posti siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(), FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(), blocklength, @@ -1050,7 +1050,7 @@ void sccc_decoder( */ } - } // end repetitions + } // end iterations // generate hard decisions for(int k=0;k<blocklength;k++) { @@ -1075,7 +1075,7 @@ template void sccc_decoder<unsigned char>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *iprioro, unsigned char *data ); @@ -1084,7 +1084,7 @@ template void sccc_decoder<short>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *iprioro, short *data ); @@ -1093,7 +1093,7 @@ template void sccc_decoder<int>( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *iprioro, int *data ); @@ -1105,7 +1105,7 @@ template<class T> void pccc_decoder( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *cprioro, T *data ) @@ -1140,7 +1140,7 @@ void pccc_decoder( } } - for(int rep=0;rep<repetitions;rep++) { + for(int rep=0;rep<iterations;rep++) { // run SISO 1 siso_algorithm(FSM1.I(),FSM1.S(),FSM1.O(), FSM1.NS(), FSM1.OS(), FSM1.PS(), FSM1.PI(), @@ -1185,7 +1185,7 @@ void pccc_decoder( memcpy(&(priori1[ki*FSM1.I()]),&(posti2[k*FSM2.I()]),FSM1.I()*sizeof(float)); } - } // end repetitions + } // end iterations // generate hard decisions for(int k=0;k<blocklength;k++) { @@ -1204,8 +1204,6 @@ void pccc_decoder( } //std::cout << std::endl; - - } //---------------- @@ -1214,7 +1212,7 @@ template void pccc_decoder<unsigned char>( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *cprioro, unsigned char *data ); @@ -1223,7 +1221,7 @@ template void pccc_decoder<short>( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *cprioro, short *data ); @@ -1232,8 +1230,208 @@ template void pccc_decoder<int>( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), const float *cprioro, int *data ); + + +//---------------- + + +template<class Ti, class To> +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<Ti> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const Ti *observations, To *data +) +{ + + //allocate space for cprioro + std::vector<float> cprioro(blocklength*FSM1.O()*FSM2.O(),0.0); + + //allocate space for priori, prioro and posti of FSM1 + std::vector<float> priori1(blocklength*FSM1.I(),0.0); + std::vector<float> prioro1(blocklength*FSM1.O()); + std::vector<float> posti1(blocklength*FSM1.I()); + + //allocate space for priori, prioro and posti of FSM2 + std::vector<float> priori2(blocklength*FSM2.I(),0.0); + std::vector<float> prioro2(blocklength*FSM2.O()); + std::vector<float> posti2(blocklength*FSM2.I()); + + // turn observations to neg-log-priors for cprioiro + int O=FSM1.O()*FSM2.O(); + for(int k=0;k<blocklength;k++) { + calc_metric(O, D, TABLE, &(observations[k*D]), &(cprioro[k*O]),METRIC_TYPE); + cprioro[k*O] *= scaling; + } + + //generate prioro1,2 (metrics are not updated per iteration: this is not the best you can do...) + for (int k=0;k<blocklength;k++) { + //std::cout << k << std::endl; + for(int i=0;i<FSM1.O();i++) { + float x=cprioro[k*FSM1.O()*FSM2.O()+i*FSM1.O()+0]; + for(int j=1;j<FSM2.O();j++) + x = (*p2mymin)(x,cprioro[k*FSM1.O()*FSM2.O()+i*FSM1.O()+j]); + prioro1[k*FSM1.O()+i]=x; + //std::cout << prioro1[k*FSM1.O()+i] << ", "; + } + //std::cout << std::endl; + for(int i=0;i<FSM2.O();i++) { + float x=cprioro[k*FSM1.O()*FSM2.O()+0*FSM1.O()+i]; + for(int j=1;j<FSM1.O();j++) + x = (*p2mymin)(x,cprioro[k*FSM1.O()*FSM2.O()+j*FSM1.O()+i]); + prioro2[k*FSM2.O()+i]=x; + } + } + + for(int rep=0;rep<iterations;rep++) { + // run SISO 1 + siso_algorithm(FSM1.I(),FSM1.S(),FSM1.O(), + FSM1.NS(), FSM1.OS(), FSM1.PS(), FSM1.PI(), + blocklength, + ST10,ST1K, + true, false, + p2mymin, + &(priori1[0]), &(prioro1[0]), &(posti1[0]) + ); + + //for(int k=0;k<blocklength;k++){ + //for(int i=0;i<FSM1.I();i++) + //std::cout << posti1[k*FSM1.I()+i] << ", "; + //std::cout << std::endl; + //} + + //interleave soft info 1 -> 2 + for(int k=0;k<blocklength;k++) { + int ki = INTERLEAVER.INTER()[k]; + //for(int i=0;i<FSMi.I();i++) { + //oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i]; + //} + memcpy(&(priori2[k*FSM2.I()]),&(posti1[ki*FSM1.I()]),FSM1.I()*sizeof(float)); + } + + // run SISO 2 + siso_algorithm(FSM2.I(),FSM2.S(),FSM2.O(), + FSM2.NS(), FSM2.OS(), FSM2.PS(), FSM2.PI(), + blocklength, + ST20,ST2K, + true, false, + p2mymin, + &(priori2[0]), &(prioro2[0]), &(posti2[0]) + ); + + //interleave soft info 2 --> 1 + for(int k=0;k<blocklength;k++) { + int ki = INTERLEAVER.INTER()[k]; + //for(int i=0;i<FSMi.I();i++) { + //ipriori[ki*FSMi.I()+i]=oposto[k*FSMi.I()+i]; + //} + memcpy(&(priori1[ki*FSM1.I()]),&(posti2[k*FSM2.I()]),FSM1.I()*sizeof(float)); + } + + } // end iterations + + // generate hard decisions + for(int k=0;k<blocklength;k++) { + for(int i=0;i<FSM1.I();i++) + posti1[k*FSM1.I()+i] = (*p2mymin)(priori1[k*FSM1.I()+i],posti1[k*FSM1.I()+i]); + float min=INF; + int mini=0; + for(int i=0;i<FSM1.I();i++) { + if(posti1[k*FSM1.I()+i]<min) { + min=posti1[k*FSM1.I()+i]; + mini=i; + } + } + data[k]=(To)mini; + //std::cout << data[k] << ", "<< std::endl; + } + //std::cout << std::endl; + +} + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const float *observations, unsigned char *data +); + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const float *observations, short *data +); + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const float *observations, int *data +); + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const gr_complex *observations, unsigned char *data +); + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const gr_complex *observations, short *data +); + + +template +void pccc_decoder_combined( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + int D, const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const gr_complex *observations, int *data +); diff --git a/gr-trellis/src/lib/core_algorithms.h b/gr-trellis/src/lib/core_algorithms.h index fdb5f398e..0ce4f3f4e 100644 --- a/gr-trellis/src/lib/core_algorithms.h +++ b/gr-trellis/src/lib/core_algorithms.h @@ -91,11 +91,21 @@ void siso_algorithm_combined(int I, int S, int O, ); +template<class T> +void sccc_decoder( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, int blocklength, int iterations, + float (*p2mymin)(float,float), + const float *iprioro, T *data +); + + template<class Ti, class To> void sccc_decoder_combined( const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), int D, const std::vector<Ti> &TABLE, trellis_metric_type_t METRIC_TYPE, @@ -103,26 +113,28 @@ void sccc_decoder_combined( const Ti *observations, To *data ); - template<class T> -void sccc_decoder( - const fsm &FSMo, int STo0, int SToK, - const fsm &FSMi, int STi0, int STiK, - const interleaver &INTERLEAVER, int blocklength, int repetitions, +void pccc_decoder( + const fsm &FSM1, int ST10, int ST1K, + const fsm &FSM2, int ST20, int ST2K, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), - const float *iprioro, T *data + const float *cprioro, T *data ); - -template<class T> -void pccc_decoder( +template<class Ti, class To> +void pccc_decoder_combined( const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, - const interleaver &INTERLEAVER, int blocklength, int repetitions, + const interleaver &INTERLEAVER, int blocklength, int iterations, float (*p2mymin)(float,float), - const float *cprioro, T *data + int D, const std::vector<Ti> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling, + const Ti *observations, To *data ); + #endif diff --git a/gr-trellis/src/lib/generate_trellis.py b/gr-trellis/src/lib/generate_trellis.py index 9f845f74a..31bc44aac 100644 --- a/gr-trellis/src/lib/generate_trellis.py +++ b/gr-trellis/src/lib/generate_trellis.py @@ -33,9 +33,10 @@ other_roots = [ 'trellis_metrics_X', 'trellis_viterbi_X', 'trellis_viterbi_combined_XX', - 'trellis_sccc_decoder_combined_XX', 'trellis_sccc_decoder_X', + 'trellis_sccc_decoder_combined_XX', 'trellis_pccc_decoder_X', + 'trellis_pccc_decoder_combined_XX', ] other_signatures = ( @@ -45,9 +46,10 @@ other_signatures = ( ['s','i','f','c'], ['b','s','i'], ['sb','ss','si','ib','is','ii','fb','fs','fi','cb','cs','ci'], - ['fb','fs','fi','cb','cs','ci'], ['b','s','i'], + ['fb','fs','fi','cb','cs','ci'], ['b','s','i'], + ['fb','fs','fi','cb','cs','ci'], ) diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t new file mode 100644 index 000000000..48f68f1fe --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// @WARNING@ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <@NAME@.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +@SPTR_NAME@ +trellis_make_@BASE_NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new @NAME@ ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +@NAME@::@NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("@BASE_NAME@", + gr_make_io_signature (1, 1, sizeof (@I_TYPE@)), + gr_make_io_signature (1, 1, sizeof (@O_TYPE@))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void @NAME@::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +@NAME@::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +@NAME@::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]; + @O_TYPE@ *out = (@O_TYPE@ *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t new file mode 100644 index 000000000..dd9979af9 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// @WARNING@ + +#ifndef @GUARD_NAME@ +#define @GUARD_NAME@ + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class @NAME@; +typedef boost::shared_ptr<@NAME@> @SPTR_NAME@; + +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class @NAME@ : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<@I_TYPE@> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend @SPTR_NAME@ trellis_make_@BASE_NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + @NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<@I_TYPE@> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t new file mode 100644 index 000000000..d841f67b4 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.i.t @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// @WARNING@ + +GR_SWIG_BLOCK_MAGIC(trellis,@BASE_NAME@); + +@SPTR_NAME@ trellis_make_@BASE_NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class @NAME@ : public gr_block +{ +private: + @NAME@ ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<@I_TYPE@> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<@I_TYPE@> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc new file mode 100644 index 000000000..d797ce410 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_cb.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_cb_sptr +trellis_make_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_cb ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_cb::trellis_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_cb", + gr_make_io_signature (1, 1, sizeof (gr_complex)), + gr_make_io_signature (1, 1, sizeof (unsigned char))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_cb::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_cb::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_cb::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const gr_complex *in = (const gr_complex *) input_items[0]; + unsigned char *out = (unsigned char *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.h new file mode 100644 index 000000000..46d65242e --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CB_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CB_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_cb; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_cb> trellis_pccc_decoder_combined_cb_sptr; + +trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_cb : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<gr_complex> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i new file mode 100644 index 000000000..9ae829c55 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cb.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_cb); + +trellis_pccc_decoder_combined_cb_sptr trellis_make_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_cb : public gr_block +{ +private: + trellis_pccc_decoder_combined_cb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc new file mode 100644 index 000000000..19201947e --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_ci.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_ci_sptr +trellis_make_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_ci ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_ci::trellis_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_ci", + gr_make_io_signature (1, 1, sizeof (gr_complex)), + gr_make_io_signature (1, 1, sizeof (int))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_ci::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_ci::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_ci::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const gr_complex *in = (const gr_complex *) input_items[0]; + int *out = (int *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.h new file mode 100644 index 000000000..32668c34d --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CI_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CI_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_ci; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_ci> trellis_pccc_decoder_combined_ci_sptr; + +trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_ci : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<gr_complex> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i new file mode 100644 index 000000000..5644d6992 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_ci.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_ci); + +trellis_pccc_decoder_combined_ci_sptr trellis_make_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_ci : public gr_block +{ +private: + trellis_pccc_decoder_combined_ci ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc new file mode 100644 index 000000000..0ab818bfd --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_cs.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_cs_sptr +trellis_make_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_cs ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_cs::trellis_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_cs", + gr_make_io_signature (1, 1, sizeof (gr_complex)), + gr_make_io_signature (1, 1, sizeof (short))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_cs::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_cs::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_cs::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const gr_complex *in = (const gr_complex *) input_items[0]; + short *out = (short *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.h new file mode 100644 index 000000000..3c4f138aa --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CS_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_CS_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_cs; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_cs> trellis_pccc_decoder_combined_cs_sptr; + +trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_cs : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<gr_complex> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i new file mode 100644 index 000000000..7614a81fc --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_cs.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_cs); + +trellis_pccc_decoder_combined_cs_sptr trellis_make_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_cs : public gr_block +{ +private: + trellis_pccc_decoder_combined_cs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<gr_complex> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<gr_complex> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc new file mode 100644 index 000000000..0122dd7e9 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_fb.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_fb_sptr +trellis_make_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fb ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_fb::trellis_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_fb", + gr_make_io_signature (1, 1, sizeof (float)), + gr_make_io_signature (1, 1, sizeof (unsigned char))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_fb::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_fb::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_fb::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const float *in = (const float *) input_items[0]; + unsigned char *out = (unsigned char *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.h new file mode 100644 index 000000000..0ed90b8b3 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FB_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FB_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_fb; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_fb> trellis_pccc_decoder_combined_fb_sptr; + +trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_fb : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<float> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i new file mode 100644 index 000000000..41e1a2f4f --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fb.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fb); + +trellis_pccc_decoder_combined_fb_sptr trellis_make_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_fb : public gr_block +{ +private: + trellis_pccc_decoder_combined_fb ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc new file mode 100644 index 000000000..e87487087 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_fi.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_fi_sptr +trellis_make_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fi ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_fi::trellis_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_fi", + gr_make_io_signature (1, 1, sizeof (float)), + gr_make_io_signature (1, 1, sizeof (int))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_fi::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_fi::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_fi::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const float *in = (const float *) input_items[0]; + int *out = (int *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.h new file mode 100644 index 000000000..a96adaa08 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FI_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FI_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_fi; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_fi> trellis_pccc_decoder_combined_fi_sptr; + +trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_fi : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<float> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i new file mode 100644 index 000000000..202609ace --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fi.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fi); + +trellis_pccc_decoder_combined_fi_sptr trellis_make_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_fi : public gr_block +{ +private: + trellis_pccc_decoder_combined_fi ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc new file mode 100644 index 000000000..bb822c699 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.cc @@ -0,0 +1,147 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004,2010 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include <trellis_pccc_decoder_combined_fs.h> +#include <gr_io_signature.h> +#include <assert.h> +#include <iostream> +#include "core_algorithms.h" + + +static const float INF = 1.0e9; + +trellis_pccc_decoder_combined_fs_sptr +trellis_make_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) +{ + return gnuradio::get_initial_sptr (new trellis_pccc_decoder_combined_fs ( + FSMo, STo0, SToK, + FSMi, STi0, STiK, + INTERLEAVER, + blocklength, + repetitions, + SISO_TYPE, + D, + TABLE,METRIC_TYPE, + scaling + )); +} + +trellis_pccc_decoder_combined_fs::trellis_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +) + : gr_block ("pccc_decoder_combined_fs", + gr_make_io_signature (1, 1, sizeof (float)), + gr_make_io_signature (1, 1, sizeof (short))), + d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK), + d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK), + d_INTERLEAVER (INTERLEAVER), + d_blocklength (blocklength), + d_repetitions (repetitions), + d_SISO_TYPE (SISO_TYPE), + d_D (D), + d_TABLE (TABLE), + d_METRIC_TYPE (METRIC_TYPE), + d_scaling (scaling) +{ + assert(d_FSMo.I() == d_FSMi.I()); + set_relative_rate (1.0 / ((double) d_D)); + set_output_multiple (d_blocklength); +} + +void trellis_pccc_decoder_combined_fs::set_scaling(float scaling) +{ + d_scaling = scaling; +} + + +void +trellis_pccc_decoder_combined_fs::forecast (int noutput_items, gr_vector_int &ninput_items_required) +{ + assert (noutput_items % d_blocklength == 0); + int input_required = d_D * noutput_items ; + ninput_items_required[0] = input_required; +} + + + +//=========================================================== + +int +trellis_pccc_decoder_combined_fs::general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items) +{ + assert (noutput_items % d_blocklength == 0); + int nblocks = noutput_items / d_blocklength; + + float (*p2min)(float, float) = NULL; + if(d_SISO_TYPE == TRELLIS_MIN_SUM) + p2min = &min; + else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT) + p2min = &min_star; + + + const float *in = (const float *) input_items[0]; + short *out = (short *) output_items[0]; + for (int n=0;n<nblocks;n++) { + pccc_decoder_combined( + d_FSMo, d_STo0, d_SToK, + d_FSMi, d_STi0, d_STiK, + d_INTERLEAVER, d_blocklength, d_repetitions, + p2min, + d_D,d_TABLE, + d_METRIC_TYPE, + d_scaling, + &(in[n*d_blocklength*d_D]),&(out[n*d_blocklength]) + ); + } + + consume_each (d_D * noutput_items ); + return noutput_items; +} diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.h b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.h new file mode 100644 index 000000000..9df827488 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.h @@ -0,0 +1,124 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +#ifndef INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FS_H +#define INCLUDED_TRELLIS_PCCC_DECODER_COMBINED_FS_H + +#include "fsm.h" +#include "interleaver.h" +#include <gr_block.h> +#include <vector> +#include "calc_metric.h" +#include "siso_type.h" + +class trellis_pccc_decoder_combined_fs; +typedef boost::shared_ptr<trellis_pccc_decoder_combined_fs> trellis_pccc_decoder_combined_fs_sptr; + +trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +/*! + * \ingroup coding_blk + */ +class trellis_pccc_decoder_combined_fs : public gr_block +{ + fsm d_FSMo; + fsm d_FSMi; + int d_STo0; + int d_SToK; + int d_STi0; + int d_STiK; + interleaver d_INTERLEAVER; + int d_blocklength; + int d_repetitions; + trellis_siso_type_t d_SISO_TYPE; + int d_D; + std::vector<float> d_TABLE; + trellis_metric_type_t d_METRIC_TYPE; + float d_scaling; + std::vector<float> d_buffer; + + friend trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + + trellis_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling () const { return d_scaling; } + void set_scaling (float scaling); + + void forecast (int noutput_items, + gr_vector_int &ninput_items_required); + int general_work (int noutput_items, + gr_vector_int &ninput_items, + gr_vector_const_void_star &input_items, + gr_vector_void_star &output_items); +}; + +#endif diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i new file mode 100644 index 000000000..b8bbf09d6 --- /dev/null +++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_fs.i @@ -0,0 +1,73 @@ +/* -*- c++ -*- */ +/* + * Copyright 2004 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. + */ + +// WARNING: this file is machine generated. Edits will be over written + +GR_SWIG_BLOCK_MAGIC(trellis,pccc_decoder_combined_fs); + +trellis_pccc_decoder_combined_fs_sptr trellis_make_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling +); + + +class trellis_pccc_decoder_combined_fs : public gr_block +{ +private: + trellis_pccc_decoder_combined_fs ( + const fsm &FSMo, int STo0, int SToK, + const fsm &FSMi, int STi0, int STiK, + const interleaver &INTERLEAVER, + int blocklength, + int repetitions, + trellis_siso_type_t SISO_TYPE, + int D, + const std::vector<float> &TABLE, + trellis_metric_type_t METRIC_TYPE, + float scaling + ); + +public: + fsm FSM1 () const { return d_FSMo; } + fsm FSM2 () const { return d_FSMi; } + int ST10 () const { return d_STo0; } + int ST1K () const { return d_SToK; } + int ST20 () const { return d_STi0; } + int ST2K () const { return d_STiK; } + interleaver INTERLEAVER () const { return d_INTERLEAVER; } + int blocklength () const { return d_blocklength; } + int repetitions () const { return d_repetitions; } + int D () const { return d_D; } + std::vector<float> TABLE () const { return d_TABLE; } + trellis_metric_type_t METRIC_TYPE () const { return d_METRIC_TYPE; } + trellis_siso_type_t SISO_TYPE () const { return d_SISO_TYPE; } + float scaling() const { return d_scaling; } + void set_scaling (float scaling); +}; diff --git a/gr-trellis/src/lib/trellis_permutation.cc b/gr-trellis/src/lib/trellis_permutation.cc index a32390742..416fc58ec 100644 --- a/gr-trellis/src/lib/trellis_permutation.cc +++ b/gr-trellis/src/lib/trellis_permutation.cc @@ -30,19 +30,19 @@ #include <string.h> trellis_permutation_sptr -trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT) +trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL) { - return gnuradio::get_initial_sptr(new trellis_permutation (K,TABLE,SYMS_PER_BLOCK,NBYTES_INOUT)); + return gnuradio::get_initial_sptr(new trellis_permutation (K,TABLE,SYMS_PER_BLOCK,BYTES_PER_SYMBOL)); } -trellis_permutation::trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT) +trellis_permutation::trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL) : gr_sync_block ("permutation", - gr_make_io_signature (1, -1, NBYTES_INOUT), - gr_make_io_signature (1, -1, NBYTES_INOUT)), + gr_make_io_signature (1, -1, BYTES_PER_SYMBOL), + gr_make_io_signature (1, -1, BYTES_PER_SYMBOL)), d_K (K), d_TABLE (TABLE), d_SYMS_PER_BLOCK (SYMS_PER_BLOCK), - d_NBYTES_INOUT (NBYTES_INOUT) + d_BYTES_PER_SYMBOL (BYTES_PER_SYMBOL) { set_output_multiple (d_K*SYMS_PER_BLOCK); //std::cout << d_K << "\n"; @@ -72,9 +72,9 @@ trellis_permutation::work (int noutput_items, int j0 = i%d_K; // new position of block within packet (in blocks) int k0 = d_TABLE[j0]; - memcpy(&(out[i*d_SYMS_PER_BLOCK*d_NBYTES_INOUT]), - &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_NBYTES_INOUT]), - d_NBYTES_INOUT*d_SYMS_PER_BLOCK); + memcpy(&(out[i*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), + &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]), + d_BYTES_PER_SYMBOL*d_SYMS_PER_BLOCK); } // end per stream processing } diff --git a/gr-trellis/src/lib/trellis_permutation.h b/gr-trellis/src/lib/trellis_permutation.h index 5505caf89..a5c858a8b 100644 --- a/gr-trellis/src/lib/trellis_permutation.h +++ b/gr-trellis/src/lib/trellis_permutation.h @@ -30,7 +30,7 @@ class trellis_permutation; typedef boost::shared_ptr<trellis_permutation> trellis_permutation_sptr; -trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT); +trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); /*! * \brief Permutation. @@ -39,18 +39,18 @@ trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> class trellis_permutation : public gr_sync_block { private: - friend trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT); + friend trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); int d_K; std::vector<int> d_TABLE; int d_SYMS_PER_BLOCK; - size_t d_NBYTES_INOUT; + size_t d_BYTES_PER_SYMBOL; trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES); public: int K () const { return d_K; } const std::vector<int> & TABLE () const { return d_TABLE; } int SYMS_PER_BLOCK () const { return d_SYMS_PER_BLOCK; } - size_t NBYTES_INOUT () const { return d_NBYTES_INOUT; } + size_t BYTES_PER_SYMBOL () const { return d_BYTES_PER_SYMBOL; } int work (int noutput_items, gr_vector_const_void_star &input_items, diff --git a/gr-trellis/src/lib/trellis_permutation.i b/gr-trellis/src/lib/trellis_permutation.i index 834a36986..1433a6584 100644 --- a/gr-trellis/src/lib/trellis_permutation.i +++ b/gr-trellis/src/lib/trellis_permutation.i @@ -22,7 +22,7 @@ GR_SWIG_BLOCK_MAGIC(trellis,permutation); -trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT); +trellis_permutation_sptr trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); class trellis_permutation : public gr_sync_block { @@ -30,12 +30,12 @@ private: int d_K; std::vector<int> d_TABLE; int d_SYMS_PER_BLOCK; - size_t d_NBYTES_INOUT; - trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES_INOUT); + size_t d_BYTES_PER_SYMBOL; + trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL); public: int K () const { return d_K; } const std::vector<int> & TABLE () const { return d_TABLE; } int SYMS_PER_BLOCK () const { return d_SYMS_PER_BLOCK; } - size_t NBYTES_INOUT () const { return d_NBYTES_INOUT; } + size_t BYTES_PER_SYMBOL () const { return d_BYTES_PER_SYMBOL; } }; diff --git a/grc/blocks/Makefile.am b/grc/blocks/Makefile.am index 763faf584..a9f9427e9 100644 --- a/grc/blocks/Makefile.am +++ b/grc/blocks/Makefile.am @@ -206,13 +206,6 @@ dist_ourdata_DATA = \ parameter.xml \ random_source_x.xml \ root_raised_cosine_filter.xml \ - trellis_encoder_xx.xml \ - trellis_metrics_x.xml \ - trellis_permutation.xml \ - trellis_siso_combined_f.xml \ - trellis_siso_f.xml \ - trellis_viterbi_combined_xx.xml \ - trellis_viterbi_x.xml \ variable.xml \ variable_config.xml \ variable_function_probe.xml \ diff --git a/grc/blocks/block_tree.xml b/grc/blocks/block_tree.xml index e9382d158..f82d40f85 100644 --- a/grc/blocks/block_tree.xml +++ b/grc/blocks/block_tree.xml @@ -236,13 +236,6 @@ <name>Error Correction</name> <cat> <name>Trellis</name> - <block>trellis_encoder_xx</block> - <block>trellis_metrics_x</block> - <block>trellis_permutation</block> - <block>trellis_siso_combined_f</block> - <block>trellis_siso_f</block> - <block>trellis_viterbi_combined_xx</block> - <block>trellis_viterbi_x</block> </cat> <block>gr_encode_ccsds_27_bb</block> |