From f3d38c493722b4d3cb6bd5dbd9a30d5681a7cdf2 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Wed, 7 Sep 2016 23:09:49 +0700 Subject: utils/conv_gen.py: add RACH, SCH and TCH/AHS definitions Change-Id: I0ea7151f4e8119a8798a9e129b951559e56b0d93 --- include/osmocom/gsm/gsm0503.h | 40 +++++++++++ src/gsm/libosmogsm.map | 10 +++ utils/conv_gen.py | 163 +++++++++++++++++++++++++++++++++++++++++- 3 files changed, 212 insertions(+), 1 deletion(-) diff --git a/include/osmocom/gsm/gsm0503.h b/include/osmocom/gsm/gsm0503.h index 2da4b161..862dc3f1 100644 --- a/include/osmocom/gsm/gsm0503.h +++ b/include/osmocom/gsm/gsm0503.h @@ -36,11 +36,27 @@ */ extern const struct osmo_conv_code gsm0503_xcch; +/*! \brief structure describing convolutional code RACH + */ +extern const struct osmo_conv_code gsm0503_rach; + +/*! \brief structure describing convolutional code SCH + */ +extern const struct osmo_conv_code gsm0503_sch; + /*! \brief structures describing convolutional codes CS2/3 */ extern const struct osmo_conv_code gsm0503_cs2; extern const struct osmo_conv_code gsm0503_cs3; +/*! \brief structure describing convolutional code TCH/FR + */ +extern const struct osmo_conv_code gsm0503_tch_fr; + +/*! \brief structure describing convolutional code TCH/HR + */ +extern const struct osmo_conv_code gsm0503_tch_hr; + /*! \brief structure describing convolutional code TCH/AFS 12.2 */ extern const struct osmo_conv_code gsm0503_tch_afs_12_2; @@ -72,3 +88,27 @@ extern const struct osmo_conv_code gsm0503_tch_afs_5_15; /*! \brief structure describing convolutional code TCH/AFS 4.75 */ extern const struct osmo_conv_code gsm0503_tch_afs_4_75; + +/*! \brief structure describing convolutional code TCH/AHS 7.95 + */ +extern const struct osmo_conv_code gsm0503_tch_ahs_7_95; + +/*! \brief structure describing convolutional code TCH/AHS 7.4 + */ +extern const struct osmo_conv_code gsm0503_tch_ahs_7_4; + +/*! \brief structure describing convolutional code TCH/AHS 6.7 + */ +extern const struct osmo_conv_code gsm0503_tch_ahs_6_7; + +/*! \brief structure describing convolutional code TCH/AHS 5.9 + */ +extern const struct osmo_conv_code gsm0503_tch_ahs_5_9; + +/*! \brief structure describing convolutional code TCH/AHS 5.15 + */ +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; diff --git a/src/gsm/libosmogsm.map b/src/gsm/libosmogsm.map index dc8559fd..9eff4d32 100644 --- a/src/gsm/libosmogsm.map +++ b/src/gsm/libosmogsm.map @@ -71,8 +71,12 @@ gsm0480_wrap_invoke; gsm0502_calc_paging_group; gsm0503_xcch; +gsm0503_rach; +gsm0503_sch; gsm0503_cs2; gsm0503_cs3; +gsm0503_tch_fr; +gsm0503_tch_hr; gsm0503_tch_afs_12_2; gsm0503_tch_afs_10_2; gsm0503_tch_afs_7_95; @@ -81,6 +85,12 @@ gsm0503_tch_afs_6_7; gsm0503_tch_afs_5_9; gsm0503_tch_afs_5_15; gsm0503_tch_afs_4_75; +gsm0503_tch_ahs_7_95; +gsm0503_tch_ahs_7_4; +gsm0503_tch_ahs_6_7; +gsm0503_tch_ahs_5_9; +gsm0503_tch_ahs_5_15; +gsm0503_tch_ahs_4_75; gsm0808_att_tlvdef; gsm0808_bssap_name; diff --git a/utils/conv_gen.py b/utils/conv_gen.py index 715a1462..c067104e 100644 --- a/utils/conv_gen.py +++ b/utils/conv_gen.py @@ -262,6 +262,22 @@ conv_codes = [ ] ), + # RACH definition + ConvolutionalCode( + 14, + CCH_poly, + name = "rach", + description = ["RACH convolutional code"] + ), + + # SCH definition + ConvolutionalCode( + 35, + CCH_poly, + name = "sch", + description = ["SCH convolutional code"] + ), + # CS2 definition ConvolutionalCode( 290, @@ -546,7 +562,152 @@ conv_codes = [ "G6/G6 = 1", "G6/G6 = 1", ] - ) + ), + + # TCH_FR definition + ConvolutionalCode( + 185, + CCH_poly, + name = "tch_fr", + description = ["TCH/F convolutional code"] + ), + + # TCH_HR definition + ConvolutionalCode( + 98, + [ + ( G4, 1 ), + ( G5, 1 ), + ( G6, 1 ), + ], + puncture = [ + 1, 4, 7, 10, 13, 16, 19, 22, 25, 28, 31, 34, + 37, 40, 43, 46, 49, 52, 55, 58, 61, 64, 67, 70, + 73, 76, 79, 82, 85, 88, 91, 94, 97, 100, 103, 106, + 109, 112, 115, 118, 121, 124, 127, 130, 133, 136, 139, 142, + 145, 148, 151, 154, 157, 160, 163, 166, 169, 172, 175, 178, + 181, 184, 187, 190, 193, 196, 199, 202, 205, 208, 211, 214, + 217, 220, 223, 226, 229, 232, 235, 238, 241, 244, 247, 250, + 253, 256, 259, 262, 265, 268, 271, 274, 277, 280, 283, 295, + 298, 301, 304, 307, 310, -1, + ], + name = "tch_hr", + description = ["TCH/H convolutional code"] + ), + + # TCH_AHS_7_95 definition + ConvolutionalCode( + 129, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 5, 7, 11, 15, 19, 23, 27, 31, 35, 43, + 47, 51, 55, 59, 63, 67, 71, 79, 83, 87, 91, 95, + 99, 103, 107, 115, 119, 123, 127, 131, 135, 139, 143, 151, + 155, 159, 163, 167, 171, 175, 177, 179, 183, 185, 187, 191, + 193, 195, 197, 199, 203, 205, 207, 211, 213, 215, 219, 221, + 223, 227, 229, 231, 233, 235, 239, 241, 243, 247, 249, 251, + 255, 257, 259, 261, 263, 265, -1, + ], + name = "tch_ahs_7_95", + description = ["TCH/AHS 7.95 kbits convolutional code"] + ), + + # TCH_AHS_7_4 definition + ConvolutionalCode( + 126, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 7, 11, 19, 23, 27, 35, 39, 43, 51, 55, + 59, 67, 71, 75, 83, 87, 91, 99, 103, 107, 115, 119, + 123, 131, 135, 139, 143, 147, 151, 155, 159, 163, 167, 171, + 175, 179, 183, 187, 191, 195, 199, 203, 207, 211, 215, 219, + 221, 223, 227, 229, 231, 235, 237, 239, 243, 245, 247, 251, + 253, 255, 257, 259, -1, + ], + name = "tch_ahs_7_4", + description = ["TCH/AHS 7.4 kbits convolutional code"] + ), + + # TCH_AHS_6_7 definition + ConvolutionalCode( + 116, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 3, 9, 19, 29, 39, 49, 59, 69, 79, 89, 99, + 109, 119, 129, 139, 149, 159, 167, 169, 177, 179, 187, 189, + 197, 199, 203, 207, 209, 213, 217, 219, 223, 227, 229, 231, + 233, 235, 237, 239, -1, + ], + name = "tch_ahs_6_7", + description = ["TCH/AHS 6.7 kbits convolutional code"] + ), + + # TCH_AHS_5_9 definition + ConvolutionalCode( + 108, + [ + ( 1, 1 ), + ( G1, G0 ), + ], + puncture = [ + 1, 15, 71, 127, 139, 151, 163, 175, 187, 195, 203, 211, + 215, 219, 221, 223, -1, + ], + name = "tch_ahs_5_9", + description = ["TCH/AHS 5.9 kbits convolutional code"] + ), + + # TCH_AHS_5_15 definition + ConvolutionalCode( + 97, + [ + ( G1, G3 ), + ( G2, G3 ), + ( 1, 1 ), + ], + puncture = [ + 0, 1, 3, 4, 6, 9, 12, 15, 18, 21, 27, 33, + 39, 45, 51, 54, 57, 63, 69, 75, 81, 87, 90, 93, + 99, 105, 111, 117, 123, 126, 129, 135, 141, 147, 153, 159, + 162, 165, 168, 171, 174, 177, 180, 183, 186, 189, 192, 195, + 198, 201, 204, 207, 210, 213, 216, 219, 222, 225, 228, 231, + 234, 237, 240, 243, 244, 246, 249, 252, 255, 256, 258, 261, + 264, 267, 268, 270, 273, 276, 279, 280, 282, 285, 288, 289, + 291, 294, 295, 297, 298, 300, 301, -1, + ], + name = "tch_ahs_5_15", + description = ["TCH/AHS 5.15 kbits convolutional code"] + ), + + # TCH_AHS_4_75 definition + ConvolutionalCode( + 89, + [ + ( 1, 1 ), + ( G5, G4 ), + ( G6, G4 ), + ], + puncture = [ + 1, 2, 4, 5, 7, 8, 10, 13, 16, 22, 28, 34, + 40, 46, 52, 58, 64, 70, 76, 82, 88, 94, 100, 106, + 112, 118, 124, 130, 136, 142, 148, 151, 154, 160, 163, 166, + 172, 175, 178, 184, 187, 190, 196, 199, 202, 208, 211, 214, + 220, 223, 226, 232, 235, 238, 241, 244, 247, 250, 253, 256, + 259, 262, 265, 268, 271, 274, 275, 277, 278, 280, 281, 283, + 284, -1, + ], + name = "tch_ahs_4_75", + description = ["TCH/AHS 4.75 kbits convolutional code"] + ), ] if __name__ == '__main__': -- cgit v1.2.3