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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
<?xml version="1.0"?>
<block>
<name>TPC Encoder Definition</name>
<key>variable_tpc_encoder_def</key>
<import>from gnuradio import fec</import>
<var_make>
#if int($ndim())==0 #
self.$(id) = $(id) = fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval); #slurp
#else if int($ndim())==1 #
self.$(id) = $(id) = map( (lambda a: fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval)), range(0,$dim1) ); #slurp
#else
self.$(id) = $(id) = map( (lambda b: map( ( lambda a: fec.tpc_encoder_make($row_poly, $col_poly, $krow, $kcol, $bval, $qval)), 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>Row Encoder Polynomials</name>
<key>row_poly</key>
<value>[3]</value>
<type>int_vector</type>
</param>
<param>
<name>Column Encoder Polynomials</name>
<key>col_poly</key>
<value>[43]</value>
<type>int_vector</type>
</param>
<param>
<name>K Row</name>
<key>krow</key>
<value>26</value>
<type>int</type>
</param>
<param>
<name>K Col</name>
<key>kcol</key>
<value>6</value>
<type>int</type>
</param>
<param>
<name>B</name>
<key>bval</key>
<value>9</value>
<type>int</type>
</param>
<param>
<name>Q</name>
<key>qval</key>
<value>3</value>
<type>int</type>
</param>
<doc>
This instantiates a 1-dim array or 2-dim array fo Turbo Product Encoders (TPC).
Restrictions: B and Q must be carefully chosen such that when the matrices are setup,
and the first B outputs are removed, they (the first B outputs) are all 0's.
</doc>
</block>
|