From 30618d2fcaefacfd3d2fc904405630a1ce482fe3 Mon Sep 17 00:00:00 2001
From: Achilleas Anastasopoulos
Date: Wed, 31 Aug 2011 20:42:22 -0400
Subject: More examples and turbo decoder blocks added.
---
gnuradio-examples/grc/trellis/pccc1.grc | 857 +++++++++++++++++++++++++++++
gnuradio-examples/grc/trellis/readme.txt | 10 +-
gr-trellis/grc/Makefile.am | 3 +-
gr-trellis/grc/trellis_pccc_decoder_x.xml | 117 ++++
gr-trellis/grc/trellis_pccc_encoder_xx.xml | 8 +-
5 files changed, 988 insertions(+), 7 deletions(-)
create mode 100644 gnuradio-examples/grc/trellis/pccc1.grc
create mode 100644 gr-trellis/grc/trellis_pccc_decoder_x.xml
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 @@
+
+
+ Wed Aug 31 20:34:39 2011
+
+ options
+
+ id
+ sccc1
+
+
+ _enabled
+ True
+
+
+ title
+ Serially Concatenated Convolutional Code
+
+
+ author
+ AA
+
+
+ description
+ gnuradio flow graph
+
+
+ window_size
+ 2048, 2048
+
+
+ generate_options
+ wx_gui
+
+
+ category
+ Custom
+
+
+ run_options
+ prompt
+
+
+ run
+ True
+
+
+ realtime_scheduling
+
+
+
+ _coordinate
+ (10, 10)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ noisevar
+
+
+ _enabled
+ True
+
+
+ value
+ 10**(-snr_db/10)
+
+
+ _coordinate
+ (389, 15)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ prefix
+
+
+ _enabled
+ True
+
+
+ value
+ "/n/harrisville/x/anastas/gnuradio_trunk/"
+
+
+ _coordinate
+ (590, 15)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ block
+
+
+ _enabled
+ True
+
+
+ value
+ 1000
+
+
+ _coordinate
+ (764, 16)
+
+
+ _rotation
+ 0
+
+
+
+ variable_slider
+
+ id
+ snr_db
+
+
+ _enabled
+ True
+
+
+ label
+ SNR (dB)
+
+
+ value
+ 5
+
+
+ min
+ -10
+
+
+ max
+ 10
+
+
+ num_steps
+ 100
+
+
+ style
+ wx.SL_HORIZONTAL
+
+
+ converver
+ float_converter
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ _coordinate
+ (229, 13)
+
+
+ _rotation
+ 0
+
+
+
+ gr_multiply_xx
+
+ id
+ gr_multiply_xx_2_0
+
+
+ _enabled
+ True
+
+
+ type
+ short
+
+
+ num_inputs
+ 2
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (392, 591)
+
+
+ _rotation
+ 0
+
+
+
+ gr_short_to_float
+
+ id
+ gr_short_to_float_1_0
+
+
+ _enabled
+ True
+
+
+ _coordinate
+ (535, 609)
+
+
+ _rotation
+ 0
+
+
+
+ wxgui_numbersink2
+
+ id
+ wxgui_numbersink2_3_0
+
+
+ _enabled
+ True
+
+
+ type
+ float
+
+
+ title
+ BER
+
+
+ units
+ BER
+
+
+ samp_rate
+ R
+
+
+ min_value
+ 0
+
+
+ max_value
+ 1.0
+
+
+ factor
+ 1.0
+
+
+ decimal_places
+ 6
+
+
+ ref_level
+ 0
+
+
+ number_rate
+ 15
+
+
+ peak_hold
+ False
+
+
+ average
+ True
+
+
+ avg_alpha
+ 0.001
+
+
+ show_gauge
+ True
+
+
+ win_size
+
+
+
+ grid_pos
+ 1,0,1,1
+
+
+ notebook
+
+
+
+ _coordinate
+ (713, 426)
+
+
+ _rotation
+ 0
+
+
+
+ gr_noise_source_x
+
+ id
+ gr_noise_source_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ float
+
+
+ noise_type
+ gr.GR_GAUSSIAN
+
+
+ amp
+ noisevar
+
+
+ seed
+ 42
+
+
+ _coordinate
+ (672, 290)
+
+
+ _rotation
+ 0
+
+
+
+ gr_add_xx
+
+ id
+ gr_add_xx_1
+
+
+ _enabled
+ True
+
+
+ type
+ float
+
+
+ num_inputs
+ 2
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (951, 256)
+
+
+ _rotation
+ 0
+
+
+
+ wxgui_scopesink2
+
+ id
+ wxgui_scopesink2_0
+
+
+ _enabled
+ False
+
+
+ type
+ float
+
+
+ title
+ Scope Plot
+
+
+ samp_rate
+ R
+
+
+ v_scale
+ 0
+
+
+ v_offset
+ 0
+
+
+ t_scale
+ 0
+
+
+ ac_couple
+ False
+
+
+ xy_mode
+ False
+
+
+ num_inputs
+ 1
+
+
+ win_size
+
+
+
+ grid_pos
+
+
+
+ notebook
+
+
+
+ trig_mode
+ gr.gr_TRIG_MODE_AUTO
+
+
+ y_axis_label
+ Counts
+
+
+ _coordinate
+ (952, 73)
+
+
+ _rotation
+ 0
+
+
+
+ random_source_x
+
+ id
+ random_source_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ short
+
+
+ min
+ 0
+
+
+ max
+ 2
+
+
+ num_samps
+ 1000
+
+
+ repeat
+ True
+
+
+ _coordinate
+ (21, 170)
+
+
+ _rotation
+ 0
+
+
+
+ gr_throttle
+
+ id
+ gr_throttle_0
+
+
+ _enabled
+ True
+
+
+ type
+ short
+
+
+ samples_per_second
+ R
+
+
+ vlen
+ 1
+
+
+ _coordinate
+ (517, 103)
+
+
+ _rotation
+ 0
+
+
+
+ gr_sub_xx
+
+ id
+ gr_sub_xx_0
+
+
+ _enabled
+ True
+
+
+ type
+ short
+
+
+ vlen
+ 1
+
+
+ num_inputs
+ 2
+
+
+ _coordinate
+ (217, 597)
+
+
+ _rotation
+ 0
+
+
+
+ gr_chunks_to_symbols_xx
+
+ id
+ gr_chunks_to_symbols_xx_0
+
+
+ _enabled
+ True
+
+
+ in_type
+ short
+
+
+ out_type
+ float
+
+
+ symbol_table
+ -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
+
+
+ dimension
+ 2
+
+
+ num_ports
+ 1
+
+
+ _coordinate
+ (551, 184)
+
+
+ _rotation
+ 0
+
+
+
+ trellis_pccc_encoder_xx
+
+ id
+ trellis_pccc_encoder_xx_0
+
+
+ _enabled
+ True
+
+
+ type
+ ss
+
+
+ o_fsm_args
+ prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"
+
+
+ o_init_state
+ 0
+
+
+ i_fsm_args
+ prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"
+
+
+ i_init_state
+ 0
+
+
+ interleaver_args
+ trellis.interleaver(block,666)
+
+
+ bl
+ block
+
+
+ _coordinate
+ (236, 147)
+
+
+ _rotation
+ 0
+
+
+
+ trellis_pccc_decoder_x
+
+ id
+ trellis_pccc_decoder_x_0
+
+
+ _enabled
+ True
+
+
+ out_type
+ s
+
+
+ o_fsm_args
+ prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"
+
+
+ o_init_state
+ 0
+
+
+ o_final_state
+ -1
+
+
+ i_fsm_args
+ prefix+"gr-trellis/src/examples/fsm_files/awgn1o2_4.fsm"
+
+
+ i_init_state
+ 0
+
+
+ i_final_state
+ -1
+
+
+ interleaver
+ trellis.interleaver(block,666)
+
+
+ block_size
+ block
+
+
+ iterations
+ 10
+
+
+ siso_type
+ trellis.TRELLIS_MIN_SUM
+
+
+ _coordinate
+ (357, 304)
+
+
+ _rotation
+ 0
+
+
+
+ trellis_metrics_x
+
+ id
+ trellis_metrics_x_0
+
+
+ _enabled
+ True
+
+
+ type
+ f
+
+
+ card
+ 16
+
+
+ dim
+ 2
+
+
+ table
+ -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
+
+
+ metric_type
+ trellis.TRELLIS_EUCLIDEAN
+
+
+ _coordinate
+ (58, 354)
+
+
+ _rotation
+ 0
+
+
+
+ variable
+
+ id
+ R
+
+
+ _enabled
+ True
+
+
+ value
+ 100e3
+
+
+ _coordinate
+ (482, 17)
+
+
+ _rotation
+ 0
+
+
+
+ random_source_x_0
+ gr_sub_xx_0
+ 0
+ 0
+
+
+ gr_throttle_0
+ gr_chunks_to_symbols_xx_0
+ 0
+ 0
+
+
+ gr_add_xx_1
+ wxgui_scopesink2_0
+ 0
+ 0
+
+
+ gr_noise_source_x_0
+ gr_add_xx_1
+ 0
+ 1
+
+
+ gr_chunks_to_symbols_xx_0
+ gr_add_xx_1
+ 0
+ 0
+
+
+ gr_multiply_xx_2_0
+ gr_short_to_float_1_0
+ 0
+ 0
+
+
+ gr_short_to_float_1_0
+ wxgui_numbersink2_3_0
+ 0
+ 0
+
+
+ gr_sub_xx_0
+ gr_multiply_xx_2_0
+ 0
+ 0
+
+
+ gr_sub_xx_0
+ gr_multiply_xx_2_0
+ 0
+ 1
+
+
+ gr_add_xx_1
+ trellis_metrics_x_0
+ 0
+ 0
+
+
+ random_source_x_0
+ trellis_pccc_encoder_xx_0
+ 0
+ 0
+
+
+ trellis_pccc_encoder_xx_0
+ gr_throttle_0
+ 0
+ 0
+
+
+ trellis_metrics_x_0
+ trellis_pccc_decoder_x_0
+ 0
+ 0
+
+
+ trellis_pccc_decoder_x_0
+ gr_sub_xx_0
+ 0
+ 1
+
+
diff --git a/gnuradio-examples/grc/trellis/readme.txt b/gnuradio-examples/grc/trellis/readme.txt
index 75966c4be..9c7363af8 100644
--- a/gnuradio-examples/grc/trellis/readme.txt
+++ b/gnuradio-examples/grc/trellis/readme.txt
@@ -16,11 +16,17 @@ 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 Convolutionsl Codes
+Serially Concatenated Convolutional Codes
-----------------------------------------
-An SCCC can be defined by an outer and an inner FSM together with an interleaver
+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/gr-trellis/grc/Makefile.am b/gr-trellis/grc/Makefile.am
index 394d87869..0b7bd464c 100644
--- a/gr-trellis/grc/Makefile.am
+++ b/gr-trellis/grc/Makefile.am
@@ -34,4 +34,5 @@ dist_grcblocks_DATA = \
trellis_sccc_encoder_xx.xml \
trellis_sccc_decoder_x.xml \
trellis_sccc_decoder_combined_xx.xml \
- trellis_pccc_encoder_xx.xml
+ trellis_pccc_encoder_xx.xml \
+ trellis_pccc_decoder_x.xml
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..da506b3ce
--- /dev/null
+++ b/gr-trellis/grc/trellis_pccc_decoder_x.xml
@@ -0,0 +1,117 @@
+
+
+
+
+
+ PCCC Decoder
+ trellis_pccc_decoder_x
+ Error Correction/Trellis
+ from gnuradio import trellis
+ 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)
+
+
+ Output Type
+ out_type
+ enum
+
+
+
+
+
+ FSM 1
+ o_fsm_args
+ raw
+
+
+ Initial State 1
+ o_init_state
+ -1
+ int
+
+
+ Final State 1
+ o_final_state
+ -1
+ int
+
+
+ FSM 2
+ i_fsm_args
+ raw
+
+
+ Initial State 2
+ i_init_state
+ -1
+ int
+
+
+ Final State 2
+ i_final_state
+ -1
+ int
+
+
+ Interleaver
+ interleaver
+ raw
+
+
+ Block Size
+ block_size
+ int
+
+
+ Iterations
+ iterations
+ 10
+ int
+
+
+ SISO Type
+ siso_type
+ enum
+
+
+
+
+ in
+ float
+
+
+ out
+ $out_type.io
+
+
+PCCC turbo Decoder.
+The fsm and interleaver arguments are passed directly to the trellis.fsm() and trellis.interleaver() constructors.
+
+
diff --git a/gr-trellis/grc/trellis_pccc_encoder_xx.xml b/gr-trellis/grc/trellis_pccc_encoder_xx.xml
index c416dfdfa..c9576cbc8 100644
--- a/gr-trellis/grc/trellis_pccc_encoder_xx.xml
+++ b/gr-trellis/grc/trellis_pccc_encoder_xx.xml
@@ -53,22 +53,22 @@
- Outer FSM
+ FSM 1
o_fsm_args
raw
- Outer Initial State
+ Initial State 1
o_init_state
int
- Inner FSM
+ FSM 2
i_fsm_args
raw
- Inner Initial State
+ Initial State 2
i_init_state
int
--
cgit