laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/30261 )
Change subject: conv_codes_gsm: Cosmetic improvements ...................................................................... conv_codes_gsm: Cosmetic improvements * Fix mixed tab/space indent * Switch from 05.03 to 45.003 * give the 3GPP spec / section for each code * make the "magic number" of input bits to the convolutional code match the spec. The code always subtracts any known-zero tail bits as this improves decoding. Change-Id: I7cc6056114f997b5d4febf612ecd347b2d6d69b1 --- M utils/conv_codes_gsm.py 1 file changed, 41 insertions(+), 41 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/61/30261/1 diff --git a/utils/conv_codes_gsm.py b/utils/conv_codes_gsm.py index 42f340b..cee5efc 100644 --- a/utils/conv_codes_gsm.py +++ b/utils/conv_codes_gsm.py @@ -4,7 +4,7 @@ from conv_gen import ConvolutionalCode from conv_gen import poly -# Polynomials according to 3GPP TS 05.03 Annex B +# Polynomials according to 3GPP TS 45.003 Annex B G0 = poly(0, 3, 4) G1 = poly(0, 1, 3, 4) G2 = poly(0, 2, 4) @@ -29,9 +29,9 @@ # Convolutional code definitions conv_codes = [ - # xCCH definition + # xCCH definition, 3GPP TS 45.003 Section 4.1 ConvolutionalCode( - 224, + 228 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], name = "xcch", description = [ @@ -42,7 +42,7 @@ ] ), - # RACH definition + # RACH definition, 3GPP TS 45.003 Section 4.6.1 ConvolutionalCode( 14, shared_polys["xcch"], @@ -50,7 +50,7 @@ description = ["RACH convolutional code"] ), - # Extended RACH definition from 3GPP TS 45.003 ยง5.3.2 + # Extended RACH definition, 3GPP TS 45.003 Section 5.3.2 ConvolutionalCode( 17, shared_polys["xcch"], @@ -59,7 +59,7 @@ description = ["Extended RACH (11 bit) convolutional code"] ), - # SCH definition + # SCH definition, 3GPP TS 45.003 Section 4.7 ConvolutionalCode( 35, shared_polys["xcch"], @@ -67,9 +67,9 @@ description = ["SCH convolutional code"] ), - # CS2 definition + # CS2 definition, 3GPP TS 45.003 Section 5.1.2 ConvolutionalCode( - 290, + 294 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], puncture = [ 15, 19, 23, 27, 31, 35, 43, 47, 51, 55, 59, 63, 67, 71, @@ -91,9 +91,9 @@ ] ), - # CS3 definition + # CS3 definition. 3GPP TS 45.003 Section 5.1.3 ConvolutionalCode( - 334, + 338 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], puncture = [ 15, 17, 21, 23, 27, 29, 33, 35, 39, 41, 45, 47, 51, 53, @@ -123,7 +123,7 @@ # CS2 definition (non-punctured) ConvolutionalCode( - 290, + 294 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], name = "cs2_np", description = [ @@ -135,7 +135,7 @@ # CS3 definition (non-punctured) ConvolutionalCode( - 334, + 338 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], name = "cs3_np", description = [ @@ -377,17 +377,17 @@ ] ), - # TCH_FR definition + # TCH_FR definition, 3GPP TS 45.003 Section 3.1.2 ConvolutionalCode( - 185, + 189 - 4, # 4 tail bits are known to be zero shared_polys["xcch"], name = "tch_fr", description = ["TCH/F convolutional code"] ), - # TCH_HR definition + # TCH_HR definition, 3GPP TS 45.003 Section 3.2 ConvolutionalCode( - 98, + 98 - 6, # 6 tail bits are known to be zero [ ( G4, 1 ), ( G5, 1 ), @@ -522,7 +522,7 @@ description = ["TCH/AHS 4.75 kbits convolutional code"] ), - # TCH_AXS SID UPDATE definition + # TCH_AXS SID UPDATE definition, 3GPP TS 45.003 Section 3.9.1 + 3.10.1 ConvolutionalCode( 49, [ @@ -541,7 +541,7 @@ ] ), - # EDGE MCS1_DL_HDR definition + # EDGE MCS1_DL_HDR definition, 3GPP TS 45.003 Section 5.1.5.1.3 ConvolutionalCode( 36, shared_polys["mcs"], @@ -556,7 +556,7 @@ ] ), - # EDGE MCS1_UL_HDR definition + # EDGE MCS1_UL_HDR definition, 3GPP TS 45.003 Section 5.1.5.2.2 ConvolutionalCode( 39, shared_polys["mcs"], @@ -571,9 +571,9 @@ ] ), - # EDGE MCS1 definition + # EDGE MCS1 definition, 3GPP TS 45.003 Section 5.1.5.1.4 ConvolutionalCode( - 190, + 190 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs1", description = [ @@ -585,9 +585,9 @@ ] ), - # EDGE MCS2 definition + # EDGE MCS2 definition, 3GPP TS 45.003 Section 5.1.6.1.4 ConvolutionalCode( - 238, + 238 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs2", description = [ @@ -599,9 +599,9 @@ ] ), - # EDGE MCS3 definition + # EDGE MCS3 definition, 3GPP TS 45.003 Section 5.1.7.1.4 ConvolutionalCode( - 310, + 316 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs3", description = [ @@ -613,9 +613,9 @@ ] ), - # EDGE MCS4 definition + # EDGE MCS4 definition, 3GPP TS 45.003 Section 5.1.8.1.4 ConvolutionalCode( - 366, + 372 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs4", description = [ @@ -627,7 +627,7 @@ ] ), - # EDGE MCS5_DL_HDR definition + # EDGE MCS5_DL_HDR definition, 3GPP TS 45.003 Section 5.1.9.1.3 ConvolutionalCode( 33, shared_polys["mcs"], @@ -642,7 +642,7 @@ ] ), - # EDGE MCS5_UL_HDR definition + # EDGE MCS5_UL_HDR definition, 3GPP TS 45.003 Section 5.1.9.2.3 ConvolutionalCode( 45, shared_polys["mcs"], @@ -657,9 +657,9 @@ ] ), - # EDGE MCS5 definition + # EDGE MCS5 definition, 3GPP TS 45.003 Section 5.1.9.1.4 ConvolutionalCode( - 462, + 468 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs5", description = [ @@ -671,9 +671,9 @@ ] ), - # EDGE MCS6 definition + # EDGE MCS6 definition, 3GPP TS 45.003 Section 5.1.10.1.4 ConvolutionalCode( - 606, + 612 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs6", description = [ @@ -685,7 +685,7 @@ ] ), - # EDGE MCS7_DL_HDR definition + # EDGE MCS7_DL_HDR definition, 3GPP TS 45.003 Section 5.1.11.1.3 ConvolutionalCode( 45, shared_polys["mcs"], @@ -700,7 +700,7 @@ ] ), - # EDGE MCS7_UL_HDR definition + # EDGE MCS7_UL_HDR definition, 3GPP TS 45.003 Section 5.1.11.2.3 ConvolutionalCode( 54, shared_polys["mcs"], @@ -715,9 +715,9 @@ ] ), - # EDGE MCS7 definition + # EDGE MCS7 definition, 3GPP TS 45.003 Section 5.1.11.1.4 ConvolutionalCode( - 462, + 468 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs7", description = [ @@ -729,9 +729,9 @@ ] ), - # EDGE MCS8 definition + # EDGE MCS8 definition, 3GPP TS 45.003 Section 5.1.12.1.4 ConvolutionalCode( - 558, + 564 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs8", description = [ @@ -743,9 +743,9 @@ ] ), - # EDGE MCS9 definition + # EDGE MCS9 definition, 3GPP TS 45.003 Section 5.1.13.1.4 ConvolutionalCode( - 606, + 612 - 6, # 6 tail bits are known to be zero shared_polys["mcs"], name = "mcs9", description = [ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/30261 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I7cc6056114f997b5d4febf612ecd347b2d6d69b1 Gerrit-Change-Number: 30261 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <lafo...@osmocom.org> Gerrit-MessageType: newchange