Commit 11c4cb9b authored by Raymond Knopp's avatar Raymond Knopp

1. fixed initialization issues for lte-uesoftmodem when running with non RF simulation target.

2. minor modifications in dlsch_demodulation.c for 2 eNB TX antennas, 1 RX antenna. Inconsistant indexing of some arrays in this case.
3. change in config_load_configmodule.c : removed exit(-1) when no configuration file is used. This makes unitary simulators exit. Effect on lte-XXsoftmodem TBC.
parent a385af01
......@@ -276,7 +276,7 @@ int i;
if (cfgmode != NULL) free(cfgmode);
if (CONFIG_ISFLAGSET(CONFIG_ABORT)) {
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params));
exit(-1);
// exit(-1);
}
return cfgptr;
}
......
......@@ -1315,12 +1315,12 @@ void dlsch_channel_compensation(int **rxdataF_ext,
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*2 + aarx][symbol*frame_parms->N_RB_DL*12];
//print_shorts("dl_ch128[0]=",&dl_ch128[0]);*/
dl_ch_mag128 = (__m128i *)&dl_ch_mag[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch_mag128b = (__m128i *)&dl_ch_magb[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch_mag128 = (__m128i *)&dl_ch_mag[aatx*2 + aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch_mag128b = (__m128i *)&dl_ch_magb[aatx*2 + aarx][symbol*frame_parms->N_RB_DL*12];
rxdataF128 = (__m128i *)&rxdataF_ext[aarx][symbol*frame_parms->N_RB_DL*12];
rxdataF_comp128 = (__m128i *)&rxdataF_comp[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
rxdataF_comp128 = (__m128i *)&rxdataF_comp[aatx*2 + aarx][symbol*frame_parms->N_RB_DL*12];
for (rb=0; rb<nb_rb; rb++) {
......@@ -1772,11 +1772,11 @@ void dlsch_channel_compensation_core(int **rxdataF_ext,
for (aarx=0; aarx<n_rx; aarx++) {
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*n_rx + aarx][start_point];
dl_ch_mag128 = (__m128i *)&dl_ch_mag[aatx*n_rx + aarx][start_point];
dl_ch_mag128b = (__m128i *)&dl_ch_magb[aatx*n_rx + aarx][start_point];
dl_ch128 = (__m128i *)&dl_ch_estimates_ext[aatx*2 + aarx][start_point];
dl_ch_mag128 = (__m128i *)&dl_ch_mag[aatx*2 + aarx][start_point];
dl_ch_mag128b = (__m128i *)&dl_ch_magb[aatx*2 + aarx][start_point];
rxdataF128 = (__m128i *)&rxdataF_ext[aarx][start_point];
rxdataF_comp128 = (__m128i *)&rxdataF_comp[aatx*n_rx + aarx][start_point];
rxdataF_comp128 = (__m128i *)&rxdataF_comp[aatx*2 + aarx][start_point];
length_mod8 = length&7;
if (length_mod8 == 0){
......@@ -3733,7 +3733,7 @@ void dlsch_channel_level(int **dl_ch_estimates_ext,
// 5 is always a symbol with no pilots for both normal and extended prefix
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*frame_parms->nb_antennas_rx + aarx][symbol*frame_parms->N_RB_DL*12];
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*2 + aarx][symbol*frame_parms->N_RB_DL*12];
for (rb=0;rb<nb_rb;rb++) {
......@@ -3854,7 +3854,7 @@ void dlsch_channel_level_core(int **dl_ch_estimates_ext,
avg128D = _mm_setzero_si128();
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*n_rx + aarx][start_point];
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*2 + aarx][start_point];
length_mod8=length&7;
......@@ -3965,7 +3965,7 @@ void dlsch_channel_level_median(int **dl_ch_estimates_ext,
min = 0;
norm128D = _mm_setzero_si128();
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*n_rx + aarx][start_point];
dl_ch128=(__m128i *)&dl_ch_estimates_ext[aatx*2 + aarx][start_point];
length_mod4=length&3;
......
......@@ -262,7 +262,7 @@ extern void set_function_spec_param(RU_t *ru);
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
extern void fill_ue_band_info(void);
extern void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax, int nb_rx, int nb_tx);
extern void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax, LTE_DL_FRAME_PARMS *fp);
extern void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_t *cpuset, char * name);
extern void reset_opp_meas(void);
......
......@@ -79,7 +79,7 @@ void init_UE_threads(int);
void init_UE_threads_stub(int);
void init_UE_single_thread_stub(int);
void *UE_thread(void *arg);
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,int nb_rx,int nb_tx);
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,LTE_DL_FRAME_PARMS *fp);
void init_UE_stub(int nb_inst,int,int,char*);
void init_UE_stub_single_thread(int nb_inst,int,int,char*);
int init_timer_thread(void);
......@@ -172,14 +172,12 @@ PHY_VARS_UE* init_ue_vars(LTE_DL_FRAME_PARMS *frame_parms,
{
PHY_VARS_UE* ue;
PHY_VARS_UE* ue = (PHY_VARS_UE *)malloc(sizeof(PHY_VARS_UE));
memset(ue,0,sizeof(PHY_VARS_UE));
if (frame_parms!=(LTE_DL_FRAME_PARMS *)NULL) { // if we want to give initial frame parms, allocate the PHY_VARS_UE structure and put them in
ue = (PHY_VARS_UE *)malloc(sizeof(PHY_VARS_UE));
memset(ue,0,sizeof(PHY_VARS_UE));
memcpy(&(ue->frame_parms), frame_parms, sizeof(LTE_DL_FRAME_PARMS));
}
else ue = PHY_vars_UE_g[UE_id][0];
ue->Mod_id = UE_id;
......@@ -238,7 +236,7 @@ void init_thread(int sched_runtime, int sched_deadline, int sched_fifo, cpu_set_
}
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,int nb_rx,int nb_tx) {
void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correction, int phy_test, int UE_scan, int UE_scan_carrier, runmode_t mode,int rxgain,int txpowermax,LTE_DL_FRAME_PARMS *fp0) {
PHY_VARS_UE *UE;
int inst;
......@@ -257,11 +255,11 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
if (PHY_vars_UE_g[inst]==NULL) PHY_vars_UE_g[inst] = (PHY_VARS_UE**)calloc(1+MAX_NUM_CCs,sizeof(PHY_VARS_UE*));
LOG_I(PHY,"Allocating UE context %d\n",inst);
if (simL1flag == 0) PHY_vars_UE_g[inst][0] = init_ue_vars(NULL,inst,0);
if (simL1flag == 0) PHY_vars_UE_g[inst][0] = init_ue_vars(fp0,inst,0);
else {
// needed for memcopy below. these are not used in the RU, but needed for UE
RC.ru[0]->frame_parms.nb_antennas_rx = nb_rx;
RC.ru[0]->frame_parms.nb_antennas_tx = nb_tx;
RC.ru[0]->frame_parms.nb_antennas_rx = fp0->nb_antennas_rx;
RC.ru[0]->frame_parms.nb_antennas_tx = fp0->nb_antennas_tx;
PHY_vars_UE_g[inst][0] = init_ue_vars(&RC.ru[0]->frame_parms,inst,0);
}
// turn off timing control loop in UE
......@@ -303,8 +301,8 @@ void init_UE(int nb_inst,int eMBMS_active, int uecap_xer_in, int timing_correcti
UE->rx_total_gain_dB = rxgain;
UE->tx_power_max_dBm = txpowermax;
UE->frame_parms.nb_antennas_tx = nb_tx;
UE->frame_parms.nb_antennas_rx = nb_rx;
UE->frame_parms.nb_antennas_tx = fp0->nb_antennas_tx;
UE->frame_parms.nb_antennas_rx = fp0->nb_antennas_rx;
if (fp->frame_type == TDD) {
switch (fp->N_RB_DL) {
......
......@@ -952,8 +952,7 @@ int main( int argc, char **argv )
}
else {
init_UE(NB_UE_INST,eMBMS_active,uecap_xer_in,0,phy_test,UE_scan,UE_scan_carrier,mode,(int)rx_gain[0][0],tx_max_power[0],
frame_parms[0]->nb_antennas_rx,
frame_parms[0]->nb_antennas_tx);
frame_parms[0]);
}
......
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