summaryrefslogtreecommitdiff
path: root/gr-fec/grc/variable_polar_encoder.block.yml
diff options
context:
space:
mode:
Diffstat (limited to 'gr-fec/grc/variable_polar_encoder.block.yml')
-rw-r--r--gr-fec/grc/variable_polar_encoder.block.yml52
1 files changed, 52 insertions, 0 deletions
diff --git a/gr-fec/grc/variable_polar_encoder.block.yml b/gr-fec/grc/variable_polar_encoder.block.yml
new file mode 100644
index 0000000000..7979a71f43
--- /dev/null
+++ b/gr-fec/grc/variable_polar_encoder.block.yml
@@ -0,0 +1,52 @@
+id: variable_polar_encoder_def
+label: POLAR Encoder Definition
+
+parameters:
+- id: is_packed
+ label: Packed Bits
+ dtype: enum
+ default: 'False'
+ options: ['False', 'True']
+ option_labels: ['No', 'Yes']
+- id: ndim
+ label: Parallelism
+ dtype: enum
+ default: '0'
+ options: ['0', '1', '2']
+- id: dim1
+ label: Dimension 1
+ dtype: int
+ default: '1'
+ hide: ${ ('none' if (int(ndim) >= 1) else 'all') }
+- id: dim2
+ label: Dimension 2
+ dtype: int
+ default: '4'
+ hide: ${ ('none' if (int(ndim) >= 2) else 'all') }
+- id: block_size
+ label: Block size (N)
+ dtype: int
+- id: num_info_bits
+ label: '#Info Bits (K)'
+ dtype: int
+- id: frozen_bit_positions
+ label: Frozen Bit Positions
+ dtype: int_vector
+- id: frozen_bit_values
+ label: Frozen Bit Values
+ dtype: int_vector
+value: ${ fec.polar_encoder.make(block_size, num_info_bits, frozen_bit_positions,
+ frozen_bit_values, is_packed) }
+
+templates:
+ imports: from gnuradio import fec
+ var_make: "% if int(ndim)==0 #:\nself.${id} = ${id} = fec.polar_encoder.make(${block_size},\
+ \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values}, ${is_packed})\
+ \ \n% elif int(ndim)==1 #:\nself.${id} = ${id} = map((lambda a: fec.polar_encoder.make(${block_size},\
+ \ ${num_info_bits}, ${frozen_bit_positions}, ${frozen_bit_values}, ${is_packed})),\
+ \ range(0, ${dim1})) \n% else:\nself.${id} = ${id} = map((lambda b: map((lambda\
+ \ a: fec.polar_encoder.make(${block_size}, ${num_info_bits}, ${frozen_bit_positions},\
+ \ ${frozen_bit_values}, ${is_packed})), range(0, ${dim2}))), range(0, ${dim1}))\
+ \ \n% endif"
+
+file_format: 1