summaryrefslogtreecommitdiff
path: root/gr-fec/grc/variable_polar_encoder.block.yml
blob: 7979a71f4306f66d55cd0c2cc4094bec08277023 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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