[MERGED] libosmocore[master]: utils/conv_gen.py: add EDGE MCS 1-9 definitions

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Sun Oct 23 07:38:17 UTC 2016


Harald Welte has submitted this change and it was merged.

Change subject: utils/conv_gen.py: add EDGE MCS 1-9 definitions
......................................................................


utils/conv_gen.py: add EDGE MCS 1-9 definitions

Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3
---
M include/osmocom/gsm/gsm0503.h
M src/gsm/libosmogsm.map
M utils/conv_gen.py
3 files changed, 301 insertions(+), 1 deletion(-)

Approvals:
  Tom Tsou: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h
index 862dc3f..de28ad2 100644
--- a/include/osmocom/gsm/gsm0503.h
+++ b/include/osmocom/gsm/gsm0503.h
@@ -112,3 +112,63 @@
 /*! \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 9eff4d3..a83f92c 100644
--- a/src/gsm/libosmogsm.map
+++ b/src/gsm/libosmogsm.map
@@ -91,6 +91,21 @@
 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 865a5ee..5eb7ac1 100644
--- a/utils/conv_gen.py
+++ b/utils/conv_gen.py
@@ -28,12 +28,13 @@
 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 @@
 		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:
@@ -246,6 +249,12 @@
 CCH_poly = [
 	( G0, 1 ),
 	( G1, 1 ),
+]
+
+MCS_poly = [
+	( G4, 1 ),
+	( G7, 1 ),
+	( G5, 1 ),
 ]
 
 conv_codes = [
@@ -708,6 +717,222 @@
 		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__':

-- 
To view, visit https://gerrit.osmocom.org/837
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1452342f524a8b60f2babc07398a1d9c9e06aa3
Gerrit-PatchSet: 8
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Tom Tsou <tom at tsou.cc>
Gerrit-Reviewer: Vadim Yanitskiy <axilirator at gmail.com>



More information about the gerrit-log mailing list