diff options
Diffstat (limited to 'gr-trellis/src')
24 files changed, 1307 insertions, 1136 deletions
diff --git a/gr-trellis/src/examples/grc/interference_cancellation.grc b/gr-trellis/src/examples/grc/interference_cancellation.grc index 7674b4bf16..129ee87905 100644 --- a/gr-trellis/src/examples/grc/interference_cancellation.grc +++ b/gr-trellis/src/examples/grc/interference_cancellation.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Wed Aug 31 17:40:25 2011</timestamp> + <timestamp>Sat Nov 10 15:39:57 2012</timestamp> <block> <key>options</key> <param> @@ -44,6 +44,10 @@ <value>True</value> </param> <param> + <key>max_nouts</key> + <value>0</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -229,37 +233,6 @@ </param> </block> <block> - <key>gr_multiply_const_vxx</key> - <param> - <key>id</key> - <value>gr_multiply_const_vxx_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>const</key> - <value>alpha**0.5</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(988, 196)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>random_source_x</key> <param> <key>id</key> @@ -299,142 +272,6 @@ </param> </block> <block> - <key>gr_chunks_to_symbols_xx</key> - <param> - <key>id</key> - <value>gr_chunks_to_symbols_xx_1</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>num_ports</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(660, 311)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_multiply_const_vxx</key> - <param> - <key>id</key> - <value>gr_multiply_const_vxx_1</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>const</key> - <value>(1-alpha)**0.5</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(994, 319)</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_0</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>(1224, 244)</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>(1146, 369)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>gr_sub_xx</key> <param> <key>id</key> @@ -507,6 +344,14 @@ <value>True</value> </param> <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>scale</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(994, 545)</value> </param> @@ -588,78 +433,16 @@ <value>True</value> </param> <param> - <key>_coordinate</key> - <value>(1005, 798)</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_2</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>num_ports</key> + <key>vlen</key> <value>1</value> </param> <param> - <key>_coordinate</key> - <value>(405, 998)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_multiply_const_vxx</key> - <param> - <key>id</key> - <value>gr_multiply_const_vxx_2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>const</key> - <value>alpha**0.5</value> - </param> - <param> - <key>vlen</key> + <key>scale</key> <value>1</value> </param> <param> <key>_coordinate</key> - <value>(710, 1008)</value> + <value>(1005, 798)</value> </param> <param> <key>_rotation</key> @@ -770,78 +553,16 @@ <value>True</value> </param> <param> - <key>_coordinate</key> - <value>(1009, 1156)</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_2_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> + <key>vlen</key> <value>1</value> </param> <param> - <key>num_ports</key> + <key>scale</key> <value>1</value> </param> <param> <key>_coordinate</key> - <value>(420, 1368)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>gr_multiply_const_vxx</key> - <param> - <key>id</key> - <value>gr_multiply_const_vxx_2_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>complex</value> - </param> - <param> - <key>const</key> - <value>(1-alpha)**0.5</value> - </param> - <param> - <key>vlen</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(733, 1374)</value> + <value>(1009, 1156)</value> </param> <param> <key>_rotation</key> @@ -952,39 +673,16 @@ <value>True</value> </param> <param> - <key>_coordinate</key> - <value>(1010, 1551)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> - <key>trellis_encoder_xx</key> - <param> - <key>id</key> - <value>trellis_encoder_xx_1</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>ss</value> - </param> - <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>init_state</key> - <value>0</value> + <key>scale</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(336, 311)</value> + <value>(1010, 1551)</value> </param> <param> <key>_rotation</key> @@ -1035,7 +733,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> @@ -1090,7 +788,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> @@ -1102,37 +800,6 @@ </param> </block> <block> - <key>trellis_encoder_xx</key> - <param> - <key>id</key> - <value>trellis_encoder_xx_2</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>ss</value> - </param> - <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> - </param> - <param> - <key>init_state</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(89, 998)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>trellis_viterbi_combined_xx</key> <param> <key>id</key> @@ -1176,7 +843,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> @@ -1188,37 +855,6 @@ </param> </block> <block> - <key>trellis_encoder_xx</key> - <param> - <key>id</key> - <value>trellis_encoder_xx_2_0</value> - </param> - <param> - <key>_enabled</key> - <value>True</value> - </param> - <param> - <key>type</key> - <value>ss</value> - </param> - <param> - <key>fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> - </param> - <param> - <key>init_state</key> - <value>0</value> - </param> - <param> - <key>_coordinate</key> - <value>(105, 1367)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>trellis_viterbi_combined_xx</key> <param> <key>id</key> @@ -1262,7 +898,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> @@ -1274,37 +910,6 @@ </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>(1400, 262)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>wxgui_scopesink2</key> <param> <key>id</key> @@ -1434,76 +1039,6 @@ </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>(534, 149)</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,1j,-1j,-1</value> - </param> - <param> - <key>dimension</key> - <value>1</value> - </param> - <param> - <key>num_ports</key> - <value>1</value> - </param> - <param> - <key>_coordinate</key> - <value>(682, 186)</value> - </param> - <param> - <key>_rotation</key> - <value>0</value> - </param> - </block> - <block> <key>variable</key> <param> <key>id</key> @@ -1874,6 +1409,507 @@ <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>(1400, 262)</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_0</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>(1224, 245)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>analog_noise_source_x</key> + <param> + <key>id</key> + <value>analog_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>analog.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>(1178, 321)</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>(579, 143)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>alpha**0.5</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(988, 196)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_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>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(703, 211)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>(1-alpha)**0.5</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(994, 319)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_encoder_xx_1</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + </param> + <param> + <key>init_state</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(336, 311)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_chunks_to_symbols_xx_0_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>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(703, 311)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_chunks_to_symbols_xx_0_0_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>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(418, 1000)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>alpha**0.5</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(710, 1008)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_encoder_xx_2</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + </param> + <param> + <key>init_state</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(89, 1000)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>gr_multiply_const_vxx</key> + <param> + <key>id</key> + <value>gr_multiply_const_vxx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>complex</value> + </param> + <param> + <key>const</key> + <value>(1-alpha)**0.5</value> + </param> + <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(733, 1374)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>trellis_encoder_xx</key> + <param> + <key>id</key> + <value>trellis_encoder_xx_2_0</value> + </param> + <param> + <key>_enabled</key> + <value>True</value> + </param> + <param> + <key>type</key> + <value>ss</value> + </param> + <param> + <key>fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_16.fsm"</value> + </param> + <param> + <key>init_state</key> + <value>0</value> + </param> + <param> + <key>_coordinate</key> + <value>(103, 1366)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_chunks_to_symbols_xx_0_0_1</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>num_ports</key> + <value>1</value> + </param> + <param> + <key>_coordinate</key> + <value>(420, 1366)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> <connection> <source_block_id>random_source_x_1</source_block_id> <sink_block_id>trellis_encoder_xx_1</sink_block_id> @@ -1881,18 +1917,6 @@ <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> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gr_chunks_to_symbols_xx_0</source_block_id> - <sink_block_id>gr_multiply_const_vxx_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>gr_multiply_const_vxx_0</source_block_id> <sink_block_id>gr_add_xx_0</sink_block_id> <source_key>0</source_key> @@ -1905,18 +1929,6 @@ <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_1</source_block_id> - <sink_block_id>gr_multiply_const_vxx_1</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>gr_multiply_const_vxx_1</source_block_id> <sink_block_id>gr_add_xx_0</sink_block_id> <source_key>0</source_key> @@ -2013,18 +2025,6 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>trellis_encoder_xx_2</source_block_id> - <sink_block_id>gr_chunks_to_symbols_xx_2</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gr_chunks_to_symbols_xx_2</source_block_id> - <sink_block_id>gr_multiply_const_vxx_2</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>gr_multiply_const_vxx_2</source_block_id> <sink_block_id>gr_sub_xx_2</sink_block_id> <source_key>0</source_key> @@ -2085,18 +2085,6 @@ <sink_key>0</sink_key> </connection> <connection> - <source_block_id>trellis_encoder_xx_2_0</source_block_id> - <sink_block_id>gr_chunks_to_symbols_xx_2_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> - <source_block_id>gr_chunks_to_symbols_xx_2_0</source_block_id> - <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id> - <source_key>0</source_key> - <sink_key>0</sink_key> - </connection> - <connection> <source_block_id>trellis_viterbi_combined_xx_2</source_block_id> <sink_block_id>trellis_encoder_xx_2_0</sink_block_id> <source_key>0</source_key> @@ -2169,8 +2157,56 @@ <sink_key>0</sink_key> </connection> <connection> + <source_block_id>analog_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_throttle_0</source_block_id> - <sink_block_id>gr_chunks_to_symbols_xx_0</sink_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_chunks_to_symbols_xx_0</source_block_id> + <sink_block_id>gr_multiply_const_vxx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_chunks_to_symbols_xx_0_0</source_block_id> + <sink_block_id>gr_multiply_const_vxx_1</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>digital_chunks_to_symbols_xx_0_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_encoder_xx_2</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0_0_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_chunks_to_symbols_xx_0_0_0</source_block_id> + <sink_block_id>gr_multiply_const_vxx_2</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>trellis_encoder_xx_2_0</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0_0_1</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_chunks_to_symbols_xx_0_0_1</source_block_id> + <sink_block_id>gr_multiply_const_vxx_2_0</sink_block_id> <source_key>0</source_key> <sink_key>0</sink_key> </connection> diff --git a/gr-trellis/src/examples/grc/pccc.grc b/gr-trellis/src/examples/grc/pccc.grc index c3111c3211..06fa9cd69f 100644 --- a/gr-trellis/src/examples/grc/pccc.grc +++ b/gr-trellis/src/examples/grc/pccc.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Thu Sep 1 12:53:13 2011</timestamp> + <timestamp>Sat Nov 10 15:37:00 2012</timestamp> <block> <key>options</key> <param> @@ -44,6 +44,10 @@ <value>True</value> </param> <param> + <key>max_nouts</key> + <value>0</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -222,6 +226,14 @@ <value>True</value> </param> <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>scale</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(535, 609)</value> </param> @@ -318,41 +330,6 @@ </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> @@ -467,10 +444,10 @@ </param> </block> <block> - <key>gr_throttle</key> + <key>trellis_pccc_encoder_xx</key> <param> <key>id</key> - <value>gr_throttle_0</value> + <value>trellis_pccc_encoder_xx_0</value> </param> <param> <key>_enabled</key> @@ -478,58 +455,58 @@ </param> <param> <key>type</key> - <value>short</value> + <value>ss</value> </param> <param> - <key>samples_per_second</key> - <value>R</value> + <key>o_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>o_init_state</key> + <value>0</value> </param> <param> - <key>_coordinate</key> - <value>(517, 103)</value> + <key>i_fsm_args</key> + <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> </param> <param> - <key>_rotation</key> + <key>i_init_state</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> + <key>interleaver_args</key> + <value>trellis.interleaver(block,666)</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>bl</key> + <value>block</value> </param> <param> - <key>in_type</key> - <value>short</value> + <key>_coordinate</key> + <value>(236, 147)</value> </param> <param> - <key>out_type</key> - <value>float</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>variable</key> <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> + <key>id</key> + <value>R</value> </param> <param> - <key>dimension</key> - <value>2</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>num_ports</key> - <value>1</value> + <key>value</key> + <value>100e3</value> </param> <param> <key>_coordinate</key> - <value>(551, 184)</value> + <value>(482, 17)</value> </param> <param> <key>_rotation</key> @@ -537,10 +514,10 @@ </param> </block> <block> - <key>trellis_pccc_encoder_xx</key> + <key>trellis_pccc_decoder_combined_xx</key> <param> <key>id</key> - <value>trellis_pccc_encoder_xx_0</value> + <value>trellis_pccc_decoder_combined_xx_0</value> </param> <param> <key>_enabled</key> @@ -548,7 +525,11 @@ </param> <param> <key>type</key> - <value>ss</value> + <value>f</value> + </param> + <param> + <key>out_type</key> + <value>s</value> </param> <param> <key>o_fsm_args</key> @@ -559,6 +540,10 @@ <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> @@ -567,16 +552,44 @@ <value>0</value> </param> <param> - <key>interleaver_args</key> + <key>i_final_state</key> + <value>-1</value> + </param> + <param> + <key>interleaver</key> <value>trellis.interleaver(block,666)</value> </param> <param> - <key>bl</key> + <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>digital.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>(236, 147)</value> + <value>(196, 274)</value> </param> <param> <key>_rotation</key> @@ -584,22 +597,30 @@ </param> </block> <block> - <key>variable</key> + <key>gr_sub_xx</key> <param> <key>id</key> - <value>R</value> + <value>gr_sub_xx_0</value> </param> <param> <key>_enabled</key> <value>True</value> </param> <param> - <key>value</key> - <value>100e3</value> + <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>(482, 17)</value> + <value>(217, 597)</value> </param> <param> <key>_rotation</key> @@ -607,10 +628,10 @@ </param> </block> <block> - <key>gr_add_xx</key> + <key>analog_noise_source_x</key> <param> <key>id</key> - <value>gr_add_xx_1</value> + <value>analog_noise_source_x_0</value> </param> <param> <key>_enabled</key> @@ -621,16 +642,20 @@ <value>float</value> </param> <param> - <key>num_inputs</key> - <value>2</value> + <key>noise_type</key> + <value>analog.GR_GAUSSIAN</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>amp</key> + <value>noisevar</value> + </param> + <param> + <key>seed</key> + <value>-42</value> </param> <param> <key>_coordinate</key> - <value>(951, 256)</value> + <value>(584, 259)</value> </param> <param> <key>_rotation</key> @@ -638,10 +663,10 @@ </param> </block> <block> - <key>trellis_pccc_decoder_combined_xx</key> + <key>gr_throttle</key> <param> <key>id</key> - <value>trellis_pccc_decoder_combined_xx_0</value> + <value>gr_throttle_0</value> </param> <param> <key>_enabled</key> @@ -649,71 +674,58 @@ </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> + <value>short</value> </param> <param> - <key>o_init_state</key> - <value>0</value> + <key>samples_per_second</key> + <value>R</value> </param> <param> - <key>o_final_state</key> - <value>-1</value> + <key>vlen</key> + <value>1</value> </param> <param> - <key>i_fsm_args</key> - <value>prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"</value> + <key>_coordinate</key> + <value>(517, 103)</value> </param> <param> - <key>i_init_state</key> + <key>_rotation</key> <value>0</value> </param> + </block> + <block> + <key>digital_chunks_to_symbols_xx</key> <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> + <key>id</key> + <value>digital_chunks_to_symbols_xx_0</value> </param> <param> - <key>iterations</key> - <value>10</value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>dim</key> - <value>2</value> + <key>in_type</key> + <value>short</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> + <key>out_type</key> + <value>float</value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <key>symbol_table</key> + <value>-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7,0,-7,0,-5,0,-3,0,-1,0,1,0,3,0,5,0,7</value> </param> <param> - <key>siso_type</key> - <value>trellis.TRELLIS_MIN_SUM</value> + <key>dimension</key> + <value>2</value> </param> <param> - <key>scaling</key> - <value>1.0</value> + <key>num_ports</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(196, 274)</value> + <value>(559, 180)</value> </param> <param> <key>_rotation</key> @@ -721,10 +733,10 @@ </param> </block> <block> - <key>gr_sub_xx</key> + <key>gr_add_xx</key> <param> <key>id</key> - <value>gr_sub_xx_0</value> + <value>gr_add_xx_1</value> </param> <param> <key>_enabled</key> @@ -732,19 +744,19 @@ </param> <param> <key>type</key> - <value>short</value> - </param> - <param> - <key>vlen</key> - <value>1</value> + <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>(217, 597)</value> + <value>(951, 256)</value> </param> <param> <key>_rotation</key> @@ -758,30 +770,12 @@ <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> @@ -829,4 +823,22 @@ <source_key>0</source_key> <sink_key>1</sink_key> </connection> + <connection> + <source_block_id>analog_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_throttle_0</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_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> </flow_graph> diff --git a/gr-trellis/src/examples/grc/pccc1.grc b/gr-trellis/src/examples/grc/pccc1.grc index 15a63707ee..c111ebd3ec 100644 --- a/gr-trellis/src/examples/grc/pccc1.grc +++ b/gr-trellis/src/examples/grc/pccc1.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Wed Aug 31 20:34:39 2011</timestamp> + <timestamp>Sat Nov 10 15:36:08 2012</timestamp> <block> <key>options</key> <param> @@ -44,6 +44,10 @@ <value>True</value> </param> <param> + <key>max_nouts</key> + <value>0</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -222,6 +226,14 @@ <value>True</value> </param> <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>scale</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(535, 609)</value> </param> @@ -318,72 +330,6 @@ </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> @@ -498,37 +444,6 @@ </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> @@ -560,45 +475,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>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> @@ -736,7 +612,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> @@ -770,6 +646,142 @@ <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_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>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_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,-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>(552, 178)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>analog_noise_source_x</key> + <param> + <key>id</key> + <value>analog_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>analog.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>(622, 257)</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> @@ -777,30 +789,12 @@ <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> @@ -854,4 +848,22 @@ <source_key>0</source_key> <sink_key>1</sink_key> </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_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>analog_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> </flow_graph> diff --git a/gr-trellis/src/examples/grc/sccc.grc b/gr-trellis/src/examples/grc/sccc.grc index e8f656f637..36657f5441 100644 --- a/gr-trellis/src/examples/grc/sccc.grc +++ b/gr-trellis/src/examples/grc/sccc.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Wed Aug 31 19:57:09 2011</timestamp> + <timestamp>Sat Nov 10 15:34:26 2012</timestamp> <block> <key>options</key> <param> @@ -44,6 +44,10 @@ <value>True</value> </param> <param> + <key>max_nouts</key> + <value>0</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -165,37 +169,6 @@ </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> @@ -268,6 +241,14 @@ <value>True</value> </param> <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>scale</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(416, 815)</value> </param> @@ -430,111 +411,6 @@ </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> @@ -732,7 +608,7 @@ </param> <param> <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>siso_type</key> @@ -751,6 +627,142 @@ <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_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>digital_chunks_to_symbols_xx</key> + <param> + <key>id</key> + <value>digital_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,01</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, 181)</value> + </param> + <param> + <key>_rotation</key> + <value>0</value> + </param> + </block> + <block> + <key>analog_noise_source_x</key> + <param> + <key>id</key> + <value>analog_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>analog.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>(651, 270)</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> @@ -758,30 +770,12 @@ <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> @@ -829,4 +823,22 @@ <source_key>0</source_key> <sink_key>1</sink_key> </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>analog_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>digital_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> </flow_graph> diff --git a/gr-trellis/src/examples/grc/sccc1.grc b/gr-trellis/src/examples/grc/sccc1.grc index 0be59d0c47..17626e3dce 100644 --- a/gr-trellis/src/examples/grc/sccc1.grc +++ b/gr-trellis/src/examples/grc/sccc1.grc @@ -1,6 +1,6 @@ <?xml version='1.0' encoding='ASCII'?> <flow_graph> - <timestamp>Wed Aug 31 20:09:23 2011</timestamp> + <timestamp>Sat Nov 10 15:41:10 2012</timestamp> <block> <key>options</key> <param> @@ -44,6 +44,10 @@ <value>True</value> </param> <param> + <key>max_nouts</key> + <value>0</value> + </param> + <param> <key>realtime_scheduling</key> <value></value> </param> @@ -425,6 +429,14 @@ <value>True</value> </param> <param> + <key>vlen</key> + <value>1</value> + </param> + <param> + <key>scale</key> + <value>1</value> + </param> + <param> <key>_coordinate</key> <value>(535, 609)</value> </param> @@ -521,10 +533,10 @@ </param> </block> <block> - <key>gr_noise_source_x</key> + <key>trellis_metrics_x</key> <param> <key>id</key> - <value>gr_noise_source_x_0</value> + <value>trellis_metrics_x_0</value> </param> <param> <key>_enabled</key> @@ -532,23 +544,27 @@ </param> <param> <key>type</key> - <value>float</value> + <value>f</value> </param> <param> - <key>noise_type</key> - <value>gr.GR_GAUSSIAN</value> + <key>card</key> + <value>8</value> </param> <param> - <key>amp</key> - <value>noisevar</value> + <key>dim</key> + <value>1</value> </param> <param> - <key>seed</key> - <value>42</value> + <key>table</key> + <value>-7, -5, -3, -1, 1, 3, 5, 7</value> + </param> + <param> + <key>metric_type</key> + <value>digital.TRELLIS_EUCLIDEAN</value> </param> <param> <key>_coordinate</key> - <value>(672, 290)</value> + <value>(58, 354)</value> </param> <param> <key>_rotation</key> @@ -556,69 +572,74 @@ </param> </block> <block> - <key>gr_add_xx</key> + <key>wxgui_scopesink2</key> <param> <key>id</key> - <value>gr_add_xx_1</value> + <value>wxgui_scopesink2_0</value> </param> <param> <key>_enabled</key> - <value>True</value> + <value>False</value> </param> <param> <key>type</key> <value>float</value> </param> <param> - <key>num_inputs</key> - <value>2</value> + <key>title</key> + <value>Scope Plot</value> </param> <param> - <key>vlen</key> - <value>1</value> + <key>samp_rate</key> + <value>R</value> </param> <param> - <key>_coordinate</key> - <value>(951, 256)</value> + <key>v_scale</key> + <value>0</value> </param> <param> - <key>_rotation</key> + <key>v_offset</key> <value>0</value> </param> - </block> - <block> - <key>trellis_metrics_x</key> <param> - <key>id</key> - <value>trellis_metrics_x_0</value> + <key>t_scale</key> + <value>0</value> </param> <param> - <key>_enabled</key> - <value>True</value> + <key>ac_couple</key> + <value>False</value> </param> <param> - <key>type</key> - <value>f</value> + <key>xy_mode</key> + <value>False</value> </param> <param> - <key>card</key> - <value>8</value> + <key>num_inputs</key> + <value>1</value> </param> <param> - <key>dim</key> - <value>1</value> + <key>win_size</key> + <value></value> </param> <param> - <key>table</key> - <value>-7, -5, -3, -1, 1, 3, 5, 7</value> + <key>grid_pos</key> + <value></value> </param> <param> - <key>metric_type</key> - <value>trellis.TRELLIS_EUCLIDEAN</value> + <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>(58, 354)</value> + <value>(952, 73)</value> </param> <param> <key>_rotation</key> @@ -657,74 +678,69 @@ </param> </block> <block> - <key>wxgui_scopesink2</key> + <key>digital_chunks_to_symbols_xx</key> <param> <key>id</key> - <value>wxgui_scopesink2_0</value> + <value>digital_chunks_to_symbols_xx_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> + <value>True</value> </param> <param> - <key>samp_rate</key> - <value>R</value> + <key>in_type</key> + <value>short</value> </param> <param> - <key>v_scale</key> - <value>0</value> + <key>out_type</key> + <value>float</value> </param> <param> - <key>v_offset</key> - <value>0</value> + <key>symbol_table</key> + <value>-7,-5,-3,-1,1,3,5,7</value> </param> <param> - <key>t_scale</key> - <value>0</value> + <key>dimension</key> + <value>1</value> </param> <param> - <key>ac_couple</key> - <value>False</value> + <key>num_ports</key> + <value>1</value> </param> <param> - <key>xy_mode</key> - <value>False</value> + <key>_coordinate</key> + <value>(607, 175)</value> </param> <param> - <key>num_inputs</key> - <value>1</value> + <key>_rotation</key> + <value>0</value> </param> + </block> + <block> + <key>gr_add_xx</key> <param> - <key>win_size</key> - <value></value> + <key>id</key> + <value>gr_add_xx_1</value> </param> <param> - <key>grid_pos</key> - <value></value> + <key>_enabled</key> + <value>True</value> </param> <param> - <key>notebook</key> - <value></value> + <key>type</key> + <value>float</value> </param> <param> - <key>trig_mode</key> - <value>gr.gr_TRIG_MODE_AUTO</value> + <key>num_inputs</key> + <value>2</value> </param> <param> - <key>y_axis_label</key> - <value>Counts</value> + <key>vlen</key> + <value>1</value> </param> <param> <key>_coordinate</key> - <value>(952, 73)</value> + <value>(951, 256)</value> </param> <param> <key>_rotation</key> @@ -732,38 +748,34 @@ </param> </block> <block> - <key>gr_chunks_to_symbols_xx</key> + <key>analog_noise_source_x</key> <param> <key>id</key> - <value>gr_chunks_to_symbols_xx_0</value> + <value>analog_noise_source_x_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> + <key>type</key> <value>float</value> </param> <param> - <key>symbol_table</key> - <value>-7, -5, -3, -1, 1, 3, 5, 7</value> + <key>noise_type</key> + <value>analog.GR_GAUSSIAN</value> </param> <param> - <key>dimension</key> - <value>1</value> + <key>amp</key> + <value>noisevar</value> </param> <param> - <key>num_ports</key> - <value>1</value> + <key>seed</key> + <value>-42</value> </param> <param> <key>_coordinate</key> - <value>(551, 184)</value> + <value>(632, 254)</value> </param> <param> <key>_rotation</key> @@ -777,30 +789,12 @@ <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> @@ -854,4 +848,22 @@ <source_key>0</source_key> <sink_key>1</sink_key> </connection> + <connection> + <source_block_id>gr_throttle_0</source_block_id> + <sink_block_id>digital_chunks_to_symbols_xx_0</sink_block_id> + <source_key>0</source_key> + <sink_key>0</sink_key> + </connection> + <connection> + <source_block_id>digital_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>analog_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> </flow_graph> diff --git a/gr-trellis/src/examples/python/test_cpm.py b/gr-trellis/src/examples/python/test_cpm.py index 7e80d400be..6b9b9a4f52 100755 --- a/gr-trellis/src/examples/python/test_cpm.py +++ b/gr-trellis/src/examples/python/test_cpm.py @@ -9,7 +9,6 @@ from gnuradio import gr from gnuradio import trellis, digital, filter -from gnuradio.gr import firdes from grc_gnuradio import blks2 as grc_blks2 import math import numpy @@ -17,6 +16,12 @@ import fsm_utils from gnuradio import trellis try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + +try: import scipy.stats except ImportError: print "Error: Program requires scipy (see: www.scipy.org)." @@ -91,13 +96,13 @@ def run_test(seed,blocksize): random_source_x_0 = gr.vector_source_b(data.tolist(), False) digital_chunks_to_symbols_xx_0 = digital.chunks_to_symbols_bf((-1, 1), 1) gr_interp_fir_filter_xxx_0 = filter.interp_fir_filter_fff(Q, p) - gr_frequency_modulator_fc_0 = gr.frequency_modulator_fc(2*math.pi*h*(1.0/Q)) + gr_frequency_modulator_fc_0 = analog.frequency_modulator_fc(2*math.pi*h*(1.0/Q)) gr_add_vxx_0 = gr.add_vcc(1) - gr_noise_source_x_0 = gr.noise_source_c(gr.GR_GAUSSIAN, (N0/2.0)**0.5, -long(seed)) + gr_noise_source_x_0 = analog.noise_source_c(analog.GR_GAUSSIAN, (N0/2.0)**0.5, -long(seed)) gr_multiply_vxx_0 = gr.multiply_vcc(1) - gr_sig_source_x_0 = gr.sig_source_c(Q, gr.GR_COS_WAVE, -f0T, 1, 0) + gr_sig_source_x_0 = analog.sig_source_c(Q, analog.GR_COS_WAVE, -f0T, 1, 0) # only works for N=2, do it manually for N>2... gr_fir_filter_xxx_0_0 = filter.fir_filter_ccc(Q, MF[0].conjugate()) gr_fir_filter_xxx_0_0_0 = filter.fir_filter_ccc(Q, MF[1].conjugate()) diff --git a/gr-trellis/src/examples/python/test_pccc_turbo1.py b/gr-trellis/src/examples/python/test_pccc_turbo1.py index abc0e1d01f..bbcce106fb 100755 --- a/gr-trellis/src/examples/python/test_pccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_pccc_turbo1.py @@ -8,6 +8,11 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () @@ -24,7 +29,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics_in = trellis.metrics_f(fi.O()*fo.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO diff --git a/gr-trellis/src/examples/python/test_sccc_hard.py b/gr-trellis/src/examples/python/test_sccc_hard.py index 397ebf0871..b75a07b8b0 100755 --- a/gr-trellis/src/examples/python/test_sccc_hard.py +++ b/gr-trellis/src/examples/python/test_sccc_hard.py @@ -8,6 +8,12 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -23,7 +29,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi diff --git a/gr-trellis/src/examples/python/test_sccc_soft.py b/gr-trellis/src/examples/python/test_sccc_soft.py index b1ffaae748..0b10c07bbc 100755 --- a/gr-trellis/src/examples/python/test_sccc_soft.py +++ b/gr-trellis/src/examples/python/test_sccc_soft.py @@ -8,8 +8,11 @@ import sys import random import fsm_utils - - +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -26,7 +29,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi diff --git a/gr-trellis/src/examples/python/test_sccc_turbo.py b/gr-trellis/src/examples/python/test_sccc_turbo.py index e8054a08b2..979dfeca59 100755 --- a/gr-trellis/src/examples/python/test_sccc_turbo.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo.py @@ -8,7 +8,11 @@ import sys import random import fsm_utils - +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,type): metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner Viterbi @@ -65,7 +69,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) diff --git a/gr-trellis/src/examples/python/test_sccc_turbo1.py b/gr-trellis/src/examples/python/test_sccc_turbo1.py index ef5d32f588..60188e4d3b 100755 --- a/gr-trellis/src/examples/python/test_sccc_turbo1.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo1.py @@ -8,6 +8,11 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () @@ -21,7 +26,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX dec = trellis.sccc_decoder_combined_fs(fo,0,-1,fi,0,-1,interleaver,K,IT,trellis.TRELLIS_MIN_SUM,dimensionality,constellation,digital.TRELLIS_EUCLIDEAN,1.0) diff --git a/gr-trellis/src/examples/python/test_sccc_turbo2.py b/gr-trellis/src/examples/python/test_sccc_turbo2.py index 942572676d..e9f4841e3e 100755 --- a/gr-trellis/src/examples/python/test_sccc_turbo2.py +++ b/gr-trellis/src/examples/python/test_sccc_turbo2.py @@ -8,6 +8,11 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation,Es,N0,IT,seed): tb = gr.top_block () @@ -21,7 +26,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,constellation, # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics_in = trellis.metrics_f(fi.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO diff --git a/gr-trellis/src/examples/python/test_tcm.py b/gr-trellis/src/examples/python/test_tcm.py index eff93f5b4e..fced315260 100755 --- a/gr-trellis/src/examples/python/test_tcm.py +++ b/gr-trellis/src/examples/python/test_tcm.py @@ -10,6 +10,12 @@ import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -28,7 +34,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi diff --git a/gr-trellis/src/examples/python/test_tcm_bit.py b/gr-trellis/src/examples/python/test_tcm_bit.py index 1a89d06a89..873d58684b 100755 --- a/gr-trellis/src/examples/python/test_tcm_bit.py +++ b/gr-trellis/src/examples/python/test_tcm_bit.py @@ -10,6 +10,11 @@ import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -30,7 +35,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX diff --git a/gr-trellis/src/examples/python/test_tcm_combined.py b/gr-trellis/src/examples/python/test_tcm_combined.py index a46444e32b..8bea1ac86a 100755 --- a/gr-trellis/src/examples/python/test_tcm_combined.py +++ b/gr-trellis/src/examples/python/test_tcm_combined.py @@ -9,6 +9,11 @@ import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): tb = gr.top_block () @@ -23,7 +28,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed): # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX diff --git a/gr-trellis/src/examples/python/test_tcm_parallel.py b/gr-trellis/src/examples/python/test_tcm_parallel.py index 72fb8cf3bf..1767cc730f 100755 --- a/gr-trellis/src/examples/python/test_tcm_parallel.py +++ b/gr-trellis/src/examples/python/test_tcm_parallel.py @@ -9,6 +9,11 @@ import fsm_utils from gnuradio.eng_option import eng_option from optparse import OptionParser +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): tb = gr.top_block () @@ -26,7 +31,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,constellation,N0,seed,P): noise=[] for i in range(P): add.append(gr.add_ff()) - noise.append(gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed)) + noise.append(analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed)) # RX metrics = trellis.metrics_f(f.O(),dimensionality,constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi diff --git a/gr-trellis/src/examples/python/test_turbo_equalization.py b/gr-trellis/src/examples/python/test_turbo_equalization.py index d97f3f2c29..baddd7cb50 100755 --- a/gr-trellis/src/examples/python/test_turbo_equalization.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization.py @@ -7,6 +7,11 @@ import math import sys import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type): metrics_in = trellis.metrics_f(fi.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO @@ -63,7 +68,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,dimensionality,tot_constellat # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) diff --git a/gr-trellis/src/examples/python/test_turbo_equalization1.py b/gr-trellis/src/examples/python/test_turbo_equalization1.py index e8b946458c..dfe1a2d82e 100755 --- a/gr-trellis/src/examples/python/test_turbo_equalization1.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization1.py @@ -8,6 +8,12 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type): metrics_in = trellis.metrics_f(fi.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for innner SISO scale = gr.multiply_const_ff(1.0/N0) @@ -66,7 +72,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona # CHANNEL isi = filter.fir_filter_fff(1,channel) add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) diff --git a/gr-trellis/src/examples/python/test_turbo_equalization2.py b/gr-trellis/src/examples/python/test_turbo_equalization2.py index 6b37ee9b59..fb0a899eba 100755 --- a/gr-trellis/src/examples/python/test_turbo_equalization2.py +++ b/gr-trellis/src/examples/python/test_turbo_equalization2.py @@ -8,6 +8,12 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,type): scale = gr.multiply_const_ff(math.sqrt(1.0/N0)) gnd = gr.vector_source_f([0],True); @@ -64,7 +70,7 @@ def run_test (fo,fi,interleaver,Kb,bitspersymbol,K,channel,modulation,dimensiona # CHANNEL isi = filter.fir_filter_fff(1,channel) add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX (head,tail) = make_rx(tb,fo,fi,dimensionality,tot_constellation,K,interleaver,IT,Es,N0,trellis.TRELLIS_MIN_SUM) diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization.py b/gr-trellis/src/examples/python/test_viterbi_equalization.py index 00d54620b2..91dc7e36da 100755 --- a/gr-trellis/src/examples/python/test_viterbi_equalization.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization.py @@ -7,6 +7,12 @@ import math import sys import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed): tb = gr.top_block () @@ -20,7 +26,7 @@ def run_test (f,Kb,bitspersymbol,K,dimensionality,tot_constellation,N0,seed): # CHANNEL add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX metrics = trellis.metrics_f(f.O(),dimensionality,tot_constellation,digital.TRELLIS_EUCLIDEAN) # data preprocessing to generate metrics for Viterbi diff --git a/gr-trellis/src/examples/python/test_viterbi_equalization1.py b/gr-trellis/src/examples/python/test_viterbi_equalization1.py index cb000d6852..4421e370a4 100755 --- a/gr-trellis/src/examples/python/test_viterbi_equalization1.py +++ b/gr-trellis/src/examples/python/test_viterbi_equalization1.py @@ -8,6 +8,12 @@ import sys import random import fsm_utils +try: + from gnuradio import analog +except ImportError: + sys.stderr.write("Error: Program requires gr-analog.\n") + sys.exit(1) + def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constellation,N0,seed): tb = gr.top_block () L = len(channel) @@ -27,7 +33,7 @@ def run_test (f,Kb,bitspersymbol,K,channel,modulation,dimensionality,tot_constel # CHANNEL isi = filter.fir_filter_fff(1,channel) add = gr.add_ff() - noise = gr.noise_source_f(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_f(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX skip = gr.skiphead(gr.sizeof_float, L) # skip the first L samples since you know they are coming from the L zero symbols diff --git a/gr-trellis/src/lib/CMakeLists.txt b/gr-trellis/src/lib/CMakeLists.txt index 315ef3a93c..dfb5d8ef19 100644 --- a/gr-trellis/src/lib/CMakeLists.txt +++ b/gr-trellis/src/lib/CMakeLists.txt @@ -214,7 +214,7 @@ set(GR_SWIG_INCLUDE_DIRS set(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/trellis_swig_doc.i) set(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) -set(GR_SWIG_LIBRARIES gnuradio-trellis) +set(GR_SWIG_LIBRARIES gnuradio-trellis gnuradio-digital gnuradio-analog) GR_SWIG_MAKE(trellis trellis.i) GR_SWIG_INSTALL( diff --git a/gr-trellis/src/python/CMakeLists.txt b/gr-trellis/src/python/CMakeLists.txt index ae2ab9cb41..5b5a35bcfc 100644 --- a/gr-trellis/src/python/CMakeLists.txt +++ b/gr-trellis/src/python/CMakeLists.txt @@ -21,6 +21,7 @@ # Handle the unit tests ######################################################################## if(ENABLE_TESTING) +include(GrPython) include(GrTest) file(GLOB py_qa_test_files "qa_*.py") foreach(py_qa_test_file ${py_qa_test_files}) @@ -29,9 +30,11 @@ foreach(py_qa_test_file ${py_qa_test_files}) ${CMAKE_BINARY_DIR}/gnuradio-core/src/python ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ${CMAKE_BINARY_DIR}/gr-digital/swig + ${CMAKE_BINARY_DIR}/gr-analog/swig ${CMAKE_BINARY_DIR}/gr-trellis/src/lib ) - set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core gnuradio-digital gnuradio-trellis) - GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${py_qa_test_file}) + set(GR_TEST_TARGET_DEPS volk gruel gnuradio-core + gnuradio-digital gnuradio-analog gnuradio-trellis) + GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file}) endforeach(py_qa_test_file) endif(ENABLE_TESTING) diff --git a/gr-trellis/src/python/qa_trellis.py b/gr-trellis/src/python/qa_trellis.py index c6ba40d11f..53dcf0d8f6 100755 --- a/gr-trellis/src/python/qa_trellis.py +++ b/gr-trellis/src/python/qa_trellis.py @@ -30,6 +30,7 @@ import trellis import os import digital_swig as digital +import analog_swig as analog fsm_args = {"awgn1o2_4": (2, 4, 4, (0, 2, 0, 2, 1, 3, 1, 3), @@ -118,7 +119,7 @@ class trellis_tb(gr.top_block): # CHANNEL add = gr.add_cc() - noise = gr.noise_source_c(gr.GR_GAUSSIAN,math.sqrt(N0/2),seed) + noise = analog.noise_source_c(analog.GR_GAUSSIAN,math.sqrt(N0/2),seed) # RX # data preprocessing to generate metrics for Viterbi |