Commit 5ed848c7 authored by Laurent OpenCells's avatar Laurent OpenCells

more fixes on gcc warnings, misleading indentation and CPU mitigation when the...

more fixes on gcc warnings, misleading indentation and CPU mitigation when the traffic demand in 5G exeeds the available througput
parent 78da8436
This diff is collapsed.
This diff is collapsed.
...@@ -2727,7 +2727,7 @@ typedef struct { ...@@ -2727,7 +2727,7 @@ typedef struct {
} nfapi_cqi_indication_rel8_t; } nfapi_cqi_indication_rel8_t;
#define NFAPI_CQI_INDICATION_REL8_TAG 0x202f #define NFAPI_CQI_INDICATION_REL8_TAG 0x202f
#define NFAPI_CC_MAX 4 #define NFAPI_CC_MAX MAX_NUM_CCs
typedef struct { typedef struct {
nfapi_tl_t tl; nfapi_tl_t tl;
uint16_t length; uint16_t length;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -373,10 +373,10 @@ char interleave_compact_byte(short *base_interleaver,unsigned char *input, unsig ...@@ -373,10 +373,10 @@ char interleave_compact_byte(short *base_interleaver,unsigned char *input, unsig
short *ptr_intl=base_interleaver; short *ptr_intl=base_interleaver;
#if defined(__x86_64) || defined(__i386__) #if defined(__x86_64) || defined(__i386__)
#ifndef __AVX2__ #ifndef __AVX2__
__m128i tmp; __m128i tmp={0};
uint16_t *systematic2_ptr=(uint16_t *) output; uint16_t *systematic2_ptr=(uint16_t *) output;
#else #else
__m256i tmp; __m256i tmp={0};
uint32_t *systematic2_ptr=(uint32_t *) output; uint32_t *systematic2_ptr=(uint32_t *) output;
#endif #endif
#elif defined(__arm__) #elif defined(__arm__)
......
...@@ -1105,7 +1105,7 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y, ...@@ -1105,7 +1105,7 @@ uint8_t phy_threegpplte_turbo_decoder16(int16_t *y,
uint8_t temp; uint8_t temp;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
__m128i *yp128; __m128i *yp128;
__m128i tmp, zeros=_mm_setzero_si128(); __m128i tmp={0}, zeros=_mm_setzero_si128();
__m128i tmpe; __m128i tmpe;
#elif defined(__arm__) #elif defined(__arm__)
int16x8_t *yp128; int16x8_t *yp128;
......
...@@ -819,7 +819,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y, ...@@ -819,7 +819,7 @@ uint8_t phy_threegpplte_turbo_decoder8(int16_t *y,
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
__m128i *yp128; __m128i *yp128;
__m128i tmp128[(n+8)>>3]; __m128i tmp128[(n+8)>>3];
__m128i tmp, zeros=_mm_setzero_si128(); __m128i tmp={0}, zeros=_mm_setzero_si128();
#elif defined(__arm__) #elif defined(__arm__)
int8x16_t *yp128; int8x16_t *yp128;
int8x16_t tmp128[(n+8)>>3]; int8x16_t tmp128[(n+8)>>3];
......
...@@ -35,7 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32 ...@@ -35,7 +35,6 @@ static int16_t ru_90c[2*128] = {32767, 0,32766, -402,32758, -804,32746, -1206,32
#define SCALE 0x3FFF #define SCALE 0x3FFF
static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1}; static const short conjugate[8]__attribute__((aligned(16))) = {-1,1,-1,1,-1,1,-1,1};
//static const short conjugate2[8]__attribute__((aligned(16))) = {1,-1,1,-1,1,-1,1,-1};
extern unsigned short dftsizes[34]; extern unsigned short dftsizes[34];
extern int16_t *ul_ref_sigs_rx[30][2][34]; extern int16_t *ul_ref_sigs_rx[30][2][34];
......
...@@ -1234,7 +1234,7 @@ void dlsch_channel_compensation(int **rxdataF_ext, ...@@ -1234,7 +1234,7 @@ void dlsch_channel_compensation(int **rxdataF_ext,
unsigned short rb; unsigned short rb;
unsigned char aatx,aarx,symbol_mod,pilots=0; unsigned char aatx,aarx,symbol_mod,pilots=0;
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0};
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) { if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) {
...@@ -1657,11 +1657,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext, ...@@ -1657,11 +1657,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext,
int length_mod8 = 0; int length_mod8 = 0;
int length2; int length2;
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0};
int aatx = 0, aarx = 0; int aatx = 0, aarx = 0;
for (aatx=0; aatx<n_tx; aatx++) { for (aatx=0; aatx<n_tx; aatx++) {
__m128i QAM_amp128b; __m128i QAM_amp128b={0};
if (mod_order == 4) { if (mod_order == 4) {
QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10) QAM_amp128 = _mm_set1_epi16(QAM16_n1); // 2/sqrt(10)
...@@ -2411,7 +2411,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms, ...@@ -2411,7 +2411,7 @@ void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
int **rxdataF_comp0 = pdsch_vars->rxdataF_comp0; int **rxdataF_comp0 = pdsch_vars->rxdataF_comp0;
int **rxdataF_comp1 = pdsch_vars->rxdataF_comp1[harq_pid][round]; int **rxdataF_comp1 = pdsch_vars->rxdataF_comp1[harq_pid][round];
unsigned char *pmi_ext = pdsch_vars->pmi_ext; unsigned char *pmi_ext = pdsch_vars->pmi_ext;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128,QAM_amp1_128; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp0_128={0},QAM_amp1_128={0};
symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol; symbol_mod = (symbol>=(7-frame_parms->Ncp)) ? symbol-(7-frame_parms->Ncp) : symbol;
if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp))) if ((symbol_mod == 0) || (symbol_mod == (4-frame_parms->Ncp)))
......
...@@ -328,7 +328,7 @@ void mch_channel_compensation(int **rxdataF_ext, ...@@ -328,7 +328,7 @@ void mch_channel_compensation(int **rxdataF_ext,
int aarx,nre,i; int aarx,nre,i;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128; __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
#elif defined(__arm__) #elif defined(__arm__)
#endif #endif
...@@ -455,7 +455,7 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext, ...@@ -455,7 +455,7 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
int aarx,nre,i; int aarx,nre,i;
#if defined(__x86_64__) || defined(__i386__) #if defined(__x86_64__) || defined(__i386__)
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128; __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b,*rxdataF128,*rxdataF_comp128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
#elif defined(__arm__) #elif defined(__arm__)
#endif #endif
/*if ((symbol == 2) || (symbol == 6) || (symbol == 10)) /*if ((symbol == 2) || (symbol == 6) || (symbol == 10))
......
...@@ -629,7 +629,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext, ...@@ -629,7 +629,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
unsigned char aatx,aarx; unsigned char aatx,aarx;
char nb_antennas_ue_tx = 1; char nb_antennas_ue_tx = 1;
__m128i *ul_ch128,*ul_ch128_2,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128; __m128i *ul_ch128,*ul_ch128_2,*ul_ch_mag128,*ul_ch_mag128b,*rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
QAM_amp128b = _mm_setzero_si128(); QAM_amp128b = _mm_setzero_si128();
for (aatx=0; aatx<nb_antennas_ue_tx; aatx++) { for (aatx=0; aatx<nb_antennas_ue_tx; aatx++) {
......
...@@ -793,7 +793,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext, ...@@ -793,7 +793,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
unsigned short rb; unsigned short rb;
unsigned char aatx,aarx,atx; unsigned char aatx,aarx,atx;
__m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*dl_ch_mag128r,*rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch128_2,*dl_ch_mag128,*dl_ch_mag128b,*dl_ch_mag128r,*rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b,QAM_amp128r; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0};
QAM_amp128b = _mm_setzero_si128(); QAM_amp128b = _mm_setzero_si128();
for (aatx=0; aatx<nb_aatx; aatx++) { for (aatx=0; aatx<nb_aatx; aatx++) {
...@@ -1314,7 +1314,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext, ...@@ -1314,7 +1314,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
int length_mod8 = 0; int length_mod8 = 0;
int length2; int length2;
__m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128; __m128i *dl_ch128,*dl_ch_mag128,*dl_ch_mag128b, *dl_ch128_2, *rxdataF128,*rxdataF_comp128,*rho128;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b; __m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0};
int aatx = 0, aarx = 0; int aatx = 0, aarx = 0;
for (aatx=0; aatx<n_tx; aatx++) { for (aatx=0; aatx<n_tx; aatx++) {
...@@ -2823,7 +2823,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp, ...@@ -2823,7 +2823,7 @@ uint8_t nr_zero_forcing_rx_2layers(int **rxdataF_comp,
* *
**************************************************************************/ **************************************************************************/
__m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128b_0,*dl_ch_mag128_1,*dl_ch_mag128b_1,*determ_fin_128; __m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0,*dl_ch_mag128b_0,*dl_ch_mag128_1,*dl_ch_mag128b_1,*determ_fin_128;
__m128i mmtmpD2,mmtmpD3,mmtmpD0,mmtmpD1,QAM_amp128,QAM_amp128b; __m128i mmtmpD2,mmtmpD3,mmtmpD0,mmtmpD1,QAM_amp128={0},QAM_amp128b={0};
__m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128; __m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128;
determ_fin_128 = (__m128i *)&determ_fin[0]; determ_fin_128 = (__m128i *)&determ_fin[0];
......
...@@ -894,7 +894,7 @@ void phy_scope_nrUE(OAI_phy_scope_t *form, ...@@ -894,7 +894,7 @@ void phy_scope_nrUE(OAI_phy_scope_t *form,
static void *nrUEscopeThread(void *arg) { static void *nrUEscopeThread(void *arg) {
PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg; PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg;
size_t stksize; size_t stksize;
pthread_attr_t atr; pthread_attr_t atr={0};
pthread_attr_getstacksize(&atr, &stksize); pthread_attr_getstacksize(&atr, &stksize);
pthread_attr_setstacksize(&atr,32*1024*1024 ); pthread_attr_setstacksize(&atr,32*1024*1024 );
int fl_argc=1; int fl_argc=1;
......
...@@ -216,7 +216,7 @@ int main(int argc, char **argv){ ...@@ -216,7 +216,7 @@ int main(int argc, char **argv){
char c; char c;
double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0; double sigma2, sigma2_dB = 0, SNR, snr0 = -2.0, snr1 = 0.0, ue_speed0 = 0.0, ue_speed1 = 0.0;
double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs, bw; double **s_re, **s_im, **r_re, **r_im, iqim = 0.0, delay_avg = 0, ue_speed = 0, fs=-1, bw;
int i, l, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1; int i, l, aa, aarx, **txdata, trial, n_frames = 1, prach_start, rx_prach_start; //, ntrials=1;
int N_RB_UL = 106, delay = 0, NCS_config = 13, rootSequenceIndex = 1, threequarter_fs = 0, mu = 1, fd_occasion = 0, loglvl = OAILOG_INFO, numRA = 0, prachStartSymbol = 0; int N_RB_UL = 106, delay = 0, NCS_config = 13, rootSequenceIndex = 1, threequarter_fs = 0, mu = 1, fd_occasion = 0, loglvl = OAILOG_INFO, numRA = 0, prachStartSymbol = 0;
uint8_t snr1set = 0, ue_speed1set = 0, transmission_mode = 1, n_tx = 1, n_rx = 1, awgn_flag = 0, msg1_frequencystart = 0, num_prach_fd_occasions = 1, prach_format=0; uint8_t snr1set = 0, ue_speed1set = 0, transmission_mode = 1, n_tx = 1, n_rx = 1, awgn_flag = 0, msg1_frequencystart = 0, num_prach_fd_occasions = 1, prach_format=0;
......
...@@ -285,7 +285,7 @@ int main(int argc, char **argv) ...@@ -285,7 +285,7 @@ int main(int argc, char **argv)
int gNB_id = 0; int gNB_id = 0;
int ap; int ap;
int tx_offset; int tx_offset;
int32_t txlev; int32_t txlev=0;
int start_rb = 0; int start_rb = 0;
int UE_id =0; // [hna] only works for UE_id = 0 because NUMBER_OF_NR_UE_MAX is set to 1 (phy_init_nr_gNB causes segmentation fault) int UE_id =0; // [hna] only works for UE_id = 0 because NUMBER_OF_NR_UE_MAX is set to 1 (phy_init_nr_gNB causes segmentation fault)
float target_error_rate = 0.01; float target_error_rate = 0.01;
......
...@@ -1529,7 +1529,7 @@ static int tx_list_size(nr_rlc_entity_am_t *entity, ...@@ -1529,7 +1529,7 @@ static int tx_list_size(nr_rlc_entity_am_t *entity,
{ {
int ret = 0; int ret = 0;
while (l != NULL) { while (l != NULL && ret < maxsize) {
ret += compute_pdu_header_size(entity, l) + l->size; ret += compute_pdu_header_size(entity, l) + l->size;
l = l->next; l = l->next;
} }
......
...@@ -78,7 +78,7 @@ static int tx_list_size(nr_rlc_entity_tm_t *entity, ...@@ -78,7 +78,7 @@ static int tx_list_size(nr_rlc_entity_tm_t *entity,
{ {
int ret = 0; int ret = 0;
while (l != NULL) { while (l != NULL && ret < maxsize) {
ret += l->size; ret += l->size;
l = l->next; l = l->next;
} }
......
...@@ -497,7 +497,7 @@ static int tx_list_size(nr_rlc_entity_um_t *entity, ...@@ -497,7 +497,7 @@ static int tx_list_size(nr_rlc_entity_um_t *entity,
{ {
int ret = 0; int ret = 0;
while (l != NULL) { while (l != NULL && ret < maxsize) {
ret += compute_pdu_header_size(entity, l) + l->size; ret += compute_pdu_header_size(entity, l) + l->size;
l = l->next; l = l->next;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment