Commit 5f9e0a23 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge remote-tracking branch 'origin/code-cleanup-20210716' into integration_2021_w32

parents 3e6ef7ba b7857a50
......@@ -328,7 +328,7 @@ void mch_channel_compensation(int **rxdataF_ext,
int aarx,nre,i;
#if defined(__x86_64__) || defined(__i386__)
__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__)
#endif
......@@ -455,7 +455,7 @@ void mch_channel_compensation_khz_1dot25(int **rxdataF_ext,
int aarx,nre,i;
#if defined(__x86_64__) || defined(__i386__)
__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__)
#endif
/*if ((symbol == 2) || (symbol == 6) || (symbol == 10))
......
......@@ -42,7 +42,7 @@
extern short nr_qpsk_mod_table[8];
uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
const uint8_t nr_pbch_payload_interleaving_pattern[32] = {16, 23, 18, 17, 8, 30, 10, 6, 24, 7, 0, 5, 3, 2, 1, 4,
9, 11, 12, 13, 14, 15, 19, 20, 21, 22, 25, 26, 27, 28, 29, 31
};
......@@ -141,7 +141,7 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
return 0;
}
void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
static void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
uint32_t Nid,
uint8_t nushift,
uint16_t M,
......
......@@ -78,19 +78,6 @@ int nr_generate_pbch_dmrs(uint32_t *gold_pbch_dmrs,
nfapi_nr_config_request_scf_t *config,
NR_DL_FRAME_PARMS *frame_parms);
/*!
\fn int nr_pbch_scrambling
\brief PBCH scrambling function
@param
*/
void nr_pbch_scrambling(NR_gNB_PBCH *pbch,
uint32_t Nid,
uint8_t nushift,
uint16_t M,
uint16_t length,
uint8_t encoded,
uint32_t unscrambling_mask);
/*!
\fn int nr_generate_pbch
\brief Generation of the PBCH
......
......@@ -630,7 +630,7 @@ void nr_ulsch_channel_compensation(int **rxdataF_ext,
unsigned short rb;
unsigned char aatx,aarx;
__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();
for (aatx=0; aatx<nrOfLayers; aatx++) {
......
......@@ -811,7 +811,7 @@ void nr_dlsch_channel_compensation(int **rxdataF_ext,
unsigned short rb;
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 mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128,QAM_amp128b,QAM_amp128r;
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3,QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0};
uint32_t nb_rb_0 = length/12 + ((length%12)?1:0);
for (aatx=0; aatx<nb_aatx; aatx++) {
......@@ -1303,7 +1303,7 @@ void nr_dlsch_channel_compensation_core(int **rxdataF_ext,
int length_mod8 = 0;
int length2;
__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;
for (aatx=0; aatx<n_tx; aatx++) {
......@@ -2877,10 +2877,10 @@ 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_mag128r_0,*determ_fin_128;//*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1
__m128i *rxdataF_comp128_0,*rxdataF_comp128_1,*dl_ch_mag128_0=NULL,*dl_ch_mag128b_0=NULL,*dl_ch_mag128r_0=NULL,*determ_fin_128;//*dl_ch_mag128_1,*dl_ch_mag128b_1,*dl_ch_mag128r_1
__m128i mmtmpD0,mmtmpD1,mmtmpD2,mmtmpD3;
__m128i *after_mf_a_128,*after_mf_b_128, *after_mf_c_128, *after_mf_d_128;
__m128i QAM_amp128,QAM_amp128b,QAM_amp128r;
__m128i QAM_amp128={0},QAM_amp128b={0},QAM_amp128r={0};
determ_fin_128 = (__m128i *)&determ_fin[0];
......
......@@ -374,8 +374,6 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames)
#endif
//#endif
ue->is_synchronized_on_frame = is; // to notify on which of the two frames sync was successful
if (ue->UE_scan_carrier == 0) {
#if UE_AUTOTEST_TRACE
......
......@@ -328,7 +328,7 @@ void nr_pbch_detection_mrc(NR_DL_FRAME_PARMS *frame_parms,
#endif
}
void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
static void nr_pbch_unscrambling(NR_UE_PBCH *pbch,
uint16_t Nid,
uint8_t nushift,
uint16_t M,
......@@ -549,7 +549,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue,
nr_ue_pbch_vars->pbch_a_prime = a_reversed;
//payload un-scrambling
memset(&nr_ue_pbch_vars->pbch_a_interleaved, 0, sizeof(uint32_t) );
nr_ue_pbch_vars->pbch_a_interleaved=0;
M = (Lmax == 64)? (NR_POLAR_PBCH_PAYLOAD_BITS - 6) : (NR_POLAR_PBCH_PAYLOAD_BITS - 3);
nushift = ((nr_ue_pbch_vars->pbch_a_prime>>24)&1) ^ (((nr_ue_pbch_vars->pbch_a_prime>>6)&1)<<1);
nr_pbch_unscrambling(nr_ue_pbch_vars,frame_parms->Nid_cell,nushift,M,NR_POLAR_PBCH_PAYLOAD_BITS,1,unscrambling_mask);
......
......@@ -894,7 +894,7 @@ void phy_scope_nrUE(OAI_phy_scope_t *form,
static void *nrUEscopeThread(void *arg) {
PHY_VARS_NR_UE *ue=(PHY_VARS_NR_UE *)arg;
size_t stksize;
pthread_attr_t atr;
pthread_attr_t atr={0};
pthread_attr_getstacksize(&atr, &stksize);
pthread_attr_setstacksize(&atr,32*1024*1024 );
int fl_argc=1;
......
......@@ -766,8 +766,6 @@ typedef struct {
int UE_fo_compensation;
/// \brief Indicator that UE is synchronized to a gNB
int is_synchronized;
/// \brief Indicates on which frame is synchronized in a two frame synchronization
int is_synchronized_on_frame;
/// \brief Indicator that UE lost frame synchronization
int lost_sync;
/// Data structure for UE process scheduling
......
......@@ -23,6 +23,6 @@
#define __openair_TYPES_H__
#include <stdint.h>
#define MAKE_VERSION(a,b,c) ((a)*256+(b)*16+c)
#endif /*__openair_TYPES_H__ */
......@@ -61,6 +61,8 @@ void handle_nfapi_ul_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
nfapi_ul_config_request_pdu_t *ul_config_pdu,
uint16_t frame,uint8_t subframe,uint8_t srs_present);
void handle_nfapi_hi_dci0_dci_pdu(PHY_VARS_eNB *eNB,int frame,int subframe,L1_rxtx_proc_t *proc,
nfapi_hi_dci0_request_pdu_t *hi_dci0_config_pdu);
void handle_ulsch_harq_pdu(
PHY_VARS_eNB *eNB,
int UE_id,
......@@ -68,7 +70,9 @@ void handle_ulsch_harq_pdu(
nfapi_ul_config_ulsch_harq_information *harq_information,
uint16_t frame,
uint8_t subframe);
void handle_nfapi_bch_pdu(PHY_VARS_eNB *eNB,L1_rxtx_proc_t *proc,
nfapi_dl_config_request_pdu_t *dl_config_pdu,
uint8_t *sdu) ;
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);
void handle_uci_harq_information(PHY_VARS_eNB *eNB, LTE_eNB_UCI *uci,nfapi_ul_config_harq_information *harq_information);
......
......@@ -49,9 +49,6 @@
extern uint8_t nfapi_mode;
extern int oai_nfapi_nr_rach_ind(nfapi_rach_indication_t *rach_ind);
void L1_nr_prach_procedures(PHY_VARS_gNB *gNB,int frame,int slot) {
uint16_t max_preamble[4]={0},max_preamble_energy[4]={0},max_preamble_delay[4]={0};
......
......@@ -231,7 +231,6 @@ void clear_UE_transport_info(uint8_t nb_UE)
for (UE_id=0; UE_id<nb_UE; UE_id++)
for (CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
UE_transport_info_TB_index[UE_id][CC_id]=0;
memset((void *)&UE_transport_info[UE_id][CC_id].cntl,0,sizeof(UE_cntl));
}
......
......@@ -57,7 +57,6 @@ extern eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
extern uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
extern UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
extern uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
extern UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][MAX_NUM_CCs][2];
......
......@@ -58,7 +58,6 @@ eNB_transport_info_t eNB_transport_info[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
uint16_t eNB_transport_info_TB_index[NUMBER_OF_eNB_MAX][MAX_NUM_CCs];
UE_transport_info_t UE_transport_info[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
uint16_t UE_transport_info_TB_index[NUMBER_OF_UE_MAX][MAX_NUM_CCs];
UE_cntl ue_cntl_delay[NUMBER_OF_UE_MAX][MAX_NUM_CCs][2];
......
......@@ -87,7 +87,6 @@ uint16_t sl_ahead=0;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
msc_interface_t msc_interface;
uint32_t N_RB_DL = 106;
// dummy functions
......
......@@ -216,7 +216,7 @@ int main(int argc, char **argv){
char c;
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 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;
......
......@@ -83,7 +83,6 @@ double cpuf;
uint64_t downlink_frequency[MAX_NUM_CCs][4];
THREAD_STRUCT thread_struct;
nfapi_ue_release_request_body_t release_rntis;
msc_interface_t msc_interface;
uint32_t N_RB_DL = 106;
extern void fix_scd(NR_ServingCellConfig_t *scd);// forward declaration
......@@ -286,7 +285,7 @@ int main(int argc, char **argv)
int gNB_id = 0;
int ap;
int tx_offset;
int32_t txlev;
int32_t txlev=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)
float target_error_rate = 0.01;
......
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