summaryrefslogtreecommitdiff
path: root/gr-fec/grc/ldpc_decoder_def_list.xml
blob: 007f85505ca80e529b0cb17c9beeb3400d9b96b2 (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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0"?>
<block>
    <name>LDPC Decoder Definition</name>
    <key>variable_ldpc_decoder_def</key>
    <import>from gnuradio import fec</import>
    <var_make>
#if int($ndim())==0 #
self.$(id) = $(id) = fec.ldpc_decoder.make($file, $sigma, $max_iter); #slurp
#else if int($ndim())==1 #
self.$(id) = $(id) = map( (lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim1) ); #slurp
#else
self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.ldpc_decoder.make($file, $sigma, $max_iter)), range(0,$dim2) ) ), range(0,$dim1)); #slurp
#end if</var_make>
    <make></make>

<!-- This definition below is wierd, it seems required for the GRC to be happy, im confused -->
    <param>
        <name>Ignore Me</name>
        <key>value</key>
        <value>"ok"</value>
        <type>raw</type>
        <hide>all</hide>
    </param>

    <param>
        <name>Parallelism</name>
        <key>ndim</key>
        <value>0</value>
        <type>enum</type>
        <option>
            <name>0</name>
            <key>0</key>
        </option>
        <option>
            <name>1</name>
            <key>1</key>
        </option>
        <option>
            <name>2</name>
            <key>2</key>
        </option>
    </param>

    <param>
        <name>Dimension 1</name>
        <key>dim1</key>
        <value>4</value>
        <type>int</type>
        <hide>#if (int($ndim()) >= 1) then 'none' else 'all' #</hide>
    </param>

    <param>
        <name>Dimension 2</name>
        <key>dim2</key>
        <value>4</value>
        <type>int</type>
        <hide>#if (int($ndim()) >= 2) then 'none' else 'all' #</hide>
    </param>

    <param>
        <name>AList File</name>
        <key>file</key>
        <type>file_open</type>
    </param>
    
    <param>
        <name>Sigma</name>
        <key>sigma</key>
        <value>0.5</value>
        <type>float</type>
    </param>

    <param>
        <name>Max Iterations</name>
        <key>max_iter</key>
        <value>50</value>
        <type>int</type>
    </param>

    <doc>
This is a soft-decision decoder that uses belief propagation (also known as message passing) that is described at:

www.cs.toronto.edu/~radford/ftp/LDPC-2012-02-11/decoding.html

Designed for a memoryless AWGN channel, it assumes a noise variance of the value specified for sigma.
    </doc>
</block>