aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/osmocom/gsm/gsm0503.h60
-rw-r--r--src/gsm/libosmogsm.map15
-rw-r--r--utils/conv_gen.py227
3 files changed, 301 insertions, 1 deletions
diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h
index 862dc3f1..de28ad23 100644
--- a/include/osmocom/gsm/gsm0503.h
+++ b/include/osmocom/gsm/gsm0503.h
@@ -112,3 +112,63 @@ extern const struct osmo_conv_code gsm0503_tch_ahs_5_15;
/*! \brief structure describing convolutional code TCH/AHS 4.75
*/
extern const struct osmo_conv_code gsm0503_tch_ahs_4_75;
+
+/*! \brief structure describing convolutional code EDGE MCS-1 DL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs1_dl_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-1 UL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs1_ul_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-1
+ */
+extern const struct osmo_conv_code gsm0503_mcs1;
+
+/*! \brief structure describing convolutional code EDGE MCS-2
+ */
+extern const struct osmo_conv_code gsm0503_mcs2;
+
+/*! \brief structure describing convolutional code EDGE MCS-3
+ */
+extern const struct osmo_conv_code gsm0503_mcs3;
+
+/*! \brief structure describing convolutional code EDGE MCS-4
+ */
+extern const struct osmo_conv_code gsm0503_mcs4;
+
+/*! \brief structure describing convolutional code EDGE MCS-5 DL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs5_dl_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-5 UL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs5_ul_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-5
+ */
+extern const struct osmo_conv_code gsm0503_mcs5;
+
+/*! \brief structure describing convolutional code EDGE MCS-6
+ */
+extern const struct osmo_conv_code gsm0503_mcs6;
+
+/*! \brief structure describing convolutional code EDGE MCS-7 DL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs7_dl_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-7 UL HDR
+ */
+extern const struct osmo_conv_code gsm0503_mcs7_ul_hdr;
+
+/*! \brief structure describing convolutional code EDGE MCS-7
+ */
+extern const struct osmo_conv_code gsm0503_mcs7;
+
+/*! \brief structure describing convolutional code EDGE MCS-8
+ */
+extern const struct osmo_conv_code gsm0503_mcs8;
+
+/*! \brief structure describing convolutional code EDGE MCS-9
+ */
+extern const struct osmo_conv_code gsm0503_mcs9;
diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map
index 9eff4d32..a83f92ca 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -91,6 +91,21 @@ gsm0503_tch_ahs_6_7;
gsm0503_tch_ahs_5_9;
gsm0503_tch_ahs_5_15;
gsm0503_tch_ahs_4_75;
+gsm0503_mcs1_dl_hdr;
+gsm0503_mcs1_ul_hdr;
+gsm0503_mcs1;
+gsm0503_mcs2;
+gsm0503_mcs3;
+gsm0503_mcs4;
+gsm0503_mcs5_dl_hdr;
+gsm0503_mcs5_ul_hdr;
+gsm0503_mcs5;
+gsm0503_mcs6;
+gsm0503_mcs7_dl_hdr;
+gsm0503_mcs7_ul_hdr;
+gsm0503_mcs7;
+gsm0503_mcs8;
+gsm0503_mcs9;
gsm0808_att_tlvdef;
gsm0808_bssap_name;
diff --git a/utils/conv_gen.py b/utils/conv_gen.py
index 865a5ee8..5eb7ac12 100644
--- a/utils/conv_gen.py
+++ b/utils/conv_gen.py
@@ -28,12 +28,13 @@ import sys, os, math
class ConvolutionalCode(object):
def __init__(self, block_len, polys, name,
- description = None, puncture = []):
+ description = None, puncture = [], term_type = None):
# Save simple params
self.block_len = block_len
self.k = 1
self.puncture = puncture
self.rate_inv = len(polys)
+ self.term_type = term_type
# Infos
self.name = name
@@ -202,6 +203,8 @@ class ConvolutionalCode(object):
print >>fi, "\t.N = %d," % self.rate_inv
print >>fi, "\t.K = %d," % self.k
print >>fi, "\t.len = %d," % self.block_len
+ if self.term_type is not None:
+ print >>fi, "\t.term = %s," % self.term_type
print >>fi, "\t.next_output = %s_output," % self.name
print >>fi, "\t.next_state = %s_state," % self.name
if self.recursive:
@@ -248,6 +251,12 @@ CCH_poly = [
( G1, 1 ),
]
+MCS_poly = [
+ ( G4, 1 ),
+ ( G7, 1 ),
+ ( G5, 1 ),
+]
+
conv_codes = [
# xCCH definition
ConvolutionalCode(
@@ -708,6 +717,222 @@ conv_codes = [
name = "tch_ahs_4_75",
description = ["TCH/AHS 4.75 kbits convolutional code"]
),
+
+ # EDGE MCS1_DL_HDR definition
+ ConvolutionalCode(
+ 36,
+ MCS_poly,
+ name = "mcs1_dl_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS1_UL_HDR definition
+ ConvolutionalCode(
+ 39,
+ MCS_poly,
+ name = "mcs1_ul_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS1 definition
+ ConvolutionalCode(
+ 190,
+ MCS_poly,
+ name = "mcs1",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS2 definition
+ ConvolutionalCode(
+ 238,
+ MCS_poly,
+ name = "mcs2",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS3 definition
+ ConvolutionalCode(
+ 310,
+ MCS_poly,
+ name = "mcs3",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS4 definition
+ ConvolutionalCode(
+ 366,
+ MCS_poly,
+ name = "mcs4",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS5_DL_HDR definition
+ ConvolutionalCode(
+ 33,
+ MCS_poly,
+ name = "mcs5_dl_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS5_UL_HDR definition
+ ConvolutionalCode(
+ 45,
+ MCS_poly,
+ name = "mcs5_ul_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS5 definition
+ ConvolutionalCode(
+ 462,
+ MCS_poly,
+ name = "mcs5",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS6 definition
+ ConvolutionalCode(
+ 606,
+ MCS_poly,
+ name = "mcs6",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS7_DL_HDR definition
+ ConvolutionalCode(
+ 45,
+ MCS_poly,
+ name = "mcs7_dl_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS7_UL_HDR definition
+ ConvolutionalCode(
+ 54,
+ MCS_poly,
+ name = "mcs7_ul_hdr",
+ term_type = "CONV_TERM_TAIL_BITING",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS7 definition
+ ConvolutionalCode(
+ 462,
+ MCS_poly,
+ name = "mcs7",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS8 definition
+ ConvolutionalCode(
+ 558,
+ MCS_poly,
+ name = "mcs8",
+ description = [
+ "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"
+ ]
+ ),
+
+ # EDGE MCS9 definition
+ ConvolutionalCode(
+ 606,
+ MCS_poly,
+ name = "mcs9",
+ description = [
+ "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"
+ ]
+ ),
]
if __name__ == '__main__':