mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
137 lines
11 KiB
C
137 lines
11 KiB
C
4 years ago
|
/**
|
||
5 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
5 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
5 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
5 years ago
|
*
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_RA_SL_H
|
||
|
#define SRSRAN_RA_SL_H
|
||
5 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_sl_get_available_pool_prb(uint32_t prb_num, uint32_t prb_start, uint32_t prb_end);
|
||
5 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_pscch_resources(uint32_t prb_num,
|
||
5 years ago
|
uint32_t prb_start,
|
||
|
uint32_t prb_end,
|
||
|
uint8_t* pscch_sf_bitmap,
|
||
|
uint32_t period_length,
|
||
|
uint32_t n_pscch,
|
||
|
uint32_t* m_a,
|
||
|
uint32_t* l_b);
|
||
|
|
||
4 years ago
|
SRSRAN_API uint32_t srsran_ra_sl_type0_to_riv(uint32_t nof_prb, uint32_t prb_start, uint32_t L_crb);
|
||
|
SRSRAN_API void srsran_ra_sl_type0_from_riv(uint32_t riv, uint32_t nof_prb, uint32_t* L_crb, uint32_t* prb_start);
|
||
|
SRSRAN_API int
|
||
|
srsran_ra_sl_pssch_allowed_sf(uint32_t pssch_sf_idx, uint32_t trp_idx, uint32_t duplex_mode, uint32_t tdd_config);
|
||
|
SRSRAN_API int srsran_sci_generate_trp_idx(uint32_t duplex_mode, uint32_t tdd_config, uint32_t k_TRP);
|
||
5 years ago
|
|
||
|
// TS 36.213 table 14.1.1.1.1-3: Time Resource pattern Index mapping for N_TRP = 6
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_6_k_1[] = {1, 2, 4, 8, 16, 32};
|
||
|
static const uint8_t srsran_sl_N_TRP_6_k_2[] = {3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33, 34, 36, 40, 48};
|
||
|
static const uint8_t srsran_sl_N_TRP_6_k_3[] = {7, 11, 13, 14, 19, 21, 22, 25, 26, 28,
|
||
5 years ago
|
35, 37, 38, 41, 42, 44, 49, 50, 52, 56};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_6_k_4[] = {15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54, 57, 58, 60};
|
||
|
static const uint8_t srsran_sl_N_TRP_6_k_5[] = {31, 47, 55, 59, 61, 62};
|
||
|
static const uint8_t srsran_sl_N_TRP_6_k_6[] = {63};
|
||
|
static const uint8_t srsran_sl_N_TRP_6[][6] = {
|
||
5 years ago
|
{0, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0}, {1, 1, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0},
|
||
|
{1, 0, 1, 0, 0, 0}, {0, 1, 1, 0, 0, 0}, {1, 1, 1, 0, 0, 0}, {0, 0, 0, 1, 0, 0}, {1, 0, 0, 1, 0, 0},
|
||
|
{0, 1, 0, 1, 0, 0}, {1, 1, 0, 1, 0, 0}, {0, 0, 1, 1, 0, 0}, {1, 0, 1, 1, 0, 0}, {0, 1, 1, 1, 0, 0},
|
||
|
{1, 1, 1, 1, 0, 0}, {0, 0, 0, 0, 1, 0}, {1, 0, 0, 0, 1, 0}, {0, 1, 0, 0, 1, 0}, {1, 1, 0, 0, 1, 0},
|
||
|
{0, 0, 1, 0, 1, 0}, {1, 0, 1, 0, 1, 0}, {0, 1, 1, 0, 1, 0}, {1, 1, 1, 0, 1, 0}, {0, 0, 0, 1, 1, 0},
|
||
|
{1, 0, 0, 1, 1, 0}, {0, 1, 0, 1, 1, 0}, {1, 1, 0, 1, 1, 0}, {0, 0, 1, 1, 1, 0}, {1, 0, 1, 1, 1, 0},
|
||
|
{0, 1, 1, 1, 1, 0}, {1, 1, 1, 1, 1, 0}, {0, 0, 0, 0, 0, 1}, {1, 0, 0, 0, 0, 1}, {0, 1, 0, 0, 0, 1},
|
||
|
{1, 1, 0, 0, 0, 1}, {0, 0, 1, 0, 0, 1}, {1, 0, 1, 0, 0, 1}, {0, 1, 1, 0, 0, 1}, {1, 1, 1, 0, 0, 1},
|
||
|
{0, 0, 0, 1, 0, 1}, {1, 0, 0, 1, 0, 1}, {0, 1, 0, 1, 0, 1}, {1, 1, 0, 1, 0, 1}, {0, 0, 1, 1, 0, 1},
|
||
|
{1, 0, 1, 1, 0, 1}, {0, 1, 1, 1, 0, 1}, {1, 1, 1, 1, 0, 1}, {0, 0, 0, 0, 1, 1}, {1, 0, 0, 0, 1, 1},
|
||
|
{0, 1, 0, 0, 1, 1}, {1, 1, 0, 0, 1, 1}, {0, 0, 1, 0, 1, 1}, {1, 0, 1, 0, 1, 1}, {0, 1, 1, 0, 1, 1},
|
||
|
{1, 1, 1, 0, 1, 1}, {0, 0, 0, 1, 1, 1}, {1, 0, 0, 1, 1, 1}, {0, 1, 0, 1, 1, 1}, {1, 1, 0, 1, 1, 1},
|
||
|
{0, 0, 1, 1, 1, 1}, {1, 0, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1}};
|
||
|
|
||
|
// TS 36.213 table 14.1.1.1.1-2: Time Resource pattern Index mapping for N_TRP = 7
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_7_k_1[] = {1, 2, 4, 8, 16, 32, 64};
|
||
|
static const uint8_t srsran_sl_N_TRP_7_k_2[] = {3, 5, 6, 9, 10, 12, 17, 18, 20, 24, 33,
|
||
5 years ago
|
34, 36, 40, 48, 65, 66, 68, 72, 80, 96};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_7_k_3[] = {7, 11, 13, 14, 19, 21, 22, 25, 26, 28, 35, 37,
|
||
5 years ago
|
38, 41, 42, 44, 49, 50, 52, 56, 67, 69, 70, 73,
|
||
|
74, 76, 81, 82, 84, 88, 97, 98, 100, 104, 112};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_7_k_4[] = {15, 23, 27, 29, 30, 39, 43, 45, 46, 51, 53, 54,
|
||
5 years ago
|
57, 58, 60, 71, 75, 77, 78, 83, 85, 86, 89, 90,
|
||
|
92, 99, 101, 102, 105, 106, 108, 113, 114, 116, 120};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_7_k_5[] = {31, 47, 55, 59, 61, 62, 79, 87, 91, 93, 94,
|
||
5 years ago
|
103, 107, 109, 110, 115, 117, 118, 121, 122, 124};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_7_k_6[] = {63, 95, 111, 119, 123, 125, 126};
|
||
|
static const uint8_t srsran_sl_N_TRP_7_k_7[] = {127};
|
||
|
static const uint8_t srsran_sl_N_TRP_7[][7] = {
|
||
5 years ago
|
{0, 0, 0, 0, 0, 0, 0}, {1, 0, 0, 0, 0, 0, 0}, {0, 1, 0, 0, 0, 0, 0}, {1, 1, 0, 0, 0, 0, 0}, {0, 0, 1, 0, 0, 0, 0},
|
||
|
{1, 0, 1, 0, 0, 0, 0}, {0, 1, 1, 0, 0, 0, 0}, {1, 1, 1, 0, 0, 0, 0}, {0, 0, 0, 1, 0, 0, 0}, {1, 0, 0, 1, 0, 0, 0},
|
||
|
{0, 1, 0, 1, 0, 0, 0}, {1, 1, 0, 1, 0, 0, 0}, {0, 0, 1, 1, 0, 0, 0}, {1, 0, 1, 1, 0, 0, 0}, {0, 1, 1, 1, 0, 0, 0},
|
||
|
{1, 1, 1, 1, 0, 0, 0}, {0, 0, 0, 0, 1, 0, 0}, {1, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 1, 0, 0}, {1, 1, 0, 0, 1, 0, 0},
|
||
|
{0, 0, 1, 0, 1, 0, 0}, {1, 0, 1, 0, 1, 0, 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0, 1, 1, 1, 0, 1, 1}, {1, 1, 1, 1, 0, 1, 1}, {0, 0, 0, 0, 1, 1, 1}, {1, 0, 0, 0, 1, 1, 1}, {0, 1, 0, 0, 1, 1, 1},
|
||
|
{1, 1, 0, 0, 1, 1, 1}, {0, 0, 1, 0, 1, 1, 1}, {1, 0, 1, 0, 1, 1, 1}, {0, 1, 1, 0, 1, 1, 1}, {1, 1, 1, 0, 1, 1, 1},
|
||
|
{0, 0, 0, 1, 1, 1, 1}, {1, 0, 0, 1, 1, 1, 1}, {0, 1, 0, 1, 1, 1, 1}, {1, 1, 0, 1, 1, 1, 1}, {0, 0, 1, 1, 1, 1, 1},
|
||
|
{1, 0, 1, 1, 1, 1, 1}, {0, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1}};
|
||
|
|
||
|
// TS 36.213 table 14.1.1.1.1-1: Time Resource pattern Index mapping for N_TRP = 8
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_8_k_1[] = {0, 1, 2, 3, 4, 5, 6, 7};
|
||
|
static const uint8_t srsran_sl_N_TRP_8_k_2[] = {8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
|
||
5 years ago
|
22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_8_k_4[] = {
|
||
5 years ago
|
36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
|
||
|
60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83,
|
||
|
84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105};
|
||
4 years ago
|
static const uint8_t srsran_sl_N_TRP_8_k_8[] = {106};
|
||
|
static const uint8_t srsran_sl_N_TRP_8[][8] = {
|
||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