aboutsummaryrefslogtreecommitdiffstats
path: root/lib/decoding/osmocom/gsm/gsm0503.h
blob: 44df4ad66577ec7a4fdb2363b75f2cc8d2f71535 (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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
/*
 * Copyright (C) 2011-2016 Sylvain Munaut <tnt@246tNt.com>
 * Copyright (C) 2016 sysmocom s.f.m.c. GmbH
 *
 * All Rights Reserved
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 */

#pragma once

#include <stdint.h>
#include <osmocom/core/conv.h>

/*! structure describing xCCH convolutional code:.
 * 228 bits blocks, rate 1/2, k = 5
 * G0 = 1 + D3 + D4
 * G1 = 1 + D + D3 + D4
 */
extern const struct osmo_conv_code gsm0503_xcch;

/*! structure describing RACH convolutional code.
 */
extern const struct osmo_conv_code gsm0503_rach;

/*! structure describing Extended RACH (11 bit) convolutional code.
 */
//extern const struct osmo_conv_code gsm0503_rach_ext;

/*! structure describing SCH convolutional code.
 */
extern const struct osmo_conv_code gsm0503_sch;

/*! structure describing CS2 convolutional code:.
 * G0 = 1 + D3 + D4
 * G1 = 1 + D + D3 + D4
 */
extern const struct osmo_conv_code gsm0503_cs2;

/*! structure describing CS3 convolutional code:.
 * G0 = 1 + D3 + D4
 * G1 = 1 + D + D3 + D4
 */
extern const struct osmo_conv_code gsm0503_cs3;

/*! structure describing CS2 convolutional code (non-punctured):.
 * G0 = 1 + D3 + D4
 * G1 = 1 + D + D3 + D4
 */
//extern const struct osmo_conv_code gsm0503_cs2_np;

/*! structure describing CS3 convolutional code (non-punctured):.
 * G0 = 1 + D3 + D4
 * G1 = 1 + D + D3 + D4
 */
//extern const struct osmo_conv_code gsm0503_cs3_np;

/*! structure describing TCH/AFS 12.2 kbits convolutional code:.
 * 250 bits block, rate 1/2, punctured
 * G0/G0 = 1
 * G1/G0 = 1 + D + D3 + D4 / 1 + D3 + D4
 */
extern const struct osmo_conv_code gsm0503_tch_afs_12_2;

/*! structure describing TCH/AFS 10.2 kbits convolutional code:.
 * G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4
 * G2/G3 = 1 + D2 + D4     / 1 + D + D2 + D3 + D4
 * G3/G3 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_10_2;

/*! structure describing TCH/AFS 7.95 kbits convolutional code:.
 * G4/G4 = 1
 * G5/G4 = 1 + D + D4 + D6           / 1 + D2 + D3 + D5 + D6
 * G6/G4 = 1 + D + D2 + D3 + D4 + D6 / 1 + D2 + D3 + D5 + D6
 */
extern const struct osmo_conv_code gsm0503_tch_afs_7_95;

/*! structure describing TCH/AFS 7.4 kbits convolutional code:.
 * G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4
 * G2/G3 = 1 + D2 + D4     / 1 + D + D2 + D3 + D4
 * G3/G3 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_7_4;

/*! structure describing TCH/AFS 6.7 kbits convolutional code:.
 * G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4
 * G2/G3 = 1 + D2 + D4     / 1 + D + D2 + D3 + D4
 * G3/G3 = 1
 * G3/G3 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_6_7;

/*! structure describing TCH/AFS 5.9 kbits convolutional code:.
 * 124 bits
 * G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6
 * G5/G6 = 1 + D + D4 + D6       / 1 + D + D2 + D3 + D4 + D6
 * G6/G6 = 1
 * G6/G6 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_5_9;

/*! structure describing TCH/AFS 5.15 kbits convolutional code:.
 * G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4
 * G1/G3 = 1 + D + D3 + D4 / 1 + D + D2 + D3 + D4
 * G2/G3 = 1 + D2 + D4     / 1 + D + D2 + D3 + D4
 * G3/G3 = 1
 * G3/G3 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_5_15;

/*! structure describing TCH/AFS 4.75 kbits convolutional code:.
 * G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6
 * G4/G6 = 1 + D2 + D3 + D5 + D6 / 1 + D + D2 + D3 + D4 + D6
 * G5/G6 = 1 + D + D4 + D6       / 1 + D + D2 + D3 + D4 + D6
 * G6/G6 = 1
 * G6/G6 = 1
 */
extern const struct osmo_conv_code gsm0503_tch_afs_4_75;

/*! structure describing TCH/F convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_fr;

/*! structure describing TCH/H convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_hr;

/*! structure describing TCH/AHS 7.95 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_7_95;

/*! structure describing TCH/AHS 7.4 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_7_4;

/*! structure describing TCH/AHS 6.7 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_6_7;

/*! structure describing TCH/AHS 5.9 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_5_9;

/*! structure describing TCH/AHS 5.15 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_5_15;

/*! structure describing TCH/AHS 4.75 kbits convolutional code.
 */
extern const struct osmo_conv_code gsm0503_tch_ahs_4_75;

/*! structure describing EDGE MCS-1 DL header convolutional code:.
 * 42 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs1_dl_hdr;

/*! structure describing EDGE MCS-1 UL header convolutional code:.
 * 45 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs1_ul_hdr;

/*! structure describing EDGE MCS-1 data convolutional code:.
 * 196 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs1;

/*! structure describing EDGE MCS-2 data convolutional code:.
 * 244 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs2;

/*! structure describing EDGE MCS-3 data convolutional code:.
 * 316 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs3;

/*! structure describing EDGE MCS-4 data convolutional code:.
 * 372 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs4;

/*! structure describing EDGE MCS-5 DL header convolutional code:.
 * 39 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs5_dl_hdr;

/*! structure describing EDGE MCS-5 UL header convolutional code:.
 * 51 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs5_ul_hdr;

/*! structure describing EDGE MCS-5 data convolutional code:.
 * 468 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs5;

/*! structure describing EDGE MCS-6 data convolutional code:.
 * 612 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs6;

/*! structure describing EDGE MCS-7 DL header convolutional code:.
 * 51 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs7_dl_hdr;

/*! structure describing EDGE MCS-7 UL header convolutional code:.
 * 60 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs7_ul_hdr;

/*! structure describing EDGE MCS-7 data convolutional code:.
 * 468 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs7;

/*! structure describing EDGE MCS-8 data convolutional code:.
 * 564 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs8;

/*! structure describing EDGE MCS-9 data convolutional code:.
 * 612 bits blocks, rate 1/3, k = 7
 * G4 = 1 + D2 + D3 + D5 + D6
 * G7 = 1 + D + D2 + D3 + D6
 * G5 = 1 + D + D4 + D6
 */
extern const struct osmo_conv_code gsm0503_mcs9;