laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/libosmocore/+/31528 )

Change subject: convolutional coding for CSD
......................................................................

convolutional coding for CSD

This patch adds the convolutional code definitions for CSD (circuit
switched data) on TCH/F channels with user bit rates of 2400, 4800, 9600
and 14400 bps.

Related: OS#4396, OS#1572
Change-Id: I412131d7ee2e676402bf8d88394af17c4447b664
---
M src/gsm/libosmogsm.map
M tests/conv/conv_gsm0503_test.ok
M utils/conv_codes_gsm.py
3 files changed, 137 insertions(+), 0 deletions(-)

Approvals:
  Jenkins Builder: Verified
  fixeria: Looks good to me, but someone else must approve
  msuraev: Looks good to me, but someone else must approve
  laforge: Looks good to me, approved




diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index ebfa42e..21f8e15 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -121,6 +121,10 @@
 gsm0503_cs2_np;
 gsm0503_cs3_np;
 gsm0503_tch_fr;
+gsm0503_tch_f24;
+gsm0503_tch_f48;
+gsm0503_tch_f96;
+gsm0503_tch_f144;
 gsm0503_tch_hr;
 gsm0503_tch_afs_12_2;
 gsm0503_tch_afs_10_2;
diff --git a/tests/conv/conv_gsm0503_test.ok b/tests/conv/conv_gsm0503_test.ok
index 764bd43..bfefcd0 100644
--- a/tests/conv/conv_gsm0503_test.ok
+++ b/tests/conv/conv_gsm0503_test.ok
@@ -6,6 +6,38 @@
 [..] Encoding / Decoding cycle : OK
 [..] Encoding / Decoding cycle : OK

+[+] Testing: gsm0503_tch_f24
+[.] Input length  : ret =  72  exp =  72 -> OK
+[.] Output length : ret = 456  exp = 456 -> OK
+[.] Random vector checks:
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+
+[+] Testing: gsm0503_tch_f48
+[.] Input length  : ret = 152  exp = 152 -> OK
+[.] Output length : ret = 468  exp = 468 -> OK
+[.] Random vector checks:
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+
+[+] Testing: gsm0503_tch_f96
+[.] Input length  : ret = 240  exp = 240 -> OK
+[.] Output length : ret = 456  exp = 456 -> OK
+[.] Random vector checks:
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+
+[+] Testing: gsm0503_tch_f144
+[.] Input length  : ret = 290  exp = 290 -> OK
+[.] Output length : ret = 456  exp = 456 -> OK
+[.] Random vector checks:
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+[..] Encoding / Decoding cycle : OK
+
 [+] Testing: gsm0503_rach
 [.] Input length  : ret =  14  exp =  14 -> OK
 [.] Output length : ret =  36  exp =  36 -> OK
diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py
index 42f340b..a6e471e 100644
--- a/utils/conv_codes_gsm.py
+++ b/utils/conv_codes_gsm.py
@@ -42,6 +42,93 @@
                ]
        ),

+       # TCH/F2.4 definition
+       ConvolutionalCode(
+               72,
+               [
+                   (G1, 1),
+                   (G2, 1),
+                   (G3, 1),
+                   (G1, 1),
+                   (G2, 1),
+                   (G3, 1),
+               ],
+               name = "tch_f24",
+               description = [
+                       "TCH/F2.4 convolutional code:",
+                       "72 bits blocks, rate 1/6, k = 5",
+                       "G1 = 1 + D + D3 + D4",
+                       "G2 = 1 + D2 + D4",
+                       "G3 = 1 + D + D2 + D3 + D4",
+                       "G1 = 1 + D + D3 + D4",
+                       "G2 = 1 + D2 + D4",
+                       "G3 = 1 + D + D2 + D3 + D4",
+               ]
+       ),
+
+       # TCH/F4.8 definition
+       ConvolutionalCode(
+               152,
+               [
+                   (G1, 1),
+                   (G2, 1),
+                   (G3, 1),
+               ],
+               name = "tch_f48",
+               description = [
+                       "TCH/F4.8 convolutional code:",
+                       "152 bits blocks, rate 1/3, k = 5",
+                       "G1 = 1 + D + D3 + D4",
+                       "G2 = 1 + D2 + D4",
+                       "G3 = 1 + D + D2 + D3 + D4",
+               ]
+       ),
+
+       # TCH/F9.6 definition
+       ConvolutionalCode(
+               240,
+               shared_polys["xcch"],
+               puncture = [
+                        11,  26,  41,  56,  71,  86, 101, 116, 131, 146, 161, 
176,
+                       191, 206, 221, 236, 251, 266, 281, 296, 311, 326, 341, 
356,
+                       371, 386, 401, 416, 431, 446, 461, 476, -1
+               ],
+               name = "tch_f96",
+               description = [
+                       "TCH/F9.6 convolutional code:",
+                       "240 bits blocks, rate 1/2, k = 5",
+                       "G0 = 1 + D3 + D4",
+                       "G1 = 1 + D + D3 + D4",
+               ]
+       ),
+
+       # TCH/F14.4 definition
+       ConvolutionalCode(
+               290,
+               shared_polys["xcch"],
+               puncture = [
+                         1,   6,  11,  15,  19,  24,  29,  33,  37,  42,  47,  
51,
+                        55,  60,  65,  69,  73,  78,  83,  87,  91,  96, 101, 
105,
+                       109, 114, 119, 123, 127, 132, 137, 141, 145, 150, 155, 
159,
+                       163, 168, 173, 177, 181, 186, 191, 195, 199, 204, 209, 
213,
+                       217, 222, 227, 231, 235, 240, 245, 249, 253, 258, 263, 
267,
+                       271, 276, 281, 285, 289, 294, 299, 303, 307, 312, 317, 
321,
+                       325, 330, 335, 339, 343, 348, 353, 357, 361, 366, 371, 
375,
+                       379, 384, 389, 393, 397, 402, 407, 411, 415, 420, 425, 
429,
+                       433, 438, 443, 447, 451, 456, 461, 465, 469, 474, 479, 
483,
+                       487, 492, 497, 501, 505, 510, 515, 519, 523, 528, 533, 
537,
+                       541, 546, 551, 555, 559, 564, 569, 573, 577, 582, 584, 
587,
+                        -1
+               ],
+               name = "tch_f144",
+               description = [
+                       "TCH/F14.4 convolutional code:",
+                       "290 bits blocks, rate 1/2, k = 5",
+                       "G0 = 1 + D3 + D4",
+                       "G1 = 1 + D + D3 + D4",
+               ]
+       ),
+
        # RACH definition
        ConvolutionalCode(
                14,

--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/31528
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I412131d7ee2e676402bf8d88394af17c4447b664
Gerrit-Change-Number: 31528
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: msuraev <[email protected]>
Gerrit-MessageType: merged

Reply via email to