cleanup only

This commit is contained in:
laurent
2023-04-28 16:25:24 +02:00
committed by Laurent THOMAS
parent 6022fe5acd
commit b339460666
93 changed files with 38876 additions and 5864 deletions
-4
View File
@@ -775,7 +775,6 @@ add_library(UTIL
set(SECU_OSA_SRC
${OPENAIR2_DIR}/UTIL/OSA/osa_key_deriver.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eea.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
@@ -1178,7 +1177,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/dmrs_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_ul_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_ESTIMATION/nr_measurements_gNB.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
@@ -1229,7 +1227,6 @@ set(PHY_SRC_UE
${OPENAIR1_DIR}/PHY/NR_REFSIG/ptrs_nr.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gold_ue.c
${OPENAIR1_DIR}/PHY/NR_REFSIG/nr_gen_mod_table.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/filt16a_32.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_adjust_synch_ue.c
${OPENAIR1_DIR}/PHY/NR_UE_ESTIMATION/nr_ue_measurements.c
@@ -1355,7 +1352,6 @@ set(NR_PDCP_SRC
#of reusing code of osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_stream_eia.c
${OPENAIR2_DIR}/UTIL/OSA/osa_snow3g.c
${OPENAIR2_DIR}/UTIL/OSA/osa_rijndael.c
)
set(NR_SDAP_SRC
+23 -26
View File
@@ -45,6 +45,7 @@
#include "common/config/config_userapi.h"
#include <time.h>
#include <sys/time.h>
#include "common/utils/LOG/log_extern.h"
// main log variables
@@ -66,32 +67,30 @@ char __log_mem_filename[1024]={0};
char * log_mem_filename = &__log_mem_filename[0];
char logmem_filename[1024] = {0};
mapping log_level_names[] = {
{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}
};
const mapping log_level_names[] = {{"error", OAILOG_ERR},
{"warn", OAILOG_WARNING},
{"analysis", OAILOG_ANALYSIS},
{"info", OAILOG_INFO},
{"debug", OAILOG_DEBUG},
{"trace", OAILOG_TRACE},
{NULL, -1}};
mapping log_options[] = {
{"nocolor", FLAG_NOCOLOR },
{"level", FLAG_LEVEL },
{"thread", FLAG_THREAD },
{"line_num", FLAG_FILE_LINE },
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL,-1}
};
const mapping log_options[] = {{"nocolor", FLAG_NOCOLOR},
{"level", FLAG_LEVEL},
{"thread", FLAG_THREAD},
{"line_num", FLAG_FILE_LINE},
{"function", FLAG_FUNCT},
{"time", FLAG_TIME},
{"thread_id", FLAG_THREAD_ID},
{"wall_clock", FLAG_REAL_TIME},
{NULL, -1}};
mapping log_maskmap[] = LOG_MASKMAP_INIT;
char *log_level_highlight_start[] = {LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
char *log_level_highlight_end[] = {LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static const char *log_level_highlight_start[] =
{LOG_RED, LOG_ORANGE, LOG_GREEN, "", LOG_BLUE, LOG_CYBL}; /*!< \brief Optional start-format strings for highlighting */
static const char *log_level_highlight_end[] =
{LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET, LOG_RESET}; /*!< \brief Optional end-format strings for highlighting */
static void log_output_memory(log_component_t *c, const char *file, const char *func, int line, int comp, int level, const char* format,va_list args);
@@ -754,8 +753,7 @@ void close_component_filelog(int comp)
* with string value NULL
*/
/* map a string to an int. Takes a mapping array and a string as arg */
int map_str_to_int(mapping *map,
const char *str)
int map_str_to_int(const mapping *map, const char *str)
{
while (1) {
if (map->name == NULL) {
@@ -771,8 +769,7 @@ int map_str_to_int(mapping *map,
}
/* map an int to a string. Takes a mapping array and a value */
char *map_int_to_str(mapping *map,
int val)
char *map_int_to_str(const mapping *map, const int val)
{
while (1) {
if (map->name == NULL) {
+2 -2
View File
@@ -315,8 +315,8 @@ void set_glog_filelog(int enable);
void set_component_filelog(int comp);
void close_component_filelog(int comp);
void set_component_consolelog(int comp);
int map_str_to_int(mapping *map, const char *str);
char *map_int_to_str(mapping *map, int val);
int map_str_to_int(const mapping *map, const char *str);
char *map_int_to_str(const mapping *map, const int val);
void logClean (void);
int is_newline( char *str, int size);
+2 -3
View File
@@ -23,9 +23,8 @@
extern log_t *g_log;
extern mapping log_level_names[];
extern mapping log_options[];
extern const mapping log_level_names[];
extern const mapping log_options[];
extern mapping log_maskmap[];
extern int log_mem_flag;
extern char * log_mem_filename;
+4 -4
View File
@@ -28,10 +28,10 @@
//#define DEBUG_CCODE 1
unsigned short glte[] = { 0133, 0171, 0165 }; // {A,B}
unsigned short glte_rev[] = { 0155, 0117, 0127 }; // {A,B}
unsigned short gdab[] = { 0133, 0171, 0145 }; // {A,B}
unsigned short gdab_rev[] = { 0155, 0117, 0123 }; // {A,B}
static const unsigned short glte[] = {0133, 0171, 0165}; // {A,B}
static const unsigned short glte_rev[] = {0155, 0117, 0127}; // {A,B}
static const unsigned short gdab[] = {0133, 0171, 0145}; // {A,B}
static const unsigned short gdab_rev[] = {0155, 0117, 0123}; // {A,B}
unsigned char ccodelte_table[128]; // for transmitter
unsigned char ccodelte_table_rev[128]; // for receiver
+31 -33
View File
@@ -44,18 +44,20 @@
/*ref 36-212 v8.6.0 , pp 8-9 */
/* the highest degree is set by default */
uint32_t poly24a = 0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
uint32_t poly11 = 0xc4200000; //11000100001000... -> D^11+D^10+D^9+D^5+1
static const uint32_t poly24a =
0x864cfb00; // 1000 0110 0100 1100 1111 1011
// D^24 + D^23 + D^18 + D^17 + D^14 + D^11 + D^10 + D^7 + D^6 + D^5 + D^4 + D^3 + D + 1
static const uint32_t poly24b = 0x80006300; // 1000 0000 0000 0000 0110 0011
// D^24 + D^23 + D^6 + D^5 + D + 1
static const uint32_t poly24c = 0xb2b11700; // 1011 0010 1011 0001 0001 0111
// D^24+D^23+D^21+D^20+D^17+D^15+D^13+D^12+D^8+D^4+D^2+D+1
static const uint32_t poly16 = 0x10210000; // 0001 0000 0010 0001 D^16 + D^12 + D^5 + 1
static const uint32_t poly12 = 0x80F00000; // 1000 0000 1111 D^12 + D^11 + D^3 + D^2 + D + 1
static const uint32_t poly8 = 0x9B000000; // 1001 1011 D^8 + D^7 + D^4 + D^3 + D + 1
static const uint32_t poly6 = 0x84000000; // 10000100000... -> D^6+D^5+1
static const uint32_t poly11 = 0xc4200000; // 11000100001000... -> D^11+D^10+D^9+D^5+1
/*********************************************************
@@ -100,24 +102,20 @@ static uint32_t crc8Table[256];
static uint32_t crc6Table[256];
#if USE_INTEL_CRC
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq, 16) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
static const struct crc_pclmulqdq_ctx lte_crc24a_pclmulqdq __attribute__((aligned(16))) = {
0x64e4d700, /**< k1 */
0x2c8c9d00, /**< k2 */
0xd9fe8c00, /**< k3 */
0xf845fe24, /**< q */
0x864cfb00, /**< p */
0ULL /**< res */
};
__m128i crc_xmm_be_le_swap128;
DECLARE_ALIGNED(const uint8_t crc_xmm_shift_tab[48], 16) = {
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff
};
const uint8_t crc_xmm_shift_tab[48]
__attribute__((aligned(16))) = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
#endif
@@ -176,13 +174,13 @@ uint32_t crc24a(unsigned char* inptr, int bitlen)
}
#if USE_INTEL_CRC
static DECLARE_ALIGNED(struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq, 16) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
static const struct crc_pclmulqdq_ctx lte_crc24b_pclmulqdq __attribute__((aligned(16))) = {
0x80140500, /**< k1 */
0x42000100, /**< k2 */
0x90042100, /**< k3 */
0xffff83ff, /**< q */
0x80006300, /**< p */
0ULL /**< res */
};
#endif
uint32_t crc24b(unsigned char* inptr, int bitlen)
+6 -3
View File
@@ -33,9 +33,12 @@
//#define cmin(a,b) ((a)<(b) ? (a) : (b))
static uint32_t bitrev[32] = {0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30,1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31};
static uint32_t bitrev_x3[32] = {0,48,24,72,12,60,36,84,6,54,30,78,18,66,42,90,3,51,27,75,15,63,39,87,9,57,33,81,21,69,45,93};
static uint32_t bitrev_cc[32] = {1,17,9,25,5,21,13,29,3,19,11,27,7,23,15,31,0,16,8,24,4,20,12,28,2,18,10,26,6,22,14,30};
static const uint32_t bitrev[32] = {0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30,
1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31};
static const uint32_t bitrev_x3[32] = {0, 48, 24, 72, 12, 60, 36, 84, 6, 54, 30, 78, 18, 66, 42, 90,
3, 51, 27, 75, 15, 63, 39, 87, 9, 57, 33, 81, 21, 69, 45, 93};
static const uint32_t bitrev_cc[32] = {1, 17, 9, 25, 5, 21, 13, 29, 3, 19, 11, 27, 7, 23, 15, 31,
0, 16, 8, 24, 4, 20, 12, 28, 2, 18, 10, 26, 6, 22, 14, 30};
//#define RM_DEBUG_TX 1
//#define RM_DEBUG 1
@@ -22,12 +22,12 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
// ----- Old implementation ----
uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[25] = {1,1,0,1,1,0,0,1,0,1,0,1,1,0,0,0,1,0,0,0,1,0,1,1,1};
// 1011 0010 1011 0001 0001 0111 D^24 + D^23 + D^21 + D^20 + D^17 + D^15 + D^13 + D^12 + D^8 + D^4 + D^2 + D + 1
uint8_t crcPolynomialSize = 24;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits)
{
uint8_t crcPolynomialPattern[25] = {1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1};
// 1011 0010 1011 0001 0001 0111 D^24 + D^23 + D^21 + D^20 + D^17 + D^15 + D^13 + D^12 + D^8 + D^4 + D^2 + D + 1
uint8_t crcPolynomialSize = 24;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits*sizeof(uint8_t *) + payloadSizeBits*crcPolynomialSize*sizeof(uint8_t));
if (crc_generator_matrix)
@@ -52,74 +52,5 @@ uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits){
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
}
uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[12] = {1,1,1,0,0,0,1,0,0,0,0,1};
// 1110 0010 0001 D^11 + D^10 + D^9 + D^5 + 1
uint8_t crcPolynomialSize = 11;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits * sizeof(uint8_t *));
if (crc_generator_matrix)
for (int i = 0; i < payloadSizeBits; i++)
crc_generator_matrix[i] = malloc(crcPolynomialSize * sizeof(uint8_t));
for (int i = 0; i < crcPolynomialSize; i++) crc_generator_matrix[payloadSizeBits-1][i]=crcPolynomialPattern[i+1];
for (int i = payloadSizeBits-2; i >= 0; i--){
for (int j = 0; j < crcPolynomialSize-1; j++)
temp1[j]=crc_generator_matrix[i+1][j+1];
temp1[crcPolynomialSize-1]=0;
for (int j = 0; j < crcPolynomialSize; j++)
temp2[j]=crc_generator_matrix[i+1][0]*crcPolynomialPattern[j+1];
for (int j = 0; j < crcPolynomialSize; j++){
if(temp1[j]+temp2[j] == 1)
crc_generator_matrix[i][j]=1;
else
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
}
uint8_t **crc6_generator_matrix(uint16_t payloadSizeBits){
uint8_t crcPolynomialPattern[7] = {1,1,0,0,0,0,1};
// 0110 0001 D^6 + D^5 + 1
uint8_t crcPolynomialSize = 6;
uint8_t temp1[crcPolynomialSize], temp2[crcPolynomialSize];
uint8_t **crc_generator_matrix = malloc(payloadSizeBits * sizeof(uint8_t *));
if (crc_generator_matrix)
for (int i = 0; i < payloadSizeBits; i++)
crc_generator_matrix[i] = malloc(crcPolynomialSize * sizeof(uint8_t));
for (int i = 0; i < crcPolynomialSize; i++)
crc_generator_matrix[payloadSizeBits-1][i]=crcPolynomialPattern[i+1];
for (int i = payloadSizeBits-2; i >= 0; i--){
for (int j = 0; j < crcPolynomialSize-1; j++)
temp1[j]=crc_generator_matrix[i+1][j+1];
temp1[crcPolynomialSize-1]=0;
for (int j = 0; j < crcPolynomialSize; j++)
temp2[j]=crc_generator_matrix[i+1][0]*crcPolynomialPattern[j+1];
for (int j = 0; j < crcPolynomialSize; j++){
if(temp1[j]+temp2[j] == 1)
crc_generator_matrix[i][j]=1;
else
crc_generator_matrix[i][j]=0;
}
}
return crc_generator_matrix;
return (const uint8_t **)crc_generator_matrix;
}
@@ -366,7 +366,7 @@ void applyGtoright(const t_nrPolar_params *pp,decoder_node_t *node) {
}
}
int16_t all1[16] = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
static const int16_t all1[16] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
void computeBeta(const t_nrPolar_params *pp,decoder_node_t *node) {
@@ -109,8 +109,8 @@ struct nrPolar_params {
uint16_t *channel_interleaver_pattern;
//uint32_t crc_polynomial;
uint8_t **crc_generator_matrix; //G_P
uint8_t **G_N;
const uint8_t **crc_generator_matrix; // G_P
const uint8_t **G_N;
uint64_t **G_N_tab;
int groupsize;
int *rm_tab;
@@ -205,7 +205,7 @@ t_nrPolar_params *nr_polar_params (int8_t messageType,
uint16_t nr_polar_aggregation_prime (uint8_t aggregation_level);
uint8_t **nr_polar_kronecker_power_matrices(uint8_t n);
const uint8_t **nr_polar_kronecker_power_matrices(uint8_t n);
const uint16_t *nr_polar_sequence_pattern(uint8_t n);
@@ -270,11 +270,7 @@ void nr_byte2bit_uint8_32(uint8_t *in,
uint16_t arraySize,
uint32_t *out);
uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits);
uint8_t **crc11_generator_matrix(uint16_t payloadSizeBits);
uint8_t **crc6_generator_matrix(uint16_t payloadSizeBits);
const uint8_t **crc24c_generator_matrix(uint16_t payloadSizeBits);
void nr_polar_bit_insertion(uint8_t *input,
uint8_t *output,
@@ -284,11 +280,11 @@ void nr_polar_bit_insertion(uint8_t *input,
int16_t *Q_PC_N,
uint8_t n_PC);
void nr_matrix_multiplication_uint8_1D_uint8_2D(uint8_t *matrix1,
uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col);
void nr_matrix_multiplication_uint8_1D_uint8_2D(const uint8_t *matrix1,
const uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col);
void nr_sort_asc_double_1D_array_ind(double *matrix,
uint8_t *ind,
File diff suppressed because it is too large Load Diff
@@ -32,15 +32,18 @@
#include "PHY/CODING/nrPolar_tools/nr_polar_defs.h"
void nr_matrix_multiplication_uint8_1D_uint8_2D(uint8_t *matrix1, uint8_t **matrix2,
uint8_t *output, uint16_t row, uint16_t col) {
for (uint16_t i = 0; i < col; i++) {
output[i] = 0;
for (uint16_t j = 0; j < row; j++) {
void nr_matrix_multiplication_uint8_1D_uint8_2D(const uint8_t *matrix1,
const uint8_t **matrix2,
uint8_t *output,
uint16_t row,
uint16_t col)
{
for (uint16_t i = 0; i < col; i++) {
output[i] = 0;
for (uint16_t j = 0; j < row; j++) {
output[i] += matrix1[j] * matrix2[j][i];
}
}
}
}
// Modified Bubble Sort.
File diff suppressed because one or more lines are too long
+2 -7
View File
@@ -36,15 +36,10 @@
#include <math.h>
#include "nfapi/oai_integration/vendor_ext.h"
#include <openair1/PHY/LTE_ESTIMATION/lte_estimation.h>
extern uint32_t from_earfcn(int eutra_bandP,uint32_t dl_earfcn);
extern int32_t get_uldl_offset(int eutra_bandP);
extern uint16_t prach_root_sequence_map0_3[838];
extern uint16_t prach_root_sequence_map4[138];
uint8_t dmrs1_tab[8] = { 0, 2, 3, 4, 6, 8, 9, 10 };
const uint8_t dmrs1_tab[8] = {0, 2, 3, 4, 6, 8, 9, 10};
int N_RB_DL_array[6] = { 6, 15, 25, 50, 75, 100 };
const int N_RB_DL_array[6] = {6, 15, 25, 50, 75, 100};
#include "common/ran_context.h"
extern RAN_CONTEXT_t RC;
+1 -2
View File
@@ -35,6 +35,7 @@
#include "PHY/LTE_UE_TRANSPORT/transport_proto_ue.h"
#include "PHY/LTE_REFSIG/lte_refsig.h"
#include "nfapi/oai_integration/vendor_ext.h"
#include "PHY/phy_extern.h"
void init_7_5KHz(void);
uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
@@ -360,8 +361,6 @@ void phy_config_harq_ue(module_id_t Mod_id,
phy_vars_ue->ulsch[eNB_id]->Mlimit = max_harq_tx;
}
extern uint16_t beta_cqi[16];
void phy_config_dedicated_ue(module_id_t Mod_id,int CC_id,uint8_t eNB_id,
struct LTE_PhysicalConfigDedicated *physicalConfigDedicated ) {
static uint8_t first_dedicated_configuration = 0;
+2 -2
View File
@@ -22,8 +22,8 @@
#include "phy_init.h"
#include "common/utils/LOG/log.h"
uint16_t dl_S_table_normal[10]= {3,9,10,11,12,3,9,10,11,6};
uint16_t dl_S_table_extended[10]= {3,8,9,10,3,8,9,5,0,0};
static const uint16_t dl_S_table_normal[10] = {3, 9, 10, 11, 12, 3, 9, 10, 11, 6};
static const uint16_t dl_S_table_extended[10] = {3, 8, 9, 10, 3, 8, 9, 5, 0, 0};
void set_S_config(LTE_DL_FRAME_PARMS *fp) {
int X = fp->srsX;
-3
View File
@@ -36,9 +36,6 @@
#include "openair2/COMMON/prs_nr_paramdef.h"
#include "SCHED_NR_UE/harq_nr.h"
extern uint16_t beta_cqi[16];
void RCconfig_nrUE_prs(void *cfg)
{
int j = 0, k = 0, gNB_id = 0;
+13 -53
View File
@@ -24,61 +24,21 @@
#include "common/utils/LOG/log.h"
/// Subcarrier spacings in Hz indexed by numerology index
uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
static const uint32_t nr_subcarrier_spacing[MAX_NUM_SUBCARRIER_SPACING] = {15e3, 30e3, 60e3, 120e3, 240e3};
static const uint16_t nr_slots_per_subframe[MAX_NUM_SUBCARRIER_SPACING] = {1, 2, 4, 8, 16};
// Table 5.4.3.3-1 38-101
int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A},
{2, 15, nr_ssb_type_A},
{3, 15, nr_ssb_type_A},
{5, 15, nr_ssb_type_A},
{5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A},
{8, 15, nr_ssb_type_A},
{12, 15, nr_ssb_type_A},
{14, 15, nr_ssb_type_A},
{18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A},
{25, 15, nr_ssb_type_A},
{26, 15, nr_ssb_type_A},
{28, 15, nr_ssb_type_A},
{29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A},
{34, 15, nr_ssb_type_A},
{34, 30, nr_ssb_type_C},
{38, 15, nr_ssb_type_A},
{38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A},
{39, 30, nr_ssb_type_C},
{40, 30, nr_ssb_type_C},
{41, 15, nr_ssb_type_A},
{41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C},
{48, 30, nr_ssb_type_C},
{50, 30, nr_ssb_type_C},
{51, 15, nr_ssb_type_A},
{53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A},
{66, 15, nr_ssb_type_A},
{66, 30, nr_ssb_type_B},
{70, 15, nr_ssb_type_A},
{71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A},
{75, 15, nr_ssb_type_A},
{76, 15, nr_ssb_type_A},
{77, 30, nr_ssb_type_C},
{78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C},
{90, 15, nr_ssb_type_A},
{90, 30, nr_ssb_type_C},
{91, 15, nr_ssb_type_A},
{92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A},
{94, 15, nr_ssb_type_A},
{96, 30, nr_ssb_type_C}
};
static const int nr_ssb_table[48][3] = {
{1, 15, nr_ssb_type_A}, {2, 15, nr_ssb_type_A}, {3, 15, nr_ssb_type_A}, {5, 15, nr_ssb_type_A}, {5, 30, nr_ssb_type_B},
{7, 15, nr_ssb_type_A}, {8, 15, nr_ssb_type_A}, {12, 15, nr_ssb_type_A}, {14, 15, nr_ssb_type_A}, {18, 15, nr_ssb_type_A},
{20, 15, nr_ssb_type_A}, {25, 15, nr_ssb_type_A}, {26, 15, nr_ssb_type_A}, {28, 15, nr_ssb_type_A}, {29, 15, nr_ssb_type_A},
{30, 15, nr_ssb_type_A}, {34, 15, nr_ssb_type_A}, {34, 30, nr_ssb_type_C}, {38, 15, nr_ssb_type_A}, {38, 30, nr_ssb_type_C},
{39, 15, nr_ssb_type_A}, {39, 30, nr_ssb_type_C}, {40, 30, nr_ssb_type_C}, {41, 15, nr_ssb_type_A}, {41, 30, nr_ssb_type_C},
{46, 30, nr_ssb_type_C}, {48, 30, nr_ssb_type_C}, {50, 30, nr_ssb_type_C}, {51, 15, nr_ssb_type_A}, {53, 15, nr_ssb_type_A},
{65, 15, nr_ssb_type_A}, {66, 15, nr_ssb_type_A}, {66, 30, nr_ssb_type_B}, {70, 15, nr_ssb_type_A}, {71, 15, nr_ssb_type_A},
{74, 15, nr_ssb_type_A}, {75, 15, nr_ssb_type_A}, {76, 15, nr_ssb_type_A}, {77, 30, nr_ssb_type_C}, {78, 30, nr_ssb_type_C},
{79, 30, nr_ssb_type_C}, {90, 15, nr_ssb_type_A}, {90, 30, nr_ssb_type_C}, {91, 15, nr_ssb_type_A}, {92, 15, nr_ssb_type_A},
{93, 15, nr_ssb_type_A}, {94, 15, nr_ssb_type_A}, {96, 30, nr_ssb_type_C}};
void set_Lmax(NR_DL_FRAME_PARMS *fp) {
// definition of Lmax according to ts 38.213 section 4.1
@@ -29,9 +29,40 @@
#include "openair1/PHY/LTE_TRANSPORT/transport_vars.h"
// round(exp(sqrt(-1)*(pi/2)*[0:1:N-1]/N)*pow2(15))
static int16_t ru_90[2*128] = {32767, 0,32766, 402,32758, 804,32746, 1206,32729, 1608,32706, 2009,32679, 2411,32647, 2811,32610, 3212,32568, 3612,32522, 4011,32470, 4410,32413, 4808,32352, 5205,32286, 5602,32214, 5998,32138, 6393,32058, 6787,31972, 7180,31881, 7571,31786, 7962,31686, 8351,31581, 8740,31471, 9127,31357, 9512,31238, 9896,31114, 10279,30986, 10660,30853, 11039,30715, 11417,30572, 11793,30425, 12167,30274, 12540,30118, 12910,29957, 13279,29792, 13646,29622, 14010,29448, 14373,29269, 14733,29086, 15091,28899, 15447,28707, 15800,28511, 16151,28311, 16500,28106, 16846,27897, 17190,27684, 17531,27467, 17869,27246, 18205,27020, 18538,26791, 18868,26557, 19195,26320, 19520,26078, 19841,25833, 20160,25583, 20475,25330, 20788,25073, 21097,24812, 21403,24548, 21706,24279, 22006,24008, 22302,23732, 22595,23453, 22884,23170, 23170,22884, 23453,22595, 23732,22302, 24008,22006, 24279,21706, 24548,21403, 24812,21097, 25073,20788, 25330,20475, 25583,20160, 25833,19841, 26078,19520, 26320,19195, 26557,18868, 26791,18538, 27020,18205, 27246,17869, 27467,17531, 27684,17190, 27897,16846, 28106,16500, 28311,16151, 28511,15800, 28707,15447, 28899,15091, 29086,14733, 29269,14373, 29448,14010, 29622,13646, 29792,13279, 29957,12910, 30118,12540, 30274,12167, 30425,11793, 30572,11417, 30715,11039, 30853,10660, 30986,10279, 31114,9896, 31238,9512, 31357,9127, 31471,8740, 31581,8351, 31686,7962, 31786,7571, 31881,7180, 31972,6787, 32058,6393, 32138,5998, 32214,5602, 32286,5205, 32352,4808, 32413,4410, 32470,4011, 32522,3612, 32568,3212, 32610,2811, 32647,2411, 32679,2009, 32706,1608, 32729,1206, 32746,804, 32758,402, 32766};
static const int16_t ru_90[2 * 128] = {
32767, 0, 32766, 402, 32758, 804, 32746, 1206, 32729, 1608, 32706, 2009, 32679, 2411, 32647, 2811, 32610, 3212,
32568, 3612, 32522, 4011, 32470, 4410, 32413, 4808, 32352, 5205, 32286, 5602, 32214, 5998, 32138, 6393, 32058, 6787,
31972, 7180, 31881, 7571, 31786, 7962, 31686, 8351, 31581, 8740, 31471, 9127, 31357, 9512, 31238, 9896, 31114, 10279,
30986, 10660, 30853, 11039, 30715, 11417, 30572, 11793, 30425, 12167, 30274, 12540, 30118, 12910, 29957, 13279, 29792, 13646,
29622, 14010, 29448, 14373, 29269, 14733, 29086, 15091, 28899, 15447, 28707, 15800, 28511, 16151, 28311, 16500, 28106, 16846,
27897, 17190, 27684, 17531, 27467, 17869, 27246, 18205, 27020, 18538, 26791, 18868, 26557, 19195, 26320, 19520, 26078, 19841,
25833, 20160, 25583, 20475, 25330, 20788, 25073, 21097, 24812, 21403, 24548, 21706, 24279, 22006, 24008, 22302, 23732, 22595,
23453, 22884, 23170, 23170, 22884, 23453, 22595, 23732, 22302, 24008, 22006, 24279, 21706, 24548, 21403, 24812, 21097, 25073,
20788, 25330, 20475, 25583, 20160, 25833, 19841, 26078, 19520, 26320, 19195, 26557, 18868, 26791, 18538, 27020, 18205, 27246,
17869, 27467, 17531, 27684, 17190, 27897, 16846, 28106, 16500, 28311, 16151, 28511, 15800, 28707, 15447, 28899, 15091, 29086,
14733, 29269, 14373, 29448, 14010, 29622, 13646, 29792, 13279, 29957, 12910, 30118, 12540, 30274, 12167, 30425, 11793, 30572,
11417, 30715, 11039, 30853, 10660, 30986, 10279, 31114, 9896, 31238, 9512, 31357, 9127, 31471, 8740, 31581, 8351, 31686,
7962, 31786, 7571, 31881, 7180, 31972, 6787, 32058, 6393, 32138, 5998, 32214, 5602, 32286, 5205, 32352, 4808, 32413,
4410, 32470, 4011, 32522, 3612, 32568, 3212, 32610, 2811, 32647, 2411, 32679, 2009, 32706, 1608, 32729, 1206, 32746,
804, 32758, 402, 32766};
static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32729, -1608,32706, -2009,32679, -2411,32647, -2811,32610, -3212,32568, -3612,32522, -4011,32470, -4410,32413, -4808,32352, -5205,32286, -5602,32214, -5998,32138, -6393,32058, -6787,31972, -7180,31881, -7571,31786, -7962,31686, -8351,31581, -8740,31471, -9127,31357, -9512,31238, -9896,31114, -10279,30986, -10660,30853, -11039,30715, -11417,30572, -11793,30425, -12167,30274, -12540,30118, -12910,29957, -13279,29792, -13646,29622, -14010,29448, -14373,29269, -14733,29086, -15091,28899, -15447,28707, -15800,28511, -16151,28311, -16500,28106, -16846,27897, -17190,27684, -17531,27467, -17869,27246, -18205,27020, -18538,26791, -18868,26557, -19195,26320, -19520,26078, -19841,25833, -20160,25583, -20475,25330, -20788,25073, -21097,24812, -21403,24548, -21706,24279, -22006,24008, -22302,23732, -22595,23453, -22884,23170, -23170,22884, -23453,22595, -23732,22302, -24008,22006, -24279,21706, -24548,21403, -24812,21097, -25073,20788, -25330,20475, -25583,20160, -25833,19841, -26078,19520, -26320,19195, -26557,18868, -26791,18538, -27020,18205, -27246,17869, -27467,17531, -27684,17190, -27897,16846, -28106,16500, -28311,16151, -28511,15800, -28707,15447, -28899,15091, -29086,14733, -29269,14373, -29448,14010, -29622,13646, -29792,13279, -29957,12910, -30118,12540, -30274,12167, -30425,11793, -30572,11417, -30715,11039, -30853,10660, -30986,10279, -31114,9896, -31238,9512, -31357,9127, -31471,8740, -31581,8351, -31686,7962, -31786,7571, -31881,7180, -31972,6787, -32058,6393, -32138,5998, -32214,5602, -32286,5205, -32352,4808, -32413,4410, -32470,4011, -32522,3612, -32568,3212, -32610,2811, -32647,2411, -32679,2009, -32706,1608, -32729,1206, -32746,804, -32758,402, -32766};
static const int16_t ru_90c[2 * 128] = {
32767, 0, 32766, -402, 32758, -804, 32746, -1206, 32729, -1608, 32706, -2009, 32679, -2411, 32647, -2811,
32610, -3212, 32568, -3612, 32522, -4011, 32470, -4410, 32413, -4808, 32352, -5205, 32286, -5602, 32214, -5998,
32138, -6393, 32058, -6787, 31972, -7180, 31881, -7571, 31786, -7962, 31686, -8351, 31581, -8740, 31471, -9127,
31357, -9512, 31238, -9896, 31114, -10279, 30986, -10660, 30853, -11039, 30715, -11417, 30572, -11793, 30425, -12167,
30274, -12540, 30118, -12910, 29957, -13279, 29792, -13646, 29622, -14010, 29448, -14373, 29269, -14733, 29086, -15091,
28899, -15447, 28707, -15800, 28511, -16151, 28311, -16500, 28106, -16846, 27897, -17190, 27684, -17531, 27467, -17869,
27246, -18205, 27020, -18538, 26791, -18868, 26557, -19195, 26320, -19520, 26078, -19841, 25833, -20160, 25583, -20475,
25330, -20788, 25073, -21097, 24812, -21403, 24548, -21706, 24279, -22006, 24008, -22302, 23732, -22595, 23453, -22884,
23170, -23170, 22884, -23453, 22595, -23732, 22302, -24008, 22006, -24279, 21706, -24548, 21403, -24812, 21097, -25073,
20788, -25330, 20475, -25583, 20160, -25833, 19841, -26078, 19520, -26320, 19195, -26557, 18868, -26791, 18538, -27020,
18205, -27246, 17869, -27467, 17531, -27684, 17190, -27897, 16846, -28106, 16500, -28311, 16151, -28511, 15800, -28707,
15447, -28899, 15091, -29086, 14733, -29269, 14373, -29448, 14010, -29622, 13646, -29792, 13279, -29957, 12910, -30118,
12540, -30274, 12167, -30425, 11793, -30572, 11417, -30715, 11039, -30853, 10660, -30986, 10279, -31114, 9896, -31238,
9512, -31357, 9127, -31471, 8740, -31581, 8351, -31686, 7962, -31786, 7571, -31881, 7180, -31972, 6787, -32058,
6393, -32138, 5998, -32214, 5602, -32286, 5205, -32352, 4808, -32413, 4410, -32470, 4011, -32522, 3612, -32568,
3212, -32610, 2811, -32647, 2411, -32679, 2009, -32706, 1608, -32729, 1206, -32746, 804, -32758, 402, -32766};
#define SCALE 0x3FFF
@@ -51,8 +82,8 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
uint8_t harq_pid;
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
const int16_t *ru1 = ru_90;
const int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2;
uint16_t aa,Msc_RS,Msc_RS_idx;
uint16_t *Msc_idx_ptr;
@@ -67,8 +98,8 @@ int32_t lte_ul_channel_estimation(LTE_DL_FRAME_PARMS *frame_parms,
uint32_t v=frame_parms->pusch_config_common.ul_ReferenceSignalsPUSCH.seqhop[Ns+(subframe<<1)];
int symbol_offset,i;
//debug_msg("lte_ul_channel_estimation: cyclic shift %d\n",cyclicShift);
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
#if defined(__x86_64__) || defined(__i386__)
__m128i *rxdataF128,*ul_ref128,*ul_ch128;
__m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
@@ -390,8 +421,8 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
int interpolate,
uint16_t rnti) {
int16_t delta_phase = 0;
int16_t *ru1 = ru_90;
int16_t *ru2 = ru_90;
const int16_t *ru1 = ru_90;
const int16_t *ru2 = ru_90;
int16_t current_phase1,current_phase2;
uint16_t aa,Msc_RS,Msc_RS_idx;
uint16_t *Msc_idx_ptr;
@@ -403,8 +434,8 @@ int32_t lte_ul_channel_estimation_RRU(LTE_DL_FRAME_PARMS *frame_parms,
int32_t tmp_estimates[N_rb_alloc*12] __attribute__((aligned(16)));
int symbol_offset,i;
//debug_msg("lte_ul_channel_estimation_RRU: cyclic shift %d\n",cyclicShift);
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
#if defined(__x86_64__) || defined(__i386__)
__m128i *rxdataF128,*ul_ref128,*ul_ch128;
__m128i mmtmpU0,mmtmpU1,mmtmpU2,mmtmpU3;
+39 -5
View File
@@ -28,18 +28,52 @@
#include "PHY/defs_eNB.h"
#include "openair1/PHY/LTE_TRANSPORT/transport_vars.h"
const uint16_t ref_primes[34] = {11, 23, 31, 47, 59, 71, 89, 107, 113, 139, 179, 191, 211, 239, 283, 293, 317, 359, 383, 431, 479, 523, 571, 599, 647, 719, 761, 863, 887, 953, 971, 1069, 1151, 1193};
static const uint16_t ref_primes[34] = {11, 23, 31, 47, 59, 71, 89, 107, 113, 139, 179, 191, 211, 239, 283, 293, 317,
359, 383, 431, 479, 523, 571, 599, 647, 719, 761, 863, 887, 953, 971, 1069, 1151, 1193};
int16_t *ul_ref_sigs[30][2][34];
int16_t *ul_ref_sigs_rx[30][2][34]; //these contain the sequences in repeated format and quantized to QPSK ifdef IFFT_FPGA
/* 36.211 table 5.5.1.2-1 */
char ref12[360] = {-1,1,3,-3,3,3,1,1,3,1,-3,3,1,1,3,3,3,-1,1,-3,-3,1,-3,3,1,1,-3,-3,-3,-1,-3,-3,1,-3,1,-1,-1,1,1,1,1,-1,-3,-3,1,-3,3,-1,-1,3,1,-1,1,-1,-3,-1,1,-1,1,3,1,-3,3,-1,-1,1,1,-1,-1,3,-3,1,-1,3,-3,-3,-3,3,1,-1,3,3,-3,1,-3,-1,-1,-1,1,-3,3,-1,1,-3,3,1,1,-3,3,1,-1,-1,-1,1,1,3,-1,1,1,-3,-1,3,3,-1,-3,1,1,1,1,1,-1,3,-1,1,1,-3,-3,-1,-3,-3,3,-1,3,1,-1,-1,3,3,-3,1,3,1,3,3,1,-3,1,1,-3,1,1,1,-3,-3,-3,1,3,3,-3,3,-3,1,1,3,-1,-3,3,3,-3,1,-1,-3,-1,3,1,3,3,3,-1,1,3,-1,1,-3,-1,-1,1,1,3,1,-1,-3,1,3,1,-1,1,3,3,3,-1,-1,3,-1,-3,1,1,3,-3,3,-3,-3,3,1,3,-1,-3,3,1,1,-3,1,-3,-3,-1,-1,1,-3,-1,3,1,3,1,-1,-1,3,-3,-1,-3,-1,-1,-3,1,1,1,1,3,1,-1,1,-3,-1,-1,3,-1,1,-3,-3,-3,-3,-3,1,-1,-3,1,1,-3,-3,-3,-3,-1,3,-3,1,-3,3,1,1,-1,-3,-1,-3,1,-1,1,3,-1,1,1,1,3,1,3,3,-1,1,-1,-3,-3,1,1,-3,3,3,1,3,3,1,-3,-1,-1,3,1,3,-3,-3,3,-3,1,-1,-1,3,-1,-3,-3,-1,-3,-1,-3,3,1,-1,1,3,-3,-3,-1,3,-3,3,-1,3,3,-3,3,3,-1,-1,3,-3,-3,-1,-1,-3,-1,3,-3,3,1,-1};
static const char ref12[360] = {
-1, 1, 3, -3, 3, 3, 1, 1, 3, 1, -3, 3, 1, 1, 3, 3, 3, -1, 1, -3, -3, 1, -3, 3, 1, 1, -3, -3, -3, -1,
-3, -3, 1, -3, 1, -1, -1, 1, 1, 1, 1, -1, -3, -3, 1, -3, 3, -1, -1, 3, 1, -1, 1, -1, -3, -1, 1, -1, 1, 3,
1, -3, 3, -1, -1, 1, 1, -1, -1, 3, -3, 1, -1, 3, -3, -3, -3, 3, 1, -1, 3, 3, -3, 1, -3, -1, -1, -1, 1, -3,
3, -1, 1, -3, 3, 1, 1, -3, 3, 1, -1, -1, -1, 1, 1, 3, -1, 1, 1, -3, -1, 3, 3, -1, -3, 1, 1, 1, 1, 1,
-1, 3, -1, 1, 1, -3, -3, -1, -3, -3, 3, -1, 3, 1, -1, -1, 3, 3, -3, 1, 3, 1, 3, 3, 1, -3, 1, 1, -3, 1,
1, 1, -3, -3, -3, 1, 3, 3, -3, 3, -3, 1, 1, 3, -1, -3, 3, 3, -3, 1, -1, -3, -1, 3, 1, 3, 3, 3, -1, 1,
3, -1, 1, -3, -1, -1, 1, 1, 3, 1, -1, -3, 1, 3, 1, -1, 1, 3, 3, 3, -1, -1, 3, -1, -3, 1, 1, 3, -3, 3,
-3, -3, 3, 1, 3, -1, -3, 3, 1, 1, -3, 1, -3, -3, -1, -1, 1, -3, -1, 3, 1, 3, 1, -1, -1, 3, -3, -1, -3, -1,
-1, -3, 1, 1, 1, 1, 3, 1, -1, 1, -3, -1, -1, 3, -1, 1, -3, -3, -3, -3, -3, 1, -1, -3, 1, 1, -3, -3, -3, -3,
-1, 3, -3, 1, -3, 3, 1, 1, -1, -3, -1, -3, 1, -1, 1, 3, -1, 1, 1, 1, 3, 1, 3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{
-1, 3, 1, -3, 3, -1, 1, 3, -3, 3, 1, 3, -3, 3, 1, 1, -1, 1, 3, -3, 3, -3, -1, -3, -3, 3, -3, -3, -3, 1, -3, -3,
3, -1, 1, 1, 1, 3, 1, -1, 3, -3, -3, 1, 3, 1, 1, -3, 3, -1, 3, 3, 1, 1, -3, 3, 3, 3, 3, 1, -1, 3, -1, 1,
1, -1, -3, -1, -1, 1, 3, 3, -1, -3, 1, 1, 3, -3, 1, 1, -3, -1, -1, 1, 3, 1, 3, 1, -1, 3, 1, 1, -3, -1, -3, -1,
-1, -1, -1, -3, -3, -1, 1, 1, 3, 3, -1, 3, -1, 1, -1, -3, 1, -1, -3, -3, 1, -3, -1, -1, -3, 1, 1, 3, -1, 1, 3, 1,
-3, 1, -3, 1, 1, -1, -1, 3, -1, -3, 3, -3, -3, -3, 1, 1, 1, 1, -1, -1, 3, -3, -3, 3, -3, 1, -1, -1, 1, -1, 1, 1,
-1, -3, -1, 1, -1, 3, -1, -3, -3, 3, 3, -1, -1, -3, -1, 3, 1, 3, 1, 3, 1, 1, -1, 3, 1, -1, 1, 3, -3, -1, -1, 1,
-3, 1, 3, -3, 1, -1, -3, 3, -3, 3, -1, -1, -1, -1, 1, -3, -3, -3, 1, -3, -3, -3, 1, -3, 1, 1, -3, 3, 3, -1, -3, -1,
3, -3, 3, 3, 3, -1, 1, 1, -3, 1, -1, 1, 1, -3, 1, 1, -1, 1, -3, -3, 3, -1, 3, -1, -1, -3, -3, -3, -1, -3, -3, 1,
-1, 1, 3, 3, -1, 1, -1, 3, 1, 3, 3, -3, -3, 1, 3, 1, -1, -3, -3, -3, 3, 3, -3, 3, 3, -1, -3, 3, -1, 1, -3, 1,
1, 3, 3, 1, 1, 1, -1, -1, 1, -3, 3, -1, 1, 1, -3, 3, 3, -1, -3, 3, -3, -1, -3, -1, 3, -1, -1, -1, -1, -3, -1, 3,
3, 1, -1, 1, 3, 3, 3, -1, 1, 1, -3, 1, 3, -1, -3, 3, -3, -3, 3, 1, 3, 1, -3, 3, 1, 3, 1, 1, 3, 3, -1, -1,
-3, 1, -3, -1, 3, 1, 1, 3, -1, -1, 1, -3, 1, 3, -3, 1, -1, -3, -1, 3, 1, 3, 1, -1, -3, -3, -1, -1, -3, -3, -3, -1,
-1, -3, 3, -1, -1, -1, -1, 1, 1, -3, 3, 1, 3, 3, 1, -1, 1, -3, 1, -3, 1, 1, -3, -1, 1, 3, -1, 3, 3, -1, -3, 1,
-1, -3, 3, 3, 3, -1, 1, 1, 3, -1, -3, -1, 3, -1, -1, -1, 1, 1, 1, 1, 1, -1, 3, -1, -3, 1, 1, 3, -3, 1, -3, -1,
1, 1, -3, -3, 3, 1, 1, -3, 1, 3, 3, 1, -1, -3, 3, -1, 3, 3, 3, -3, 1, -1, 1, -1, -3, -1, 1, 3, -1, 3, -3, -3,
-1, -3, 3, -3, -3, -3, -1, -1, -3, -1, -3, 3, 1, 3, -3, -1, 3, -1, 1, -1, 3, -3, 1, -1, -3, -3, 1, 1, -1, 1, -1, 1,
-1, 3, 1, -3, -1, 1, -1, 1, -1, -1, 3, 3, -3, -1, 1, -3, -3, -1, -3, 3, 1, -1, -3, -1, -3, -3, 3, -3, 3, -3, -1, 1,
3, 1, -3, 1, 3, 3, -1, -3, -1, -1, -1, -1, 3, 3, 3, 1, 3, 3, -3, 1, 3, -1, 3, -1, 3, 3, -3, 3, 1, -1, 3, 3,
1, -1, 3, 3, -1, -3, 3, -3, -1, -1, 3, -1, 3, -1, -1, 1, 1, 1, 1, -1, -1, -3, -1, 3, 1, -1, 1, -1, 3, -1, 3, 1,
1, -1, -1, -3, 1, 1, -3, 1, 3, -3, 1, 1, -3, -3, -1, -1, -3, -1, 1, 3, 1, 1, -3, -1, -1, -3, 3, -3, 3, 1, -3, 3,
-3, 1, -1, 1, -3, 1, 1, 1, -1, -3, 3, 3, 1, 1, 3, -1, -3, -1, -1, -1, 3, 1, -3, -3, -1, 3, -3, -1, -3, -1, -3, -1,
-1, -3, -1, -1, 1, -3, -1, -1, 1, -1, -3, 1, 1, -3, 1, -3, -3, 3, 1, 1, -1, 3, -1, -1, 1, 1, -1, -1, -3, -1, 3, -1,
3, -1, 1, 3, 1, -1, 3, 1, 3, -3, -3, 1, -1, -1, 1, 3};
void generate_ul_ref_sigs(void) {
double qbar,phase;
+2 -65
View File
@@ -40,8 +40,7 @@
#include "transport_common_proto.h"
#include "SCHED/sched_common.h"
//#define DEBUG_HARQ
#include "openair1/PHY/LTE_TRANSPORT/dci_tools_common_extern.h"
//#define DEBUG_DCI
@@ -98,69 +97,7 @@ uint16_t RIV2nb_rb_LUT100[6000];
uint16_t RIV2first_rb_LUT100[6000];
uint16_t RIV_max100=0;
extern uint32_t current_dlsch_cqi;
// Table 8.6.3-3 36.213
uint16_t beta_cqi[16] = {0, //reserved
0, //reserved
9, //1.125
10, //1.250
11, //1.375
13, //1.625
14, //1.750
16, //2.000
18, //2.250
20, //2.500
23, //2.875
25, //3.125
28, //3.500
32, //4.000
40, //5.000
50
}; //6.250
// Table 8.6.3-2 36.213
uint16_t beta_ri[16] = {10, //1.250
13, //1.625
16, //2.000
20, //2.500
25, //3.125
32, //4.000
40, //5.000
50, //6.250
64, //8.000
80, //10.000
101, //12.625
127, //15.875
160, //20.000
0, //reserved
0, //reserved
0
}; //reserved
// Table 8.6.3-2 36.213
uint16_t beta_ack[16] = {16, //2.000
20, //2.500
25, //3.125
32, //4.000
40, //5.000
50, //6.250
64, //8.000
80, //10.000
101, //12.625
127, //15.875
160, //20.000
248, //31.000
400, //50.000
640, //80.000
808
};//126.00
int8_t delta_PUSCH_abs[4] = {-4,-1,1,4};
int8_t delta_PUSCH_acc[4] = {-1,0,1,3};
int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
const int8_t *delta_PUCCH_lut = delta_PUSCH_acc;
uint32_t check_phich_reg(LTE_DL_FRAME_PARMS *frame_parms,uint32_t kprime,uint8_t lprime,uint8_t mi)
{
@@ -84,6 +84,6 @@ extern uint16_t RIV2nb_rb_LUT100[6000];
extern uint16_t RIV2first_rb_LUT100[6000];
extern uint16_t RIV_max100;
extern int8_t *delta_PUCCH_lut;
extern int8_t delta_PUSCH_acc[4];
extern int8_t delta_PUSCH_abs[4];
extern const int8_t *delta_PUCCH_lut;
extern const int8_t delta_PUSCH_acc[4];
extern const int8_t delta_PUSCH_abs[4];
@@ -131,8 +131,8 @@ void layer1prec2A(int32_t *antenna0_sample, int32_t *antenna1_sample, uint8_t pr
((int16_t *)antenna1_sample)[1] = (int16_t)((((int16_t *)antenna1_sample)[1]*ONE_OVER_SQRT2_Q15)>>15); */
}
uint32_t FOUR[2]={0,4};
uint32_t TWO[2]={0,2};
static const uint32_t FOUR[2] = {0, 4};
static const uint32_t TWO[2] = {0, 2};
int allocate_REs_in_RB_no_pilots_QPSK_siso(PHY_VARS_eNB* phy_vars_eNB,
int **txdataF,
-5
View File
@@ -44,11 +44,6 @@
//unsigned short phich_reg[MAX_NUM_PHICH_GROUPS][3];
int32_t alam_bpsk_perm1[4] = {2,1,4,3}; // -conj(x) 1 (-1-j) -> 2 (1-j), 2->1, 3 (-1+j) -> (4) 1+j, 4->3
int32_t alam_bpsk_perm2[4] = {3,4,2,1}; // conj(x) 1 (-1-j) -> 3 (-1+j), 3->1, 2 (1-j) -> 4 (1+j), 4->2
// This routine generates the PHICH
void generate_phich(LTE_DL_FRAME_PARMS *frame_parms,
+3 -3
View File
@@ -28,10 +28,10 @@ double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0},
{ 5.0/4.0,1.0,3.0/4.0,1.0/2.0}};
*/
double ratioPB[2][4]={{ 0.00000, -0.96910, -2.21849, -3.97940}, //in db
{ 0.96910, 0.00000, -1.24939, -3.01030}};
static const double ratioPB[2][4] = {{0.00000, -0.96910, -2.21849, -3.97940}, // in db
{0.96910, 0.00000, -1.24939, -3.01030}};
double pa_values[8]={-6.0,-4.77,-3.0,-1.77,0.0,1.0,2.0,3.0}; //reported by higher layers
static const double pa_values[8] = {-6.0, -4.77, -3.0, -1.77, 0.0, 1.0, 2.0, 3.0}; // reported by higher layers
double get_pa_dB(uint8_t pa)
{
+40 -65
View File
@@ -36,9 +36,9 @@
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "common/utils/lte/prach_utils.h"
uint16_t NCS_unrestricted[16] = {0,13,15,18,22,26,32,38,46,59,76,93,119,167,279,419};
uint16_t NCS_restricted[15] = {15,18,22,26,32,38,46,55,68,82,100,128,158,202,237}; // high-speed case
uint16_t NCS_4[7] = {2,4,6,8,10,12,15};
const uint16_t NCS_unrestricted[16] = {0, 13, 15, 18, 22, 26, 32, 38, 46, 59, 76, 93, 119, 167, 279, 419};
const uint16_t NCS_restricted[15] = {15, 18, 22, 26, 32, 38, 46, 55, 68, 82, 100, 128, 158, 202, 237}; // high-speed case
const uint16_t NCS_4[7] = {2, 4, 6, 8, 10, 12, 15};
int16_t ru[2*839]; // quantized roots of unity
uint32_t ZC_inv[839]; // multiplicative inverse for roots u
@@ -259,66 +259,41 @@ PRACH_TDD_PREAMBLE_MAP tdd_preamble_map[64][7] = {
*/
uint16_t prach_root_sequence_map0_3[838] = { 129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779,
2, 837, 1, 838,
56, 783, 112, 727, 148, 691,
80, 759, 42, 797, 40, 799,
35, 804, 73, 766, 146, 693,
31, 808, 28, 811, 30, 809, 27, 812, 29, 810,
24, 815, 48, 791, 68, 771, 74, 765, 178, 661, 136, 703,
86, 753, 78, 761, 43, 796, 39, 800, 20, 819, 21, 818,
95, 744, 202, 637, 190, 649, 181, 658, 137, 702, 125, 714, 151, 688,
217, 622, 128, 711, 142, 697, 122, 717, 203, 636, 118, 721, 110, 729, 89, 750, 103, 736, 61,
778, 55, 784, 15, 824, 14, 825,
12, 827, 23, 816, 34, 805, 37, 802, 46, 793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616,
228, 611, 227, 612, 132, 707, 133, 706, 143, 696, 135, 704, 161, 678, 201, 638, 173, 666, 106,
733, 83, 756, 91, 748, 66, 773, 53, 786, 10, 829, 9, 830,
7, 832, 8, 831, 16, 823, 47, 792, 64, 775, 57, 782, 104, 735, 101, 738, 108, 731, 208, 631, 184,
655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690, 216, 623, 218, 621,
152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, 158, 681, 164,
675, 174, 665, 171, 668, 170, 669, 87, 752, 169, 670, 88, 751, 107, 732, 81, 758, 82, 757, 100,
739, 98, 741, 71, 768, 59, 780, 65, 774, 50, 789, 49, 790, 26, 813, 17, 822, 13, 826, 6, 833,
5, 834, 33, 806, 51, 788, 75, 764, 99, 740, 96, 743, 97, 742, 166, 673, 172, 667, 175, 664, 187,
652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645, 195, 644, 192, 647,
182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, 153, 686, 213,
626, 215, 624, 150, 689,
225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, 124, 715, 193, 646, 205, 634, 206,
633, 116, 723, 160, 679, 186, 653, 167, 672, 79, 760, 85, 754, 77, 762, 92, 747, 58, 781, 62,
777, 69, 770, 54, 785, 36, 803, 32, 807, 25, 814, 18, 821, 11, 828, 4, 835,
3, 836, 19, 820, 22, 817, 41, 798, 38, 801, 44, 795, 52, 787, 45, 794, 63, 776, 67, 772, 72,
767, 76, 763, 94, 745, 102, 737, 90, 749, 109, 730, 165, 674, 111, 728, 209, 630, 204, 635, 117,
722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, 196, 643, 155, 684,
214, 625, 126, 713, 131, 708, 219, 620, 222, 617, 226, 613,
230, 609, 232, 607, 262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395,
444, 283, 556, 285, 554, 379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478,
387, 452, 360, 479, 310, 529, 354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324,
515,
323, 516, 320, 519, 334, 505, 359, 480, 295, 544, 385, 454, 292, 547, 291, 548, 381, 458, 399,
440, 380, 459, 397, 442, 369, 470, 377, 462, 410, 429, 407, 432, 281, 558, 414, 425, 247, 592,
277, 562, 271, 568, 272, 567, 264, 575, 259, 580,
237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250, 589, 246, 593, 417, 422, 248,
591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319,
520, 332, 507, 333, 506, 348, 491, 347, 492, 322, 517,
330, 509, 338, 501, 341, 498, 340, 499, 342, 497, 301, 538, 366, 473, 401, 438, 371, 468, 408,
431, 375, 464, 249, 590, 269, 570, 238, 601, 234, 605,
257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372, 467, 282, 557, 403,
436, 396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495,
345, 494, 318, 521, 331, 508, 325, 514, 321, 518,
346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, 378, 461, 374, 465, 415, 424, 270,
569, 241, 598,
231, 608, 260, 579, 268, 571, 276, 563, 409, 430, 398, 441, 290, 549, 304, 535, 308, 531, 358,
481, 316, 523,
293, 546, 288, 551, 284, 555, 368, 471, 253, 586, 256, 583, 263, 576,
242, 597, 274, 565, 402, 437, 383, 456, 357, 482, 329, 510,
317, 522, 307, 532, 286, 553, 287, 552, 266, 573, 261, 578,
236, 603, 303, 536, 356, 483,
355, 484, 405, 434, 404, 435, 406, 433,
235, 604, 267, 572, 302, 537,
309, 530, 265, 574, 233, 606,
367, 472, 296, 543,
336, 503, 305, 534, 373, 466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610
};
const uint16_t prach_root_sequence_map0_3[838] = {
129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779, 2, 837, 1, 838, 56,
783, 112, 727, 148, 691, 80, 759, 42, 797, 40, 799, 35, 804, 73, 766, 146, 693, 31, 808, 28, 811, 30, 809, 27, 812,
29, 810, 24, 815, 48, 791, 68, 771, 74, 765, 178, 661, 136, 703, 86, 753, 78, 761, 43, 796, 39, 800, 20, 819, 21,
818, 95, 744, 202, 637, 190, 649, 181, 658, 137, 702, 125, 714, 151, 688, 217, 622, 128, 711, 142, 697, 122, 717, 203, 636,
118, 721, 110, 729, 89, 750, 103, 736, 61, 778, 55, 784, 15, 824, 14, 825, 12, 827, 23, 816, 34, 805, 37, 802, 46,
793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616, 228, 611, 227, 612, 132, 707, 133, 706, 143, 696, 135, 704, 161, 678,
201, 638, 173, 666, 106, 733, 83, 756, 91, 748, 66, 773, 53, 786, 10, 829, 9, 830, 7, 832, 8, 831, 16, 823, 47,
792, 64, 775, 57, 782, 104, 735, 101, 738, 108, 731, 208, 631, 184, 655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690,
216, 623, 218, 621, 152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, 158, 681, 164, 675, 174,
665, 171, 668, 170, 669, 87, 752, 169, 670, 88, 751, 107, 732, 81, 758, 82, 757, 100, 739, 98, 741, 71, 768, 59, 780,
65, 774, 50, 789, 49, 790, 26, 813, 17, 822, 13, 826, 6, 833, 5, 834, 33, 806, 51, 788, 75, 764, 99, 740, 96,
743, 97, 742, 166, 673, 172, 667, 175, 664, 187, 652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645,
195, 644, 192, 647, 182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, 153, 686, 213, 626, 215,
624, 150, 689, 225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, 124, 715, 193, 646, 205, 634, 206, 633, 116, 723,
160, 679, 186, 653, 167, 672, 79, 760, 85, 754, 77, 762, 92, 747, 58, 781, 62, 777, 69, 770, 54, 785, 36, 803, 32,
807, 25, 814, 18, 821, 11, 828, 4, 835, 3, 836, 19, 820, 22, 817, 41, 798, 38, 801, 44, 795, 52, 787, 45, 794,
63, 776, 67, 772, 72, 767, 76, 763, 94, 745, 102, 737, 90, 749, 109, 730, 165, 674, 111, 728, 209, 630, 204, 635, 117,
722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, 196, 643, 155, 684, 214, 625, 126, 713, 131, 708,
219, 620, 222, 617, 226, 613, 230, 609, 232, 607, 262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395,
444, 283, 556, 285, 554, 379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478, 387, 452, 360, 479, 310, 529,
354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324, 515, 323, 516, 320, 519, 334, 505, 359, 480, 295, 544, 385,
454, 292, 547, 291, 548, 381, 458, 399, 440, 380, 459, 397, 442, 369, 470, 377, 462, 410, 429, 407, 432, 281, 558, 414, 425,
247, 592, 277, 562, 271, 568, 272, 567, 264, 575, 259, 580, 237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250,
589, 246, 593, 417, 422, 248, 591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319, 520, 332, 507, 333, 506, 348,
491, 347, 492, 322, 517, 330, 509, 338, 501, 341, 498, 340, 499, 342, 497, 301, 538, 366, 473, 401, 438, 371, 468, 408, 431,
375, 464, 249, 590, 269, 570, 238, 601, 234, 605, 257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372,
467, 282, 557, 403, 436, 396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495, 345, 494,
318, 521, 331, 508, 325, 514, 321, 518, 346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, 378, 461, 374, 465, 415,
424, 270, 569, 241, 598, 231, 608, 260, 579, 268, 571, 276, 563, 409, 430, 398, 441, 290, 549, 304, 535, 308, 531, 358, 481,
316, 523, 293, 546, 288, 551, 284, 555, 368, 471, 253, 586, 256, 583, 263, 576, 242, 597, 274, 565, 402, 437, 383, 456, 357,
482, 329, 510, 317, 522, 307, 532, 286, 553, 287, 552, 266, 573, 261, 578, 236, 603, 303, 536, 356, 483, 355, 484, 405, 434,
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, 336, 503, 305, 534, 373,
466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610};
uint16_t prach_root_sequence_map4[138] = { 1,138,2,137,3,136,4,135,5,134,6,133,7,132,8,131,9,130,10,129,
11,128,12,127,13,126,14,125,15,124,16,123,17,122,18,121,19,120,20,119,
@@ -350,7 +325,7 @@ void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
void fill_du(uint8_t prach_fmt) {
uint16_t iu,u,p;
uint16_t N_ZC;
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
if (prach_fmt<4) {
N_ZC = 839;
@@ -405,7 +380,7 @@ void compute_prach_seq(uint16_t rootSequenceIndex,
unsigned int k,inv_u,i,NCS=0,num_preambles;
int N_ZC;
uint8_t prach_fmt = get_prach_fmt(prach_ConfigIndex,frame_type);
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
uint16_t u, preamble_offset;
uint16_t n_shift_ra,n_shift_ra_bar, d_start,numshift;
uint8_t not_found;
+3 -3
View File
@@ -40,9 +40,9 @@
//#define PRACH_DEBUG 1
//#define PRACH_WRITE_OUTPUT_DEBUG 1
extern uint16_t NCS_unrestricted[16];
extern uint16_t NCS_restricted[15];
extern uint16_t NCS_4[7];
extern const uint16_t NCS_unrestricted[16];
extern const uint16_t NCS_restricted[15];
extern const uint16_t NCS_4[7];
extern int16_t ru[2*839]; // quantized roots of unity
extern uint32_t ZC_inv[839]; // multiplicative inverse for roots u
+23 -31
View File
@@ -44,26 +44,20 @@
#include "pucch_extern.h"
int16_t cfo_pucch_np[24*7] = {20787,-25330,27244,-18205,31356,-9512,32767,0,31356,9511,27244,18204,20787,25329,
27244,-18205,30272,-12540,32137,-6393,32767,0,32137,6392,30272,12539,27244,18204,
31356,-9512,32137,-6393,32609,-3212,32767,0,32609,3211,32137,6392,31356,9511,
32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,
31356,9511,32137,6392,32609,3211,32767,0,32609,-3212,32137,-6393,31356,-9512,
27244,18204,30272,12539,32137,6392,32767,0,32137,-6393,30272,-12540,27244,-18205,
20787,25329,27244,18204,31356,9511,32767,0,31356,-9512,27244,-18205,20787,-25330
};
int16_t cfo_pucch_ep[24*6] = {24278,-22005,29621,-14010,32412,-4808,32412,4807,29621,14009,24278,22004,
28897,-15447,31356,-9512,32609,-3212,32609,3211,31356,9511,28897,15446,
31785,-7962,32412,-4808,32727,-1608,32727,1607,32412,4807,31785,7961,
32767,0,32767,0,32767,0,32767,0,32767,0,32767,0,
31785,7961,32412,4807,32727,1607,32727,-1608,32412,-4808,31785,-7962,
28897,15446,31356,9511,32609,3211,32609,-3212,31356,-9512,28897,-15447,
24278,22004,29621,14009,32412,4807,32412,-4808,29621,-14010,24278,-22005
};
static const int16_t cfo_pucch_np[24 * 7] = {
20787, -25330, 27244, -18205, 31356, -9512, 32767, 0, 31356, 9511, 27244, 18204, 20787, 25329, 27244, -18205, 30272,
-12540, 32137, -6393, 32767, 0, 32137, 6392, 30272, 12539, 27244, 18204, 31356, -9512, 32137, -6393, 32609, -3212,
32767, 0, 32609, 3211, 32137, 6392, 31356, 9511, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767,
0, 32767, 0, 32767, 0, 31356, 9511, 32137, 6392, 32609, 3211, 32767, 0, 32609, -3212, 32137, -6393,
31356, -9512, 27244, 18204, 30272, 12539, 32137, 6392, 32767, 0, 32137, -6393, 30272, -12540, 27244, -18205, 20787,
25329, 27244, 18204, 31356, 9511, 32767, 0, 31356, -9512, 27244, -18205, 20787, -25330};
static const int16_t cfo_pucch_ep[24 * 6] = {
24278, -22005, 29621, -14010, 32412, -4808, 32412, 4807, 29621, 14009, 24278, 22004, 28897, -15447, 31356, -9512, 32609,
-3212, 32609, 3211, 31356, 9511, 28897, 15446, 31785, -7962, 32412, -4808, 32727, -1608, 32727, 1607, 32412, 4807,
31785, 7961, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 32767, 0, 31785, 7961, 32412,
4807, 32727, 1607, 32727, -1608, 32412, -4808, 31785, -7962, 28897, 15446, 31356, 9511, 32609, 3211, 32609, -3212,
31356, -9512, 28897, -15447, 24278, 22004, 29621, 14009, 32412, 4807, 32412, -4808, 29621, -14010, 24278, -22005};
void dump_uci_stats(FILE *fd,PHY_VARS_eNB *eNB,int frame) {
@@ -194,10 +188,10 @@ uint16_t pucchfmt3_Baseseq_csh_remove( int16_t SubCarrierDeMapData[4][14][12][2]
}
#define MAXROW_TBL_SF5_OS_IDX (5) // Orthogonal sequence index
const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0,3,6,8,10};
static const int16_t TBL_3_SF5_GEN_N_DASH_NS[MAXROW_TBL_SF5_OS_IDX] = {0, 3, 6, 8, 10};
#define MAXROW_TBL_SF4_OS_IDX (4) // Orthogonal sequence index
const int16_t TBL_3_SF4_GEN_N_DASH_NS[MAXROW_TBL_SF4_OS_IDX] = {0,3,6,9};
static const int16_t TBL_3_SF4_GEN_N_DASH_NS[MAXROW_TBL_SF4_OS_IDX] = {0, 3, 6, 9};
/* Channel estimation */
uint16_t pucchfmt3_ChannelEstimation( int16_t SubCarrierDeMapData[4][14][12][2],
@@ -532,12 +526,10 @@ const int16_t TBL_3_SF5[MAXROW_TBL_SF5][MAXCLM_TBL_SF5][2] = {
#define MAXROW_TBL_SF4_fmt3 4
#define MAXCLM_TBL_SF4 4
const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {
{ {32767,0}, {32767,0}, {32767,0}, {32767,0}},
{ {32767,0}, {-32767,0}, {32767,0}, {-32767,0}},
{ {32767,0}, {32767,0}, {-32767,0}, {-32767,0}},
{ {32767,0}, {-32767,0}, {-32767,0}, {32767,0}}
};
static const int16_t TBL_3_SF4[MAXROW_TBL_SF4_fmt3][MAXCLM_TBL_SF4][2] = {{{32767, 0}, {32767, 0}, {32767, 0}, {32767, 0}},
{{32767, 0}, {-32767, 0}, {32767, 0}, {-32767, 0}},
{{32767, 0}, {32767, 0}, {-32767, 0}, {-32767, 0}},
{{32767, 0}, {-32767, 0}, {-32767, 0}, {32767, 0}}};
/* orthogonal sequence remove */
uint16_t pucchfmt3_OrthSeqRemove( int16_t RemoveFrqDev_fmt3[4][2][5][12][2],
@@ -918,7 +910,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
int16_t tmp_re,tmp_im,W_re=0,W_im=0;
int16_t *rxptr;
uint32_t symbol_offset;
int16_t stat0_ref_re[4],stat0_ref_im[4],stat1_ref_re[4],stat1_ref_im[4],*cfo;
int16_t stat0_ref_re[4], stat0_ref_im[4], stat1_ref_re[4], stat1_ref_im[4];
int16_t chest0_re[4][12],chest0_im[4][12];
int16_t chest1_re[4][12],chest1_im[4][12];
int32_t chest_mag;
@@ -1214,7 +1206,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat1_re[aa]=0;
stat1_im[aa]=0;
off=re<<1;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase] : &cfo_pucch_ep[12 * phase];
for (l=0; l<(nsymb>>1); l++) {
stat0_re[aa] += (((rxcomp[aa][off]*(int32_t)cfo[l<<1])>>15) - ((rxcomp[aa][1+off]*(int32_t)cfo[1+(l<<1)])>>15))/nsymb;
@@ -1318,7 +1310,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
stat0_ref_re[aa]=0;
stat0_ref_im[aa]=0;
off=re<<1;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase] : &cfo_pucch_ep[12*phase];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase] : &cfo_pucch_ep[12 * phase];
for (l=0; l<(nsymb>>1); l++) {
if ((l<2)||(l>(nsymb>>1) - 3)) { //data symbols
@@ -1398,7 +1390,7 @@ uint32_t rx_pucch(PHY_VARS_eNB *eNB,
if (sigma2_dB<(dB_fixed(stat_max) - (IS_SOFTMODEM_IQPLAYER?0:pucch1_thres)) ) {//
chL = (nsymb>>1)-4;
chest_mag=0;
cfo = (frame_parms->Ncp==0) ? &cfo_pucch_np[14*phase_max] : &cfo_pucch_ep[12*phase_max];
const int16_t *cfo = (frame_parms->Ncp == 0) ? &cfo_pucch_np[14 * phase_max] : &cfo_pucch_ep[12 * phase_max];
for (aa=0; aa<frame_parms->nb_antennas_rx; aa++) {
for (re=0; re<12; re++) {
+282 -179
View File
@@ -72,197 +72,300 @@ void init_ncs_cell(LTE_DL_FRAME_PARMS *frame_parms,uint8_t ncs_cell[20][7])
}
}
int16_t W4[3][4] = {{32767, 32767, 32767, 32767},
{32767,-32768, 32767,-32768},
{32767,-32768,-32768, 32767}
};
int16_t W3_re[3][6] = {{32767, 32767, 32767},
{32767,-16384,-16384},
{32767,-16384,-16384}
};
const int16_t W4[3][4] = {{32767, 32767, 32767, 32767}, {32767, -32768, 32767, -32768}, {32767, -32768, -32768, 32767}};
const int16_t W3_re[3][6] = {{32767, 32767, 32767}, {32767, -16384, -16384}, {32767, -16384, -16384}};
int16_t W3_im[3][6] = {{0 ,0 ,0 },
{0 , 28377,-28378},
{0 ,-28378, 28377}
};
const int16_t W3_im[3][6] = {{0, 0, 0}, {0, 28377, -28378}, {0, -28378, 28377}};
char *pucch_format_string[] = {
"format 1",
"format 1a",
"format 1b",
"pucch_format1b_csA2",
"pucch_format1b_csA3",
"pucch_format1b_csA4",
"format 2",
"format 2a",
"format 2b",
"pucch_format3"
};
const uint8_t chcod_tbl[128][48] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1},
{1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1,
1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 1},
{0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0,
0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0},
{0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1,
1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0},
{1, 0, 1, 0, 0, 1, 0, 1, 1, 0,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, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 1},
{1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0},
{1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 0, 1, 0, 0},
{0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0, 1, 1} };
int16_t alpha_re[12] = {32767, 28377, 16383, 0,-16384, -28378,-32768,-28378,-16384, -1, 16383, 28377};
int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0,-16384,-28378,-32768,-28378,-16384};
const int16_t alpha_re[12] = {32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384, -1, 16383, 28377};
const int16_t alpha_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16384, -28378, -32768, -28378, -16384};
// W5_TBL
int16_t W5_fmt3_re[5][5] = { {32767, 32767, 32767, 32767, 32767},
{32767, 10125, -26509, -26509, 10125},
{32767, -26509, 10125, 10125, -26509},
{32767, -26509, 10125, 10125, -26509},
{32767, 10125, -26509, -26509, 10125} };
const int16_t W5_fmt3_re[5][5] = {{32767, 32767, 32767, 32767, 32767},
{32767, 10125, -26509, -26509, 10125},
{32767, -26509, 10125, 10125, -26509},
{32767, -26509, 10125, 10125, -26509},
{32767, 10125, -26509, -26509, 10125}};
int16_t W5_fmt3_im[5][5] = { {0, 0, 0, 0, 0},
{0, 31163, 19259, -19259, -31163},
{0, 19259, -31163, 31163, -19259},
{0, -19259, 31163, -31163, 19259},
{0, -31163, -19259, 19259, 31163} };
const int16_t W5_fmt3_im[5][5] = {{0, 0, 0, 0, 0},
{0, 31163, 19259, -19259, -31163},
{0, 19259, -31163, 31163, -19259},
{0, -19259, 31163, -31163, 19259},
{0, -31163, -19259, 19259, 31163}};
int16_t W4_fmt3[4][4] = { {32767, 32767, 32767, 32767},
{32767, -32767, 32767, -32767},
{32767, 32767, -32767, -32767},
{32767, -32767, -32767, 32767} };
const int16_t W4_fmt3[4][4] = {{32767, 32767, 32767, 32767},
{32767, -32767, 32767, -32767},
{32767, 32767, -32767, -32767},
{32767, -32767, -32767, 32767}};
// W2 TBL
int16_t W2[2] = {32767, 32767};
const int16_t W2[2] = {32767, 32767};
// e^j*pai*floor (ncs_cell(ns,l)/64)/2
int16_t RotTBL_re[4] = {32767, 0, -32767, 0};
int16_t RotTBL_im[4] = {0, 32767, 0, -32767};
const int16_t RotTBL_re[4] = {32767, 0, -32767, 0};
const int16_t RotTBL_im[4] = {0, 32767, 0, -32767};
//np4_tbl, np5_tbl
uint8_t Np5_TBL[5] = {0, 3, 6, 8, 10};
uint8_t Np4_TBL[4] = {0, 3, 6, 9};
const uint8_t Np5_TBL[5] = {0, 3, 6, 8, 10};
const uint8_t Np4_TBL[4] = {0, 3, 6, 9};
// alpha_TBL
int16_t alphaTBL_re[12] = {32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383, 0, 16383, 28377};
int16_t alphaTBL_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383};
const int16_t alphaTBL_re[12] = {32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383, 0, 16383, 28377};
const int16_t alphaTBL_im[12] = {0, 16383, 28377, 32767, 28377, 16383, 0, -16383, -28377, -32767, -28377, -16383};
+26 -18
View File
@@ -47,37 +47,45 @@
#define D_NPUCCH_SF5 5
#define D_NPUCCH_SF4 4
extern int16_t W4[3][4];
extern const int16_t W4[3][4];
extern int16_t W3_re[3][6];
extern const int16_t W3_re[3][6];
extern const int16_t W3_im[3][6];
extern int16_t W3_im[3][6];
extern const int16_t alpha_re[12];
extern const int16_t alpha_im[12];
extern int16_t alpha_re[12];
extern int16_t alpha_im[12];
static char const* const pucch_format_string[] = {"format 1",
"format 1a",
"format 1b",
"pucch_format1b_csA2",
"pucch_format1b_csA3",
"pucch_format1b_csA4",
"format 2",
"format 2a",
"format 2b",
"pucch_format3"};
extern char *pucch_format_string[];
extern const uint8_t chcod_tbl[128][48];
extern uint8_t chcod_tbl[128][48];
extern const int16_t W5_fmt3_re[5][5];
extern int16_t W5_fmt3_re[5][5];
extern const int16_t W5_fmt3_im[5][5];
extern int16_t W5_fmt3_im[5][5];
extern const int16_t W4_fmt3[4][4];
extern int16_t W4_fmt3[4][4];
extern const int16_t W2[2];
extern int16_t W2[2];
extern int16_t RotTBL_re[4];
extern int16_t RotTBL_im[4];
extern const int16_t RotTBL_re[4];
extern const int16_t RotTBL_im[4];
//np4_tbl, np5_tbl
extern uint8_t Np5_TBL[5];
extern uint8_t Np4_TBL[4];
extern const uint8_t Np5_TBL[5];
extern const uint8_t Np4_TBL[4];
// alpha_TBL
extern int16_t alphaTBL_re[12];
extern int16_t alphaTBL_im[12];
extern const int16_t alphaTBL_re[12];
extern const int16_t alphaTBL_im[12];
#endif
+1 -4
View File
@@ -32,6 +32,7 @@
#include "PHY/defs_UE.h"
#include "PHY/phy_extern_ue.h"
#include "PHY/phy_extern.h"
#include "SCHED_UE/sched_UE.h"
#ifdef DEBUG_DCI_TOOLS
#include "PHY/phy_vars.h"
@@ -63,10 +64,6 @@
int flag_LA=0;
extern uint16_t beta_cqi[16];
extern uint16_t beta_ri[16];
extern uint16_t beta_ack[16];
static const double p_qpsk[8] = {5982.42405670359,
-21568.1135917693,
31293.9987036905,
+21 -41
View File
@@ -33,51 +33,31 @@
#include "PHY/phy_extern.h"
#include "common/utils/LOG/log.h"
static unsigned short msrsb_6_40[8][4] = {
{36, 12, 4, 4},
{32, 16, 8, 4},
{24, 4, 4, 4},
{20, 4, 4, 4},
{16, 4, 4, 4},
{12, 4, 4, 4},
{8, 4, 4, 4},
{4, 4, 4, 4}
};
static const unsigned short msrsb_6_40[8][4] =
{{36, 12, 4, 4}, {32, 16, 8, 4}, {24, 4, 4, 4}, {20, 4, 4, 4}, {16, 4, 4, 4}, {12, 4, 4, 4}, {8, 4, 4, 4}, {4, 4, 4, 4}};
static unsigned short msrsb_41_60[8][4] = {
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4},
{24,4,4,4},
{20,4,4,4},
{16,4,4,4}
};
static const unsigned short msrsb_41_60[8][4] =
{{48, 24, 12, 4}, {48, 16, 8, 4}, {40, 20, 4, 4}, {36, 12, 4, 4}, {32, 16, 8, 4}, {24, 4, 4, 4}, {20, 4, 4, 4}, {16, 4, 4, 4}};
static unsigned short msrsb_61_80[8][4] = {
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4},
{40,20,4,4},
{36,12,4,4},
{32,16,8,4}
};
static const unsigned short msrsb_61_80[8][4] = {{72, 24, 12, 4},
{64, 32, 16, 4},
{60, 20, 4, 4},
{48, 24, 12, 4},
{48, 16, 8, 4},
{40, 20, 4, 4},
{36, 12, 4, 4},
{32, 16, 8, 4}};
static unsigned short msrsb_81_110[8][4] = {
{96,48,24,4},
{96,32,16,4},
{80,40,20,4},
{72,24,12,4},
{64,32,16,4},
{60,20,4,4},
{48,24,12,4},
{48,16,8,4}
};
static const unsigned short msrsb_81_110[8][4] = {{96, 48, 24, 4},
{96, 32, 16, 4},
{80, 40, 20, 4},
{72, 24, 12, 4},
{64, 32, 16, 4},
{60, 20, 4, 4},
{48, 24, 12, 4},
{48, 16, 8, 4}};
unsigned short transmission_offset_tdd[16] = {2,6,10,18,14,22,26,30,70,74,194,326,586,210};
// static const unsigned short transmission_offset_tdd[16] = {2,6,10,18,14,22,26,30,70,74,194,326,586,210};
int compareints (const void * a, const void * b)
{
+71 -79
View File
@@ -23,98 +23,90 @@
#include "PHY/NR_REFSIG/nr_mod_table.h"
//Table 6.3.1.5-1 Precoding Matrix W 1 layer 2 antenna ports 'n' = -1 and 'o' = -j
char nr_W_1l_2p[6][2][1] = {
{{'1'}, {'0'}},//pmi 0
{{'0'}, {'1'}},
{{'1'}, {'1'}},
{{'1'}, {'n'}},
{{'1'}, {'j'}},
{{'1'}, {'o'}}//pmi 5
const char nr_W_1l_2p[6][2][1] = {
{{'1'}, {'0'}}, // pmi 0
{{'0'}, {'1'}},
{{'1'}, {'1'}},
{{'1'}, {'n'}},
{{'1'}, {'j'}},
{{'1'}, {'o'}} // pmi 5
};
//Table 6.3.1.5-3 Precoding Matrix W 1 layer 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_1l_4p[28][4][1] = {
{{'1'}, {'0'}, {'0'}, {'0'}},//pmi 0
{{'0'}, {'1'}, {'0'}, {'0'}},
{{'0'}, {'0'}, {'1'}, {'0'}},
{{'0'}, {'0'}, {'0'}, {'1'}},
{{'1'}, {'0'}, {'1'}, {'0'}},
{{'1'}, {'0'}, {'n'}, {'0'}},
{{'1'}, {'0'}, {'j'}, {'0'}},
{{'1'}, {'0'}, {'o'}, {'0'}},//pmi 7
{{'0'}, {'1'}, {'0'}, {'1'}},//pmi 8
{{'0'}, {'1'}, {'0'}, {'n'}},
{{'0'}, {'1'}, {'0'}, {'j'}},
{{'0'}, {'1'}, {'0'}, {'o'}},
{{'1'}, {'1'}, {'1'}, {'1'}},
{{'1'}, {'1'}, {'j'}, {'j'}},
{{'1'}, {'1'}, {'n'}, {'n'}},
{{'1'}, {'1'}, {'o'}, {'o'}},
{{'1'}, {'j'}, {'1'}, {'j'}},//pmi 16
{{'1'}, {'j'}, {'j'}, {'n'}},
{{'1'}, {'j'}, {'n'}, {'o'}},
{{'1'}, {'j'}, {'o'}, {'1'}},
{{'1'}, {'n'}, {'1'}, {'n'}},
{{'1'}, {'n'}, {'j'}, {'o'}},
{{'1'}, {'n'}, {'n'}, {'1'}},
{{'1'}, {'n'}, {'o'}, {'j'}},//pmi 23
{{'1'}, {'o'}, {'1'}, {'o'}},//pmi 24
{{'1'}, {'o'}, {'j'}, {'1'}},
{{'1'}, {'o'}, {'n'}, {'j'}},
{{'1'}, {'o'}, {'o'}, {'n'}}//pmi 27
const char nr_W_1l_4p[28][4][1] = {
{{'1'}, {'0'}, {'0'}, {'0'}}, // pmi 0
{{'0'}, {'1'}, {'0'}, {'0'}},
{{'0'}, {'0'}, {'1'}, {'0'}},
{{'0'}, {'0'}, {'0'}, {'1'}},
{{'1'}, {'0'}, {'1'}, {'0'}},
{{'1'}, {'0'}, {'n'}, {'0'}},
{{'1'}, {'0'}, {'j'}, {'0'}},
{{'1'}, {'0'}, {'o'}, {'0'}}, // pmi 7
{{'0'}, {'1'}, {'0'}, {'1'}}, // pmi 8
{{'0'}, {'1'}, {'0'}, {'n'}},
{{'0'}, {'1'}, {'0'}, {'j'}},
{{'0'}, {'1'}, {'0'}, {'o'}},
{{'1'}, {'1'}, {'1'}, {'1'}},
{{'1'}, {'1'}, {'j'}, {'j'}},
{{'1'}, {'1'}, {'n'}, {'n'}},
{{'1'}, {'1'}, {'o'}, {'o'}},
{{'1'}, {'j'}, {'1'}, {'j'}}, // pmi
// 16
{{'1'}, {'j'}, {'j'}, {'n'}},
{{'1'}, {'j'}, {'n'}, {'o'}},
{{'1'}, {'j'}, {'o'}, {'1'}},
{{'1'}, {'n'}, {'1'}, {'n'}},
{{'1'}, {'n'}, {'j'}, {'o'}},
{{'1'}, {'n'}, {'n'}, {'1'}},
{{'1'}, {'n'}, {'o'}, {'j'}}, // pmi 23
{{'1'}, {'o'}, {'1'}, {'o'}}, // pmi 24
{{'1'}, {'o'}, {'j'}, {'1'}},
{{'1'}, {'o'}, {'n'}, {'j'}},
{{'1'}, {'o'}, {'o'}, {'n'}} // pmi 27
};
//Table 6.3.1.5-4 Precoding Matrix W 2 antenna ports layers 2 'n' = -1 and 'o' = -j
char nr_W_2l_2p[3][2][2] = {
{{'1', '0'}, {'0', '1'}},//pmi 0
{{'1', '1'}, {'1', 'n'}},
{{'1', '1'}, {'j', 'o'}} //pmi 2
const char nr_W_2l_2p[3][2][2] = {
{{'1', '0'}, {'0', '1'}}, // pmi 0
{{'1', '1'}, {'1', 'n'}},
{{'1', '1'}, {'j', 'o'}} // pmi 2
};
//Table 6.3.1.5-5 Precoding Matrix W 2 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_2l_4p[22][4][2] = {
{{'1', '0'}, {'0', '1'}, {'0', '0'}, {'0', '0'}},//pmi 0
{{'1', '0'}, {'0', '0'}, {'0', '1'}, {'0', '0'}},
{{'1', '0'}, {'0', '0'}, {'0', '0'}, {'0', '1'}},
{{'0', '0'}, {'1', '0'}, {'0', '1'}, {'0', '0'}},//pmi 3
{{'0', '0'}, {'1', '0'}, {'0', '0'}, {'0', '1'}},//pmi 4
{{'0', '0'}, {'0', '0'}, {'1', '0'}, {'0', '1'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'j'}},
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', '1'}},//pmi 8
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', 'n'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'j'}},//pmi 11
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', '1'}},//pmi 12
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', 'n'}},
{{'1', '1'}, {'1', '1'}, {'1', 'n'}, {'1', 'n'}},
{{'1', '1'}, {'1', '1'}, {'j', 'o'}, {'j', 'o'}},//pmi 15
{{'1', '1'}, {'j', 'j'}, {'1', 'n'}, {'j', 'o'}},//pmi 16
{{'1', '1'}, {'j', 'j'}, {'j', 'o'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'1', 'n'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'j', 'o'}, {'o', 'j'}},//pmi 19
{{'1', '1'}, {'o', 'o'}, {'1', 'n'}, {'o', 'j'}},
{{'1', '1'}, {'o', 'o'}, {'j', 'o'}, {'1', 'n'}}//pmi 21
const char nr_W_2l_4p[22][4][2] = {
{{'1', '0'}, {'0', '1'}, {'0', '0'}, {'0', '0'}}, // pmi 0
{{'1', '0'}, {'0', '0'}, {'0', '1'}, {'0', '0'}}, {{'1', '0'}, {'0', '0'}, {'0', '0'}, {'0', '1'}},
{{'0', '0'}, {'1', '0'}, {'0', '1'}, {'0', '0'}}, // pmi 3
{{'0', '0'}, {'1', '0'}, {'0', '0'}, {'0', '1'}}, // pmi 4
{{'0', '0'}, {'0', '0'}, {'1', '0'}, {'0', '1'}}, {{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'1', '0'}, {'0', 'j'}}, {{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', '1'}}, // pmi 8
{{'1', '0'}, {'0', '1'}, {'o', '0'}, {'0', 'n'}}, {{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'o'}},
{{'1', '0'}, {'0', '1'}, {'n', '0'}, {'0', 'j'}}, // pmi 11
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', '1'}}, // pmi 12
{{'1', '0'}, {'0', '1'}, {'j', '0'}, {'0', 'n'}}, {{'1', '1'}, {'1', '1'}, {'1', 'n'}, {'1', 'n'}},
{{'1', '1'}, {'1', '1'}, {'j', 'o'}, {'j', 'o'}}, // pmi 15
{{'1', '1'}, {'j', 'j'}, {'1', 'n'}, {'j', 'o'}}, // pmi 16
{{'1', '1'}, {'j', 'j'}, {'j', 'o'}, {'n', '1'}}, {{'1', '1'}, {'n', 'n'}, {'1', 'n'}, {'n', '1'}},
{{'1', '1'}, {'n', 'n'}, {'j', 'o'}, {'o', 'j'}}, // pmi 19
{{'1', '1'}, {'o', 'o'}, {'1', 'n'}, {'o', 'j'}}, {{'1', '1'}, {'o', 'o'}, {'j', 'o'}, {'1', 'n'}} // pmi 21
};
//Table 6.3.1.5-6 Precoding Matrix W 3 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_3l_4p[7][4][3] = {
{{'1', '0', '0'}, {'0', '1', '0'}, {'0', '0', '1'},{'0', '0', '0'}},//pmi 0
{{'1', '0', '0'}, {'0', '1', '0'}, {'1', '0', '0'},{'0', '0', '1'}},
{{'1', '0', '0'}, {'0', '1', '0'}, {'n', '0', '0'},{'0', '0', '1'}},
{{'1', '1', '1'}, {'1', 'n', '1'}, {'1', '1', 'n'},{'1', 'n', 'n'}},//pmi 3
{{'1', '1', '1'}, {'1', 'n', '1'}, {'j', 'j', 'o'},{'j', 'o', 'o'}},//pmi 4
{{'1', '1', '1'}, {'n', '1', 'n'}, {'1', '1', 'n'},{'n', '1', '1'}},
{{'1', '1', '1'}, {'n', '1', 'n'}, {'j', 'j', 'o'},{'o', 'j', 'j'}}
};
const char nr_W_3l_4p[7][4][3] = {{{'1', '0', '0'}, {'0', '1', '0'}, {'0', '0', '1'}, {'0', '0', '0'}}, // pmi 0
{{'1', '0', '0'}, {'0', '1', '0'}, {'1', '0', '0'}, {'0', '0', '1'}},
{{'1', '0', '0'}, {'0', '1', '0'}, {'n', '0', '0'}, {'0', '0', '1'}},
{{'1', '1', '1'}, {'1', 'n', '1'}, {'1', '1', 'n'}, {'1', 'n', 'n'}}, // pmi 3
{{'1', '1', '1'}, {'1', 'n', '1'}, {'j', 'j', 'o'}, {'j', 'o', 'o'}}, // pmi 4
{{'1', '1', '1'}, {'n', '1', 'n'}, {'1', '1', 'n'}, {'n', '1', '1'}},
{{'1', '1', '1'}, {'n', '1', 'n'}, {'j', 'j', 'o'}, {'o', 'j', 'j'}}};
//Table 6.3.1.5-7 Precoding Matrix W 4 layers 4 antenna ports 'n' = -1 and 'o' = -j
char nr_W_4l_4p[5][4][4] = {
{{'1', '0', '0', '0'}, {'0', '1', '0', '0'}, {'0', '0', '1', '0'}, {'0', '0', '0', '1'}},//pmi 0
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'1', 'n', '0', '0'}, {'0', '0', '1', 'n'}},
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'j', 'o', '0', '0'}, {'0', '0', 'j', 'o'}},
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'1', '1', 'n', 'n'}, {'1', 'n', 'n', '1'}},//pmi 3
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'j', 'j', 'o', 'o'}, {'j', 'o', 'o', 'j'}}//pmi 4
const char nr_W_4l_4p[5][4][4] = {
{{'1', '0', '0', '0'}, {'0', '1', '0', '0'}, {'0', '0', '1', '0'}, {'0', '0', '0', '1'}}, // pmi 0
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'1', 'n', '0', '0'}, {'0', '0', '1', 'n'}},
{{'1', '1', '0', '0'}, {'0', '0', '1', '1'}, {'j', 'o', '0', '0'}, {'0', '0', 'j', 'o'}},
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'1', '1', 'n', 'n'}, {'1', 'n', 'n', '1'}}, // pmi 3
{{'1', '1', '1', '1'}, {'1', 'n', '1', 'n'}, {'j', 'j', 'o', 'o'}, {'j', 'o', 'o', 'j'}} // pmi 4
};
void nr_modulation(uint32_t *in,
@@ -673,7 +665,7 @@ void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp)
}
}
int nr_layer_precoder(int16_t **datatx_F_precoding, char *prec_matrix, uint8_t n_layers, int32_t re_offset)
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset)
{
int32_t precodatatx_F = 0;
+7 -10
View File
@@ -29,12 +29,12 @@
#define DMRS_MOD_ORDER 2
/*Precoding matices: W[pmi][antenna_port][layer]*/
extern char nr_W_1l_2p[6][2][1];
extern char nr_W_2l_2p[3][2][2];
extern char nr_W_1l_4p[28][4][1];
extern char nr_W_2l_4p[22][4][2];
extern char nr_W_3l_4p[7][4][3];
extern char nr_W_4l_4p[5][4][4];
extern const char nr_W_1l_2p[6][2][1];
extern const char nr_W_2l_2p[3][2][2];
extern const char nr_W_1l_4p[28][4][1];
extern const char nr_W_2l_4p[22][4][2];
extern const char nr_W_3l_4p[7][4][3];
extern const char nr_W_4l_4p[5][4][4];
/*! \brief Perform NR modulation. TS 38.211 V15.4.0 subclause 5.1
@param[in] in, Pointer to input bits
@param[in] length, size of input bits
@@ -129,10 +129,7 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms,
@param[in] prec_matrix, Pointer to precoding matrix
@param[in] n_layers, number of DLSCH layers
*/
int nr_layer_precoder(int16_t **datatx_F_precoding,
char *prec_matrix,
uint8_t n_layers,
int32_t re_offset);
int nr_layer_precoder(int16_t **datatx_F_precoding, const char *prec_matrix, uint8_t n_layers, int32_t re_offset);
int nr_layer_precoder_cm(int16_t **datatx_F_precoding,
int *prec_matrix,
@@ -787,11 +787,11 @@ int nr_srs_channel_estimation(const PHY_VARS_gNB *gNB,
} else if(subcarrier < K_TC) { // Start of OFDM symbol case
// filt8_start is {12288,8192,4096,0,0,0,0,0}
srs_estimated_channel16 = (int16_t *)&srs_est[subcarrier];
short *filter = mem_offset==0 ? filt8_start:filt8_start_shift2;
const short *filter = mem_offset == 0 ? filt8_start : filt8_start_shift2;
multadd_real_vector_complex_scalar(filter, ls_estimated, srs_estimated_channel16, 8);
} else if((subcarrier+K_TC)>=frame_parms->ofdm_symbol_size || k == (M_sc_b_SRS-1)) { // End of OFDM symbol or last subcarrier cases
// filt8_end is {4096,8192,12288,16384,0,0,0,0}
short *filter = mem_offset==0 || k == (M_sc_b_SRS-1) ? filt8_end:filt8_end_shift2;
const short *filter = mem_offset == 0 || k == (M_sc_b_SRS - 1) ? filt8_end : filt8_end_shift2;
multadd_real_vector_complex_scalar(filter, ls_estimated, srs_estimated_channel16, 8);
} else if(k%2 == 1) { // 1st middle case
// filt8_middle2 is {4096,8192,8192,8192,4096,0,0,0}
+18 -21
View File
@@ -40,16 +40,20 @@
#include "PHY/defs_gNB.h"
// Table 6.4.1.1.3-1/2 from TS 38.211
int delta1[8] = {0, 0, 1, 1, 0, 0, 1, 1};
int wf1[8][2] = {{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1}};
int wt1[8][2] = {{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1}};
int delta2[12] = {0, 0, 2, 2, 4, 4, 0, 0, 2, 2, 4, 4};
int wf2[12][2] = {{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1},{1,1},{1,-1}};
int wt2[12][2] = {{1,1},{1,1},{1,1},{1,1},{1,1},{1,1},{1,-1},{1,-1},{1,-1},{1,-1},{1,-1},{1,-1}};
static const int delta1[8] = {0, 0, 1, 1, 0, 0, 1, 1};
static const int wf1[8][2] = {{1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}};
static const int wt1[8][2] = {{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, -1}, {1, -1}, {1, -1}, {1, -1}};
static const int delta2[12] = {0, 0, 2, 2, 4, 4, 0, 0, 2, 2, 4, 4};
static const int wf2[12][2] =
{{1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}, {1, 1}, {1, -1}};
static const int wt2[12][2] =
{{1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, 1}, {1, -1}, {1, -1}, {1, -1}, {1, -1}, {1, -1}, {1, -1}};
// complex conjugate of mod table
short nr_rx_mod_table[14] = {0,0,23170,-23170,-23170,23170,23170,-23170,23170,23170,-23170,-23170,-23170,23170};
short nr_rx_nmod_table[14] = {0,0,-23170,23170,23170,-23170,-23170,23170,-23170,-23170,23170,23170,23170,-23170};
static const short nr_rx_mod_table[14] =
{0, 0, 23170, -23170, -23170, 23170, 23170, -23170, 23170, 23170, -23170, -23170, -23170, 23170};
static const short nr_rx_nmod_table[14] =
{0, 0, -23170, 23170, 23170, -23170, -23170, 23170, -23170, -23170, 23170, 23170, 23170, -23170};
int nr_pusch_dmrs_delta(uint8_t dmrs_config_type, unsigned short p) {
if (dmrs_config_type == pusch_dmrs_type1) {
@@ -70,14 +74,11 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
uint8_t dmrs_type)
{
int8_t w, nb_dmrs;
short *mod_table;
unsigned char idx=0;
int k;
typedef int array_of_w[2];
array_of_w *wf;
array_of_w *wt;
wf = (dmrs_type==pusch_dmrs_type1) ? wf1 : wf2;
wt = (dmrs_type==pusch_dmrs_type1) ? wt1 : wt2;
const array_of_w *wf = (dmrs_type == pusch_dmrs_type1) ? wf1 : wf2;
const array_of_w *wt = (dmrs_type == pusch_dmrs_type1) ? wt1 : wt2;
int dmrs_offset = re_offset/((dmrs_type==pusch_dmrs_type1)?2:3);
@@ -90,7 +91,7 @@ int nr_pusch_dmrs_rx(PHY_VARS_gNB *gNB,
for (int i=dmrs_offset; i<dmrs_offset+(nb_pusch_rb*nb_dmrs); i++) {
k = i-dmrs_offset;
w = (wf[p-1000][i&1])*(wt[p-1000][lp]);
mod_table = (w==1) ? nr_rx_mod_table : nr_rx_nmod_table;
const short *mod_table = (w == 1) ? nr_rx_mod_table : nr_rx_nmod_table;
idx = ((((nr_gold_pusch[(i<<1)>>5])>>((i<<1)&0x1f))&1)<<1) ^ (((nr_gold_pusch[((i<<1)+1)>>5])>>(((i<<1)+1)&0x1f))&1);
((int16_t*)output)[k<<1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx)<<1];
@@ -124,15 +125,11 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
uint8_t config_type)
{
int8_t w;
short *mod_table;
unsigned char idx=0;
typedef int array_of_w[2];
array_of_w *wf;
array_of_w *wt;
wf = (config_type==NFAPI_NR_DMRS_TYPE1) ? wf1 : wf2;
wt = (config_type==NFAPI_NR_DMRS_TYPE1) ? wt1 : wt2;
const array_of_w *wf = (config_type == NFAPI_NR_DMRS_TYPE1) ? wf1 : wf2;
const array_of_w *wt = (config_type == NFAPI_NR_DMRS_TYPE1) ? wt1 : wt2;
if (config_type > 1)
LOG_E(PHY,"Bad PDSCH DMRS config type %d\n", config_type);
@@ -141,7 +138,7 @@ int nr_pdsch_dmrs_rx(PHY_VARS_NR_UE *ue,
if (ue->frame_parms.Ncp == NORMAL) {
for (int i = 0; i < nb_pdsch_rb * ((config_type == NFAPI_NR_DMRS_TYPE1) ? 6 : 4); i++) {
w = (wf[p - 1000][i & 1]) * (wt[p - 1000][lp]);
mod_table = (w == 1) ? nr_rx_mod_table : nr_rx_nmod_table;
const short *mod_table = (w == 1) ? nr_rx_mod_table : nr_rx_nmod_table;
idx = ((((nr_gold_pdsch[(i << 1) >> 5]) >> ((i << 1) & 0x1f)) & 1) << 1) ^ (((nr_gold_pdsch[((i << 1) + 1) >> 5]) >> (((i << 1) + 1) & 0x1f)) & 1);
((int16_t *)output)[i << 1] = mod_table[(NR_MOD_TABLE_QPSK_OFFSET + idx) << 1];
+7 -8
View File
@@ -43,16 +43,15 @@
// TS 38.211 Table 6.4.1.2.2.1-1: The parameter kRE_ref.
// The first 4 colomns are DM-RS Configuration type 1 and the last 4 colomns are DM-RS Configuration type 2.
int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref [6][8] = {
{ 0, 2, 6, 8, 0, 1, 6, 7},
{ 2, 4, 8, 10, 1, 6, 7, 0},
{ 1, 3, 7, 9, 2, 3, 8, 9},
{ 3, 5, 9, 11, 3, 8, 9, 2},
{-1, -1, -1, -1, 4, 5, 10, 11},
{-1, -1, -1, -1, 5, 10, 11, 4},
static const int16_t table_6_4_1_2_2_1_1_pusch_ptrs_kRE_ref[6][8] = {
{0, 2, 6, 8, 0, 1, 6, 7},
{2, 4, 8, 10, 1, 6, 7, 0},
{1, 3, 7, 9, 2, 3, 8, 9},
{3, 5, 9, 11, 3, 8, 9, 2},
{-1, -1, -1, -1, 4, 5, 10, 11},
{-1, -1, -1, -1, 5, 10, 11, 4},
};
/*******************************************************************
*
* NAME : get_kRE_ref
+2 -6
View File
@@ -33,11 +33,7 @@
#include "PHY/defs_gNB.h"
#include "PHY/NR_TRANSPORT/nr_transport_proto.h"
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
extern uint16_t prach_root_sequence_map_0_3[838];
extern uint16_t prach_root_sequence_map_abc[138];
extern uint16_t nr_du[838];
extern const char *prachfmt[];
#include "openair1/PHY/NR_TRANSPORT/nr_prach.h"
void init_prach_list(PHY_VARS_gNB *gNB)
{
@@ -442,7 +438,7 @@ void rx_nr_prach(PHY_VARS_gNB *gNB,
uint16_t preamble_index0=0,n_shift_ra=0,n_shift_ra_bar;
uint16_t d_start=0;
uint16_t numshift=0;
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
uint8_t not_found;
uint16_t u;
int16_t *Xu=0;
+45 -56
View File
@@ -30,66 +30,55 @@
* \warning
*/
int16_t nr_ru[2*839]; // quantized roots of unity
uint32_t nr_ZC_inv[839]; // multiplicative inverse for roots u
uint16_t nr_du[838];
extern int16_t nr_ru[2 * 839]; // quantized roots of unity
extern uint16_t nr_du[838];
static const char* const prachfmt[] = {"0", "1", "2", "3", "A1", "A2", "A3", "B1", "B4", "C0", "C2", "A1/B1", "A2/B2", "A3/B3"};
/*************************************
* The following tables defined for NR
**************************************/
//Table 6.3.3.1-3: Mapping from logical index i to sequence number u for preamble formats with L_RA = 839
uint16_t prach_root_sequence_map_0_3[838] = {
129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84 , 755, 105, 734, 93 , 746, 70 , 769, 60 , 779,
2 , 837, 1 , 838, 56 , 783, 112, 727, 148, 691, 80 , 759, 42 , 797, 40 , 799, 35 , 804, 73 , 766,
146, 693, 31 , 808, 28 , 811, 30 , 809, 27 , 812, 29 , 810, 24 , 815, 48 , 791, 68 , 771, 74 , 765,
178, 661, 136, 703, 86 , 753, 78 , 761, 43 , 796, 39 , 800, 20 , 819, 21 , 818, 95 , 744, 202, 637,
190, 649, 181, 658, 137, 702, 125, 714, 151, 688, 217, 622, 128, 711, 142, 697, 122, 717, 203, 636,
118, 721, 110, 729, 89 , 750, 103, 736, 61 , 778, 55 , 784, 15 , 824, 14 , 825, 12 , 827, 23 , 816,
34 , 805, 37 , 802, 46 , 793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616, 228, 611, 227, 612,
132, 707, 133, 706, 143, 696, 135, 704, 161, 678, 201, 638, 173, 666, 106, 733, 83 , 756, 91 , 748,
66 , 773, 53 , 786, 10 , 829, 9 , 830, 7 , 832, 8 , 831, 16 , 823, 47 , 792, 64 , 775, 57 , 782,
104, 735, 101, 738, 108, 731, 208, 631, 184, 655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690,
216, 623, 218, 621, 152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720,
158, 681, 164, 675, 174, 665, 171, 668, 170, 669, 87 , 752, 169, 670, 88 , 751, 107, 732, 81 , 758,
82 , 757, 100, 739, 98 , 741, 71 , 768, 59 , 780, 65 , 774, 50 , 789, 49 , 790, 26 , 813, 17 , 822,
13 , 826, 6 , 833, 5 , 834, 33 , 806, 51 , 788, 75 , 764, 99 , 740, 96 , 743, 97 , 742, 166, 673,
172, 667, 175, 664, 187, 652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645,
195, 644, 192, 647, 182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627,
153, 686, 213, 626, 215, 624, 150, 689, 225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692,
124, 715, 193, 646, 205, 634, 206, 633, 116, 723, 160, 679, 186, 653, 167, 672, 79 , 760, 85 , 754,
77 , 762, 92 , 747, 58 , 781, 62 , 777, 69 , 770, 54 , 785, 36 , 803, 32 , 807, 25 , 814, 18 , 821,
11 , 828, 4 , 835, 3 , 836, 19 , 820, 22 , 817, 41 , 798, 38 , 801, 44 , 795, 52 , 787, 45 , 794,
63 , 776, 67 , 772, 72 , 767, 76 , 763, 94 , 745, 102, 737, 90 , 749, 109, 730, 165, 674, 111, 728,
209, 630, 204, 635, 117, 722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662,
196, 643, 155, 684, 214, 625, 126, 713, 131, 708, 219, 620, 222, 617, 226, 613, 230, 609, 232, 607,
262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395, 444, 283, 556, 285, 554,
379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478, 387, 452, 360, 479, 310, 529,
354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324, 515, 323, 516, 320, 519, 334, 505,
359, 480, 295, 544, 385, 454, 292, 547, 291, 548, 381, 458, 399, 440, 380, 459, 397, 442, 369, 470,
377, 462, 410, 429, 407, 432, 281, 558, 414, 425, 247, 592, 277, 562, 271, 568, 272, 567, 264, 575,
259, 580, 237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250, 589, 246, 593, 417, 422,
248, 591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319, 520,
332, 507, 333, 506, 348, 491, 347, 492, 322, 517, 330, 509, 338, 501, 341, 498, 340, 499, 342, 497,
301, 538, 366, 473, 401, 438, 371, 468, 408, 431, 375, 464, 249, 590, 269, 570, 238, 601, 234, 605,
257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372, 467, 282, 557, 403, 436,
396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495, 345, 494,
318, 521, 331, 508, 325, 514, 321, 518, 346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439,
378, 461, 374, 465, 415, 424, 270, 569, 241, 598, 231, 608, 260, 579, 268, 571, 276, 563, 409, 430,
398, 441, 290, 549, 304, 535, 308, 531, 358, 481, 316, 523, 293, 546, 288, 551, 284, 555, 368, 471,
253, 586, 256, 583, 263, 576, 242, 597, 274, 565, 402, 437, 383, 456, 357, 482, 329, 510, 317, 522,
307, 532, 286, 553, 287, 552, 266, 573, 261, 578, 236, 603, 303, 536, 356, 483, 355, 484, 405, 434,
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543,
336, 503, 305, 534, 373, 466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610
};
static const uint16_t prach_root_sequence_map_0_3[838] = {
129, 710, 140, 699, 120, 719, 210, 629, 168, 671, 84, 755, 105, 734, 93, 746, 70, 769, 60, 779, 2, 837, 1, 838, 56,
783, 112, 727, 148, 691, 80, 759, 42, 797, 40, 799, 35, 804, 73, 766, 146, 693, 31, 808, 28, 811, 30, 809, 27, 812,
29, 810, 24, 815, 48, 791, 68, 771, 74, 765, 178, 661, 136, 703, 86, 753, 78, 761, 43, 796, 39, 800, 20, 819, 21,
818, 95, 744, 202, 637, 190, 649, 181, 658, 137, 702, 125, 714, 151, 688, 217, 622, 128, 711, 142, 697, 122, 717, 203, 636,
118, 721, 110, 729, 89, 750, 103, 736, 61, 778, 55, 784, 15, 824, 14, 825, 12, 827, 23, 816, 34, 805, 37, 802, 46,
793, 207, 632, 179, 660, 145, 694, 130, 709, 223, 616, 228, 611, 227, 612, 132, 707, 133, 706, 143, 696, 135, 704, 161, 678,
201, 638, 173, 666, 106, 733, 83, 756, 91, 748, 66, 773, 53, 786, 10, 829, 9, 830, 7, 832, 8, 831, 16, 823, 47,
792, 64, 775, 57, 782, 104, 735, 101, 738, 108, 731, 208, 631, 184, 655, 197, 642, 191, 648, 121, 718, 141, 698, 149, 690,
216, 623, 218, 621, 152, 687, 144, 695, 134, 705, 138, 701, 199, 640, 162, 677, 176, 663, 119, 720, 158, 681, 164, 675, 174,
665, 171, 668, 170, 669, 87, 752, 169, 670, 88, 751, 107, 732, 81, 758, 82, 757, 100, 739, 98, 741, 71, 768, 59, 780,
65, 774, 50, 789, 49, 790, 26, 813, 17, 822, 13, 826, 6, 833, 5, 834, 33, 806, 51, 788, 75, 764, 99, 740, 96,
743, 97, 742, 166, 673, 172, 667, 175, 664, 187, 652, 163, 676, 185, 654, 200, 639, 114, 725, 189, 650, 115, 724, 194, 645,
195, 644, 192, 647, 182, 657, 157, 682, 156, 683, 211, 628, 154, 685, 123, 716, 139, 700, 212, 627, 153, 686, 213, 626, 215,
624, 150, 689, 225, 614, 224, 615, 221, 618, 220, 619, 127, 712, 147, 692, 124, 715, 193, 646, 205, 634, 206, 633, 116, 723,
160, 679, 186, 653, 167, 672, 79, 760, 85, 754, 77, 762, 92, 747, 58, 781, 62, 777, 69, 770, 54, 785, 36, 803, 32,
807, 25, 814, 18, 821, 11, 828, 4, 835, 3, 836, 19, 820, 22, 817, 41, 798, 38, 801, 44, 795, 52, 787, 45, 794,
63, 776, 67, 772, 72, 767, 76, 763, 94, 745, 102, 737, 90, 749, 109, 730, 165, 674, 111, 728, 209, 630, 204, 635, 117,
722, 188, 651, 159, 680, 198, 641, 113, 726, 183, 656, 180, 659, 177, 662, 196, 643, 155, 684, 214, 625, 126, 713, 131, 708,
219, 620, 222, 617, 226, 613, 230, 609, 232, 607, 262, 577, 252, 587, 418, 421, 416, 423, 413, 426, 411, 428, 376, 463, 395,
444, 283, 556, 285, 554, 379, 460, 390, 449, 363, 476, 384, 455, 388, 451, 386, 453, 361, 478, 387, 452, 360, 479, 310, 529,
354, 485, 328, 511, 315, 524, 337, 502, 349, 490, 335, 504, 324, 515, 323, 516, 320, 519, 334, 505, 359, 480, 295, 544, 385,
454, 292, 547, 291, 548, 381, 458, 399, 440, 380, 459, 397, 442, 369, 470, 377, 462, 410, 429, 407, 432, 281, 558, 414, 425,
247, 592, 277, 562, 271, 568, 272, 567, 264, 575, 259, 580, 237, 602, 239, 600, 244, 595, 243, 596, 275, 564, 278, 561, 250,
589, 246, 593, 417, 422, 248, 591, 394, 445, 393, 446, 370, 469, 365, 474, 300, 539, 299, 540, 364, 475, 362, 477, 298, 541,
312, 527, 313, 526, 314, 525, 353, 486, 352, 487, 343, 496, 327, 512, 350, 489, 326, 513, 319, 520, 332, 507, 333, 506, 348,
491, 347, 492, 322, 517, 330, 509, 338, 501, 341, 498, 340, 499, 342, 497, 301, 538, 366, 473, 401, 438, 371, 468, 408, 431,
375, 464, 249, 590, 269, 570, 238, 601, 234, 605, 257, 582, 273, 566, 255, 584, 254, 585, 245, 594, 251, 588, 412, 427, 372,
467, 282, 557, 403, 436, 396, 443, 392, 447, 391, 448, 382, 457, 389, 450, 294, 545, 297, 542, 311, 528, 344, 495, 345, 494,
318, 521, 331, 508, 325, 514, 321, 518, 346, 493, 339, 500, 351, 488, 306, 533, 289, 550, 400, 439, 378, 461, 374, 465, 415,
424, 270, 569, 241, 598, 231, 608, 260, 579, 268, 571, 276, 563, 409, 430, 398, 441, 290, 549, 304, 535, 308, 531, 358, 481,
316, 523, 293, 546, 288, 551, 284, 555, 368, 471, 253, 586, 256, 583, 263, 576, 242, 597, 274, 565, 402, 437, 383, 456, 357,
482, 329, 510, 317, 522, 307, 532, 286, 553, 287, 552, 266, 573, 261, 578, 236, 603, 303, 536, 356, 483, 355, 484, 405, 434,
404, 435, 406, 433, 235, 604, 267, 572, 302, 537, 309, 530, 265, 574, 233, 606, 367, 472, 296, 543, 336, 503, 305, 534, 373,
466, 280, 559, 279, 560, 419, 420, 240, 599, 258, 581, 229, 610};
// Table 6.3.3.1-4: Mapping from logical index i to sequence number u for preamble formats with L_RA = 139
uint16_t prach_root_sequence_map_abc[138] = {
1 , 138, 2 , 137, 3 , 136, 4 , 135, 5 , 134, 6 , 133, 7 , 132, 8 , 131, 9 , 130, 10, 129,
11, 128, 12, 127, 13, 126, 14, 125, 15, 124, 16, 123, 17, 122, 18, 121, 19, 120, 20, 119,
21, 118, 22, 117, 23, 116, 24, 115, 25, 114, 26, 113, 27, 112, 28, 111, 29, 110, 30, 109,
31, 108, 32, 107, 33, 106, 34, 105, 35, 104, 36, 103, 37, 102, 38, 101, 39, 100, 40, 99 ,
41, 98 , 42, 97 , 43, 96 , 44, 95 , 45, 94 , 46, 93 , 47, 92 , 48, 91 , 49, 90 , 50, 89 ,
51, 88 , 52, 87 , 53, 86 , 54, 85 , 55, 84 , 56, 83 , 57, 82 , 58, 81 , 59, 80 , 60, 79 ,
61, 78 , 62, 77 , 63, 76 , 64, 75 , 65, 74 , 66, 73 , 67, 72 , 68, 71 , 69, 70
};
static const uint16_t prach_root_sequence_map_abc[138] = {
1, 138, 2, 137, 3, 136, 4, 135, 5, 134, 6, 133, 7, 132, 8, 131, 9, 130, 10, 129, 11, 128, 12, 127, 13, 126, 14, 125,
15, 124, 16, 123, 17, 122, 18, 121, 19, 120, 20, 119, 21, 118, 22, 117, 23, 116, 24, 115, 25, 114, 26, 113, 27, 112, 28, 111,
29, 110, 30, 109, 31, 108, 32, 107, 33, 106, 34, 105, 35, 104, 36, 103, 37, 102, 38, 101, 39, 100, 40, 99, 41, 98, 42, 97,
43, 96, 44, 95, 45, 94, 46, 93, 47, 92, 48, 91, 49, 90, 50, 89, 51, 88, 52, 87, 53, 86, 54, 85, 55, 84, 56, 83,
57, 82, 58, 81, 59, 80, 60, 79, 61, 78, 62, 77, 63, 76, 64, 75, 65, 74, 66, 73, 67, 72, 68, 71, 69, 70};
+5 -4
View File
@@ -38,8 +38,9 @@
#include "common/utils/LOG/log.h"
#include "common/utils/LOG/vcd_signal_dumper.h"
#include "T.h"
int16_t nr_ru[2 * 839]; // quantized roots of unity
static uint32_t nr_ZC_inv[839]; // multiplicative inverse for roots u
uint16_t nr_du[838];
/*void dump_nr_prach_config(NR_DL_FRAME_PARMS *frame_parms,uint8_t subframe) {
@@ -78,7 +79,7 @@
}*/
// This function computes the du
void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map)
void nr_fill_du(uint16_t N_ZC, const uint16_t *prach_root_sequence_map)
{
uint16_t iu,u,p;
@@ -105,7 +106,7 @@ void compute_nr_prach_seq(uint8_t short_sequence,
unsigned int k,inv_u,i;
int N_ZC;
uint16_t *prach_root_sequence_map;
const uint16_t *prach_root_sequence_map;
uint16_t u;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_COMPUTE_PRACH, VCD_FUNCTION_IN);
+20 -20
View File
@@ -34,27 +34,27 @@
/*Table 7.4.1.1.2-1 and 7.4.1.1.2-2 38211 Columns: ap - CDM group - Delta - Wf(0) - Wf(1) - Wt(0) - Wt(1)*/
/*Table 6.4.1.1.3-1 is identical to Table 7.4.1.1.2-1 and Table 6.4.1.1.3-2 is identical to Table 7.4.1.1.2-2. UL DMRS can reuse these tables*/
int8_t pdsch_dmrs_1[8][7] = {{0,0,0,1,1,1,1},
{1,0,0,1,-1,1,1},
{2,1,1,1,1,1,1},
{3,1,1,1,-1,1,1},
{4,0,0,1,1,1,-1},
{5,0,0,1,-1,1,-1},
{6,1,1,1,1,1,-1},
{7,1,1,1,-1,1,-1}};
static const int8_t pdsch_dmrs_1[8][7] = {{0, 0, 0, 1, 1, 1, 1},
{1, 0, 0, 1, -1, 1, 1},
{2, 1, 1, 1, 1, 1, 1},
{3, 1, 1, 1, -1, 1, 1},
{4, 0, 0, 1, 1, 1, -1},
{5, 0, 0, 1, -1, 1, -1},
{6, 1, 1, 1, 1, 1, -1},
{7, 1, 1, 1, -1, 1, -1}};
int8_t pdsch_dmrs_2[12][7] = {{0,0,0,1,1,1,1},
{1,0,0,1,-1,1,1},
{2,1,2,1,1,1,1},
{3,1,2,1,-1,1,1},
{4,2,4,1,1,1,1},
{5,2,4,1,-1,1,1},
{6,0,0,1,1,1,-1},
{7,0,0,1,-1,1,-1},
{8,1,2,1,1,1,-1},
{9,1,2,1,-1,1,-1},
{10,2,4,1,1,1,-1},
{11,2,4,1,-1,1,-1}};
static const int8_t pdsch_dmrs_2[12][7] = {{0, 0, 0, 1, 1, 1, 1},
{1, 0, 0, 1, -1, 1, 1},
{2, 1, 2, 1, 1, 1, 1},
{3, 1, 2, 1, -1, 1, 1},
{4, 2, 4, 1, 1, 1, 1},
{5, 2, 4, 1, -1, 1, 1},
{6, 0, 0, 1, 1, 1, -1},
{7, 0, 0, 1, -1, 1, -1},
{8, 1, 2, 1, 1, 1, -1},
{9, 1, 2, 1, -1, 1, -1},
{10, 2, 4, 1, 1, 1, -1},
{11, 2, 4, 1, -1, 1, -1}};
void get_antenna_ports(uint8_t *ap, uint8_t n_symbs, uint8_t config) {
if (config == NFAPI_NR_DMRS_TYPE1)
@@ -64,7 +64,7 @@ void compute_nr_prach_seq(uint8_t short_sequence,
uint8_t rootSequenceIndex,
uint32_t X_u[64][839]);
void nr_fill_du(uint16_t N_ZC,uint16_t *prach_root_sequence_map);
void nr_fill_du(uint16_t N_ZC, const uint16_t *prach_root_sequence_map);
void init_nr_prach_tables(int N_ZC);
+4 -13
View File
@@ -116,10 +116,8 @@ int get_pucch0_cs_lut_index(PHY_VARS_gNB *gNB,nfapi_nr_pucch_pdu_t* pucch_pdu) {
gNB->pucch0_lut.nb_id++;
return(gNB->pucch0_lut.nb_id-1);
}
int16_t idft12_re[12][12] = {
static const int16_t idft12_re[12][12] = {
{23170,23170,23170,23170,23170,23170,23170,23170,23170,23170,23170,23170},
{23170,20066,11585,0,-11585,-20066,-23170,-20066,-11585,0,11585,20066},
{23170,11585,-11585,-23170,-11585,11585,23170,11585,-11585,-23170,-11585,11585},
@@ -134,7 +132,7 @@ int16_t idft12_re[12][12] = {
{23170,20066,11585,0,-11585,-20066,-23170,-20066,-11585,0,11585,20066}
};
int16_t idft12_im[12][12] = {
static const int16_t idft12_im[12][12] = {
{0,0,0,0,0,0,0,0,0,0,0,0},
{0,11585,20066,23170,20066,11585,0,-11585,-20066,-23170,-20066,-11585},
{0,20066,20066,0,-20066,-20066,0,20066,20066,0,-20066,-20066},
@@ -975,15 +973,8 @@ __m256i pucch2_9bit[512*2];
__m256i pucch2_10bit[1024*2];
__m256i pucch2_11bit[2048*2];
__m256i *pucch2_lut[9]={pucch2_3bit,
pucch2_4bit,
pucch2_5bit,
pucch2_6bit,
pucch2_7bit,
pucch2_8bit,
pucch2_9bit,
pucch2_10bit,
pucch2_11bit};
static __m256i *const pucch2_lut[9] =
{pucch2_3bit, pucch2_4bit, pucch2_5bit, pucch2_6bit, pucch2_7bit, pucch2_8bit, pucch2_9bit, pucch2_10bit, pucch2_11bit};
__m64 pucch2_polar_4bit[16];
__m128i pucch2_polar_llr_num_lut[256],pucch2_polar_llr_den_lut[256];
-367
View File
@@ -1,367 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include "filt16a_32.h"
short filt16a_l0[16] = {
16384,12288,8192,4096,0,0,0,0,0,0,0,0,0,0,0,0};
short filt16a_mm0[16] = {
0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0,0,0,0};
short filt16a_r0[16] = {
0,0,0,0,0,4096,8192,12288,16384,20480,24576,28672,0,0,0,0};
short filt16a_m0[16] = {
0,4096,8192,12288,16384,12288,8192,4096,0,-4096,-8192,-12288,0,0,0,0};
short filt16a_l1[16] = {
20480,16384,12288,8192,4096,0,0,0,0,0,0,0,0,0,0,0};
short filt16a_mm1[16] = {
0,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0,0,0};
short filt16a_ml1[16] = {
-4096,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0,0,0};
short filt16a_mr1[16] = {
0,0,4096,8192,12288,16384,12288,8192,4096,0,-4096,-8192,0,0,0,0};
short filt16a_r1[16] = {
0,0,0,0,0,0,4096,8192,12288,16384,20480,24576,0,0,0,0};
short filt16a_m1[16] = {
-4096,0,4096,8192,12288,16384,12288,8192,4096,0,-4096,-8192,0,0,0,0};
short filt16a_l2[16] = {
24576,20480,16384,12288,8192,4096,0,0,0,0,0,0,0,0,0,0};
short filt16a_mm2[16] = {
0,0,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0,0};
short filt16a_ml2[16] = {
-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0,0};
short filt16a_mr2[16] = {
0,0,0,4096,8192,12288,16384,12288,8192,4096,0,-4096,0,0,0,0};
short filt16a_r2[16] = {
0,0,0,0,0,0,0,4096,8192,12288,16384,20480,0,0,0,0};
short filt16a_m2[16] = {
-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0,-4096,0,0,0,0};
short filt16a_l3[16] = {
28672,24576,20480,16384,12288,8192,4096,0,0,0,0,0,0,0,0,0};
short filt16a_mm3[16] = {
0,0,0,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0};
short filt16a_ml3[16] = {
-12288,-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0};
short filt16a_r3[16] = {
0,0,0,0,0,0,0,0,4096,8192,12288,16384,0,0,0,0};
short filt16a_m3[16] = {
-12288,-8192,-4096,0,4096,8192,12288,16384,12288,8192,4096,0,0,0,0,0};
short filt16a_l0_dc[16] = {
16384,12288,8192,4096,0,0,0,0,0,0,0,0,0,0,0,0};
short filt16a_r0_dc[16] = {
0,0,0,0,0,3276,9830,13107,16384,19660,22937,26214,0,0,0,0};
short filt16a_m0_dc[16] = {
0,4096,8192,12288,16384,13107,6553,3276,0,-3277,-6554,-9831,0,0,0,0};
short filt16a_l1_dc[16] = {
16384,12288,8192,4096,0,-4096,0,0,0,0,0,0,0,0,0,0};
short filt16a_r1_dc[16] = {
0,0,0,0,0,0,6553,9830,13107,16384,19660,22937,0,0,0,0};
short filt16a_m1_dc[16] = {
-4096,0,4096,8192,12288,16384,9830,6553,3276,0,-3277,-6554,0,0,0,0};
short filt16a_l2_dc[16] = {
26214,22937,19660,16384,13107,9830,6553,0,0,0,0,0,0,0,0,0};
short filt16a_r2_dc[16] = {
0,0,0,0,0,0,0,4096,8192,12288,16384,20480,0,0,0,0};
short filt16a_m2_dc[16] = {
-6554,-3277,0,3276,6553,6553,16384,12288,8192,4096,0,-4096,0,0,0,0};
short filt16a_l3_dc[16] = {
26214,22937,19660,16384,13107,9830,3276,0,0,0,0,0,0,0,0,0};
short filt16a_r3_dc[16] = {
0,0,0,0,0,0,0,0,4096,8192,12288,16384,0,0,0,0};
short filt16a_m3_dc[16] = {
-9831,-6554,-3277,0,3276,6553,9830,16384,12288,8192,4096,0,0,0,0,0};
short filt16a_1[16] = {
16384,16384,16384,16384,16384,16384,16384,16384,16384,16384,16384,16384,0,0,0,0};
short filt16a_2l0[16] = {
16384,12288,8192,4096,-4096,0,0,0,0,0,0,0,0,0,0,0};
short filt16a_2r0[16] = {
0,4096,8192,12288,16384,20480,0,0,0,0,0,0,0,0,0,0};
short filt16a_2l1[16] = {
20480,16384,12288,8192,4096,0,0,0,0,0,0,0,0,0,0,0};
short filt16a_2r1[16] = {
-4096,0,4096,8192,12288,16384,0,0,0,0,0,0,0,0,0,0};
/*filter8*/
short filt8_l0[8] = {
16384,8192,0,0,0,0,0,0};
short filt8_mr0[8] = {
0,0,0,8192,16384,8192,0,-8192};
short filt8_r0[8] = {
0,8192,16384,24576,0,0,0,0};
short filt8_m0[8] = {
0,8192,16384,8192,0,0,0,0};
short filt8_mm0[8]= {
0,0,0,8192,16384,8192,0,0};
short filt8_dcma[8]= {
16384,12288,8192,4096,4096,0,0,0};
short filt8_dcmb[8]= {
0,4096,8192,4096,4096,0,0,0};
short filt8_dcmc[8]= {
0,0,0,4096,4096,8192,4096,0};
short filt8_dcmd[8]= {
0,0,0,4096,4096,8192,12288,16384};
short filt8_dcl0[8]= {
0,0,16384,12288,8192,4096,0,0};
short filt8_dcr0[8]= {
0,0,0,4096,8192,12288,16384,0};
short filt8_dcl0_h[8]= {
16384,12288,8192,4096,0,0,0,0};
short filt8_dcr0_h[8]= {
0,4096,8192,12288,16384,0,0,0};
short filt8_l1[8] = {
24576,16384,8192,0,0,0,0,0};
short filt8_ml1[8] = {
-8192,0,8192,16384,8192,0,0,0};
short filt8_r1[8] = {
0,0,8192,16384,0,0,0,0};
short filt8_m1[8] = {
0,0,8192,16384,8192,0,0,0};
short filt8_mm1[8]= {
0,0,0,0,8192,16384,8192,0};
short filt8_dcl1[8]= {
0,0,16384,12288,8192,4096,0,0};
short filt8_dcr1[8]= {
0,0,0,4096,8192,12288,16384,0};
short filt8_dcl1_h[8]= {
0,16384,12288,8192,4096,0,0,0};
short filt8_dcr1_h[8]= {
0,0,4096,8192,12288,16384,0,0};
short filt8_ml2[8] = {
13107,9830,6554,3277,0,0,0,0};
short filt8_mr2[8] = {
3277,6554,9830,13107,0,0,0,0};
short filt8_rr1[8] = {
8192,12288,16384,20480,0,0,0,0};
short filt8_rr2[8] = {
-4096,-8192,-12288,-16384,0,0,0,0};
short filt8_l2[8] = {
0,0,13107,9830,6554,3277,0,0};
short filt8_r2[8] = {
0,0,3277,6554,9830,13107,0,0};
short filt8_m2[8] = {
0,0,0,0,13107,9830,6554,3277};
short filt8_mm2[8]= {
0,0,0,0,3277,6554,9830,13107};
short filt8_rl2[8] = {
19661,22938,26214,29491,0,0,0,0};
short filt8_rm2[8] = {
-3277,-6554,-9830,-13107,0,0,0,0};//-3277,-6554,-9830,-13107
short filt8_l3[8] = {
22938,19661,0,0,13107,9830,6554,3277};
short filt8_r3[8] = {
-7537,-4260,0,0,3277,6554,9830,13107};//-6554,-3277
short filt8_rl3[8] = {
0,0,19661,22938,0,0,0,0};
short filt8_rr3[8] = {
0,0,-4260,-7537,0,0,0,0};//-3277,-6554
short filt8_dcrl1[8] = {
14895,13405,11916,10426,8937,7447,5958,4468};
short filt8_dcrh1[8] = {
2979,1489,0,0,0,0,0,0};
short filt8_dcll1[8] = {
13405,14895,0,0,0,0,0,0};
short filt8_dclh1[8] = {
1489,2979,4468,5958,7447,8937,10426,11916};
short filt8_dcrl2[8] = {
0,0,0,0,14895,13405,11916,10426};
short filt8_dcrh2[8] = {
8937,7447,5958,4468,2979,1489,0,0,};
short filt8_dcll2[8] = {
7447,8937,10426,11916,13405,14895,0,0};
short filt8_dclh2[8] = {
0,0,0,0,1489,2979,4468,5958};
short filt8_avlip0[8] = {
16384,16384,16384,16384,16384,16384,16384,15019};
short filt8_avlip1[8] = {
13653,12288,10923,9557,8192,6827,5461,4096};
short filt8_avlip2[8] = {
2731,1365,0,0,0,0,0,0};
short filt8_avlip3[8] = {
2731,4096,5461,6827,8192,9557,10923,12288};
short filt8_avlip4[8] = {
13653,15019,16384,15019,13653,12288,10923,9557};
short filt8_avlip5[8] = {
8192,6827,5461,4096,2731,1365,0,0};
short filt8_avlip6[8] = {
13653,15019,16384,16384,16384,16384,16384,16384};
// Comb size 2
short filt8_start[8] = {
12288,8192,4096,0,0,0,0,0};
short filt8_start_shift2[8] = {
0, 0, 12288,8192,4096,0,0,0};
short filt8_middle2[8] = {
4096,8192,8192,8192,4096,0,0,0};
short filt8_middle4[8] = {
0,0,4096,8192,8192,8192,4096,0};
short filt8_end[8] = {
4096,8192,12288,16384,0,0,0,0};
short filt8_end_shift2[8] = {
0, 0, 4096,8192,12288,16384,0,0};
// Comb size 4
short filt16_start[16] = {
12288,8192,8192,8192,4096,0,0,0,0,0,0,0,0,0,0,0};
short filt16_middle4[16] = {
4096,8192,8192,8192,8192,8192,8192,8192,4096,0,0,0,0,0,0,0};
short filt16_end[16] = {
4096,8192,8192,8192,12288,16384,16384,16384,0,0,0,0,0,0,0,0};
// CSI-RS
short filt24_start[24] = {
12288,11605,10923,10240,9557,8875,8192,7509,6827,6144,5461,4779,
0,0,0,0,0,0,0,0,0,0,0,0};
short filt24_end[24] = {
4096,4779,5461,6144,6827,7509,8192,8875,9557,10240,10923,11605,
16384,16384,16384,16384,16384,16384,16384,16384,16384,16384,16384,16384};
short filt24_middle[24] = {
4096,4779,5461,6144,6827,7509,8192,8875,9557,10240,10923,11605,
12288,11605,10923,10240,9557,8875,8192,7509,6827,6144,5461,4779};
// UL
short filt16_ul_p0[16] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096,
0, 0, 0, 0, 0, 0, 0, 0};
short filt16_ul_p1p2[16] = {4096, 4096, 4096, 4096, 2048, 2048, 2048, 2048,
2048, 2048, 2048, 2048, 0, 0, 0, 0};
short filt16_ul_middle[16] = {2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,
2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048};
short filt16_ul_last[16] = {4096, 4096, 4096, 4096, 8192, 8192, 8192, 8192,
0, 0, 0, 0, 0, 0, 0, 0};
short filt8_rep4[8] = {16384, 16384, 16384, 16384, 0, 0, 0, 0};
// DL
// DMRS_Type1
short filt16_dl_first[16] = {12228, 12228, 12228, 12228, 8192, 8192, 8192, 8192,
4096, 4096, 4096, 4096, 0, 0, 0, 0};
short filt16_dl_middle[16] = {2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048,
2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048};
short filt16_dl_last[16] = {4096, 4096, 4096, 4096, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0};
// DMRS_Type2
short filt16_dl_first_type2[16] = {16384, 16384, 16384, 8192, 8192, 8192, 8192, 8192,
8192, 0, 0, 0, 0, 0, 0};
short filt16_dl_middle_type2[16] = {8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192,
8192, 8192, 8192, 8192, 0, 0, 0, 0};
short filt16_dl_last_type2[16] = {8192, 8192, 8192, 8192, 8192, 8192, 16384, 16384,
16384, 0, 0, 0, 0, 0, 0, 0};
+153 -123
View File
@@ -18,222 +18,252 @@
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#ifndef __FILT16A_H__
#define __FILT16A_H__
static const short filt16a_l0[16] = {16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
#ifndef __FILT16A_32__H__
#define __FILT16A_32__H__
static const short filt16a_mm0[16] = {0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_l0[16];
static const short filt16a_r0[16] = {0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 20480, 24576, 28672, 0, 0, 0, 0};
extern short filt16a_r0[16];
static const short filt16a_m0[16] = {0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, -4096, -8192, -12288, 0, 0, 0, 0};
extern short filt16a_m0[16];
static const short filt16a_l1[16] = {20480, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_mm0[16];
static const short filt16a_mm1[16] = {0, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_l1[16];
static const short filt16a_ml1[16] = {-4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_r1[16];
static const short filt16a_mr1[16] = {0, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, -4096, -8192, 0, 0, 0, 0};
extern short filt16a_m1[16];
static const short filt16a_r1[16] = {0, 0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 20480, 24576, 0, 0, 0, 0};
extern short filt16a_mm1[16];
static const short filt16a_m1[16] = {-4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, -4096, -8192, 0, 0, 0, 0};
extern short filt16a_mr1[16];
static const short filt16a_l2[16] = {24576, 20480, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_ml1[16];
static const short filt16a_mm2[16] = {0, 0, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0};
extern short filt16a_l2[16];
static const short filt16a_ml2[16] = {-8192, -4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0};
extern short filt16a_r2[16];
static const short filt16a_mr2[16] = {0, 0, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, -4096, 0, 0, 0, 0};
extern short filt16a_m2[16];
static const short filt16a_r2[16] = {0, 0, 0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 20480, 0, 0, 0, 0};
extern short filt16a_mm2[16];
static const short filt16a_m2[16] = {-8192, -4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, -4096, 0, 0, 0, 0};
extern short filt16a_mr2[16];
static const short filt16a_l3[16] = {28672, 24576, 20480, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_ml2[16];
static const short filt16a_mm3[16] = {0, 0, 0, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0};
extern short filt16a_l3[16];
static const short filt16a_ml3[16] = {-12288, -8192, -4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0};
extern short filt16a_r3[16];
static const short filt16a_r3[16] = {0, 0, 0, 0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 0, 0, 0, 0};
extern short filt16a_m3[16];
static const short filt16a_m3[16] = {-12288, -8192, -4096, 0, 4096, 8192, 12288, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0};
extern short filt16a_mm3[16];
static const short filt16a_l0_dc[16] = {16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_ml3[16];
static const short filt16a_r0_dc[16] = {0, 0, 0, 0, 0, 3276, 9830, 13107, 16384, 19660, 22937, 26214, 0, 0, 0, 0};
extern short filt16a_l0_dc[16];
static const short filt16a_m0_dc[16] = {0, 4096, 8192, 12288, 16384, 13107, 6553, 3276, 0, -3277, -6554, -9831, 0, 0, 0, 0};
extern short filt16a_r0_dc[16];
static const short filt16a_l1_dc[16] = {16384, 12288, 8192, 4096, 0, -4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_m0_dc[16];
static const short filt16a_r1_dc[16] = {0, 0, 0, 0, 0, 0, 6553, 9830, 13107, 16384, 19660, 22937, 0, 0, 0, 0};
extern short filt16a_l1_dc[16];
static const short filt16a_m1_dc[16] = {-4096, 0, 4096, 8192, 12288, 16384, 9830, 6553, 3276, 0, -3277, -6554, 0, 0, 0, 0};
extern short filt16a_r1_dc[16];
static const short filt16a_l2_dc[16] = {26214, 22937, 19660, 16384, 13107, 9830, 6553, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_m1_dc[16];
static const short filt16a_r2_dc[16] = {0, 0, 0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 20480, 0, 0, 0, 0};
extern short filt16a_l2_dc[16];
static const short filt16a_m2_dc[16] = {-6554, -3277, 0, 3276, 6553, 6553, 16384, 12288, 8192, 4096, 0, -4096, 0, 0, 0, 0};
extern short filt16a_r2_dc[16];
static const short filt16a_l3_dc[16] = {26214, 22937, 19660, 16384, 13107, 9830, 3276, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_m2_dc[16];
static const short filt16a_r3_dc[16] = {0, 0, 0, 0, 0, 0, 0, 0, 4096, 8192, 12288, 16384, 0, 0, 0, 0};
extern short filt16a_l3_dc[16];
static const short filt16a_m3_dc[16] = {-9831, -6554, -3277, 0, 3276, 6553, 9830, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0};
extern short filt16a_r3_dc[16];
static const short filt16a_1[16] = {16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 0, 0, 0, 0};
extern short filt16a_m3_dc[16];
static const short filt16a_2l0[16] = {16384, 12288, 8192, 4096, -4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_1[16];
static const short filt16a_2r0[16] = {0, 4096, 8192, 12288, 16384, 20480, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_2l0[16];
static const short filt16a_2l1[16] = {20480, 16384, 12288, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
extern short filt16a_2r0[16];
extern short filt16a_2l1[16];
extern short filt16a_2r1[16];
static const short filt16a_2r1[16] = {-4096, 0, 4096, 8192, 12288, 16384, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
/*filter8*/
extern short filt8_l0[8];
static const short filt8_l0[8] = {16384, 8192, 0, 0, 0, 0, 0, 0};
extern short filt8_mr0[8];
static const short filt8_mr0[8] = {0, 0, 0, 8192, 16384, 8192, 0, -8192};
extern short filt8_r0[8];
static const short filt8_r0[8] = {0, 8192, 16384, 24576, 0, 0, 0, 0};
extern short filt8_m0[8];
static const short filt8_m0[8] = {0, 8192, 16384, 8192, 0, 0, 0, 0};
extern short filt8_mm0[8];
static const short filt8_mm0[8] = {0, 0, 0, 8192, 16384, 8192, 0, 0};
extern short filt8_dcma[8];
static const short filt8_dcma[8] = {16384, 12288, 8192, 4096, 4096, 0, 0, 0};
extern short filt8_dcmb[8];
static const short filt8_dcmb[8] = {0, 4096, 8192, 4096, 4096, 0, 0, 0};
extern short filt8_dcmc[8];
static const short filt8_dcmc[8] = {0, 0, 0, 4096, 4096, 8192, 4096, 0};
extern short filt8_dcmd[8];
static const short filt8_dcmd[8] = {0, 0, 0, 4096, 4096, 8192, 12288, 16384};
extern short filt8_dcl0[8];
static const short filt8_dcl0[8] = {0, 0, 16384, 12288, 8192, 4096, 0, 0};
extern short filt8_dcr0[8];
static const short filt8_dcr0[8] = {0, 0, 0, 4096, 8192, 12288, 16384, 0};
extern short filt8_dcl0_h[8];
static const short filt8_dcl0_h[8] = {16384, 12288, 8192, 4096, 0, 0, 0, 0};
extern short filt8_dcr0_h[8];
static const short filt8_dcr0_h[8] = {0, 4096, 8192, 12288, 16384, 0, 0, 0};
extern short filt8_l1[8];
static const short filt8_l1[8] = {24576, 16384, 8192, 0, 0, 0, 0, 0};
extern short filt8_ml1[8];
static const short filt8_ml1[8] = {-8192, 0, 8192, 16384, 8192, 0, 0, 0};
extern short filt8_r1[8];
static const short filt8_r1[8] = {0, 0, 8192, 16384, 0, 0, 0, 0};
extern short filt8_m1[8];
static const short filt8_m1[8] = {0, 0, 8192, 16384, 8192, 0, 0, 0};
extern short filt8_mm1[8];
static const short filt8_mm1[8] = {0, 0, 0, 0, 8192, 16384, 8192, 0};
extern short filt8_dcl1[8];
static const short filt8_dcl1[8] = {0, 0, 16384, 12288, 8192, 4096, 0, 0};
extern short filt8_dcr1[8];
static const short filt8_dcr1[8] = {0, 0, 0, 4096, 8192, 12288, 16384, 0};
extern short filt8_dcl1_h[8];
static const short filt8_dcl1_h[8] = {0, 16384, 12288, 8192, 4096, 0, 0, 0};
extern short filt8_dcr1_h[8];
static const short filt8_dcr1_h[8] = {0, 0, 4096, 8192, 12288, 16384, 0, 0};
extern short filt8_ml2[8];
static const short filt8_ml2[8] = {13107, 9830, 6554, 3277, 0, 0, 0, 0};
extern short filt8_mr2[8];
static const short filt8_mr2[8] = {3277, 6554, 9830, 13107, 0, 0, 0, 0};
extern short filt8_rr1[8];
static const short filt8_rr1[8] = {8192, 12288, 16384, 20480, 0, 0, 0, 0};
extern short filt8_rr2[8];
static const short filt8_rr2[8] = {-4096, -8192, -12288, -16384, 0, 0, 0, 0};
extern short filt8_rm2[8];
static const short filt8_l2[8] = {0, 0, 13107, 9830, 6554, 3277, 0, 0};
extern short filt8_rl2[8];
static const short filt8_r2[8] = {0, 0, 3277, 6554, 9830, 13107, 0, 0};
extern short filt8_l2[8];
static const short filt8_m2[8] = {0, 0, 0, 0, 13107, 9830, 6554, 3277};
extern short filt8_r2[8];
static const short filt8_mm2[8] = {0, 0, 0, 0, 3277, 6554, 9830, 13107};
extern short filt8_m2[8];
static const short filt8_rl2[8] = {19661, 22938, 26214, 29491, 0, 0, 0, 0};
extern short filt8_mm2[8];
static const short filt8_rm2[8] = {-3277, -6554, -9830, -13107, 0, 0, 0, 0}; //-3277,-6554,-9830,-13107
extern short filt8_l3[8];
static const short filt8_l3[8] = {22938, 19661, 0, 0, 13107, 9830, 6554, 3277};
extern short filt8_r3[8];
static const short filt8_r3[8] = {-7537, -4260, 0, 0, 3277, 6554, 9830, 13107}; //-6554,-3277
extern short filt8_rr3[8];
static const short filt8_rl3[8] = {0, 0, 19661, 22938, 0, 0, 0, 0};
extern short filt8_rl3[8];
static const short filt8_rr3[8] = {0, 0, -4260, -7537, 0, 0, 0, 0}; //-3277,-6554
extern short filt8_dcrl1[8];
static const short filt8_dcrl1[8] = {14895, 13405, 11916, 10426, 8937, 7447, 5958, 4468};
extern short filt8_dcrh1[8];
static const short filt8_dcrh1[8] = {2979, 1489, 0, 0, 0, 0, 0, 0};
extern short filt8_dcll1[8];
static const short filt8_dcll1[8] = {13405, 14895, 0, 0, 0, 0, 0, 0};
extern short filt8_dclh1[8];
static const short filt8_dclh1[8] = {1489, 2979, 4468, 5958, 7447, 8937, 10426, 11916};
extern short filt8_dcrl2[8];
static const short filt8_dcrl2[8] = {0, 0, 0, 0, 14895, 13405, 11916, 10426};
extern short filt8_dcrh2[8];
static const short filt8_dcrh2[8] = {
8937,
7447,
5958,
4468,
2979,
1489,
0,
0,
};
extern short filt8_dcll2[8];
static const short filt8_dcll2[8] = {7447, 8937, 10426, 11916, 13405, 14895, 0, 0};
extern short filt8_dclh2[8];
static const short filt8_dclh2[8] = {0, 0, 0, 0, 1489, 2979, 4468, 5958};
extern short filt8_avlip0[8];
static const short filt8_avlip0[8] = {16384, 16384, 16384, 16384, 16384, 16384, 16384, 15019};
extern short filt8_avlip1[8];
static const short filt8_avlip1[8] = {13653, 12288, 10923, 9557, 8192, 6827, 5461, 4096};
extern short filt8_avlip2[8];
static const short filt8_avlip2[8] = {2731, 1365, 0, 0, 0, 0, 0, 0};
extern short filt8_avlip3[8];
static const short filt8_avlip3[8] = {2731, 4096, 5461, 6827, 8192, 9557, 10923, 12288};
extern short filt8_avlip4[8];
static const short filt8_avlip4[8] = {13653, 15019, 16384, 15019, 13653, 12288, 10923, 9557};
extern short filt8_avlip5[8];
static const short filt8_avlip5[8] = {8192, 6827, 5461, 4096, 2731, 1365, 0, 0};
extern short filt8_avlip6[8];
static const short filt8_avlip6[8] = {13653, 15019, 16384, 16384, 16384, 16384, 16384, 16384};
/*Comb size 2*/
extern short filt8_start[8];
extern short filt8_start_shift2[8];
extern short filt8_middle2[8];
extern short filt8_middle4[8];
extern short filt8_end[8];
extern short filt8_end_shift2[8];
// Comb size 2
static const short filt8_start[8] = {12288, 8192, 4096, 0, 0, 0, 0, 0};
/*Comb size 4*/
extern short filt16_start[16];
extern short filt16_middle4[16];
extern short filt16_end[16];
static const short filt8_start_shift2[8] = {0, 0, 12288, 8192, 4096, 0, 0, 0};
/*CSI-RS*/
extern short filt24_start[24];
extern short filt24_end[24];
extern short filt24_middle[24];
static const short filt8_middle2[8] = {4096, 8192, 8192, 8192, 4096, 0, 0, 0};
/*UL*/
extern short filt16_ul_p0[16];
extern short filt16_ul_p1p2[16];
extern short filt16_ul_middle[16];
extern short filt16_ul_last[16];
extern short filt8_rep4[8];
static const short filt8_middle4[8] = {0, 0, 4096, 8192, 8192, 8192, 4096, 0};
/*DL*/
// DL DMRS_Type1
extern short filt16_dl_first[16];
extern short filt16_dl_middle[16];
extern short filt16_dl_last[16];
static const short filt8_end[8] = {4096, 8192, 12288, 16384, 0, 0, 0, 0};
// DL DMRS_Type2
extern short filt16_dl_first_type2[16];
extern short filt16_dl_middle_type2[16];
extern short filt16_dl_last_type2[16];
static const short filt8_end_shift2[8] = {0, 0, 4096, 8192, 12288, 16384, 0, 0};
// Comb size 4
static const short filt16_start[16] = {12288, 8192, 8192, 8192, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short filt16_middle4[16] = {4096, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 4096, 0, 0, 0, 0, 0, 0, 0};
static const short filt16_end[16] = {4096, 8192, 8192, 8192, 12288, 16384, 16384, 16384, 0, 0, 0, 0, 0, 0, 0, 0};
// CSI-RS
static const short filt24_start[24] = {12288, 11605, 10923, 10240, 9557, 8875, 8192, 7509, 6827, 6144, 5461, 4779,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
static const short filt24_end[24] = {4096, 4779, 5461, 6144, 6827, 7509, 8192, 8875, 9557, 10240, 10923, 11605,
16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384, 16384};
static const short filt24_middle[24] = {4096, 4779, 5461, 6144, 6827, 7509, 8192, 8875, 9557, 10240, 10923, 11605,
12288, 11605, 10923, 10240, 9557, 8875, 8192, 7509, 6827, 6144, 5461, 4779};
// UL
static const short filt16_ul_p0[16] = {4096, 4096, 4096, 4096, 4096, 4096, 4096, 4096, 0, 0, 0, 0, 0, 0, 0, 0};
static const short filt16_ul_p1p2[16] = {4096, 4096, 4096, 4096, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 0, 0, 0, 0};
static const short filt16_ul_middle[16] =
{2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048};
static const short filt16_ul_last[16] = {4096, 4096, 4096, 4096, 8192, 8192, 8192, 8192, 0, 0, 0, 0, 0, 0, 0, 0};
static const short filt8_rep4[8] = {16384, 16384, 16384, 16384, 0, 0, 0, 0};
// DL
// DMRS_Type1
static const short filt16_dl_first[16] = {12228, 12228, 12228, 12228, 8192, 8192, 8192, 8192, 4096, 4096, 4096, 4096, 0, 0, 0, 0};
static const short filt16_dl_middle[16] =
{2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048, 2048};
static const short filt16_dl_last[16] = {4096, 4096, 4096, 4096, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
// DMRS_Type2
static const short filt16_dl_first_type2[16] = {16384, 16384, 16384, 8192, 8192, 8192, 8192, 8192, 8192, 0, 0, 0, 0, 0, 0};
static const short filt16_dl_middle_type2[16] =
{8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 8192, 0, 0, 0, 0};
static const short filt16_dl_last_type2[16] = {8192, 8192, 8192, 8192, 8192, 8192, 16384, 16384, 16384, 0, 0, 0, 0, 0, 0, 0};
#endif
@@ -81,8 +81,9 @@ int nr_prs_channel_estimation(uint8_t rsc_id,
int slot_prs = (proc->nr_slot_rx - rep_num*prs_cfg->PRSResourceTimeGap + frame_params->slots_per_frame)%frame_params->slots_per_frame;
uint32_t **nr_gold_prs = ue->nr_gold_prs[gNB_id][rsc_id][slot_prs];
int16_t *rxF, *pil, *fl, *fm, *fmm, *fml, *fmr, *fr, mod_prs[NR_MAX_PRS_LENGTH<<1];
int16_t *rxF, *pil, mod_prs[NR_MAX_PRS_LENGTH << 1];
const int16_t *fl, *fm, *fmm, *fml, *fmr, *fr;
int16_t ch[2] = {0}, noiseFig[2] = {0};
int16_t k_prime = 0, k = 0, re_offset = 0, first_half = 0, second_half = 0;
int32_t ch_pwr = 0, snr = 0;
@@ -737,7 +738,8 @@ int nr_pbch_channel_estimation(PHY_VARS_NR_UE *ue,
int pilot[200] __attribute__((aligned(16)));
unsigned short k;
unsigned int pilot_cnt;
int16_t *pil,*rxF,*dl_ch,*fl,*fm,*fr;
int16_t *pil, *rxF, *dl_ch;
const int16_t *fl, *fm, *fr;
int ch_offset,symbol_offset;
//int slot_pbch;
@@ -1243,10 +1245,10 @@ void NFAPI_NR_DMRS_TYPE1_linear_interp(NR_DL_FRAME_PARMS *frame_parms,
c16_t *dl_ch0 = dl_ch;
c16_t ch = {0};
int16_t *fdcl = NULL;
int16_t *fdcr = NULL;
int16_t *fdclh = NULL;
int16_t *fdcrh = NULL;
const int16_t *fdcl = NULL;
const int16_t *fdcr = NULL;
const int16_t *fdclh = NULL;
const int16_t *fdcrh = NULL;
switch (delta) {
case 0: // port 0,1
fdcl = filt8_dcl0; // left DC interpolation Filter (even RB)
+3 -7
View File
@@ -43,12 +43,7 @@
#include "T.h"
//#define NR_PRACH_DEBUG 1
extern uint16_t prach_root_sequence_map_0_3[838];
extern uint16_t prach_root_sequence_map_abc[138];
extern uint16_t nr_du[838];
extern int16_t nr_ru[2*839];
extern const char *prachfmt[];
#include "openair1/PHY/NR_TRANSPORT/nr_prach.h"
// Note:
// - prach_fmt_id is an ID used to map to the corresponding PRACH format value in prachfmt
@@ -64,7 +59,8 @@ int32_t generate_nr_prach(PHY_VARS_NR_UE *ue, uint8_t gNB_id, int frame, uint8_t
fapi_nr_ul_config_prach_pdu *prach_pdu = &ue->prach_vars[gNB_id]->prach_pdu;
uint8_t Mod_id, fd_occasion, preamble_index, restricted_set, not_found;
uint16_t rootSequenceIndex, prach_fmt_id, NCS, *prach_root_sequence_map, preamble_offset = 0;
uint16_t rootSequenceIndex, prach_fmt_id, NCS, preamble_offset = 0;
const uint16_t *prach_root_sequence_map;
uint16_t preamble_shift = 0, preamble_index0, n_shift_ra, n_shift_ra_bar, d_start=INT16_MAX, numshift, N_ZC, u, offset, offset2, first_nonzero_root_idx;
int16_t prach_tmp[(4688+4*24576)*4*2] __attribute__((aligned(32))) = {0};
int16_t prachF_tmp[(4688+4*24576)*4*2] __attribute__((aligned(32))) = {0};
+1 -1
View File
@@ -530,7 +530,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
}
else {
//get the precoding matrix weights:
char *W_prec;
const char *W_prec;
switch (frame_parms->nb_antennas_tx) {
case 1://1 antenna port
W_prec = nr_W_1l_2p[pmi][ap];
+6 -11
View File
@@ -52,25 +52,20 @@ void multadd_complex_vector_real_scalar(int16_t *x,
}
void multadd_real_vector_complex_scalar(int16_t *x,
int16_t *alpha,
int16_t *y,
uint32_t N)
void multadd_real_vector_complex_scalar(const int16_t *x, const int16_t *alpha, int16_t *y, uint32_t N)
{
uint32_t i;
// do 8 multiplications at a time
simd_q15_t alpha_r_128, alpha_i_128, yr, yi, *x_128 = (simd_q15_t *)x, *y_128 = (simd_q15_t *)y;
simd_q15_t *x_128 = (simd_q15_t *)x, *y_128 = (simd_q15_t *)y;
// printf("alpha = %d,%d\n",alpha[0],alpha[1]);
alpha_r_128 = set1_int16(alpha[0]);
alpha_i_128 = set1_int16(alpha[1]);
const simd_q15_t alpha_r_128 = set1_int16(alpha[0]);
const simd_q15_t alpha_i_128 = set1_int16(alpha[1]);
for (i=0; i<N>>3; i++) {
yr = mulhi_s1_int16(alpha_r_128,x_128[i]);
yi = mulhi_s1_int16(alpha_i_128,x_128[i]);
const simd_q15_t yr = mulhi_s1_int16(alpha_r_128, x_128[i]);
const simd_q15_t yi = mulhi_s1_int16(alpha_i_128, x_128[i]);
#if defined(__x86_64__) || defined(__i386__)
const simd_q15_t tmp = _mm_loadu_si128(y_128);
_mm_storeu_si128(y_128++, _mm_adds_epi16(tmp, _mm_unpacklo_epi16(yr, yi)));
+3 -3
View File
@@ -24,15 +24,15 @@
#include <stdio.h>
#if defined(__x86_64__) || defined(__i386__)
int16_t conjug[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1} ;
int16_t conjug2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1} ;
static const int16_t conjug[8] __attribute__((aligned(16))) = {-1, 1, -1, 1, -1, 1, -1, 1};
static const int16_t conjug2[8] __attribute__((aligned(16))) = {1, -1, 1, -1, 1, -1, 1, -1};
#define simd_q15_t __m128i
#define simdshort_q15_t __m64
#define set1_int16(a) _mm_set1_epi16(a)
#define setr_int16(a0, a1, a2, a3, a4, a5, a6, a7) _mm_setr_epi16(a0, a1, a2, a3, a4, a5, a6, a7 )
#elif defined(__arm__) || defined(__aarch64__)
int16_t conjug[4]__attribute__((aligned(16))) = {-1,1,-1,1} ;
static const int16_t conjug[4] __attribute__((aligned(16))) = {-1, 1, -1, 1};
#define simd_q15_t int16x8_t
#define simdshort_q15_t int16x4_t
#define _mm_empty()
+40 -797
View File
@@ -23,805 +23,48 @@
// Approximate 10*log10(x) in fixed point : x = 0...(2^32)-1
int8_t dB_table[256] = {
0,
3,
5,
6,
7,
8,
8,
9,
10,
10,
10,
11,
11,
11,
12,
12,
12,
13,
13,
13,
13,
13,
14,
14,
14,
14,
14,
14,
15,
15,
15,
15,
15,
15,
15,
16,
16,
16,
16,
16,
16,
16,
16,
16,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
17,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
18,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
19,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
20,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
21,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
22,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
23,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24,
24
};
static const int8_t dB_table[256] = {
0, 3, 5, 6, 7, 8, 8, 9, 10, 10, 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15,
15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18,
18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20,
20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,
23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24,
24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24};
int16_t dB_table_times10[256] = {
0,
30,
47,
60,
69,
77,
84,
90,
95,
100,
104,
107,
111,
114,
117,
120,
123,
125,
127,
130,
132,
134,
136,
138,
139,
141,
143,
144,
146,
147,
149,
150,
151,
153,
154,
155,
156,
157,
159,
160,
161,
162,
163,
164,
165,
166,
167,
168,
169,
169,
170,
171,
172,
173,
174,
174,
175,
176,
177,
177,
178,
179,
179,
180,
181,
181,
182,
183,
183,
184,
185,
185,
186,
186,
187,
188,
188,
189,
189,
190,
190,
191,
191,
192,
192,
193,
193,
194,
194,
195,
195,
196,
196,
197,
197,
198,
198,
199,
199,
200,
200,
200,
201,
201,
202,
202,
202,
203,
203,
204,
204,
204,
205,
205,
206,
206,
206,
207,
207,
207,
208,
208,
208,
209,
209,
210,
210,
210,
211,
211,
211,
212,
212,
212,
213,
213,
213,
213,
214,
214,
214,
215,
215,
215,
216,
216,
216,
217,
217,
217,
217,
218,
218,
218,
219,
219,
219,
219,
220,
220,
220,
220,
221,
221,
221,
222,
222,
222,
222,
223,
223,
223,
223,
224,
224,
224,
224,
225,
225,
225,
225,
226,
226,
226,
226,
226,
227,
227,
227,
227,
228,
228,
228,
228,
229,
229,
229,
229,
229,
230,
230,
230,
230,
230,
231,
231,
231,
231,
232,
232,
232,
232,
232,
233,
233,
233,
233,
233,
234,
234,
234,
234,
234,
235,
235,
235,
235,
235,
235,
236,
236,
236,
236,
236,
237,
237,
237,
237,
237,
238,
238,
238,
238,
238,
238,
239,
239,
239,
239,
239,
239,
240,
240,
240,
240,
240
};
static const int16_t dB_table_times10[256] = {
0, 30, 47, 60, 69, 77, 84, 90, 95, 100, 104, 107, 111, 114, 117, 120, 123, 125, 127, 130, 132, 134, 136, 138,
139, 141, 143, 144, 146, 147, 149, 150, 151, 153, 154, 155, 156, 157, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,
169, 169, 170, 171, 172, 173, 174, 174, 175, 176, 177, 177, 178, 179, 179, 180, 181, 181, 182, 183, 183, 184, 185, 185,
186, 186, 187, 188, 188, 189, 189, 190, 190, 191, 191, 192, 192, 193, 193, 194, 194, 195, 195, 196, 196, 197, 197, 198,
198, 199, 199, 200, 200, 200, 201, 201, 202, 202, 202, 203, 203, 204, 204, 204, 205, 205, 206, 206, 206, 207, 207, 207,
208, 208, 208, 209, 209, 210, 210, 210, 211, 211, 211, 212, 212, 212, 213, 213, 213, 213, 214, 214, 214, 215, 215, 215,
216, 216, 216, 217, 217, 217, 217, 218, 218, 218, 219, 219, 219, 219, 220, 220, 220, 220, 221, 221, 221, 222, 222, 222,
222, 223, 223, 223, 223, 224, 224, 224, 224, 225, 225, 225, 225, 226, 226, 226, 226, 226, 227, 227, 227, 227, 228, 228,
228, 228, 229, 229, 229, 229, 229, 230, 230, 230, 230, 230, 231, 231, 231, 231, 232, 232, 232, 232, 232, 233, 233, 233,
233, 233, 234, 234, 234, 234, 234, 235, 235, 235, 235, 235, 235, 236, 236, 236, 236, 236, 237, 237, 237, 237, 237, 238,
238, 238, 238, 238, 238, 239, 239, 239, 239, 239, 239, 240, 240, 240, 240, 240};
uint32_t bit_seach_mask[32] = {
0x80000000, 0x40000000, 0x20000000, 0x10000000,
0x08000000, 0x04000000, 0x02000000, 0x01000000,
0x00800000, 0x00400000, 0x00200000, 0x00100000,
0x00080000, 0x00040000, 0x00020000, 0x00010000,
0x00008000, 0x00004000, 0x00002000, 0x00001000,
0x00000800, 0x00000400, 0x00000200, 0x00000100,
0x00000080, 0x00000040, 0x00000020, 0x00000010,
0x00000008, 0x00000004, 0x00000002, 0x00000001
};
uint32_t bit_seach_res[32] = {
31, 30, 29, 28,
27, 26, 25, 24,
23, 22, 21, 20,
19, 18, 17, 16,
15, 14, 13, 12,
11, 10, 9, 8,
7, 6, 5, 4,
3, 2, 1, 0
};
uint32_t dB_fix_x10_tbl[128] = {
0 ,
0 ,
1 ,
1 ,
1 ,
2 ,
2 ,
2 ,
3 ,
3 ,
3 ,
4 ,
4 ,
4 ,
5 ,
5 ,
5 ,
5 ,
6 ,
6 ,
6 ,
7 ,
7 ,
7 ,
7 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,
199 ,
199 ,
200 ,
200 ,
200 ,
201 ,
201 ,
202 ,
202 ,
203 ,
203 ,
203 ,
204 ,
204 ,
205 ,
205 ,
205 ,
206 ,
206 ,
206 ,
207 ,
207 ,
208 ,
208 ,
208 ,
209 ,
209 ,
209 ,
210 ,
210 ,
210
};
static const uint32_t bit_seach_mask[32] = {0x80000000, 0x40000000, 0x20000000, 0x10000000, 0x08000000, 0x04000000, 0x02000000,
0x01000000, 0x00800000, 0x00400000, 0x00200000, 0x00100000, 0x00080000, 0x00040000,
0x00020000, 0x00010000, 0x00008000, 0x00004000, 0x00002000, 0x00001000, 0x00000800,
0x00000400, 0x00000200, 0x00000100, 0x00000080, 0x00000040, 0x00000020, 0x00000010,
0x00000008, 0x00000004, 0x00000002, 0x00000001};
static const uint32_t bit_seach_res[32] = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16,
15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0};
static const uint32_t dB_fix_x10_tbl[128] = {
0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 9,
10, 10, 10, 10, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17,
18, 18, 18, 18, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24, 24, 24, 24,
24, 24, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 30, 30, 30};
static const uint32_t dB_fix_x10_tbl_low[128] = {
0, 0, 30, 48, 60, 70, 78, 85, 90, 95, 100, 104, 108, 111, 115, 118, 120, 123, 126, 128, 130, 132,
134, 136, 138, 140, 141, 143, 145, 146, 148, 149, 151, 152, 153, 154, 156, 157, 158, 159, 160, 161, 162, 163,
164, 165, 166, 167, 168, 169, 170, 171, 172, 172, 173, 174, 175, 176, 176, 177, 178, 179, 179, 180, 181, 181,
182, 183, 183, 184, 185, 185, 186, 186, 187, 188, 188, 189, 189, 190, 190, 191, 191, 192, 192, 193, 193, 194,
194, 195, 195, 196, 196, 197, 197, 198, 198, 199, 199, 200, 200, 200, 201, 201, 202, 202, 203, 203, 203, 204,
204, 205, 205, 205, 206, 206, 206, 207, 207, 208, 208, 208, 209, 209, 209, 210, 210, 210};
/*
int8_t dB_fixed(int x) {
+16 -23
View File
@@ -338,33 +338,26 @@ This function performs componentwise multiplication and accumulation of a comple
The function implemented is : \f$\mathbf{y} = y + \alpha\mathbf{x}\f$
*/
void multadd_real_vector_complex_scalar(int16_t *x,
int16_t *alpha,
int16_t *y,
uint32_t N);
void multadd_real_vector_complex_scalar(const int16_t *x, const int16_t *alpha, int16_t *y, uint32_t N);
__attribute__((always_inline)) inline void multadd_real_four_symbols_vector_complex_scalar(int16_t *x,
c16_t *alpha,
c16_t *y)
{
__attribute__((always_inline)) inline void multadd_real_four_symbols_vector_complex_scalar(const int16_t *x,
c16_t *alpha,
c16_t *y)
{
// do 8 multiplications at a time
const simd_q15_t alpha_r_128 = set1_int16(alpha->r);
const simd_q15_t alpha_i_128 = set1_int16(alpha->i);
// do 8 multiplications at a time
simd_q15_t alpha_r_128,alpha_i_128,yr,yi,*x_128=(simd_q15_t*)x;
simd_q15_t y_128;
y_128 = _mm_loadu_si128((simd_q15_t*)y);
const simd_q15_t *x_128 = (const simd_q15_t *)x;
const simd_q15_t yr = mulhi_s1_int16(alpha_r_128, *x_128);
const simd_q15_t yi = mulhi_s1_int16(alpha_i_128, *x_128);
alpha_r_128 = set1_int16(alpha->r);
alpha_i_128 = set1_int16(alpha->i);
simd_q15_t y_128 = _mm_loadu_si128((simd_q15_t *)y);
y_128 = _mm_adds_epi16(y_128, _mm_unpacklo_epi16(yr, yi));
y_128 = _mm_adds_epi16(y_128, _mm_unpackhi_epi16(yr, yi));
yr = mulhi_s1_int16(alpha_r_128,x_128[0]);
yi = mulhi_s1_int16(alpha_i_128,x_128[0]);
y_128 = _mm_adds_epi16(y_128,_mm_unpacklo_epi16(yr,yi));
y_128 = _mm_adds_epi16(y_128,_mm_unpackhi_epi16(yr,yi));
_mm_storeu_si128((simd_q15_t*)y, y_128);
}
_mm_storeu_si128((simd_q15_t *)y, y_128);
}
/*!\fn void multadd_complex_vector_real_scalar(int16_t *x,int16_t alpha,int16_t *y,uint8_t zero_flag,uint32_t N)
This function performs componentwise multiplication and accumulation of a real scalar and a complex vector.
+58
View File
@@ -123,6 +123,64 @@ static const unsigned short Nb_81_110[8][4] = {
static const uint8_t alpha_lut[8] = {0, 40, 50, 60, 70, 80, 90, 100};
extern uint32_t current_dlsch_cqi;
// Table 8.6.3-3 36.213
static const uint16_t beta_cqi[16] = {0, // reserved
0, // reserved
9, // 1.125
10, // 1.250
11, // 1.375
13, // 1.625
14, // 1.750
16, // 2.000
18, // 2.250
20, // 2.500
23, // 2.875
25, // 3.125
28, // 3.500
32, // 4.000
40, // 5.000
50}; // 6.250
// Table 8.6.3-2 36.213
static const uint16_t beta_ri[16] = {10, // 1.250
13, // 1.625
16, // 2.000
20, // 2.500
25, // 3.125
32, // 4.000
40, // 5.000
50, // 6.250
64, // 8.000
80, // 10.000
101, // 12.625
127, // 15.875
160, // 20.000
0, // reserved
0, // reserved
0}; // reserved
// Table 8.6.3-2 36.213
static const uint16_t beta_ack[16] = {16, // 2.000
20, // 2.500
25, // 3.125
32, // 4.000
40, // 5.000
50, // 6.250
64, // 8.000
80, // 10.000
101, // 12.625
127, // 15.875
160, // 20.000
248, // 31.000
400, // 50.000
640, // 80.000
808}; // 126.00
static const int8_t delta_PUSCH_abs[4] = {-4, -1, 1, 4};
static const int8_t delta_PUSCH_acc[4] = {-1, 0, 1, 3};
extern uint8_t max_turbo_iterations;
extern double cpuf;
+3 -3
View File
@@ -429,7 +429,7 @@ void handle_nfapi_dlsch_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_pro
}
}
int16_t to_beta_offset_harqack[16]= {16,20,25,32,40,50,64,80,101,127,160,248,400,640,1008,8};
static const int16_t to_beta_offset_harqack[16] = {16, 20, 25, 32, 40, 50, 64, 80, 101, 127, 160, 248, 400, 640, 1008, 8};
void handle_ulsch_harq_pdu(
PHY_VARS_eNB *eNB,
@@ -457,8 +457,8 @@ void handle_ulsch_harq_pdu(
}
}
uint16_t to_beta_offset_ri[16]= {9,13,16,20,25,32,40,50,64,80,101,127,160,0,0,0};
uint16_t to_beta_offset_cqi[16]= {0,0,9,10,11,13,14,16,18,20,23,25,28,32,40,50};
static const uint16_t to_beta_offset_ri[16] = {9, 13, 16, 20, 25, 32, 40, 50, 64, 80, 101, 127, 160, 0, 0, 0};
static const uint16_t to_beta_offset_cqi[16] = {0, 0, 9, 10, 11, 13, 14, 16, 18, 20, 23, 25, 28, 32, 40, 50};
void handle_ulsch_cqi_ri_pdu(PHY_VARS_eNB *eNB,int UE_id,nfapi_ul_config_request_pdu_t *ul_config_pdu,uint16_t frame,uint8_t subframe) {
nfapi_ul_config_cqi_ri_information_rel9_t *rel9 = &ul_config_pdu->ulsch_cqi_ri_pdu.cqi_ri_information.cqi_ri_information_rel9;
+16 -19
View File
@@ -680,18 +680,16 @@ uint8_t reset_ack(LTE_DL_FRAME_PARMS *frame_parms,
return get_reset_ack(frame_parms, harq_ack, subframe_tx, subframe_rx, o_ACK, pN_bundled, cw_idx, 1);
}
uint8_t Np6[4]= {0,1,3,5};
uint8_t Np15[4]= {0,3,8,13};
uint8_t Np25[4]= {0,5,13,22};
uint8_t Np50[4]= {0,11,27,44};
uint8_t Np75[4]= {0,16,41,66};
uint8_t Np100[4]= {0,22,55,88};
static const uint8_t Np6[4] = {0, 1, 3, 5};
static const uint8_t Np15[4] = {0, 3, 8, 13};
static const uint8_t Np25[4] = {0, 5, 13, 22};
static const uint8_t Np50[4] = {0, 11, 27, 44};
static const uint8_t Np75[4] = {0, 16, 41, 66};
static const uint8_t Np100[4] = {0, 22, 55, 88};
// This is part of the PUCCH allocation procedure (see Section 10.1 36.213)
uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1)
{
uint8_t *Np;
const uint8_t *Np;
switch (N_RB_DL) {
case 6:
@@ -831,16 +829,15 @@ dci_detect_mode_t dci_detect_mode_select(LTE_DL_FRAME_PARMS *frame_parms,uint8_t
{
dci_detect_mode_t ret = 0;
static dci_detect_mode_t Table_8_2_3gpp_36_213[][10] = {
//subf0 , subf1 , subf2 , subf3 , subf4 , subf5 , subf6 , subf7 , subf8 , subf9
{UL_DL_DCI, UL_DL_DCI , NO_DCI , NO_DCI , NO_DCI , UL_DL_DCI , UL_DL_DCI , NO_DCI, NO_DCI , NO_DCI }, // tdd0
{DL_DCI , UL_DL_DCI , NO_DCI , NO_DCI , UL_DL_DCI , DL_DCI , UL_DL_DCI , NO_DCI, NO_DCI , UL_DL_DCI }, // tdd1
{DL_DCI , DL_DCI , NO_DCI , UL_DL_DCI , DL_DCI , DL_DCI , DL_DCI , NO_DCI, UL_DL_DCI , DL_DCI }, // tdd2
{UL_DL_DCI, DL_DCI , NO_DCI , NO_DCI , NO_DCI , DL_DCI , DL_DCI , DL_DCI, UL_DL_DCI , UL_DL_DCI }, // tdd3
{DL_DCI , DL_DCI , NO_DCI , NO_DCI , DL_DCI , DL_DCI , DL_DCI , DL_DCI, UL_DL_DCI , UL_DL_DCI }, // tdd4
{DL_DCI , DL_DCI , NO_DCI , DL_DCI , DL_DCI , DL_DCI , DL_DCI , DL_DCI, UL_DL_DCI , DL_DCI }, // tdd5
{UL_DL_DCI, UL_DL_DCI , NO_DCI , NO_DCI , NO_DCI , UL_DL_DCI , UL_DL_DCI , NO_DCI, NO_DCI , UL_DL_DCI }}; // tdd6
static const dci_detect_mode_t Table_8_2_3gpp_36_213[][10] = {
// subf0 , subf1 , subf2 , subf3 , subf4 , subf5 , subf6 , subf7 , subf8 , subf9
{UL_DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, NO_DCI, UL_DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, NO_DCI}, // tdd0
{DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, UL_DL_DCI, DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, UL_DL_DCI}, // tdd1
{DL_DCI, DL_DCI, NO_DCI, UL_DL_DCI, DL_DCI, DL_DCI, DL_DCI, NO_DCI, UL_DL_DCI, DL_DCI}, // tdd2
{UL_DL_DCI, DL_DCI, NO_DCI, NO_DCI, NO_DCI, DL_DCI, DL_DCI, DL_DCI, UL_DL_DCI, UL_DL_DCI}, // tdd3
{DL_DCI, DL_DCI, NO_DCI, NO_DCI, DL_DCI, DL_DCI, DL_DCI, DL_DCI, UL_DL_DCI, UL_DL_DCI}, // tdd4
{DL_DCI, DL_DCI, NO_DCI, DL_DCI, DL_DCI, DL_DCI, DL_DCI, DL_DCI, UL_DL_DCI, DL_DCI}, // tdd5
{UL_DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, NO_DCI, UL_DL_DCI, UL_DL_DCI, NO_DCI, NO_DCI, UL_DL_DCI}}; // tdd6
DevAssert(subframe>=0 && subframe<=9);
DevAssert((frame_parms->tdd_config)>=0 && (frame_parms->tdd_config)<=6);
-2
View File
@@ -42,8 +42,6 @@ PHY_VARS_UE *UE;
double cpuf;
extern uint16_t prach_root_sequence_map0_3[838];
void dump_prach_config(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
int main(int argc, char **argv) {
+2 -1
View File
@@ -54,6 +54,8 @@
#include "common/ran_context.h"
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
#include "openair1/PHY/LTE_TRANSPORT/dlsch_tbs_full.h"
#include "PHY/phy_extern.h"
const char *__asan_default_options()
{
/* don't do leak checking in ulsim, not finished yet */
@@ -69,7 +71,6 @@ channel_desc_t *UE2eNB[NUMBER_OF_UE_MAX][NUMBER_OF_eNB_MAX];
node_desc_t *enb_data[NUMBER_OF_eNB_MAX];
node_desc_t *ue_data[NUMBER_OF_UE_MAX];
extern uint16_t beta_ack[16],beta_ri[16],beta_cqi[16];
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
-1
View File
@@ -67,7 +67,6 @@ PHY_VARS_NR_UE *UE;
RAN_CONTEXT_t RC;
RU_t *ru;
double cpuf;
extern uint16_t prach_root_sequence_map0_3[838];
openair0_config_t openair0_cfg[MAX_CARDS];
//uint8_t nfapi_mode=0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
+27 -26
View File
@@ -41,33 +41,34 @@
#include "f1ap_du_paging.h"
/* Handlers matrix. Only f1 related procedure present here */
f1ap_message_processing_t f1ap_messages_processing[][3] = {
static const f1ap_message_processing_t f1ap_messages_processing[][3] = {
{ 0, 0, 0 }, /* Reset */
{ CU_handle_F1_SETUP_REQUEST, DU_handle_F1_SETUP_RESPONSE, DU_handle_F1_SETUP_FAILURE }, /* F1Setup */
{ 0, 0, 0 }, /* ErrorIndication */
{ 0, 0, 0 }, /* gNBDUConfigurationUpdate */
{ DU_handle_gNB_CU_CONFIGURATION_UPDATE, CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE, CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE }, /* gNBCUConfigurationUpdate */
{ DU_handle_UE_CONTEXT_SETUP_REQUEST, CU_handle_UE_CONTEXT_SETUP_RESPONSE, 0 }, /* UEContextSetup */
{ DU_handle_UE_CONTEXT_RELEASE_COMMAND, CU_handle_UE_CONTEXT_RELEASE_COMPLETE, 0 }, /* UEContextRelease */
{ DU_handle_UE_CONTEXT_MODIFICATION_REQUEST, CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE, 0 }, /* UEContextModification */
{ 0, 0, 0 }, /* UEContextModificationRequired */
{ 0, 0, 0 }, /* UEMobilityCommand */
{ CU_handle_UE_CONTEXT_RELEASE_REQUEST, 0, 0 }, /* UEContextReleaseRequest */
{ CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* InitialULRRCMessageTransfer */
{ DU_handle_DL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* DLRRCMessageTransfer */
{ CU_handle_UL_RRC_MESSAGE_TRANSFER, 0, 0 }, /* ULRRCMessageTransfer */
{ 0, 0, 0 }, /* privateMessage */
{ 0, 0, 0 }, /* UEInactivityNotification */
{ 0, 0, 0 }, /* GNBDUResourceCoordination */
{ 0, 0, 0 }, /* SystemInformationDeliveryCommand */
{ DU_handle_Paging, 0, 0 }, /* Paging */
{ 0, 0, 0 }, /* Notify */
{ 0, 0, 0 }, /* WriteReplaceWarning */
{ 0, 0, 0 }, /* PWSCancel */
{ 0, 0, 0 }, /* PWSRestartIndication */
{ 0, 0, 0 }, /* PWSFailureIndication */
{0, 0, 0}, /* Reset */
{CU_handle_F1_SETUP_REQUEST, DU_handle_F1_SETUP_RESPONSE, DU_handle_F1_SETUP_FAILURE}, /* F1Setup */
{0, 0, 0}, /* ErrorIndication */
{0, 0, 0}, /* gNBDUConfigurationUpdate */
{DU_handle_gNB_CU_CONFIGURATION_UPDATE,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_ACKNOWLEDGE,
CU_handle_gNB_CU_CONFIGURATION_UPDATE_FAILURE}, /* gNBCUConfigurationUpdate */
{DU_handle_UE_CONTEXT_SETUP_REQUEST, CU_handle_UE_CONTEXT_SETUP_RESPONSE, 0}, /* UEContextSetup */
{DU_handle_UE_CONTEXT_RELEASE_COMMAND, CU_handle_UE_CONTEXT_RELEASE_COMPLETE, 0}, /* UEContextRelease */
{DU_handle_UE_CONTEXT_MODIFICATION_REQUEST, CU_handle_UE_CONTEXT_MODIFICATION_RESPONSE, 0}, /* UEContextModification */
{0, 0, 0}, /* UEContextModificationRequired */
{0, 0, 0}, /* UEMobilityCommand */
{CU_handle_UE_CONTEXT_RELEASE_REQUEST, 0, 0}, /* UEContextReleaseRequest */
{CU_handle_INITIAL_UL_RRC_MESSAGE_TRANSFER, 0, 0}, /* InitialULRRCMessageTransfer */
{DU_handle_DL_RRC_MESSAGE_TRANSFER, 0, 0}, /* DLRRCMessageTransfer */
{CU_handle_UL_RRC_MESSAGE_TRANSFER, 0, 0}, /* ULRRCMessageTransfer */
{0, 0, 0}, /* privateMessage */
{0, 0, 0}, /* UEInactivityNotification */
{0, 0, 0}, /* GNBDUResourceCoordination */
{0, 0, 0}, /* SystemInformationDeliveryCommand */
{DU_handle_Paging, 0, 0}, /* Paging */
{0, 0, 0}, /* Notify */
{0, 0, 0}, /* WriteReplaceWarning */
{0, 0, 0}, /* PWSCancel */
{0, 0, 0}, /* PWSRestartIndication */
{0, 0, 0}, /* PWSFailureIndication */
};
const char *f1ap_direction2String(int f1ap_dir) {
+1 -1
View File
@@ -746,7 +746,7 @@ config_dedicated_scell(int Mod_idP,
LTE_SCellToAddMod_r10_t *sCellToAddMod_r10) {
}
int rrc_mac_config_req_eNB(module_id_t Mod_idP, rrc_mac_config_req_eNB_t *param)
int rrc_mac_config_req_eNB(const module_id_t Mod_idP, const rrc_mac_config_req_eNB_t *param)
{
int i;
int UE_id = -1;
+1 -2
View File
@@ -58,8 +58,7 @@
extern RAN_CONTEXT_t RC;
uint16_t pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 };
static const uint16_t pdcch_order_table[6] = {31, 31, 511, 2047, 2047, 8191};
//-----------------------------------------------------------------------------
/*
+11 -11
View File
@@ -56,18 +56,18 @@ extern RAN_CONTEXT_t RC;
#define size_Sj25 2
int Sj25[size_Sj25] = { 0, 3 };
static const int Sj25[size_Sj25] = {0, 3};
#define size_Sj50 6
int Sj50[size_Sj50] = { 0, 1, 2, 5, 6, 7 };
static const int Sj50[size_Sj50] = {0, 1, 2, 5, 6, 7};
#define size_Sj75 10
int Sj75[size_Sj75] = { 0, 1, 2, 3, 4, 7, 8, 9, 10, 11 };
static const int Sj75[size_Sj75] = {0, 1, 2, 3, 4, 7, 8, 9, 10, 11};
#define size_Sj100 14
int Sj100[size_Sj100] = { 0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15 };
static const int Sj100[size_Sj100] = {0, 1, 2, 3, 4, 5, 6, 9, 10, 11, 12, 13, 14, 15};
int SIB1_BR_TBS_table[6] = { 208, 256, 328, 504, 712, 936 };
static const int SIB1_BR_TBS_table[6] = {208, 256, 328, 504, 712, 936};
//------------------------------------------------------------------------------
void
@@ -87,7 +87,7 @@ schedule_SIB1_MBMS(module_id_t module_idP,
nfapi_tx_request_pdu_t *TX_req;
nfapi_dl_config_request_body_t *dl_req;
int m, i, N_S_NB;
int *Sj;
const int *Sj;
int n_NB = 0;
int TBS;
int k = 0, rvidx;
@@ -311,7 +311,7 @@ schedule_SIB1_BR(module_id_t module_idP,
nfapi_tx_request_pdu_t *TX_req;
nfapi_dl_config_request_body_t *dl_req;
int m, i, N_S_NB;
int *Sj;
const int *Sj;
int n_NB = 0;
int TBS;
int k = 0, rvidx;
@@ -515,10 +515,10 @@ schedule_SIB1_BR(module_id_t module_idP,
}
}
int si_WindowLength_BR_r13tab[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] = { 20, 40, 60, 80, 120, 160, 200 };
int si_TBS_r13tab[LTE_SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = { 152, 208, 256, 328, 408, 504, 600, 712, 808, 936 };
int si_WindowLength_MBMS_r14tab[8] = { 1, 2, 5, 10, 15, 20, 40, 80 };
static const int si_WindowLength_BR_r13tab
[LTE_SystemInformationBlockType1_v1310_IEs__bandwidthReducedAccessRelatedInfo_r13__si_WindowLength_BR_r13_spare] =
{20, 40, 60, 80, 120, 160, 200};
static const int si_TBS_r13tab[LTE_SchedulingInfo_BR_r13__si_TBS_r13_b936 + 1] = {152, 208, 256, 328, 408, 504, 600, 712, 808, 936};
//------------------------------------------------------------------------------
void
@@ -134,7 +134,5 @@ void schedule_ulsch_rnti_fairRR(module_id_t module_idP,
/* extern */
extern DLSCH_UE_SELECT dlsch_ue_select[MAX_NUM_CCs];
extern int last_dlsch_ue_id[MAX_NUM_CCs];
extern int last_ulsch_ue_id[MAX_NUM_CCs];
#endif
@@ -1847,13 +1847,11 @@ get_numnarrowbandbits(long dl_Bandwidth)
//This implements the frame/subframe condition for first subframe of MPDCCH transmission (Section 9.1.5 36.213, Rel 13/14)
//------------------------------------------------------------------------------
int
startSF_fdd_RA_times2[8] = { 2, 3, 4, 5, 8, 10, 16, 20 };
static const int startSF_fdd_RA_times2[8] = {2, 3, 4, 5, 8, 10, 16, 20};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
int
startSF_tdd_RA[7] = { 1, 2, 4, 5, 8, 10, 20 };
static const int startSF_tdd_RA[7] = {1, 2, 4, 5, 8, 10, 20};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
+1 -1
View File
@@ -941,7 +941,7 @@ typedef struct {
LTE_MBSFNAreaConfiguration_r9_t *mbms_AreaConfiguration;
} rrc_mac_config_req_eNB_t;
int rrc_mac_config_req_eNB(module_id_t module_idP, rrc_mac_config_req_eNB_t *);
int rrc_mac_config_req_eNB(const module_id_t module_idP, const rrc_mac_config_req_eNB_t *);
/** \brief RRC eNB Configuration primitive for PHY/MAC. Allows configuration of PHY/MAC resources based on System Information (SI), RRCConnectionSetup and RRCConnectionReconfiguration messages.
@param Mod_id Instance ID of ue
+10 -14
View File
@@ -400,13 +400,11 @@ int pf_wbcqi_dl_run(module_id_t Mod_id,
return n_rbg_sched;
}
default_sched_dl_algo_t proportional_fair_wbcqi_dl = {
.name = "proportional_fair_wbcqi_dl",
.setup = pf_dl_setup,
.unset = pf_dl_unset,
.run = pf_wbcqi_dl_run,
.data = NULL
};
const default_sched_dl_algo_t proportional_fair_wbcqi_dl = {.name = "proportional_fair_wbcqi_dl",
.setup = pf_dl_setup,
.unset = pf_dl_unset,
.run = pf_wbcqi_dl_run,
.data = NULL};
void *mt_dl_setup(void) {
return NULL;
@@ -513,13 +511,11 @@ int mt_wbcqi_dl_run(module_id_t Mod_id,
return n_rbg_sched;
}
default_sched_dl_algo_t maximum_throughput_wbcqi_dl = {
.name = "maximum_throughput_wbcqi_dl",
.setup = mt_dl_setup,
.unset = mt_dl_unset,
.run = mt_wbcqi_dl_run,
.data = NULL
};
const default_sched_dl_algo_t maximum_throughput_wbcqi_dl = {.name = "maximum_throughput_wbcqi_dl",
.setup = mt_dl_setup,
.unset = mt_dl_unset,
.run = mt_wbcqi_dl_run,
.data = NULL};
// This function stores the downlink buffer for all the logical channels
void
@@ -29,9 +29,14 @@
#include <math.h>
//Table 5.1.2.2-2
uint16_t Tbstable_nr[INDEX_MAX_TBS_TABLE] = {24,32,40,48,56,64,72,80,88,96,104,112,120,128,136,144,152,160,168,176,184,192,208,224,240,256,272,288,304,320,336,352,368,384,408,432,456,480,504,528,552,576,608,640,672,704,736,768,808,848,888,928,984,1032,1064,1128,1160,1192,1224,1256,1288,1320,1352,1416,1480,1544,1608,1672,1736,1800,1864,1928,2024,2088,2152,2216,2280,2408,2472,2536,2600,2664,2728,2792,2856,2976,3104,3240,3368,3496,3624,3752,3824};
static const uint16_t Tbstable_nr[INDEX_MAX_TBS_TABLE] = {
24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144, 152, 160, 168,
176, 184, 192, 208, 224, 240, 256, 272, 288, 304, 320, 336, 352, 368, 384, 408, 432, 456, 480,
504, 528, 552, 576, 608, 640, 672, 704, 736, 768, 808, 848, 888, 928, 984, 1032, 1064, 1128, 1160,
1192, 1224, 1256, 1288, 1320, 1352, 1416, 1480, 1544, 1608, 1672, 1736, 1800, 1864, 1928, 2024, 2088, 2152, 2216,
2280, 2408, 2472, 2536, 2600, 2664, 2728, 2792, 2856, 2976, 3104, 3240, 3368, 3496, 3624, 3752, 3824};
uint16_t NPRB_LBRM[7] = {32,66,107,135,162,217,273};
static const uint16_t NPRB_LBRM[7] = {32, 66, 107, 135, 162, 217, 273};
// Transport block size determination according to 6.1.4.2 of TS 38.214
// returns the TBS in bits
File diff suppressed because it is too large Load Diff
@@ -166,9 +166,7 @@ uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int
int get_format0(uint8_t index, uint8_t unpaired,frequency_range_t);
int64_t *get_prach_config_info(frequency_range_t freq_range,
uint8_t index,
uint8_t unpaired);
const int64_t *get_prach_config_info(frequency_range_t freq_range, uint8_t index, uint8_t unpaired);
uint16_t get_NCS(uint8_t index, uint16_t format, uint8_t restricted_set_config);
int compute_pucch_crc_size(int O_uci);
+1 -2
View File
@@ -1576,7 +1576,6 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
uint8_t prach_conf_period_idx;
uint8_t nb_of_frames_per_prach_conf_period;
uint8_t prach_conf_period_frame_idx;
int64_t *prach_config_info_p;
NR_RACH_ConfigCommon_t *setup = mac->current_UL_BWP.rach_ConfigCommon;
NR_RACH_ConfigGeneric_t *rach_ConfigGeneric = &setup->rach_ConfigGeneric;
@@ -1608,7 +1607,7 @@ static void build_ro_list(NR_UE_MAC_INST_t *mac) {
int unpaired = mac->phy_config.config_req.cell_config.frame_duplex_type;
prach_config_info_p = get_prach_config_info(mac->frequency_range, config_index, unpaired);
const int64_t *prach_config_info_p = get_prach_config_info(mac->frequency_range, config_index, unpaired);
// Identify the proper PRACH Configuration Index table according to the operating frequency
LOG_D(NR_MAC,"mu = %u, PRACH config index = %u, unpaired = %u\n", mu, config_index, unpaired);
+1 -2
View File
@@ -53,8 +53,7 @@
#include <errno.h>
#include <string.h>
const uint8_t nr_rv_round_map[4] = { 0, 2, 3, 1 };
uint16_t nr_pdcch_order_table[6] = { 31, 31, 511, 2047, 2047, 8191 };
const uint8_t nr_rv_round_map[4] = {0, 2, 3, 1};
void clear_nr_nfapi_information(gNB_MAC_INST *gNB,
int CC_idP,
@@ -49,9 +49,9 @@ extern RAN_CONTEXT_t RC;
extern const uint8_t nr_slots_per_frame[5];
extern uint16_t sl_ahead;
uint8_t DELTA[4]= {2,3,4,6};
static const uint8_t DELTA[4] = {2, 3, 4, 6};
float ssb_per_rach_occasion[8] = {0.125,0.25,0.5,1,2,4,8};
static const float ssb_per_rach_occasion[8] = {0.125, 0.25, 0.5, 1, 2, 4, 8};
int16_t ssb_index_from_prach(module_id_t module_idP,
frame_t frameP,
@@ -63,64 +63,60 @@
extern RAN_CONTEXT_t RC;
// Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs
/// LUT for the number of symbols in the coreset indexed by coreset index (4 MSB rmsi_pdcch_config)
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_15_15[15] = {2,2,2,3,3,3,1,1,2,2,3,3,1,2,3};
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_15_30[14] = {2,2,2,2,3,3,3,3,1,1,2,2,3,3};
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_30_15_b40Mhz[9] = {1,1,2,2,3,3,1,2,3};
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_30_15_a40Mhz[9] = {1,2,3,1,1,2,2,3,3};
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_30_30_b40Mhz[16] = {2,2,2,2,2,3,3,3,3,3,1,1,1,2,2,2}; // below 40Mhz bw
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_30_30_a40Mhz[10] = {2,2,3,3,1,1,2,2,3,3}; // above 40Mhz bw
uint8_t nr_coreset_nsymb_pdcch_type_0_scs_120_60[12] = {1,1,2,2,3,3,1,2,1,1,1,1};
/// LUT for the number of RBs in the coreset indexed by coreset index
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_15_15[15] = {0,2,4,0,2,4,12,16,12,16,12,16,38,38,38};
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_15_30[14] = {5,6,7,8,5,6,7,8,18,20,18,20,18,20};
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_30_15_b40Mhz[9] = {2,6,2,6,2,6,28,28,28};
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_30_15_a40Mhz[9] = {4,4,4,0,56,0,56,0,56};
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_30_30_b40Mhz[16] = {0,1,2,3,4,0,1,2,3,4,12,14,16,12,14,16};
uint8_t nr_coreset_rb_offset_pdcch_type_0_scs_30_30_a40Mhz[10] = {0,4,0,4,0,28,0,28,0,28};
int8_t nr_coreset_rb_offset_pdcch_type_0_scs_120_60[12] = {0,8,0,8,0,8,28,28,-1,49,-1,97};
int8_t nr_coreset_rb_offset_pdcch_type_0_scs_120_120[8] = {0,4,14,14,-1,24,-1,48};
int8_t nr_coreset_rb_offset_pdcch_type_0_scs_240_120[8] = {0,8,0,8,-1,25,-1,49};
/// LUT for monitoring occasions param O indexed by ss index (4 LSB rmsi_pdcch_config)
// Note: scaling is used to avoid decimal values for O and M, original values commented
uint8_t nr_ss_param_O_type_0_mux1_FR1[16] = {0,0,2,2,5,5,7,7,0,5,0,0,2,2,5,5};
uint8_t nr_ss_param_O_type_0_mux1_FR2[14] = {0,0,5,5,5,5,0,5,5,15,15,15,0,5}; //{0,0,2.5,2.5,5,5,0,2.5,5,7.5,7.5,7.5,0,5}
uint8_t nr_ss_scale_O_mux1_FR2[14] = {0,0,1,1,0,0,0,1,0,1,1,1,0,0};
/// LUT for number of SS sets per slot indexed by ss index
uint8_t nr_ss_sets_per_slot_type_0_FR1[16] = {1,2,1,2,1,2,1,2,1,1,1,1,1,1,1,1};
uint8_t nr_ss_sets_per_slot_type_0_FR2[14] = {1,2,1,2,1,2,2,2,2,1,2,2,1,1};
/// LUT for monitoring occasions param M indexed by ss index
uint8_t nr_ss_param_M_type_0_mux1_FR1[16] = {1,1,1,1,1,1,1,1,2,2,1,1,1,1,1,1}; //{1,0.5,1,0.5,1,0.5,1,0.5,2,2,1,1,1,1,1,1}
uint8_t nr_ss_scale_M_mux1_FR1[16] = {0,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0};
uint8_t nr_ss_param_M_type_0_mux1_FR2[14] = {1,1,1,1,1,1,1,1,1,1,1,1,2,2}; //{1,0.5,1,0.5,1,0.5,0.5,0.5,0.5,1,0.5,0.5,2,2}
uint8_t nr_ss_scale_M_mux1_FR2[14] = {0,1,0,1,0,1,1,1,1,0,1,1,0,0};
/// LUT for SS first symbol index indexed by ss index
uint8_t nr_ss_first_symb_idx_type_0_mux1_FR1[8] = {0,0,1,2,1,2,1,2};
// Mux pattern type 2
uint8_t nr_ss_first_symb_idx_scs_120_60_mux2[4] = {0,1,6,7};
uint8_t nr_ss_first_symb_idx_scs_240_120_set1_mux2[6] = {0,1,2,3,0,1};
// Mux pattern type 3
uint8_t nr_ss_first_symb_idx_scs_120_120_mux3[4] = {4,8,2,6};
// CQI TABLES (10 times the value in 214 to adequately compare with R)
// Table 1 (38.214 5.2.2.1-2)
uint16_t cqi_table1[16][2] = {{0,0},{2,780},{2,1200},{2,1930},{2,3080},{2,4490},{2,6020},{4,3780},
{4,4900},{4,6160},{6,4660},{6,5670},{6,6660},{6,7720},{6,8730},{6,9480}};
static const uint16_t cqi_table1[16][2] = {{0, 0},
{2, 780},
{2, 1200},
{2, 1930},
{2, 3080},
{2, 4490},
{2, 6020},
{4, 3780},
{4, 4900},
{4, 6160},
{6, 4660},
{6, 5670},
{6, 6660},
{6, 7720},
{6, 8730},
{6, 9480}};
// Table 2 (38.214 5.2.2.1-3)
uint16_t cqi_table2[16][2] = {{0,0},{2,780},{2,1930},{2,4490},{4,3780},{4,4900},{4,6160},{6,4660},
{6,5670},{6,6660},{6,7720},{6,8730},{8,7110},{8,7970},{8,8850},{8,9480}};
static const uint16_t cqi_table2[16][2] = {{0, 0},
{2, 780},
{2, 1930},
{2, 4490},
{4, 3780},
{4, 4900},
{4, 6160},
{6, 4660},
{6, 5670},
{6, 6660},
{6, 7720},
{6, 8730},
{8, 7110},
{8, 7970},
{8, 8850},
{8, 9480}};
// Table 2 (38.214 5.2.2.1-4)
uint16_t cqi_table3[16][2] = {{0,0},{2,300},{2,500},{2,780},{2,1200},{2,1930},{2,3080},{2,4490},
{2,6020},{4,3780},{4,4900},{4,6160},{6,4660},{6,5670},{6,6660},{6,7720}};
static const uint16_t cqi_table3[16][2] = {{0, 0},
{2, 300},
{2, 500},
{2, 780},
{2, 1200},
{2, 1930},
{2, 3080},
{2, 4490},
{2, 6020},
{4, 3780},
{4, 4900},
{4, 6160},
{6, 4660},
{6, 5670},
{6, 6660},
{6, 7720}};
uint8_t get_dl_nrOfLayers(const NR_UE_sched_ctrl_t *sched_ctrl,
const nr_dci_format_t dci_format) {
+32 -19
View File
@@ -107,30 +107,43 @@ int ssb_rsrp_sorted[MAX_NUM_SSB] = {0};
//Measured RSRP Values Table 10.1.16.1-1 from 36.133
//Stored all the upper limits[Max RSRP Value of corresponding index]
//stored -1 for invalid values
int L1_SSB_CSI_RSRP_measReport_mapping_38133_10_1_6_1_1[128] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, //0 - 9
-1, -1, -1, -1, -1, -1, INT_MIN, -140, -139, -138, //10 - 19
-137, -136, -135, -134, -133, -132, -131, -130, -129, -128, //20 - 29
-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, //30 - 39
-117,-116, -115, -114, -113, -112, -111, -110, -109, -108, //40 - 49
-107, -106, -105, -104, -103, -102, -101, -100, -99, -98, //50 - 59
-97, -96, -95, -94, -93, -92, -91, -90, -89, -88, //60 - 69
-87, -86, -85, -84, -83, -82, -81, -80, -79, -78, //70 - 79
-77, -76, -75, -74, -73, -72, -71, -70, -69, -68, //80 - 89
-67, -66, -65, -64, -63, -62, -61, -60, -59, -58, //90 - 99
-57, -56, -55, -54, -53, -52, -51, -50, -49, -48, //100 - 109
-47, -46, -45, -44, INT_MAX, -1, -1, -1, -1, -1, //110 - 119
-1, -1, -1, -1, -1, -1, -1, -1//120 - 127
};
static const int L1_SSB_CSI_RSRP_measReport_mapping_38133_10_1_6_1_1[128] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0 - 9
-1, -1, -1, -1, -1, -1, INT_MIN, -140, -139, -138, // 10 - 19
-137, -136, -135, -134, -133, -132, -131, -130, -129, -128, // 20 - 29
-127, -126, -125, -124, -123, -122, -121, -120, -119, -118, // 30 - 39
-117, -116, -115, -114, -113, -112, -111, -110, -109, -108, // 40 - 49
-107, -106, -105, -104, -103, -102, -101, -100, -99, -98, // 50 - 59
-97, -96, -95, -94, -93, -92, -91, -90, -89, -88, // 60 - 69
-87, -86, -85, -84, -83, -82, -81, -80, -79, -78, // 70 - 79
-77, -76, -75, -74, -73, -72, -71, -70, -69, -68, // 80 - 89
-67, -66, -65, -64, -63, -62, -61, -60, -59, -58, // 90 - 99
-57, -56, -55, -54, -53, -52, -51, -50, -49, -48, // 100 - 109
-47, -46, -45, -44, INT_MAX, -1, -1, -1, -1, -1, // 110 - 119
-1, -1, -1, -1, -1, -1, -1, -1 // 120 - 127
};
//Differential RSRP values Table 10.1.6.1-2 from 36.133
//Stored the upper limits[MAX RSRP Value]
int diff_rsrp_ssb_csi_meas_10_1_6_1_2[16] = {
0, -2, -4, -6, -8, -10, -12, -14, -16, -18, //0 - 9
-20, -22, -24, -26, -28, -30 //10 - 15
static const int diff_rsrp_ssb_csi_meas_10_1_6_1_2[16] = {
0,
-2,
-4,
-6,
-8,
-10,
-12,
-14,
-16,
-18, // 0 - 9
-20,
-22,
-24,
-26,
-28,
-30 // 10 - 15
};
int get_pucch_index(int frame, int slot, int n_slots_frame, const NR_TDD_UL_DL_Pattern_t *tdd, int sched_pucch_size)
{
// PUCCH structures are indexed by slot in the PUCCH period determined by sched_pucch_size number of UL slots
+19 -7
View File
@@ -23,11 +23,8 @@
int decode_t_reordering(int v)
{
static int tab[36] = {
0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, 60, 80, 100, 120, 140, 160, 180,
200, 220, 240, 260, 280, 300, 500, 750, 1000, 1250, 1500, 1750, 2000,
2250, 2500, 2750, 3000
};
static const int tab[36] = {0, 1, 2, 4, 5, 8, 10, 15, 20, 30, 40, 50, 60, 80, 100, 120, 140, 160,
180, 200, 220, 240, 260, 280, 300, 500, 750, 1000, 1250, 1500, 1750, 2000, 2250, 2500, 2750, 3000};
if (v < 0 || v > 35) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -55,8 +52,23 @@ int decode_sn_size_dl(long s)
int decode_discard_timer(long v)
{
static int tab[16] = {
10, 20, 30, 40, 50, 60, 75, 100, 150, 200, 250, 300, 500, 750, 1500, -1,
static const int tab[16] = {
10,
20,
30,
40,
50,
60,
75,
100,
150,
200,
250,
300,
500,
750,
1500,
-1,
};
if (v < 0 || v > 15) {
+62 -43
View File
@@ -23,10 +23,8 @@
int decode_t_reassembly(int v)
{
static int tab[31] = {
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200
};
static const int tab[31] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200};
if (v < 0 || v > 30) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -38,12 +36,10 @@ int decode_t_reassembly(int v)
int decode_t_status_prohibit(int v)
{
static int tab[62] = {
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240,
245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400
};
static const int tab[62] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155,
160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235,
240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400};
if (v < 0 || v > 61) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -55,12 +51,9 @@ int decode_t_status_prohibit(int v)
int decode_t_poll_retransmit(int v)
{
static int tab[59] = {
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170,
175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245,
250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000
};
static const int tab[59] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100,
105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200,
205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000};
if (v < 0 || v > 58) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -72,10 +65,9 @@ int decode_t_poll_retransmit(int v)
int decode_poll_pdu(int v)
{
static int tab[24] = {
4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144, 8192, 12288,
16384, 20480, 24576, 28672, 32768, 40960, 49152, 57344, 65536
-1 /* -1 means infinity */
static const int tab[24] = {
4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 6144,
8192, 12288, 16384, 20480, 24576, 28672, 32768, 40960, 49152, 57344, 65536 - 1 /* -1 means infinity */
};
if (v < 0 || v > 23) {
@@ -88,20 +80,53 @@ int decode_poll_pdu(int v)
int decode_poll_byte(int v)
{
static int tab[44] = {
/* KB */
1024 * 1, 1024 * 2, 1024 * 5, 1024 * 8, 1024 * 10,
1024 * 15, 1024 * 25, 1024 * 50, 1024 * 75, 1024 * 100,
1024 * 125, 1024 * 250, 1024 * 375, 1024 * 500, 1024 * 750,
1024 * 1000, 1024 * 1250, 1024 * 1500, 1024 * 2000, 1024 * 3000,
1024 * 4000, 1024 * 4500, 1024 * 5000, 1024 * 5500, 1024 * 6000,
1024 * 6500, 1024 * 7000, 1024 * 7500,
/* MB */
1024 * 1024 * 8, 1024 * 1024 * 9, 1024 * 1024 * 10, 1024 * 1024 * 11,
1024 * 1024 * 12, 1024 * 1024 * 13, 1024 * 1024 * 14, 1024 * 1024 * 15,
1024 * 1024 * 16, 1024 * 1024 * 17, 1024 * 1024 * 18, 1024 * 1024 * 20,
1024 * 1024 * 25, 1024 * 1024 * 30, 1024 * 1024 * 40,
-1 /* -1 means infinity */
static const int tab[44] = {
/* KB */
1024 * 1,
1024 * 2,
1024 * 5,
1024 * 8,
1024 * 10,
1024 * 15,
1024 * 25,
1024 * 50,
1024 * 75,
1024 * 100,
1024 * 125,
1024 * 250,
1024 * 375,
1024 * 500,
1024 * 750,
1024 * 1000,
1024 * 1250,
1024 * 1500,
1024 * 2000,
1024 * 3000,
1024 * 4000,
1024 * 4500,
1024 * 5000,
1024 * 5500,
1024 * 6000,
1024 * 6500,
1024 * 7000,
1024 * 7500,
/* MB */
1024 * 1024 * 8,
1024 * 1024 * 9,
1024 * 1024 * 10,
1024 * 1024 * 11,
1024 * 1024 * 12,
1024 * 1024 * 13,
1024 * 1024 * 14,
1024 * 1024 * 15,
1024 * 1024 * 16,
1024 * 1024 * 17,
1024 * 1024 * 18,
1024 * 1024 * 20,
1024 * 1024 * 25,
1024 * 1024 * 30,
1024 * 1024 * 40,
-1 /* -1 means infinity */
};
if (v < 0 || v > 43) {
@@ -115,9 +140,7 @@ int decode_poll_byte(int v)
int decode_max_retx_threshold(int v)
{
static int tab[8] = {
1, 2, 3, 4, 6, 8, 16, 32
};
static const int tab[8] = {1, 2, 3, 4, 6, 8, 16, 32};
if (v < 0 || v > 7) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -129,9 +152,7 @@ int decode_max_retx_threshold(int v)
int decode_sn_field_length_um(int v)
{
static int tab[2] = {
6, 12
};
static const int tab[2] = {6, 12};
if (v < 0 || v > 1) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -143,9 +164,7 @@ int decode_sn_field_length_um(int v)
int decode_sn_field_length_am(int v)
{
static int tab[2] = {
12, 18
};
static const int tab[2] = {12, 18};
if (v < 0 || v > 1) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
+36 -27
View File
@@ -23,10 +23,8 @@
int decode_t_reordering(int v)
{
static int tab[32] = {
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85,
90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 1600
};
static const int tab[32] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
80, 85, 90, 95, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 1600};
if (v < 0 || v > 31) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -38,12 +36,10 @@ int decode_t_reordering(int v)
int decode_t_status_prohibit(int v)
{
static int tab[62] = {
0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90,
95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165,
170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240,
245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400
};
static const int tab[62] = {0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75,
80, 85, 90, 95, 100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155,
160, 165, 170, 175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235,
240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 1200, 1600, 2000, 2400};
if (v < 0 || v > 61) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -55,12 +51,9 @@ int decode_t_status_prohibit(int v)
int decode_t_poll_retransmit(int v)
{
static int tab[59] = {
5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95,
100, 105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170,
175, 180, 185, 190, 195, 200, 205, 210, 215, 220, 225, 230, 235, 240, 245,
250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000
};
static const int tab[59] = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100,
105, 110, 115, 120, 125, 130, 135, 140, 145, 150, 155, 160, 165, 170, 175, 180, 185, 190, 195, 200,
205, 210, 215, 220, 225, 230, 235, 240, 245, 250, 300, 350, 400, 450, 500, 800, 1000, 2000, 4000};
if (v < 0 || v > 58) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -72,8 +65,15 @@ int decode_t_poll_retransmit(int v)
int decode_poll_pdu(int v)
{
static int tab[8] = {
4, 8, 16, 32, 64, 128, 256, -1 /* -1 means infinity */
static const int tab[8] = {
4,
8,
16,
32,
64,
128,
256,
-1 /* -1 means infinity */
};
if (v < 0 || v > 7) {
@@ -86,9 +86,22 @@ int decode_poll_pdu(int v)
int decode_poll_byte(int v)
{
static int tab[15] = {
25, 50, 75, 100, 125, 250, 375, 500, 750, 1000, 1250, 1500, 2000, 3000,
-1 /* -1 means infinity */
static const int tab[15] = {
25,
50,
75,
100,
125,
250,
375,
500,
750,
1000,
1250,
1500,
2000,
3000,
-1 /* -1 means infinity */
};
if (v < 0 || v > 14) {
@@ -102,9 +115,7 @@ int decode_poll_byte(int v)
int decode_max_retx_threshold(int v)
{
static int tab[8] = {
1, 2, 3, 4, 6, 8, 16, 32
};
static const int tab[8] = {1, 2, 3, 4, 6, 8, 16, 32};
if (v < 0 || v > 7) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
@@ -116,9 +127,7 @@ int decode_max_retx_threshold(int v)
int decode_sn_field_length(int v)
{
static int tab[2] = {
5, 10
};
static const int tab[2] = {5, 10};
if (v < 0 || v > 1) {
LOG_E(RLC, "%s:%d:%s: fatal\n", __FILE__, __LINE__, __FUNCTION__);
+14 -14
View File
@@ -48,20 +48,20 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m2ap_message_decoded_callback m2ap_MCE_messages_callback[][3] = {
{ 0, MCE_handle_MBMS_SESSION_START_RESPONSE, 0 }, /* MBMSSessionStart */
{ 0, MCE_handle_MBMS_SESSION_STOP_RESPONSE, 0 }, /* MBMSSessionStop */
{ 0, MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE, 0 }, /* MBMSSchedulingInformation */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ MCE_handle_M2_SETUP_REQUEST, 0, 0 }, /* M2 Setup */
{ 0, 0, 0 }, /* eNBConfigurationUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ 0, 0, 0 }, /* privateMessage */
{ 0, 0, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MBMSServiceCounting */
{ 0, 0, 0 }, /* MBMSServiceCountingResultReport */
{ 0, 0, 0 } /* MBMSOverloadNotification */
static const m2ap_message_decoded_callback m2ap_MCE_messages_callback[][3] = {
{0, MCE_handle_MBMS_SESSION_START_RESPONSE, 0}, /* MBMSSessionStart */
{0, MCE_handle_MBMS_SESSION_STOP_RESPONSE, 0}, /* MBMSSessionStop */
{0, MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE, 0}, /* MBMSSchedulingInformation */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{MCE_handle_M2_SETUP_REQUEST, 0, 0}, /* M2 Setup */
{0, 0, 0}, /* eNBConfigurationUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{0, 0, 0}, /* privateMessage */
{0, 0, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MBMSServiceCounting */
{0, 0, 0}, /* MBMSServiceCountingResultReport */
{0, 0, 0} /* MBMSOverloadNotification */
};
static char *m2ap_direction2String(int m2ap_dir) {
+14 -14
View File
@@ -46,20 +46,20 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m2ap_eNB_message_decoded_callback m2ap_eNB_messages_callback[][3] = {
{ eNB_handle_MBMS_SESSION_START_REQUEST, 0, 0 }, /* MBMSSessionStart */
{ eNB_handle_MBMS_SESSION_STOP_REQUEST, 0, 0 }, /* MBMSSessionStop */
{ eNB_handle_MBMS_SCHEDULING_INFORMATION, 0, 0 }, /* MBMSSchedulingInformation */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ 0,eNB_handle_M2_SETUP_RESPONSE,eNB_handle_M2_SETUP_FAILURE }, /* M2 Setup */
{ 0, 0, 0 }, /* eNBConfigurationUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ 0, 0, 0 }, /* privateMessage */
{ 0, 0, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MBMSServiceCounting */
{ 0, 0, 0 }, /* MBMSServiceCountingResultReport */
{ 0, 0, 0 } /* MBMSOverloadNotification */
static const m2ap_eNB_message_decoded_callback m2ap_eNB_messages_callback[][3] = {
{eNB_handle_MBMS_SESSION_START_REQUEST, 0, 0}, /* MBMSSessionStart */
{eNB_handle_MBMS_SESSION_STOP_REQUEST, 0, 0}, /* MBMSSessionStop */
{eNB_handle_MBMS_SCHEDULING_INFORMATION, 0, 0}, /* MBMSSchedulingInformation */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{0, eNB_handle_M2_SETUP_RESPONSE, eNB_handle_M2_SETUP_FAILURE}, /* M2 Setup */
{0, 0, 0}, /* eNBConfigurationUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{0, 0, 0}, /* privateMessage */
{0, 0, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MBMSServiceCounting */
{0, 0, 0}, /* MBMSServiceCountingResultReport */
{0, 0, 0} /* MBMSOverloadNotification */
};
static char *m2ap_direction2String(int m2ap_dir) {
+14 -14
View File
@@ -48,20 +48,20 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m2ap_message_decoded_callback m2ap_messages_callback[][3] = {
{ eNB_handle_MBMS_SESSION_START_REQUEST, MCE_handle_MBMS_SESSION_START_RESPONSE, 0 }, /* MBMSSessionStart */
{ eNB_handle_MBMS_SESSION_STOP_REQUEST, MCE_handle_MBMS_SESSION_STOP_RESPONSE, 0 }, /* MBMSSessionStop */
{ eNB_handle_MBMS_SCHEDULING_INFORMATION, MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE, 0 }, /* MBMSSchedulingInformation */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ MCE_handle_M2_SETUP_REQUEST,eNB_handle_M2_SETUP_RESPONSE,eNB_handle_M2_SETUP_FAILURE }, /* M2 Setup */
{ 0, 0, 0 }, /* eNBConfigurationUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ 0, 0, 0 }, /* privateMessage */
{ 0, 0, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MBMSServiceCounting */
{ 0, 0, 0 }, /* MBMSServiceCountingResultReport */
{ 0, 0, 0 } /* MBMSOverloadNotification */
static const m2ap_message_decoded_callback m2ap_messages_callback[][3] = {
{eNB_handle_MBMS_SESSION_START_REQUEST, MCE_handle_MBMS_SESSION_START_RESPONSE, 0}, /* MBMSSessionStart */
{eNB_handle_MBMS_SESSION_STOP_REQUEST, MCE_handle_MBMS_SESSION_STOP_RESPONSE, 0}, /* MBMSSessionStop */
{eNB_handle_MBMS_SCHEDULING_INFORMATION, MCE_handle_MBMS_SCHEDULING_INFORMATION_RESPONSE, 0}, /* MBMSSchedulingInformation */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{MCE_handle_M2_SETUP_REQUEST, eNB_handle_M2_SETUP_RESPONSE, eNB_handle_M2_SETUP_FAILURE}, /* M2 Setup */
{0, 0, 0}, /* eNBConfigurationUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{0, 0, 0}, /* privateMessage */
{0, 0, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MBMSServiceCounting */
{0, 0, 0}, /* MBMSServiceCountingResultReport */
{0, 0, 0} /* MBMSOverloadNotification */
};
static char *m2ap_direction2String(int m2ap_dir) {
+9 -11
View File
@@ -119,15 +119,14 @@ typedef struct xer_sprint_string_s {
extern RAN_CONTEXT_t RC;
uint16_t two_tier_hexagonal_cellIds[7] = {0,1,2,4,5,7,8};
uint16_t two_tier_hexagonal_adjacent_cellIds[7][6] = {{1,2,4,5,7,8}, // CellId 0
{11,18,2,0,8,15}, // CellId 1
{18,13,3,4,0,1}, // CellId 2
{2,3,14,6,5,0}, // CellId 4
{0,4,6,16,9,7}, // CellId 5
{8,0,5,9,17,12}, // CellId 7
{15,1,0,7,12,10}
};// CellId 8
static const uint16_t two_tier_hexagonal_cellIds[7] = {0, 1, 2, 4, 5, 7, 8};
static const uint16_t two_tier_hexagonal_adjacent_cellIds[7][6] = {{1, 2, 4, 5, 7, 8}, // CellId 0
{11, 18, 2, 0, 8, 15}, // CellId 1
{18, 13, 3, 4, 0, 1}, // CellId 2
{2, 3, 14, 6, 5, 0}, // CellId 4
{0, 4, 6, 16, 9, 7}, // CellId 5
{8, 0, 5, 9, 17, 12}, // CellId 7
{15, 1, 0, 7, 12, 10}}; // CellId 8
/*
* This is a helper function for xer_sprint, which directs all incoming data
@@ -4048,8 +4047,7 @@ uint8_t do_RRCConnectionRelease(uint8_t Mod_id,
return((enc_rval.encoded+7)/8);
}
uint8_t TMGI[5] = {4,3,2,1,0};//TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
static const uint8_t TMGI[5] = {4, 3, 2, 1, 0}; // TMGI is a string of octet, ref. TS 24.008 fig. 10.5.4a
uint8_t do_MBSFNAreaConfig(uint8_t Mod_id,
uint8_t sync_area,
+10 -11
View File
@@ -1225,24 +1225,23 @@ rrc_eNB_generate_RRCConnectionReestablishment(
if (SRB1_config->logicalChannelConfig) {
if (SRB1_config->logicalChannelConfig->present == LTE_SRB_ToAddMod__logicalChannelConfig_PR_explicitValue) {
SRB1_logicalChannelConfig = &(SRB1_config->logicalChannelConfig->choice.explicitValue);
SRB1_logicalChannelConfig = &SRB1_config->logicalChannelConfig->choice.explicitValue;
} else {
SRB1_logicalChannelConfig = &(SRB1_logicalChannelConfig_defaultValue);
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
} else {
SRB1_logicalChannelConfig = &(SRB1_logicalChannelConfig_defaultValue);
SRB1_logicalChannelConfig = &SRB1_logicalChannelConfig_defaultValue;
}
LOG_D(RRC, PROTOCOL_RRC_CTXT_UE_FMT" RRC_eNB --- MAC_CONFIG_REQ (SRB1) ---> MAC_eNB\n",
PROTOCOL_RRC_CTXT_UE_ARGS(ctxt_pP));
rrc_mac_config_req_eNB_t tmp = {0};
tmp.CC_id = ue_context->primaryCC_id;
tmp.physicalConfigDedicated = ue_context->physicalConfigDedicated;
tmp.mac_MainConfig = ue_context->mac_MainConfig;
tmp.logicalChannelIdentity = 1;
tmp.logicalChannelConfig = SRB1_logicalChannelConfig;
tmp.measGapConfig = ue_context->measGapConfig;
const rrc_mac_config_req_eNB_t tmp = {.CC_id = ue_context->primaryCC_id,
.physicalConfigDedicated = ue_context->physicalConfigDedicated,
.mac_MainConfig = ue_context->mac_MainConfig,
.logicalChannelIdentity = 1,
.logicalChannelConfig = SRB1_logicalChannelConfig,
.measGapConfig = ue_context->measGapConfig};
rrc_mac_config_req_eNB(module_id, &tmp);
break;
} // if ((*SRB_configList)->list.array[cnt]->srb_Identity == 1)
@@ -1928,7 +1927,7 @@ rrc_eNB_generate_RRCConnectionRelease(
PDCP_TRANSMISSION_MODE_CONTROL);
}
uint8_t qci_to_priority[9]= {2,4,3,5,1,6,7,8,9};
static const uint8_t qci_to_priority[9] = {2, 4, 3, 5, 1, 6, 7, 8, 9};
// TBD: this directive can be remived if we create a similar e_rab_param_t structure in RRC context
//-----------------------------------------------------------------------------
-4
View File
@@ -39,10 +39,6 @@ extern UE_RRC_INST *UE_rrc_inst;
extern uint8_t DRB2LCHAN[8];
extern NR_LogicalChannelConfig_t NR_SRB1_logicalChannelConfig_defaultValue;
extern NR_LogicalChannelConfig_t NR_SRB2_logicalChannelConfig_defaultValue;
extern NR_LogicalChannelConfig_t NR_SRB3_logicalChannelConfig_defaultValue;
extern int NB_UE_INST;
extern void* bigphys_malloc(int);
-63
View File
@@ -1,63 +0,0 @@
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
* except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.openairinterface.org/?page_id=698
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*-------------------------------------------------------------------------------
* For more information about the OpenAirInterface (OAI) Software Alliance:
* contact@openairinterface.org
*/
#include <stdint.h>
/* Rijndael S-box OSA_SR */
uint8_t OSA_SR[256] = {
0x63,0x7C,0x77,0x7B,0xF2,0x6B,0x6F,0xC5,0x30,0x01,0x67,0x2B,0xFE,0xD7,0xAB,0x76,
0x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
0xD9,0xC7,0xAF,0x6B,0x54,0x0B,0xE0,0x38,0x04,0xC8,0x9D,0xE7,0x14,0xB1,0x87,0x9C,
0xDF,0x6F,0xF9,0xDA,0x2A,0xC4,0x59,0x16,0x74,0x91,0xAB,0x26,0x61,0x76,0x34,0x2B,
0xAD,0x99,0xFB,0x72,0xEC,0x33,0x12,0xDE,0x98,0x3B,0xC0,0x9B,0x3E,0x18,0x10,0x3A,
0x56,0xE1,0x77,0xC9,0x1E,0x9E,0x95,0xA3,0x90,0x19,0xA8,0x6C,0x09,0xD0,0xF0,0x86
};
+32 -7
View File
@@ -19,12 +19,37 @@
* contact@openairinterface.org
*/
#ifndef OSA_RIJNDAEL_H_
#define OSA_RIJNDAEL_H_
/* Rijndael S-box SR */
#include <stdint.h>
/* Rijndael S-box OSA_SR */
extern uint8_t OSA_SR[256];
static const uint8_t OSA_SR[256] = {
0x63, 0x7C, 0x77, 0x7B, 0xF2, 0x6B, 0x6F, 0xC5, 0x30, 0x01, 0x67, 0x2B, 0xFE, 0xD7, 0xAB, 0x76, 0xCA, 0x82, 0xC9, 0x7D,
0xFA, 0x59, 0x47, 0xF0, 0xAD, 0xD4, 0xA2, 0xAF, 0x9C, 0xA4, 0x72, 0xC0, 0xB7, 0xFD, 0x93, 0x26, 0x36, 0x3F, 0xF7, 0xCC,
0x34, 0xA5, 0xE5, 0xF1, 0x71, 0xD8, 0x31, 0x15, 0x04, 0xC7, 0x23, 0xC3, 0x18, 0x96, 0x05, 0x9A, 0x07, 0x12, 0x80, 0xE2,
0xEB, 0x27, 0xB2, 0x75, 0x09, 0x83, 0x2C, 0x1A, 0x1B, 0x6E, 0x5A, 0xA0, 0x52, 0x3B, 0xD6, 0xB3, 0x29, 0xE3, 0x2F, 0x84,
0x53, 0xD1, 0x00, 0xED, 0x20, 0xFC, 0xB1, 0x5B, 0x6A, 0xCB, 0xBE, 0x39, 0x4A, 0x4C, 0x58, 0xCF, 0xD0, 0xEF, 0xAA, 0xFB,
0x43, 0x4D, 0x33, 0x85, 0x45, 0xF9, 0x02, 0x7F, 0x50, 0x3C, 0x9F, 0xA8, 0x51, 0xA3, 0x40, 0x8F, 0x92, 0x9D, 0x38, 0xF5,
0xBC, 0xB6, 0xDA, 0x21, 0x10, 0xFF, 0xF3, 0xD2, 0xCD, 0x0C, 0x13, 0xEC, 0x5F, 0x97, 0x44, 0x17, 0xC4, 0xA7, 0x7E, 0x3D,
0x64, 0x5D, 0x19, 0x73, 0x60, 0x81, 0x4F, 0xDC, 0x22, 0x2A, 0x90, 0x88, 0x46, 0xEE, 0xB8, 0x14, 0xDE, 0x5E, 0x0B, 0xDB,
0xE0, 0x32, 0x3A, 0x0A, 0x49, 0x06, 0x24, 0x5C, 0xC2, 0xD3, 0xAC, 0x62, 0x91, 0x95, 0xE4, 0x79, 0xE7, 0xC8, 0x37, 0x6D,
0x8D, 0xD5, 0x4E, 0xA9, 0x6C, 0x56, 0xF4, 0xEA, 0x65, 0x7A, 0xAE, 0x08, 0xBA, 0x78, 0x25, 0x2E, 0x1C, 0xA6, 0xB4, 0xC6,
0xE8, 0xDD, 0x74, 0x1F, 0x4B, 0xBD, 0x8B, 0x8A, 0x70, 0x3E, 0xB5, 0x66, 0x48, 0x03, 0xF6, 0x0E, 0x61, 0x35, 0x57, 0xB9,
0x86, 0xC1, 0x1D, 0x9E, 0xE1, 0xF8, 0x98, 0x11, 0x69, 0xD9, 0x8E, 0x94, 0x9B, 0x1E, 0x87, 0xE9, 0xCE, 0x55, 0x28, 0xDF,
0x8C, 0xA1, 0x89, 0x0D, 0xBF, 0xE6, 0x42, 0x68, 0x41, 0x99, 0x2D, 0x0F, 0xB0, 0x54, 0xBB, 0x16};
/* S-box SQ */
extern uint8_t OSA_SQ[256];
#endif
/* S-box OSA_SQ */
static const uint8_t OSA_SQ[256] = {
0x25, 0x24, 0x73, 0x67, 0xD7, 0xAE, 0x5C, 0x30, 0xA4, 0xEE, 0x6E, 0xCB, 0x7D, 0xB5, 0x82, 0xDB, 0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E0, 0x38,
0x04, 0xC8, 0x9D, 0xE7, 0x14, 0xB1, 0x87, 0x9C, 0xDF, 0x6F, 0xF9, 0xDA, 0x2A, 0xC4, 0x59, 0x16, 0x74, 0x91, 0xAB, 0x26,
0x61, 0x76, 0x34, 0x2B, 0xAD, 0x99, 0xFB, 0x72, 0xEC, 0x33, 0x12, 0xDE, 0x98, 0x3B, 0xC0, 0x9B, 0x3E, 0x18, 0x10, 0x3A,
0x56, 0xE1, 0x77, 0xC9, 0x1E, 0x9E, 0x95, 0xA3, 0x90, 0x19, 0xA8, 0x6C, 0x09, 0xD0, 0xF0, 0x86};
+58 -117
View File
@@ -166,58 +166,65 @@ int x2ap_gNB_handle_ENDC_sGNB_release_confirm(instance_t instance,
X2AP_X2AP_PDU_t *pdu);
/* Handlers matrix. Only eNB related procedure present here. Placement of callback functions according to X2AP_ProcedureCode.h */
x2ap_message_decoded_callback x2ap_messages_callback[][3] = {
{ x2ap_eNB_handle_handover_preparation, x2ap_eNB_handle_handover_response, 0 }, /* handoverPreparation */
{ x2ap_eNB_handle_handover_cancel, 0, 0 }, /* handoverCancel */
{ 0, 0, 0 }, /* loadIndication */
{ 0, 0, 0 }, /* errorIndication */
{ 0, 0, 0 }, /* snStatusTransfer */
{ x2ap_eNB_handle_ue_context_release, 0, 0 }, /* uEContextRelease */
{ x2ap_eNB_handle_x2_setup_request, x2ap_eNB_handle_x2_setup_response, x2ap_eNB_handle_x2_setup_failure }, /* x2Setup */
{ x2ap_eNB_handle_x2_reset_request, x2ap_eNB_handle_x2_reset_response, 0 }, /* reset */
{ 0, 0, 0 }, /* eNBConfigurationUpdate */
{ 0, 0, 0 }, /* resourceStatusReportingInitiation */
{ 0, 0, 0 }, /* resourceStatusReporting */
{ 0, 0, 0 }, /* privateMessage */
{ 0, 0, 0 }, /* mobilitySettingsChange */
{ 0, 0, 0 }, /* rLFIndication */
{ 0, 0, 0 }, /* handoverReport */
{ 0, 0, 0 }, /* cellActivation */
{ 0, 0, 0 }, /* x2Release */
{ 0, 0, 0 }, /* x2APMessageTransfer */
{ 0, 0, 0 }, /* x2Removal */
{ x2ap_eNB_handle_senb_addition_request, x2ap_eNB_handle_senb_addition_request_ack, x2ap_eNB_handle_senb_addition_request_reject }, /* seNBAdditionPreparation */
{ 0, 0, 0 }, /* seNBReconfigurationCompletion */
{ 0, 0, 0 }, /* meNBinitiatedSeNBModificationPreparation */
{ 0, 0, 0 }, /* seNBinitiatedSeNBModification */
{ 0, 0, 0 }, /* meNBinitiatedSeNBRelease */
{ 0, 0, 0 }, /* seNBinitiatedSeNBRelease */
{ 0, 0, 0 }, /* seNBCounterCheck */
{ 0, 0, 0 }, /* retrieveUEContext */
{ x2ap_gNB_handle_ENDC_sGNB_addition_request, x2ap_eNB_handle_ENDC_sGNB_addition_response, 0 }, /*X2AP_ProcedureCode_id_sgNBAdditionPreparation*/
{ x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete, 0, 0 }, /*X2AP_ProcedureCode_id_sgNBReconfigurationCompletion*/
{ 0, 0, 0 },
{ 0, 0, 0 },
{ x2ap_gNB_handle_ENDC_sGNB_release_request, x2ap_gNB_handle_ENDC_sGNB_release_request_acknowledge, 0 }, /* meNBinitiatedSgNBRelease */
{ x2ap_gNB_handle_ENDC_sGNB_release_required, x2ap_gNB_handle_ENDC_sGNB_release_confirm, 0 }, /* sgNBinitiatedSgNBRelease */
static const x2ap_message_decoded_callback x2ap_messages_callback[][3] = {
{x2ap_eNB_handle_handover_preparation, x2ap_eNB_handle_handover_response, 0}, /* handoverPreparation */
{x2ap_eNB_handle_handover_cancel, 0, 0}, /* handoverCancel */
{0, 0, 0}, /* loadIndication */
{0, 0, 0}, /* errorIndication */
{0, 0, 0}, /* snStatusTransfer */
{x2ap_eNB_handle_ue_context_release, 0, 0}, /* uEContextRelease */
{x2ap_eNB_handle_x2_setup_request, x2ap_eNB_handle_x2_setup_response, x2ap_eNB_handle_x2_setup_failure}, /* x2Setup */
{x2ap_eNB_handle_x2_reset_request, x2ap_eNB_handle_x2_reset_response, 0}, /* reset */
{0, 0, 0}, /* eNBConfigurationUpdate */
{0, 0, 0}, /* resourceStatusReportingInitiation */
{0, 0, 0}, /* resourceStatusReporting */
{0, 0, 0}, /* privateMessage */
{0, 0, 0}, /* mobilitySettingsChange */
{0, 0, 0}, /* rLFIndication */
{0, 0, 0}, /* handoverReport */
{0, 0, 0}, /* cellActivation */
{0, 0, 0}, /* x2Release */
{0, 0, 0}, /* x2APMessageTransfer */
{0, 0, 0}, /* x2Removal */
{x2ap_eNB_handle_senb_addition_request,
x2ap_eNB_handle_senb_addition_request_ack,
x2ap_eNB_handle_senb_addition_request_reject}, /* seNBAdditionPreparation */
{0, 0, 0}, /* seNBReconfigurationCompletion */
{0, 0, 0}, /* meNBinitiatedSeNBModificationPreparation */
{0, 0, 0}, /* seNBinitiatedSeNBModification */
{0, 0, 0}, /* meNBinitiatedSeNBRelease */
{0, 0, 0}, /* seNBinitiatedSeNBRelease */
{0, 0, 0}, /* seNBCounterCheck */
{0, 0, 0}, /* retrieveUEContext */
{x2ap_gNB_handle_ENDC_sGNB_addition_request,
x2ap_eNB_handle_ENDC_sGNB_addition_response,
0}, /*X2AP_ProcedureCode_id_sgNBAdditionPreparation*/
{x2ap_gNB_handle_ENDC_sGNB_reconfiguration_complete, 0, 0}, /*X2AP_ProcedureCode_id_sgNBReconfigurationCompletion*/
{0, 0, 0},
{0, 0, 0},
{x2ap_gNB_handle_ENDC_sGNB_release_request,
x2ap_gNB_handle_ENDC_sGNB_release_request_acknowledge,
0}, /* meNBinitiatedSgNBRelease */
{x2ap_gNB_handle_ENDC_sGNB_release_required, x2ap_gNB_handle_ENDC_sGNB_release_confirm, 0}, /* sgNBinitiatedSgNBRelease */
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 },
{ x2ap_eNB_handle_ENDC_x2_setup_request, x2ap_gNB_handle_ENDC_x2_setup_response, 0 }, /*X2AP_ProcedureCode_id_endcX2Setup*/
{ 0, 0, 0 },
{ 0, 0, 0 },
{ 0, 0, 0 }
{0, 0, 0},
{0, 0, 0},
{0, 0, 0},
{x2ap_eNB_handle_ENDC_x2_setup_request, x2ap_gNB_handle_ENDC_x2_setup_response, 0}, /*X2AP_ProcedureCode_id_endcX2Setup*/
{0, 0, 0},
{0, 0, 0},
{0, 0, 0}};
static const char *const x2ap_direction_String[] = {
"", /* Nothing */
"Originating message", /* originating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
};
char *x2ap_direction2String(int x2ap_dir) {
static char *x2ap_direction_String[] = {
"", /* Nothing */
"Originating message", /* originating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
};
return(x2ap_direction_String[x2ap_dir]);
const char *x2ap_direction2String(int x2ap_dir)
{
return (x2ap_direction_String[x2ap_dir]);
}
void x2ap_handle_x2_setup_message(x2ap_eNB_instance_t *instance_p, x2ap_eNB_data_t *enb_desc_p, int sctp_shutdown)
@@ -509,74 +516,6 @@ x2ap_eNB_handle_x2_setup_request(instance_t instance,
return x2ap_eNB_generate_x2_setup_response(instance_p, x2ap_eNB_data);
}
const char *X2AP_ResetRequest_str[2]={"X2AP_ResetRequest_IEs__value_PR_Cause","X2AP_ResetRequest_IEs__value_PR_InterfaceInstanceIndication"};
const char *X2AP_case_str_radio[50]={"X2AP_CauseRadioNetwork_handover_desirable_for_radio_reasons",
"X2AP_CauseRadioNetwork_time_critical_handover",
"X2AP_CauseRadioNetwork_resource_optimisation_handover",
"X2AP_CauseRadioNetwork_reduce_load_in_serving_cell",
"X2AP_CauseRadioNetwork_partial_handover",
"X2AP_CauseRadioNetwork_unknown_new_eNB_UE_X2AP_ID",
"X2AP_CauseRadioNetwork_unknown_old_eNB_UE_X2AP_ID",
"X2AP_CauseRadioNetwork_unknown_pair_of_UE_X2AP_ID",
"X2AP_CauseRadioNetwork_ho_target_not_allowed",
"X2AP_CauseRadioNetwork_tx2relocoverall_expiry",
"X2AP_CauseRadioNetwork_trelocprep_expiry",
"X2AP_CauseRadioNetwork_cell_not_available",
"X2AP_CauseRadioNetwork_no_radio_resources_available_in_target_cell",
"X2AP_CauseRadioNetwork_invalid_MME_GroupID",
"X2AP_CauseRadioNetwork_unknown_MME_Code",
"X2AP_CauseRadioNetwork_encryption_and_or_integrity_protection_algorithms_not_supported",
"X2AP_CauseRadioNetwork_reportCharacteristicsEmpty",
"X2AP_CauseRadioNetwork_noReportPeriodicity",
"X2AP_CauseRadioNetwork_existingMeasurementID",
"X2AP_CauseRadioNetwork_unknown_eNB_Measurement_ID",
"X2AP_CauseRadioNetwork_measurement_temporarily_not_available",
"X2AP_CauseRadioNetwork_unspecified",
"X2AP_CauseRadioNetwork_load_balancing",
"X2AP_CauseRadioNetwork_handover_optimisation",
"X2AP_CauseRadioNetwork_value_out_of_allowed_range",
"X2AP_CauseRadioNetwork_multiple_E_RAB_ID_instances",
"X2AP_CauseRadioNetwork_switch_off_ongoing",
"X2AP_CauseRadioNetwork_not_supported_QCI_value",
"X2AP_CauseRadioNetwork_measurement_not_supported_for_the_object",
"X2AP_CauseRadioNetwork_tDCoverall_expiry",
"X2AP_CauseRadioNetwork_tDCprep_expiry",
"X2AP_CauseRadioNetwork_action_desirable_for_radio_reasons",
"X2AP_CauseRadioNetwork_reduce_load",
"X2AP_CauseRadioNetwork_resource_optimisation",
"X2AP_CauseRadioNetwork_time_critical_action",
"X2AP_CauseRadioNetwork_target_not_allowed",
"X2AP_CauseRadioNetwork_no_radio_resources_available",
"X2AP_CauseRadioNetwork_invalid_QoS_combination",
"X2AP_CauseRadioNetwork_encryption_algorithms_not_supported",
"X2AP_CauseRadioNetwork_procedure_cancelled",
"X2AP_CauseRadioNetwork_rRM_purpose",
"X2AP_CauseRadioNetwork_improve_user_bit_rate",
"X2AP_CauseRadioNetwork_user_inactivity",
"X2AP_CauseRadioNetwork_radio_connection_with_UE_lost",
"X2AP_CauseRadioNetwork_bearer_option_not_supported",
"X2AP_CauseRadioNetwork_mCG_Mobility",
"X2AP_CauseRadioNetwork_sCG_Mobility",
"X2AP_CauseRadioNetwork_count_reaches_max_value",
"X2AP_CauseRadioNetwork_unknown_old_en_gNB_UE_X2AP_ID",
"X2AP_CauseRadioNetwork_pDCP_Overload"};
const char *X2AP_cause_str_radio[2]={"X2AP_CauseTransport_transport_resource_unavailable",
"X2AP_CauseTransport_unspecified"};
const char *X2AP_cause_str_protocol[7]={" X2AP_CauseProtocol_transfer_syntax_error",
"X2AP_CauseProtocol_abstract_syntax_error_reject",
"X2AP_CauseProtocol_abstract_syntax_error_ignore_and_notify",
"X2AP_CauseProtocol_message_not_compatible_with_receiver_state",
"X2AP_CauseProtocol_semantic_error",
"X2AP_CauseProtocol_unspecified",
"X2AP_CauseProtocol_abstract_syntax_error_falsely_constructed_message"};
const char *X2AP_cause_str_misc[5]={"X2AP_CauseMisc_control_processing_overload",
"X2AP_CauseMisc_hardware_failure",
"X2AP_CauseMisc_om_intervention",
"X2AP_CauseMisc_not_enough_user_plane_processing_resources",
"X2AP_CauseMisc_unspecified"};
int
x2ap_eNB_handle_x2_reset_response(instance_t instance,
uint32_t assoc_id,
@@ -594,6 +533,8 @@ x2ap_eNB_handle_x2_reset_request(instance_t instance,
uint32_t stream,
X2AP_X2AP_PDU_t *pdu)
{
const char *const X2AP_ResetRequest_str[2] = {"X2AP_ResetRequest_IEs__value_PR_Cause",
"X2AP_ResetRequest_IEs__value_PR_InterfaceInstanceIndication"};
X2AP_ResetRequest_t *ResetRequest;
X2AP_ResetRequest_IEs_t *ie;
+9 -9
View File
@@ -48,15 +48,15 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m3ap_MCE_message_decoded_callback m3ap_MCE_messages_callback[][3] = {
{ MCE_handle_MBMS_SESSION_START_REQUEST, 0, 0 }, /* MBMSSessionStart */
{ MCE_handle_MBMS_SESSION_STOP_REQUEST, 0, 0 }, /* MBMSSessionStop */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ 0, 0, 0 }, /* ??? */
{ MCE_handle_MBMS_SESSION_UPDATE_REQUEST, 0, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ 0, MCE_handle_M3_SETUP_RESPONSE, 0 } /* M3 Setup */
static const m3ap_MCE_message_decoded_callback m3ap_MCE_messages_callback[][3] = {
{MCE_handle_MBMS_SESSION_START_REQUEST, 0, 0}, /* MBMSSessionStart */
{MCE_handle_MBMS_SESSION_STOP_REQUEST, 0, 0}, /* MBMSSessionStop */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{0, 0, 0}, /* ??? */
{MCE_handle_MBMS_SESSION_UPDATE_REQUEST, 0, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{0, MCE_handle_M3_SETUP_RESPONSE, 0} /* M3 Setup */
};
static char *m3ap_direction2String(int m3ap_dir) {
+9 -9
View File
@@ -47,15 +47,15 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m3ap_MCE_message_decoded_callback m3ap_MME_messages_callback[][3] = {
{ 0, MME_handle_MBMS_SESSION_START_RESPONSE, 0 }, /* MBMSSessionStart */
{ 0, MME_handle_MBMS_SESSION_STOP_RESPONSE, 0 }, /* MBMSSessionStop */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ 0, 0, 0 }, /* ??? */
{ 0, MME_handle_MBMS_SESSION_UPDATE_RESPONSE, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ MME_handle_M3_SETUP_REQUEST, 0, 0 } /* M3 Setup */
static const m3ap_MCE_message_decoded_callback m3ap_MME_messages_callback[][3] = {
{0, MME_handle_MBMS_SESSION_START_RESPONSE, 0}, /* MBMSSessionStart */
{0, MME_handle_MBMS_SESSION_STOP_RESPONSE, 0}, /* MBMSSessionStop */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{0, 0, 0}, /* ??? */
{0, MME_handle_MBMS_SESSION_UPDATE_RESPONSE, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{MME_handle_M3_SETUP_REQUEST, 0, 0} /* M3 Setup */
};
static char *m3ap_direction2String(int m3ap_dir) {
+9 -9
View File
@@ -48,15 +48,15 @@
#include "conversions.h"
/* Handlers matrix. Only eNB related procedure present here */
m3ap_message_decoded_callback m3ap_messages_callback[][3] = {
{ MCE_handle_MBMS_SESSION_START_REQUEST, MME_handle_MBMS_SESSION_START_RESPONSE, 0 }, /* MBMSSessionStart */
{ MCE_handle_MBMS_SESSION_STOP_REQUEST, MME_handle_MBMS_SESSION_STOP_RESPONSE, 0 }, /* MBMSSessionStop */
{ 0, 0, 0 }, /* Error Indication */
{ 0, 0, 0 }, /* Reset */
{ 0, 0, 0 }, /* ??? */
{ MCE_handle_MBMS_SESSION_UPDATE_REQUEST, MME_handle_MBMS_SESSION_UPDATE_RESPONSE, 0 }, /* MBMSSessionUpdate */
{ 0, 0, 0 }, /* MCEConfigurationUpdate */
{ MME_handle_M3_SETUP_REQUEST, MCE_handle_M3_SETUP_RESPONSE, 0 } /* M3 Setup */
static const m3ap_message_decoded_callback m3ap_messages_callback[][3] = {
{MCE_handle_MBMS_SESSION_START_REQUEST, MME_handle_MBMS_SESSION_START_RESPONSE, 0}, /* MBMSSessionStart */
{MCE_handle_MBMS_SESSION_STOP_REQUEST, MME_handle_MBMS_SESSION_STOP_RESPONSE, 0}, /* MBMSSessionStop */
{0, 0, 0}, /* Error Indication */
{0, 0, 0}, /* Reset */
{0, 0, 0}, /* ??? */
{MCE_handle_MBMS_SESSION_UPDATE_REQUEST, MME_handle_MBMS_SESSION_UPDATE_RESPONSE, 0}, /* MBMSSessionUpdate */
{0, 0, 0}, /* MCEConfigurationUpdate */
{MME_handle_M3_SETUP_REQUEST, MCE_handle_M3_SETUP_RESPONSE, 0} /* M3 Setup */
};
char *m3ap_direction2String(int m3ap_dir) {
+9 -9
View File
@@ -27,15 +27,15 @@
int errorCodeDecoder = 0;
const char *errorCodeStringDecoder[] = {
"No error",
"Buffer NULL",
"Buffer too short",
"Unexpected IEI",
"Mandatory field not present",
"Wrong message type",
"EXT value doesn't match",
"Protocol not supported",
static const char* const errorCodeStringDecoder[] = {
"No error",
"Buffer NULL",
"Buffer too short",
"Unexpected IEI",
"Mandatory field not present",
"Wrong message type",
"EXT value doesn't match",
"Protocol not supported",
};
void tlv_decode_perror(void)
+59 -58
View File
@@ -124,65 +124,66 @@ int s1ap_timer_setup(
long *timer_id);
/* Handlers matrix. Only eNB related procedure present here */
s1ap_message_decoded_callback messages_callback[][3] = {
{ 0, 0, 0 }, /* HandoverPreparation */
{ 0, 0, 0 }, /* HandoverResourceAllocation */
{ 0, 0, 0 }, /* HandoverNotification */
{ 0, s1ap_eNB_handle_s1_path_switch_request_ack, s1ap_eNB_handle_s1_path_switch_request_failure }, /* PathSwitchRequest */
{ 0, 0, 0 }, /* HandoverCancel */
{ s1ap_eNB_handle_e_rab_setup_request, 0, 0 }, /* E_RABSetup */
{ s1ap_eNB_handle_e_rab_modify_request, 0, 0 }, /* E_RABModify */
{ s1ap_eNB_handle_e_rab_release_command, 0, 0 }, /* E_RABRelease */
{ 0, 0, 0 }, /* E_RABReleaseIndication */
{ s1ap_eNB_handle_initial_context_request, 0, 0 }, /* InitialContextSetup */
{ s1ap_eNB_handle_paging, 0, 0 }, /* Paging */
{ s1ap_eNB_handle_nas_downlink, 0, 0 }, /* downlinkNASTransport */
{ 0, 0, 0 }, /* initialUEMessage */
{ 0, 0, 0 }, /* uplinkNASTransport */
{ 0, 0, 0 }, /* Reset */
{ s1ap_eNB_handle_error_indication, 0, 0 }, /* ErrorIndication */
{ 0, 0, 0 }, /* NASNonDeliveryIndication */
{ 0, s1ap_eNB_handle_s1_setup_response, s1ap_eNB_handle_s1_setup_failure }, /* S1Setup */
{ 0, 0, 0 }, /* UEContextReleaseRequest */
{ 0, 0, 0 }, /* DownlinkS1cdma2000tunneling */
{ 0, 0, 0 }, /* UplinkS1cdma2000tunneling */
{ 0, 0, 0 }, /* UEContextModification */
{ 0, 0, 0 }, /* UECapabilityInfoIndication */
{ s1ap_eNB_handle_ue_context_release_command, 0, 0 }, /* UEContextRelease */
{ 0, 0, 0 }, /* eNBStatusTransfer */
{ 0, 0, 0 }, /* MMEStatusTransfer */
{ s1ap_eNB_handle_deactivate_trace, 0, 0 }, /* DeactivateTrace */
{ s1ap_eNB_handle_trace_start, 0, 0 }, /* TraceStart */
{ 0, 0, 0 }, /* TraceFailureIndication */
{ 0, 0, 0 }, /* ENBConfigurationUpdate */
{ 0, 0, 0 }, /* MMEConfigurationUpdate */
{ 0, 0, 0 }, /* LocationReportingControl */
{ 0, 0, 0 }, /* LocationReportingFailureIndication */
{ 0, 0, 0 }, /* LocationReport */
{ 0, 0, 0 }, /* OverloadStart */
{ 0, 0, 0 }, /* OverloadStop */
{ 0, 0, 0 }, /* WriteReplaceWarning */
{ 0, 0, 0 }, /* eNBDirectInformationTransfer */
{ 0, 0, 0 }, /* MMEDirectInformationTransfer */
{ 0, 0, 0 }, /* PrivateMessage */
{ 0, 0, 0 }, /* eNBConfigurationTransfer */
{ 0, 0, 0 }, /* MMEConfigurationTransfer */
{ 0, 0, 0 }, /* CellTrafficTrace */
{ 0, 0, 0 }, /* Kill */
{ 0, 0, 0 }, /* DownlinkUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* UplinkUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* DownlinkNonUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* UplinkNonUEAssociatedLPPaTransport */
{ 0, 0, 0 }, /* UERadioCapabilityMatch */
{ 0, 0, 0 }, /* PWSRestartIndication */
{ 0, s1ap_eNB_handle_s1_ENDC_e_rab_modification_confirm, 0 }, /* E_RABModificationIndication */
static const s1ap_message_decoded_callback messages_callback[][3] = {
{0, 0, 0}, /* HandoverPreparation */
{0, 0, 0}, /* HandoverResourceAllocation */
{0, 0, 0}, /* HandoverNotification */
{0, s1ap_eNB_handle_s1_path_switch_request_ack, s1ap_eNB_handle_s1_path_switch_request_failure}, /* PathSwitchRequest */
{0, 0, 0}, /* HandoverCancel */
{s1ap_eNB_handle_e_rab_setup_request, 0, 0}, /* E_RABSetup */
{s1ap_eNB_handle_e_rab_modify_request, 0, 0}, /* E_RABModify */
{s1ap_eNB_handle_e_rab_release_command, 0, 0}, /* E_RABRelease */
{0, 0, 0}, /* E_RABReleaseIndication */
{s1ap_eNB_handle_initial_context_request, 0, 0}, /* InitialContextSetup */
{s1ap_eNB_handle_paging, 0, 0}, /* Paging */
{s1ap_eNB_handle_nas_downlink, 0, 0}, /* downlinkNASTransport */
{0, 0, 0}, /* initialUEMessage */
{0, 0, 0}, /* uplinkNASTransport */
{0, 0, 0}, /* Reset */
{s1ap_eNB_handle_error_indication, 0, 0}, /* ErrorIndication */
{0, 0, 0}, /* NASNonDeliveryIndication */
{0, s1ap_eNB_handle_s1_setup_response, s1ap_eNB_handle_s1_setup_failure}, /* S1Setup */
{0, 0, 0}, /* UEContextReleaseRequest */
{0, 0, 0}, /* DownlinkS1cdma2000tunneling */
{0, 0, 0}, /* UplinkS1cdma2000tunneling */
{0, 0, 0}, /* UEContextModification */
{0, 0, 0}, /* UECapabilityInfoIndication */
{s1ap_eNB_handle_ue_context_release_command, 0, 0}, /* UEContextRelease */
{0, 0, 0}, /* eNBStatusTransfer */
{0, 0, 0}, /* MMEStatusTransfer */
{s1ap_eNB_handle_deactivate_trace, 0, 0}, /* DeactivateTrace */
{s1ap_eNB_handle_trace_start, 0, 0}, /* TraceStart */
{0, 0, 0}, /* TraceFailureIndication */
{0, 0, 0}, /* ENBConfigurationUpdate */
{0, 0, 0}, /* MMEConfigurationUpdate */
{0, 0, 0}, /* LocationReportingControl */
{0, 0, 0}, /* LocationReportingFailureIndication */
{0, 0, 0}, /* LocationReport */
{0, 0, 0}, /* OverloadStart */
{0, 0, 0}, /* OverloadStop */
{0, 0, 0}, /* WriteReplaceWarning */
{0, 0, 0}, /* eNBDirectInformationTransfer */
{0, 0, 0}, /* MMEDirectInformationTransfer */
{0, 0, 0}, /* PrivateMessage */
{0, 0, 0}, /* eNBConfigurationTransfer */
{0, 0, 0}, /* MMEConfigurationTransfer */
{0, 0, 0}, /* CellTrafficTrace */
{0, 0, 0}, /* Kill */
{0, 0, 0}, /* DownlinkUEAssociatedLPPaTransport */
{0, 0, 0}, /* UplinkUEAssociatedLPPaTransport */
{0, 0, 0}, /* DownlinkNonUEAssociatedLPPaTransport */
{0, 0, 0}, /* UplinkNonUEAssociatedLPPaTransport */
{0, 0, 0}, /* UERadioCapabilityMatch */
{0, 0, 0}, /* PWSRestartIndication */
{0, s1ap_eNB_handle_s1_ENDC_e_rab_modification_confirm, 0}, /* E_RABModificationIndication */
};
char *s1ap_direction2String(int s1ap_dir) {
static char *s1ap_direction_String[] = {
"", /* Nothing */
"Originating message", /* originating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
const char *s1ap_direction2String(int s1ap_dir)
{
const char *const s1ap_direction_String[] = {
"", /* Nothing */
"Originating message", /* originating message */
"Successfull outcome", /* successfull outcome */
"UnSuccessfull outcome", /* successfull outcome */
};
return(s1ap_direction_String[s1ap_dir]);
}
+2 -13
View File
@@ -43,19 +43,8 @@
//#include "targets/RT/USER/lte-softmodem.h"
#include "executables/softmodem-common.h"
const char* devtype_names[MAX_RF_DEV_TYPE] = {
"",
"USRP B200",
"USRP X300",
"USRP N300",
"USRP X400",
"BLADERF",
"LMSSDR",
"IRIS",
"No HW",
"UEDv2",
"RFSIMULATOR"
};
const char *const devtype_names[MAX_RF_DEV_TYPE] =
{"", "USRP B200", "USRP X300", "USRP N300", "USRP X400", "BLADERF", "LMSSDR", "IRIS", "No HW", "UEDv2", "RFSIMULATOR"};
const char *get_devname(int devtype) {
if (devtype < MAX_RF_DEV_TYPE && devtype !=MIN_RF_DEV_TYPE )
-1
View File
@@ -105,7 +105,6 @@ typedef enum {
MAX_RF_DEV_TYPE
} dev_type_t;
/* list of names of devices, needs to match dev_type_t */
extern const char* devtype_names[MAX_RF_DEV_TYPE];
/*!\brief transport protocol types
*/