Commit 33dc5772 authored by cig's avatar cig

Cleaning up references to LTE in some NR UE functions

- replaced eNB naming with gNB
parent d23a7e83
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
//uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10}; //uint8_t dmrs1_tab_ue[8] = {0,2,3,4,6,8,9,10};
/*void phy_config_sib1_ue(uint8_t Mod_id,int CC_id, /*void phy_config_sib1_ue(uint8_t Mod_id,int CC_id,
uint8_t eNB_id, uint8_t gNB_id,
TDD_Config_t *tdd_Config, TDD_Config_t *tdd_Config,
uint8_t SIwindowsize, uint8_t SIwindowsize,
uint16_t SIperiod) uint16_t SIperiod)
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
} }
void phy_config_sib2_ue(uint8_t Mod_id,int CC_id, void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
uint8_t eNB_id, uint8_t gNB_id,
RadioResourceConfigCommonSIB_t *radioResourceConfigCommon, RadioResourceConfigCommonSIB_t *radioResourceConfigCommon,
ARFCN_ValueEUTRA_t *ul_CarrierFreq, ARFCN_ValueEUTRA_t *ul_CarrierFreq,
long *ul_Bandwidth, long *ul_Bandwidth,
...@@ -76,15 +76,15 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id, ...@@ -76,15 +76,15 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_IN); VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PHY_UE_CONFIG_SIB2, VCD_FUNCTION_IN);
LOG_I(PHY,"[UE%d] Applying radioResourceConfigCommon from eNB%d\n",Mod_id,eNB_id); LOG_I(PHY,"[UE%d] Applying radioResourceConfigCommon from eNB%d\n",Mod_id,gNB_id);
ue->prach_vars[eNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex; ue->prach_vars[gNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
ue->prach_vars[eNB_id]->prach_Config_enabled=1; ue->prach_vars[gNB_id]->prach_Config_enabled=1;
//ue->prach_vars[eNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex; //ue->prach_vars[gNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_ConfigIndex;
ue->prach_vars[eNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.highSpeedFlag; ue->prach_vars[gNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.highSpeedFlag;
ue->prach_vars[eNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig; ue->prach_vars[gNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.zeroCorrelationZoneConfig;
//ue->prach_vars[eNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset; //ue->prach_vars[gNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo.prach_FreqOffset;
//compute_prach_seq(fp->prach_config_common.rootSequenceIndex, //compute_prach_seq(fp->prach_config_common.rootSequenceIndex,
// fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex, // fp->prach_config_common.prach_ConfigInfo.prach_ConfigIndex,
...@@ -185,7 +185,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id, ...@@ -185,7 +185,7 @@ void phy_config_sib2_ue(uint8_t Mod_id,int CC_id,
} }
void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_idx, void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t gNB_id,int mbsfn_Area_idx,
long mbsfn_AreaId_r9) long mbsfn_AreaId_r9)
{ {
...@@ -207,7 +207,7 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_ ...@@ -207,7 +207,7 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
/* /*
* Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover * Configures UE MAC and PHY with radioResourceCommon received in mobilityControlInfo IE during Handover
*/ */
/*void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed) /*void phy_config_afterHO_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t gNB_id, MobilityControlInfo_t *mobilityControlInfo, uint8_t ho_failed)
{ {
if(mobilityControlInfo!=NULL) { if(mobilityControlInfo!=NULL) {
...@@ -225,14 +225,14 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_ ...@@ -225,14 +225,14 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
// int u; // int u;
LOG_I(PHY,"[UE%d] Handover triggered: Applying radioResourceConfigCommon from eNB %d\n", LOG_I(PHY,"[UE%d] Handover triggered: Applying radioResourceConfigCommon from eNB %d\n",
Mod_id,eNB_id); Mod_id,gNB_id);
ue->prach_vars[eNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex; ue->prach_vars[gNB_id]->prach_pdu.root_seq_id =radioResourceConfigCommon->prach_Config.rootSequenceIndex;
ue->prach_vars[eNB_id]->prach_Config_enabled=1; ue->prach_vars[gNB_id]->prach_Config_enabled=1;
//ue->prach_vars[eNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex; //ue->prach_vars[gNB_id]->prach_pdu.prach_ConfigIndex =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex;
ue->prach_vars[eNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->highSpeedFlag; ue->prach_vars[gNB_id]->prach_pdu.restricted_set =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->highSpeedFlag;
ue->prach_vars[eNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->zeroCorrelationZoneConfig; ue->prach_vars[gNB_id]->prach_pdu.num_cs =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->zeroCorrelationZoneConfig;
//ue->prach_vars[eNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_FreqOffset; //ue->prach_vars[gNB_id]->prach_pdu.prach_FreqOffset =radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_FreqOffset;
// prach_fmt = get_prach_fmt(radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex,fp->frame_type); // prach_fmt = get_prach_fmt(radioResourceConfigCommon->prach_Config.prach_ConfigInfo->prach_ConfigIndex,fp->frame_type);
// N_ZC = (prach_fmt <4)?839:139; // N_ZC = (prach_fmt <4)?839:139;
...@@ -316,17 +316,17 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_ ...@@ -316,17 +316,17 @@ void phy_config_sib13_ue(uint8_t Mod_id,int CC_id,uint8_t eNB_id,int mbsfn_Area_
// RNTI // RNTI
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][gNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8);
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8); PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][gNB_id]->crnti = mobilityControlInfo->newUE_Identity.buf[0]|(mobilityControlInfo->newUE_Identity.buf[1]<<8);
LOG_I(PHY,"SET C-RNTI %x %x\n",PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][eNB_id]->crnti, LOG_I(PHY,"SET C-RNTI %x %x\n",PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[0][gNB_id]->crnti,
PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][eNB_id]->crnti); PHY_vars_UE_g[Mod_id][CC_id]->pdcch_vars[1][gNB_id]->crnti);
} }
if(ho_failed) { if(ho_failed) {
LOG_D(PHY,"[UE%d] Handover failed, triggering RACH procedure\n",Mod_id); LOG_D(PHY,"[UE%d] Handover failed, triggering RACH procedure\n",Mod_id);
memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms,(void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms_before_ho, sizeof(NR_DL_FRAME_PARMS)); memcpy((void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms,(void *)&PHY_vars_UE_g[Mod_id][CC_id]->frame_parms_before_ho, sizeof(NR_DL_FRAME_PARMS));
PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[eNB_id] = PRACH; PHY_vars_UE_g[Mod_id][CC_id]->UE_mode[gNB_id] = PRACH;
} }
} }
...@@ -354,14 +354,14 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n ...@@ -354,14 +354,14 @@ void phy_config_meas_ue(uint8_t Mod_id,uint8_t CC_id,uint8_t eNB_index,uint8_t n
#if 0 #if 0
void phy_config_harq_ue(module_id_t Mod_id, void phy_config_harq_ue(module_id_t Mod_id,
int CC_id, int CC_id,
uint8_t eNB_id, uint8_t gNB_id,
uint16_t max_harq_tx) { uint16_t max_harq_tx) {
int num_of_threads,num_of_code_words; int num_of_threads,num_of_code_words;
PHY_VARS_NR_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id]; PHY_VARS_NR_UE *phy_vars_ue = PHY_vars_UE_g[Mod_id][CC_id];
for (num_of_threads=0; num_of_threads<RX_NB_TH_MAX; num_of_threads++) for (num_of_threads=0; num_of_threads<RX_NB_TH_MAX; num_of_threads++)
for (num_of_code_words=0; num_of_code_words<NR_MAX_NB_CODEWORDS; num_of_code_words++) for (num_of_code_words=0; num_of_code_words<NR_MAX_NB_CODEWORDS; num_of_code_words++)
phy_vars_ue->ulsch[num_of_threads][eNB_id][num_of_code_words]->Mlimit = max_harq_tx; phy_vars_ue->ulsch[num_of_threads][gNB_id][num_of_code_words]->Mlimit = max_harq_tx;
} }
#endif #endif
...@@ -435,7 +435,7 @@ void phy_init_nr_ue_PUSCH(NR_UE_PUSCH *const pusch, ...@@ -435,7 +435,7 @@ void phy_init_nr_ue_PUSCH(NR_UE_PUSCH *const pusch,
} }
int init_nr_ue_signal(PHY_VARS_NR_UE *ue, int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
int nb_connected_eNB, int nb_connected_gNB,
uint8_t abstraction_flag) { uint8_t abstraction_flag) {
// create shortcuts // create shortcuts
NR_DL_FRAME_PARMS *const fp = &ue->frame_parms; NR_DL_FRAME_PARMS *const fp = &ue->frame_parms;
...@@ -443,7 +443,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -443,7 +443,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
NR_UE_PBCH **const pbch_vars = ue->pbch_vars; NR_UE_PBCH **const pbch_vars = ue->pbch_vars;
NR_UE_PRACH **const prach_vars = ue->prach_vars; NR_UE_PRACH **const prach_vars = ue->prach_vars;
int i,j,k,l,slot,symb,q; int i,j,k,l,slot,symb,q;
int eNB_id; int gNB_id;
int th_id; int th_id;
uint32_t ****pusch_dmrs; uint32_t ****pusch_dmrs;
uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig uint16_t N_n_scid[2] = {0,1}; // [HOTFIX] This is a temporary implementation of scramblingID0 and scramblingID1 which are given by DMRS-UplinkConfig
...@@ -457,8 +457,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -457,8 +457,8 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
//LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST); //LOG_D(PHY,"[MSC_NEW][FRAME 00000][PHY_UE][MOD %02u][]\n", ue->Mod_id+NB_eNB_INST);
phy_init_nr_top(ue); phy_init_nr_top(ue);
// many memory allocation sizes are hard coded // many memory allocation sizes are hard coded
AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[eNB_id]" ); AssertFatal( fp->nb_antennas_rx <= 2, "hard coded allocation for ue_common_vars->dl_ch_estimates[gNB_id]" );
AssertFatal( nb_connected_eNB <= NUMBER_OF_CONNECTED_eNB_MAX, "n_connected_eNB is too large" ); AssertFatal(nb_connected_gNB <= NUMBER_OF_CONNECTED_gNB_MAX, "n_connected_gNB is too large" );
// init phy_vars_ue // init phy_vars_ue
for (i=0; i<4; i++) { for (i=0; i<4; i++) {
...@@ -467,17 +467,17 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -467,17 +467,17 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
ue->rx_gain_byp[i] = 120; ue->rx_gain_byp[i] = 120;
} }
ue->n_connected_eNB = nb_connected_eNB; ue->n_connected_gNB = nb_connected_gNB;
for(eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++) { for(gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
ue->total_TBS[eNB_id] = 0; ue->total_TBS[gNB_id] = 0;
ue->total_TBS_last[eNB_id] = 0; ue->total_TBS_last[gNB_id] = 0;
ue->bitrate[eNB_id] = 0; ue->bitrate[gNB_id] = 0;
ue->total_received_bits[eNB_id] = 0; ue->total_received_bits[gNB_id] = 0;
ue->ul_time_alignment[eNB_id].apply_ta = 0; ue->ul_time_alignment[gNB_id].apply_ta = 0;
ue->ul_time_alignment[eNB_id].ta_frame = -1; ue->ul_time_alignment[gNB_id].ta_frame = -1;
ue->ul_time_alignment[eNB_id].ta_slot = -1; ue->ul_time_alignment[gNB_id].ta_slot = -1;
} }
// init NR modulation lookup tables // init NR modulation lookup tables
nr_generate_modulation_table(); nr_generate_modulation_table();
...@@ -485,9 +485,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -485,9 +485,9 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
/////////////////////////PUSCH init///////////////////////// /////////////////////////PUSCH init/////////////////////////
/////////// ///////////
for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++) { for (th_id = 0; th_id < RX_NB_TH_MAX; th_id++) {
for (eNB_id = 0; eNB_id < ue->n_connected_eNB; eNB_id++) { for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
ue->pusch_vars[th_id][eNB_id] = (NR_UE_PUSCH *)malloc16(sizeof(NR_UE_PUSCH)); ue->pusch_vars[th_id][gNB_id] = (NR_UE_PUSCH *)malloc16(sizeof(NR_UE_PUSCH));
phy_init_nr_ue_PUSCH( ue->pusch_vars[th_id][eNB_id], fp ); phy_init_nr_ue_PUSCH( ue->pusch_vars[th_id][gNB_id], fp );
} }
} }
...@@ -587,40 +587,40 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -587,40 +587,40 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
} }
// DLSCH // DLSCH
for (eNB_id=0; eNB_id<ue->n_connected_eNB; eNB_id++) { for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH)); ue->pdsch_vars[th_id][gNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
} }
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdcch_vars[th_id][eNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH)); ue->pdcch_vars[th_id][gNB_id] = (NR_UE_PDCCH *)malloc16_clear(sizeof(NR_UE_PDCCH));
} }
prach_vars[eNB_id] = (NR_UE_PRACH *)malloc16_clear(sizeof(NR_UE_PRACH)); prach_vars[gNB_id] = (NR_UE_PRACH *)malloc16_clear(sizeof(NR_UE_PRACH));
pbch_vars[eNB_id] = (NR_UE_PBCH *)malloc16_clear(sizeof(NR_UE_PBCH)); pbch_vars[gNB_id] = (NR_UE_PBCH *)malloc16_clear(sizeof(NR_UE_PBCH));
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp ); phy_init_nr_ue__PDSCH( ue->pdsch_vars[th_id][gNB_id], fp );
} }
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12); ue->pdsch_vars[th_id][gNB_id]->llr_shifts = (uint8_t *)malloc16_clear(7*2*fp->N_RB_DL*12);
ue->pdsch_vars[th_id][eNB_id]->llr_shifts_p = ue->pdsch_vars[0][eNB_id]->llr_shifts; ue->pdsch_vars[th_id][gNB_id]->llr_shifts_p = ue->pdsch_vars[0][gNB_id]->llr_shifts;
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][gNB_id]->llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][gNB_id]->layer_llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
ue->pdsch_vars[th_id][eNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear( sizeof(int16_t *) ); ue->pdsch_vars[th_id][gNB_id]->llr128_2ndstream = (int16_t **)malloc16_clear(sizeof(int16_t *));
ue->pdsch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16_clear(fp->nb_antennas_rx*sizeof(int32_t *));
} }
for (int i=0; i<fp->nb_antennas_rx; i++) { for (int i=0; i<fp->nb_antennas_rx; i++) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); ue->pdsch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
} }
} }
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
} }
for (i=0; i<fp->nb_antennas_rx; i++) for (i=0; i<fp->nb_antennas_rx; i++)
...@@ -629,7 +629,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -629,7 +629,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
const size_t num = 7*2*fp->N_RB_DL*12+4; const size_t num = 7*2*fp->N_RB_DL*12+4;
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho2_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
} }
} }
...@@ -637,10 +637,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -637,10 +637,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
for (k=0; k<8; k++) { //harq_pid for (k=0; k<8; k++) { //harq_pid
for (l=0; l<8; l++) { //round for (l=0; l<8; l++) { //round
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->rxdataF_comp1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_mag1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_magb1[k][l] = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
} }
for (int i=0; i<fp->nb_antennas_rx; i++) for (int i=0; i<fp->nb_antennas_rx; i++)
...@@ -648,10 +648,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -648,10 +648,10 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
const int idx = (j<<1)+i; const int idx = (j<<1)+i;
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_rho_ext[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
ue->pdsch_vars[th_id][eNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); ue->pdsch_vars[th_id][gNB_id]->rxdataF_comp1[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
ue->pdsch_vars[th_id][eNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_mag1[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
ue->pdsch_vars[th_id][eNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear( 7*2*sizeof(int32_t)*(fp->N_RB_DL*12) ); ue->pdsch_vars[th_id][gNB_id]->dl_ch_magb1[k][l][idx] = (int32_t *)malloc16_clear(7*2*sizeof(int32_t)*(fp->N_RB_DL*12));
} }
} }
} }
...@@ -659,72 +659,72 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -659,72 +659,72 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
// 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE // 100 PRBs * 12 REs/PRB * 4 PDCCH SYMBOLS * 2 LLRs/RE
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdcch_vars[th_id][eNB_id]->llr = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); ue->pdcch_vars[th_id][gNB_id]->llr = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
ue->pdcch_vars[th_id][eNB_id]->llr16 = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); ue->pdcch_vars[th_id][gNB_id]->llr16 = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
ue->pdcch_vars[th_id][eNB_id]->wbar = (int16_t *)malloc16_clear( 2*4*100*12*sizeof(uint16_t) ); ue->pdcch_vars[th_id][gNB_id]->wbar = (int16_t *)malloc16_clear(2*4*100*12*sizeof(uint16_t));
ue->pdcch_vars[th_id][eNB_id]->e_rx = (int16_t *)malloc16_clear( 4*2*100*12 ); ue->pdcch_vars[th_id][gNB_id]->e_rx = (int16_t *)malloc16_clear(4*2*100*12 );
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_rho_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdcch_vars[th_id][eNB_id]->rho = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) ); ue->pdcch_vars[th_id][gNB_id]->rho = (int32_t **)malloc16(fp->nb_antennas_rx*sizeof(int32_t *));
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
// Channel estimates // Channel estimates
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *)); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *)); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
for (i=0; i<fp->nb_antennas_rx; i++) { for (i=0; i<fp->nb_antennas_rx; i++) {
ue->pdcch_vars[th_id][eNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4) ); ue->pdcch_vars[th_id][gNB_id]->rho[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*(100*12*4));
for (j=0; j<4; j++) { for (j=0; j<4; j++) {
int idx = (j<<1) + i; int idx = (j<<1) + i;
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH) ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->symbols_per_slot*(fp->ofdm_symbol_size+LTE_CE_FILTER_LENGTH));
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*fp->ofdm_symbol_size*2 ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*fp->ofdm_symbol_size*2);
// size_t num = 7*2*fp->N_RB_DL*12; // size_t num = 7*2*fp->N_RB_DL*12;
size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB size_t num = 4*273*12; // 4 symbols, 100 PRBs, 12 REs per PRB
ue->pdcch_vars[th_id][eNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdcch_vars[th_id][gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
ue->pdcch_vars[th_id][eNB_id]->dl_ch_rho_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_rho_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
ue->pdcch_vars[th_id][eNB_id]->rxdataF_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdcch_vars[th_id][gNB_id]->rxdataF_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
ue->pdcch_vars[th_id][eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t) * num ); ue->pdcch_vars[th_id][gNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t) * num);
} }
} }
} }
// PBCH // PBCH
pbch_vars[eNB_id]->rxdataF_ext = (int32_t **)malloc16( fp->nb_antennas_rx*sizeof(int32_t *) ); pbch_vars[gNB_id]->rxdataF_ext = (int32_t **)malloc16(fp->nb_antennas_rx*sizeof(int32_t *));
pbch_vars[eNB_id]->rxdataF_comp = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); pbch_vars[gNB_id]->rxdataF_comp = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
pbch_vars[eNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); pbch_vars[gNB_id]->dl_ch_estimates = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
pbch_vars[eNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); pbch_vars[gNB_id]->dl_ch_estimates_ext = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
pbch_vars[eNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear( 8*sizeof(int32_t *) ); pbch_vars[gNB_id]->dl_ch_estimates_time = (int32_t **)malloc16_clear(8*sizeof(int32_t *));
pbch_vars[eNB_id]->llr = (int16_t *)malloc16_clear( 1920 ); // pbch_vars[gNB_id]->llr = (int16_t *)malloc16_clear(1920); //
prach_vars[eNB_id]->prachF = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) ); prach_vars[gNB_id]->prachF = (int16_t *)malloc16_clear(sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)));
prach_vars[eNB_id]->prach = (int16_t *)malloc16_clear( sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)) ); prach_vars[gNB_id]->prach = (int16_t *)malloc16_clear(sizeof(int)*(7*2*sizeof(int)*(fp->ofdm_symbol_size*12)));
for (i=0; i<fp->nb_antennas_rx; i++) { for (i=0; i<fp->nb_antennas_rx; i++) {
pbch_vars[eNB_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 ); pbch_vars[gNB_id]->rxdataF_ext[i] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 );
for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) { for (j=0; j<4; j++) {//fp->nb_antennas_tx;j++) {
int idx = (j<<1)+i; int idx = (j<<1)+i;
pbch_vars[eNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 ); pbch_vars[gNB_id]->rxdataF_comp[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*20*12*4);
pbch_vars[eNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) ); pbch_vars[gNB_id]->dl_ch_estimates[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size));
pbch_vars[eNB_id]->dl_ch_estimates_time[idx]= (int32_t *)malloc16_clear( sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size) ); pbch_vars[gNB_id]->dl_ch_estimates_time[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*7*2*sizeof(int)*(fp->ofdm_symbol_size));
pbch_vars[eNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear( sizeof(int32_t)*20*12*4 ); pbch_vars[gNB_id]->dl_ch_estimates_ext[idx] = (int32_t *)malloc16_clear(sizeof(int32_t)*20*12*4);
} }
} }
} }
pbch_vars[eNB_id]->decoded_output = (uint8_t *)malloc16_clear( 64 ); pbch_vars[gNB_id]->decoded_output = (uint8_t *)malloc16_clear(64);
} }
// initialization for the last instance of pdsch_vars (used for MU-MIMO) // initialization for the last instance of pdsch_vars (used for MU-MIMO)
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
ue->pdsch_vars[th_id][eNB_id] = (NR_UE_PDSCH *)malloc16_clear( sizeof(NR_UE_PDSCH) ); ue->pdsch_vars[th_id][gNB_id] = (NR_UE_PDSCH *)malloc16_clear(sizeof(NR_UE_PDSCH));
} }
if (abstraction_flag == 0) { if (abstraction_flag == 0) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) { for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
//phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][eNB_id], fp ); //phy_init_lte_ue__PDSCH( ue->pdsch_vars[th_id][gNB_id], fp );
ue->pdsch_vars[th_id][eNB_id]->llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][gNB_id]->llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
ue->pdsch_vars[th_id][eNB_id]->layer_llr[1] = (int16_t *)malloc16_clear( (8*(3*8*8448))*sizeof(int16_t) ); ue->pdsch_vars[th_id][gNB_id]->layer_llr[1] = (int16_t *)malloc16_clear((8*(3*8*8448))*sizeof(int16_t));
} }
} else { //abstraction == 1 } else { //abstraction == 1
ue->sinr_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) ); ue->sinr_dB = (double *) malloc16_clear( fp->N_RB_DL*12*sizeof(double) );
...@@ -753,7 +753,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue, ...@@ -753,7 +753,7 @@ int init_nr_ue_signal(PHY_VARS_NR_UE *ue,
void init_nr_ue_transport(PHY_VARS_NR_UE *ue, void init_nr_ue_transport(PHY_VARS_NR_UE *ue,
int abstraction_flag) { int abstraction_flag) {
for (int i=0; i<NUMBER_OF_CONNECTED_eNB_MAX; i++) { for (int i = 0; i < NUMBER_OF_CONNECTED_gNB_MAX; i++) {
for (int j=0; j<2; j++) { for (int j=0; j<2; j++) {
for (int k=0; k<RX_NB_TH_MAX; k++) { for (int k=0; k<RX_NB_TH_MAX; k++) {
AssertFatal((ue->dlsch[k][i][j] = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag))!=NULL,"Can't get ue dlsch structures\n"); AssertFatal((ue->dlsch[k][i][j] = new_nr_ue_dlsch(1,NR_MAX_DLSCH_HARQ_PROCESSES,NSOFT,MAX_LDPC_ITERATIONS,ue->frame_parms.N_RB_DL, abstraction_flag))!=NULL,"Can't get ue dlsch structures\n");
......
...@@ -108,7 +108,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -108,7 +108,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx; ue->measurements.nb_antennas_rx = frame_parms->nb_antennas_rx;
// signal measurements // signal measurements
for (gNB_id = 0; gNB_id < ue->n_connected_eNB; gNB_id++){ for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++){
ue->measurements.rx_power_tot[gNB_id] = 0; ue->measurements.rx_power_tot[gNB_id] = 0;
...@@ -140,7 +140,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -140,7 +140,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
// filter to remove jitter // filter to remove jitter
if (ue->init_averaging == 0) { if (ue->init_averaging == 0) {
for (gNB_id = 0; gNB_id < ue->n_connected_eNB; gNB_id++) for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++)
ue->measurements.rx_power_avg[gNB_id] = (int)(((k1*((long long int)(ue->measurements.rx_power_avg[gNB_id]))) + (k2*((long long int)(ue->measurements.rx_power_tot[gNB_id])))) >> 10); ue->measurements.rx_power_avg[gNB_id] = (int)(((k1*((long long int)(ue->measurements.rx_power_avg[gNB_id]))) + (k2*((long long int)(ue->measurements.rx_power_tot[gNB_id])))) >> 10);
ue->measurements.n0_power_avg = (int)(((k1*((long long int) (ue->measurements.n0_power_avg))) + (k2*((long long int) (ue->measurements.n0_power_tot))))>>10); ue->measurements.n0_power_avg = (int)(((k1*((long long int) (ue->measurements.n0_power_avg))) + (k2*((long long int) (ue->measurements.n0_power_tot))))>>10);
...@@ -149,7 +149,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -149,7 +149,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
} else { } else {
for (gNB_id = 0; gNB_id < ue->n_connected_eNB; gNB_id++) for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++)
ue->measurements.rx_power_avg[gNB_id] = ue->measurements.rx_power_tot[gNB_id]; ue->measurements.rx_power_avg[gNB_id] = ue->measurements.rx_power_tot[gNB_id];
ue->measurements.n0_power_avg = ue->measurements.n0_power_tot; ue->measurements.n0_power_avg = ue->measurements.n0_power_tot;
...@@ -157,7 +157,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue, ...@@ -157,7 +157,7 @@ void nr_ue_measurements(PHY_VARS_NR_UE *ue,
} }
for (gNB_id = 0; gNB_id < ue->n_connected_eNB; gNB_id++) { for (gNB_id = 0; gNB_id < ue->n_connected_gNB; gNB_id++) {
ue->measurements.rx_power_avg_dB[gNB_id] = dB_fixed( ue->measurements.rx_power_avg[gNB_id]); ue->measurements.rx_power_avg_dB[gNB_id] = dB_fixed( ue->measurements.rx_power_avg[gNB_id]);
ue->measurements.wideband_cqi_tot[gNB_id] = dB_fixed2(ue->measurements.rx_power_tot[gNB_id], ue->measurements.n0_power_tot); ue->measurements.wideband_cqi_tot[gNB_id] = dB_fixed2(ue->measurements.rx_power_tot[gNB_id], ue->measurements.n0_power_tot);
......
...@@ -112,7 +112,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -112,7 +112,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
NR_DL_UE_HARQ_t *dlsch1_harq, NR_DL_UE_HARQ_t *dlsch1_harq,
RX_type_t rx_type, RX_type_t rx_type,
unsigned char harq_pid, unsigned char harq_pid,
unsigned char eNB_id, unsigned char gNB_id,
unsigned char eNB_id_i, unsigned char eNB_id_i,
unsigned char first_symbol_flag, unsigned char first_symbol_flag,
unsigned char symbol, unsigned char symbol,
...@@ -128,8 +128,8 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -128,8 +128,8 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
int nr_rx_pdsch(PHY_VARS_NR_UE *ue, int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
UE_nr_rxtx_proc_t *proc, UE_nr_rxtx_proc_t *proc,
PDSCH_t type, PDSCH_t type,
unsigned char eNB_id, unsigned char gNB_id,
unsigned char eNB_id_i, //if this == ue->n_connected_eNB, we assume MU interference unsigned char eNB_id_i, //if this == ue->n_connected_gNB, we assume MU interference
uint32_t frame, uint32_t frame,
uint8_t nr_slot_rx, uint8_t nr_slot_rx,
unsigned char symbol, unsigned char symbol,
...@@ -184,24 +184,24 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -184,24 +184,24 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
switch (type) { switch (type) {
case SI_PDSCH: case SI_PDSCH:
pdsch_vars = ue->pdsch_vars[proc->thread_id]; pdsch_vars = ue->pdsch_vars[proc->thread_id];
dlsch = &ue->dlsch_SI[eNB_id]; dlsch = &ue->dlsch_SI[gNB_id];
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
break; break;
case RA_PDSCH: case RA_PDSCH:
pdsch_vars = ue->pdsch_vars[proc->thread_id]; pdsch_vars = ue->pdsch_vars[proc->thread_id];
dlsch = &ue->dlsch_ra[eNB_id]; dlsch = &ue->dlsch_ra[gNB_id];
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
break; break;
case PDSCH: case PDSCH:
pdsch_vars = ue->pdsch_vars[proc->thread_id]; pdsch_vars = ue->pdsch_vars[proc->thread_id];
dlsch = ue->dlsch[proc->thread_id][eNB_id]; dlsch = ue->dlsch[proc->thread_id][gNB_id];
dlsch0_harq = dlsch[0]->harq_processes[harq_pid]; dlsch0_harq = dlsch[0]->harq_processes[harq_pid];
dlsch1_harq = dlsch[1]->harq_processes[harq_pid]; dlsch1_harq = dlsch[1]->harq_processes[harq_pid];
beamforming_mode = ue->transmission_mode[eNB_id] < 7 ? 0 :ue->transmission_mode[eNB_id]; beamforming_mode = ue->transmission_mode[gNB_id] < 7 ? 0 :ue->transmission_mode[gNB_id];
break; break;
default: default:
...@@ -285,8 +285,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -285,8 +285,8 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
round = dlsch0_harq->round; round = dlsch0_harq->round;
//printf("round = %d\n", round); //printf("round = %d\n", round);
if (eNB_id > 2) { if (gNB_id > 2) {
LOG_W(PHY,"dlsch_demodulation.c: Illegal eNB_id %d\n",eNB_id); LOG_W(PHY, "In %s: Illegal gNB_id %d\n", __FUNCTION__, gNB_id);
return(-1); return(-1);
} }
...@@ -341,11 +341,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -341,11 +341,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]); start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
#endif #endif
nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF, nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
pdsch_vars[eNB_id]->dl_ch_estimates, pdsch_vars[gNB_id]->dl_ch_estimates,
pdsch_vars[eNB_id]->rxdataF_ext, pdsch_vars[gNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id]->pmi_ext, pdsch_vars[gNB_id]->pmi_ext,
symbol, symbol,
pilots, pilots,
start_rb, start_rb,
...@@ -357,14 +357,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -357,14 +357,14 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#ifdef DEBUG_DLSCH_MOD #ifdef DEBUG_DLSCH_MOD
printf("dlsch: using pmi %lx, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc)); printf("dlsch: using pmi %lx, pmi_ext ",pmi2hex_2Ar1(dlsch0_harq->pmi_alloc));
for (rb=0;rb<nb_rb;rb++) for (rb=0;rb<nb_rb;rb++)
printf("%d",pdsch_vars[eNB_id]->pmi_ext[rb]); printf("%d",pdsch_vars[gNB_id]->pmi_ext[rb]);
printf("\n"); printf("\n");
#endif #endif
if (rx_type >= rx_IC_single_stream) { if (rx_type >= rx_IC_single_stream) {
if (eNB_id_i<ue->n_connected_eNB) // we are in TM5 if (eNB_id_i < ue->n_connected_gNB) // we are in TM5
nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF, nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
pdsch_vars[eNB_id]->dl_ch_estimates, pdsch_vars[gNB_id]->dl_ch_estimates,
pdsch_vars[eNB_id_i]->rxdataF_ext, pdsch_vars[eNB_id_i]->rxdataF_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
...@@ -379,7 +379,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -379,7 +379,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dlsch0_harq->mimo_mode); dlsch0_harq->mimo_mode);
else else
nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF, nb_rb = nr_dlsch_extract_rbs_dual(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
pdsch_vars[eNB_id]->dl_ch_estimates, pdsch_vars[gNB_id]->dl_ch_estimates,
pdsch_vars[eNB_id_i]->rxdataF_ext, pdsch_vars[eNB_id_i]->rxdataF_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
...@@ -396,11 +396,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -396,11 +396,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
} else if (beamforming_mode==0) { //else if nb_antennas_ports_gNB==1 && beamforming_mode == 0 } else if (beamforming_mode==0) { //else if nb_antennas_ports_gNB==1 && beamforming_mode == 0
//printf("start nr dlsch extract nr_slot_rx %d thread id %d \n", nr_slot_rx, proc->thread_id); //printf("start nr dlsch extract nr_slot_rx %d thread id %d \n", nr_slot_rx, proc->thread_id);
nb_rb = nr_dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF, nb_rb = nr_dlsch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
pdsch_vars[eNB_id]->dl_ch_estimates, pdsch_vars[gNB_id]->dl_ch_estimates,
pdsch_vars[eNB_id]->rxdataF_ext, pdsch_vars[gNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
dlsch0_harq->pmi_alloc, dlsch0_harq->pmi_alloc,
pdsch_vars[eNB_id]->pmi_ext, pdsch_vars[gNB_id]->pmi_ext,
symbol, symbol,
pilots, pilots,
config_type, config_type,
...@@ -415,7 +415,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -415,7 +415,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n"); LOG_W(PHY,"dlsch_demodulation: beamforming mode not supported yet.\n");
}*/ }*/
//printf("nb_rb = %d, eNB_id %d\n",nb_rb,eNB_id); //printf("nb_rb = %d, gNB_id %d\n",nb_rb,gNB_id);
if (nb_rb==0) { if (nb_rb==0) {
LOG_D(PHY,"dlsch_demodulation.c: nb_rb=0\n"); LOG_D(PHY,"dlsch_demodulation.c: nb_rb=0\n");
return(-1); return(-1);
...@@ -440,7 +440,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -440,7 +440,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
n_tx = frame_parms->nb_antenna_ports_gNB; n_tx = frame_parms->nb_antenna_ports_gNB;
n_rx = frame_parms->nb_antennas_rx; n_rx = frame_parms->nb_antennas_rx;
nr_dlsch_scale_channel(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_scale_channel(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
dlsch, dlsch,
symbol, symbol,
...@@ -463,7 +463,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -463,7 +463,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
if (first_symbol_flag==1) { if (first_symbol_flag==1) {
if (beamforming_mode==0){ if (beamforming_mode==0){
if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) { if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
nr_dlsch_channel_level(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_channel_level(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
frame_parms, frame_parms,
avg, avg,
symbol, symbol,
...@@ -474,11 +474,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -474,11 +474,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++) for (aarx=0;aarx<frame_parms->nb_antennas_rx;aarx++)
avgs = cmax(avgs,avg[(aatx<<1)+aarx]); avgs = cmax(avgs,avg[(aatx<<1)+aarx]);
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2)+3; pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2)+3;
} }
else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM)
{ {
nr_dlsch_channel_level_median(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_channel_level_median(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
median, median,
n_tx, n_tx,
n_rx, n_rx,
...@@ -493,16 +493,19 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -493,16 +493,19 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
} }
} }
pdsch_vars[eNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; // this might need to be tuned pdsch_vars[gNB_id]->log2_maxh = (log2_approx(avgs)/2) + 1; // this might need to be tuned
} }
} }
//#ifdef UE_DEBUG_TRACE //#ifdef UE_DEBUG_TRACE
LOG_D(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n", LOG_D(PHY,"[DLSCH] AbsSubframe %d.%d log2_maxh = %d [log2_maxh0 %d log2_maxh1 %d] (%d,%d)\n",
frame%1024,nr_slot_rx, pdsch_vars[eNB_id]->log2_maxh, frame%1024,
pdsch_vars[eNB_id]->log2_maxh0, nr_slot_rx,
pdsch_vars[eNB_id]->log2_maxh1, pdsch_vars[gNB_id]->log2_maxh,
avg[0],avgs); pdsch_vars[gNB_id]->log2_maxh0,
pdsch_vars[gNB_id]->log2_maxh1,
avg[0],
avgs);
//LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode); //LOG_D(PHY,"[DLSCH] mimo_mode = %d\n", dlsch0_harq->mimo_mode);
//#endif //#endif
...@@ -522,7 +525,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -522,7 +525,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#if T_TRACER #if T_TRACER
if (type == PDSCH) if (type == PDSCH)
{ {
T(T_UE_PHY_PDSCH_ENERGY, T_INT(eNB_id), T_INT(0), T_INT(frame%1024), T_INT(nr_slot_rx), T(T_UE_PHY_PDSCH_ENERGY, T_INT(gNB_id), T_INT(0), T_INT(frame%1024), T_INT(nr_slot_rx),
T_INT(avg[0]), T_INT(avg[1]), T_INT(avg[2]), T_INT(avg[3])); T_INT(avg[0]), T_INT(avg[1]), T_INT(avg[2]), T_INT(avg[3]));
} }
#endif #endif
...@@ -542,27 +545,27 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -542,27 +545,27 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#endif #endif
// Now channel compensation // Now channel compensation
if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) { if (dlsch0_harq->mimo_mode<NR_DUALSTREAM) {
nr_dlsch_channel_compensation(pdsch_vars[eNB_id]->rxdataF_ext, nr_dlsch_channel_compensation(pdsch_vars[gNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
pdsch_vars[eNB_id]->dl_ch_magr0, pdsch_vars[gNB_id]->dl_ch_magr0,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
(aatx>1) ? pdsch_vars[eNB_id]->rho : NULL, (aatx>1) ? pdsch_vars[gNB_id]->rho : NULL,
frame_parms, frame_parms,
symbol, symbol,
pilots, pilots,
first_symbol_flag, first_symbol_flag,
dlsch0_harq->Qm, dlsch0_harq->Qm,
nb_rb, nb_rb,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[gNB_id]->log2_maxh,
measurements); // log2_maxh+I0_shift measurements); // log2_maxh+I0_shift
/*if (symbol == 5) { /*if (symbol == 5) {
write_output("rxF_comp_d.m","rxF_c_d",&pdsch_vars[eNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_d.m","rxF_c_d",&pdsch_vars[gNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
} */ } */
/*if ((rx_type==rx_IC_single_stream) && /*if ((rx_type==rx_IC_single_stream) &&
(eNB_id_i<ue->n_connected_eNB)) { (eNB_id_i<ue->n_connected_gNB)) {
nr_dlsch_channel_compensation(pdsch_vars[eNB_id_i]->rxdataF_ext, nr_dlsch_channel_compensation(pdsch_vars[eNB_id_i]->rxdataF_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdsch_vars[eNB_id_i]->dl_ch_mag0, pdsch_vars[eNB_id_i]->dl_ch_mag0,
...@@ -574,11 +577,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -574,11 +577,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
first_symbol_flag, first_symbol_flag,
i_mod, i_mod,
nb_rb, nb_rb,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[gNB_id]->log2_maxh,
measurements); // log2_maxh+I0_shift measurements); // log2_maxh+I0_shift
#ifdef DEBUG_PHY #ifdef DEBUG_PHY
if (symbol == 5) { if (symbol == 5) {
write_output("rxF_comp_d.m","rxF_c_d",&pdsch_vars[eNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_d.m","rxF_c_d",&pdsch_vars[gNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
write_output("rxF_comp_i.m","rxF_c_i",&pdsch_vars[eNB_id_i]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1); write_output("rxF_comp_i.m","rxF_c_i",&pdsch_vars[eNB_id_i]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);
} }
#endif #endif
...@@ -586,57 +589,57 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -586,57 +589,57 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
dlsch_dual_stream_correlation(frame_parms, dlsch_dual_stream_correlation(frame_parms,
symbol, symbol,
nb_rb, nb_rb,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id_i]->dl_ch_estimates_ext, pdsch_vars[eNB_id_i]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->log2_maxh); pdsch_vars[gNB_id]->log2_maxh);
}*/ }*/
} }
else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){ else if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
nr_dlsch_channel_compensation_core(pdsch_vars[eNB_id]->rxdataF_ext, nr_dlsch_channel_compensation_core(pdsch_vars[gNB_id]->rxdataF_ext,
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
pdsch_vars[eNB_id]->rxdataF_comp0, //rxdataF_comp pdsch_vars[gNB_id]->rxdataF_comp0, //rxdataF_comp
NULL, NULL,
n_tx, n_tx,
n_rx, n_rx,
dlsch0_harq->Qm, dlsch0_harq->Qm,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[gNB_id]->log2_maxh,
2*len, // subcarriers Re Im 2*len, // subcarriers Re Im
0); // we start from the beginning of the vector 0); // we start from the beginning of the vector
/* if (symbol == 5) { /* if (symbol == 5) {
write_output("rxF_comp_d00.m","rxF_c_d00",&pdsch_vars[eNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM write_output("rxF_comp_d00.m","rxF_c_d00",&pdsch_vars[gNB_id]->rxdataF_comp0[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM
write_output("rxF_comp_d01.m","rxF_c_d01",&pdsch_vars[eNB_id]->rxdataF_comp0[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rxF_comp_d01.m","rxF_c_d01",&pdsch_vars[gNB_id]->rxdataF_comp0[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
write_output("rxF_comp_d10.m","rxF_c_d10",&pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rxF_comp_d10.m","rxF_c_d10",&pdsch_vars[gNB_id]->rxdataF_comp1[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
write_output("rxF_comp_d11.m","rxF_c_d11",&pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM write_output("rxF_comp_d11.m","rxF_c_d11",&pdsch_vars[gNB_id]->rxdataF_comp1[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM
} */ } */
// compute correlation between signal and interference channels (rho12 and rho21) // compute correlation between signal and interference channels (rho12 and rho21)
nr_dlsch_dual_stream_correlation_core(pdsch_vars[eNB_id]->dl_ch_estimates_ext, nr_dlsch_dual_stream_correlation_core(pdsch_vars[gNB_id]->dl_ch_estimates_ext,
&(pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]), &(pdsch_vars[gNB_id]->dl_ch_estimates_ext[2]),
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
n_tx, n_tx,
n_rx, n_rx,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[gNB_id]->log2_maxh,
2*len, 2*len,
0); 0);
//printf("rho stream1 =%d\n", &pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round] ); //printf("rho stream1 =%d\n", &pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round] );
nr_dlsch_dual_stream_correlation_core(&(pdsch_vars[eNB_id]->dl_ch_estimates_ext[2]), nr_dlsch_dual_stream_correlation_core(&(pdsch_vars[gNB_id]->dl_ch_estimates_ext[2]),
pdsch_vars[eNB_id]->dl_ch_estimates_ext, pdsch_vars[gNB_id]->dl_ch_estimates_ext,
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
n_tx, n_tx,
n_rx, n_rx,
pdsch_vars[eNB_id]->log2_maxh, pdsch_vars[gNB_id]->log2_maxh,
2*len, 2*len,
0); 0);
// printf("rho stream2 =%d\n",&pdsch_vars[eNB_id]->dl_ch_rho2_ext ); // printf("rho stream2 =%d\n",&pdsch_vars[gNB_id]->dl_ch_rho2_ext );
//printf("TM3 log2_maxh : %d\n",pdsch_vars[eNB_id]->log2_maxh); //printf("TM3 log2_maxh : %d\n",pdsch_vars[gNB_id]->log2_maxh);
/* if (symbol == 5) { /* if (symbol == 5) {
write_output("rho0_0.m","rho0_0",&pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM write_output("rho0_0.m","rho0_0",&pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM
write_output("rho2_0.m","rho2_0",&pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rho2_0.m","rho2_0",&pdsch_vars[gNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
write_output("rho0_1.m.m","rho0_1",&pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rho0_1.m.m","rho0_1",&pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round][1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
write_output("rho2_1.m","rho2_1",&pdsch_vars[eNB_id]->dl_ch_rho2_ext[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM write_output("rho2_1.m","rho2_1",&pdsch_vars[gNB_id]->dl_ch_rho2_ext[1][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be QAM
} */ } */
} }
...@@ -644,9 +647,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -644,9 +647,9 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]); stop_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
#if DISABLE_LOG_X #if DISABLE_LOG_X
printf("[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,nr_slot_rx,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0)); printf("[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
#else #else
LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n",frame,nr_slot_rx,slot,symbol,pdsch_vars[eNB_id]->log2_maxh,proc->channel_level,ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0)); LOG_I(PHY, "[AbsSFN %u.%d] Slot%d Symbol %d log2_maxh %d channel_level %d: Channel Comp %5.2f \n", frame, nr_slot_rx, slot, symbol, pdsch_vars[gNB_id]->log2_maxh, proc->channel_level, ue->generic_stat_bis[proc->thread_id][slot].p_time/(cpuf*1000.0));
#endif #endif
#endif #endif
// MRC // MRC
...@@ -656,29 +659,29 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -656,29 +659,29 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
if (frame_parms->nb_antennas_rx > 1) { if (frame_parms->nb_antennas_rx > 1) {
if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){ if (dlsch0_harq->mimo_mode == NR_DUALSTREAM){
nr_dlsch_detection_mrc_core(pdsch_vars[eNB_id]->rxdataF_comp0, nr_dlsch_detection_mrc_core(pdsch_vars[gNB_id]->rxdataF_comp0,
NULL, NULL,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
NULL, NULL,
NULL, NULL,
n_tx, n_tx,
n_rx, n_rx,
2*len, 2*len,
0); 0);
/* if (symbol == 5) { /* if (symbol == 5) {
write_output("rho0_mrc.m","rho0_0",&pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM write_output("rho0_mrc.m","rho0_0",&pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round][0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);// should be QAM
write_output("rho2_mrc.m","rho2_0",&pdsch_vars[eNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0 write_output("rho2_mrc.m","rho2_0",&pdsch_vars[gNB_id]->dl_ch_rho2_ext[0][symbol*frame_parms->N_RB_DL*12],frame_parms->N_RB_DL*12,1,1);//should be almost 0
} */ } */
} }
} }
//printf("start compute LLR\n"); //printf("start compute LLR\n");
if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) { if (dlsch0_harq->mimo_mode == NR_DUALSTREAM) {
rxdataF_comp_ptr = pdsch_vars[eNB_id]->rxdataF_comp1[harq_pid][round]; rxdataF_comp_ptr = pdsch_vars[gNB_id]->rxdataF_comp1[harq_pid][round];
dl_ch_mag_ptr = pdsch_vars[eNB_id]->dl_ch_mag1[harq_pid][round]; dl_ch_mag_ptr = pdsch_vars[gNB_id]->dl_ch_mag1[harq_pid][round];
} }
else { else {
rxdataF_comp_ptr = pdsch_vars[eNB_id_i]->rxdataF_comp0; rxdataF_comp_ptr = pdsch_vars[eNB_id_i]->rxdataF_comp0;
...@@ -700,7 +703,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -700,7 +703,7 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
start_meas(&ue->generic_stat_bis[proc->thread_id][slot]); start_meas(&ue->generic_stat_bis[proc->thread_id][slot]);
#endif #endif
/* Store the valid DL RE's */ /* Store the valid DL RE's */
pdsch_vars[eNB_id]->dl_valid_re[symbol-1] = len; pdsch_vars[gNB_id]->dl_valid_re[symbol-1] = len;
if(dlsch0_harq->status == ACTIVE) { if(dlsch0_harq->status == ACTIVE) {
startSymbIdx = dlsch0_harq->start_symbol; startSymbIdx = dlsch0_harq->start_symbol;
...@@ -718,12 +721,15 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -718,12 +721,15 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
nr_pdsch_ptrs_processing(ue, nr_pdsch_ptrs_processing(ue,
pdsch_vars, pdsch_vars,
frame_parms, frame_parms,
dlsch0_harq, dlsch1_harq, dlsch0_harq,
eNB_id, nr_slot_rx, dlsch1_harq,
symbol, (nb_rb*12), gNB_id,
nr_slot_rx,
symbol,
(nb_rb*12),
harq_pid, harq_pid,
dlsch[0]->rnti,rx_type); dlsch[0]->rnti,rx_type);
pdsch_vars[eNB_id]->dl_valid_re[symbol-1] -= pdsch_vars[eNB_id]->ptrs_re_per_slot[0][symbol]; pdsch_vars[gNB_id]->dl_valid_re[symbol-1] -= pdsch_vars[gNB_id]->ptrs_re_per_slot[0][symbol];
} }
/* at last symbol in a slot calculate LLR's for whole slot */ /* at last symbol in a slot calculate LLR's for whole slot */
...@@ -741,11 +747,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -741,11 +747,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
rxdataF_comp_ptr, dl_ch_mag_ptr, rxdataF_comp_ptr, dl_ch_mag_ptr,
dlsch0_harq, dlsch1_harq, dlsch0_harq, dlsch1_harq,
rx_type, harq_pid, rx_type, harq_pid,
eNB_id, eNB_id_i, gNB_id, eNB_id_i,
first_symbol_flag, first_symbol_flag,
i, nb_rb, round, i, nb_rb, round,
codeword_TB0, codeword_TB1, codeword_TB0, codeword_TB1,
pdsch_vars[eNB_id]->dl_valid_re[i-1], pdsch_vars[gNB_id]->dl_valid_re[i-1],
nr_slot_rx, beamforming_mode); nr_slot_rx, beamforming_mode);
} }
} }
...@@ -753,11 +759,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -753,11 +759,11 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
//nr_dlsch_deinterleaving(symbol,bundle_L,(int16_t*)pllr_symbol_cw0,(int16_t*)pllr_symbol_cw0_deint, nb_rb_pdsch); //nr_dlsch_deinterleaving(symbol,bundle_L,(int16_t*)pllr_symbol_cw0,(int16_t*)pllr_symbol_cw0_deint, nb_rb_pdsch);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_layer_demapping(pdsch_vars[eNB_id]->llr, nr_dlsch_layer_demapping(pdsch_vars[gNB_id]->llr,
dlsch[0]->harq_processes[harq_pid]->Nl, dlsch[0]->harq_processes[harq_pid]->Nl,
dlsch[0]->harq_processes[harq_pid]->Qm, dlsch[0]->harq_processes[harq_pid]->Qm,
dlsch[0]->harq_processes[harq_pid]->G, dlsch[0]->harq_processes[harq_pid]->G,
pdsch_vars[eNB_id]->layer_llr); pdsch_vars[gNB_id]->layer_llr);
} }
#if UE_TIMING_TRACE #if UE_TIMING_TRACE
...@@ -778,29 +784,28 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue, ...@@ -778,29 +784,28 @@ int nr_rx_pdsch(PHY_VARS_NR_UE *ue,
write_output(filename, "rxdataF0", &common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0], NR_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size, 1, 1); write_output(filename, "rxdataF0", &common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF[0][0], NR_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size, 1, 1);
snprintf(filename, 40, "dl_ch_estimates0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx); snprintf(filename, 40, "dl_ch_estimates0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx);
write_output(filename, "dl_ch_estimates", &pdsch_vars[eNB_id]->dl_ch_estimates[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size, 1, 1); write_output(filename, "dl_ch_estimates", &pdsch_vars[gNB_id]->dl_ch_estimates[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->ofdm_symbol_size, 1, 1);
snprintf(filename, 40, "rxdataF_ext0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx); snprintf(filename, 40, "rxdataF_ext0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx);
write_output(filename, "rxdataF_ext", &pdsch_vars[eNB_id]->rxdataF_ext[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1); write_output(filename, "rxdataF_ext", &pdsch_vars[gNB_id]->rxdataF_ext[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1);
snprintf(filename, 40, "dl_ch_estimates_ext0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx); snprintf(filename, 40, "dl_ch_estimates_ext0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx);
write_output(filename, "dl_ch_estimates_ext00", &pdsch_vars[eNB_id]->dl_ch_estimates_ext[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1); write_output(filename, "dl_ch_estimates_ext00", &pdsch_vars[gNB_id]->dl_ch_estimates_ext[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1);
snprintf(filename, 40, "rxdataF_comp0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx); snprintf(filename, 40, "rxdataF_comp0%d_symb_%d_nr_slot_rx_%d.m", aa, symbol, nr_slot_rx);
write_output(filename, "rxdataF_comp00", &pdsch_vars[eNB_id]->rxdataF_comp0[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1); write_output(filename, "rxdataF_comp00", &pdsch_vars[gNB_id]->rxdataF_comp0[aa][0], NR_SYMBOLS_PER_SLOT*frame_parms->N_RB_DL*NR_NB_SC_PER_RB, 1, 1);
for (int i=0; i < 2; i++){ for (int i=0; i < 2; i++){
snprintf(filename, 40, "llr%d_symb_%d_nr_slot_rx_%d.m", i, symbol, nr_slot_rx); snprintf(filename, 40, "llr%d_symb_%d_nr_slot_rx_%d.m", i, symbol, nr_slot_rx);
write_output(filename,"llr", &pdsch_vars[eNB_id]->llr[i][0], (NR_SYMBOLS_PER_SLOT*nb_rb*NR_NB_SC_PER_RB*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm), 1, 0); write_output(filename,"llr", &pdsch_vars[gNB_id]->llr[i][0], (NR_SYMBOLS_PER_SLOT*nb_rb*NR_NB_SC_PER_RB*dlsch1_harq->Qm) - 4*(nb_rb*4*dlsch1_harq->Qm), 1, 0);
} }
#endif #endif
#if T_TRACER #if T_TRACER
T(T_UE_PHY_PDSCH_IQ, T_INT(eNB_id), T_INT(ue->Mod_id), T_INT(frame%1024), T(T_UE_PHY_PDSCH_IQ, T_INT(gNB_id), T_INT(ue->Mod_id), T_INT(frame%1024),
T_INT(nr_slot_rx), T_INT(nb_rb), T_INT(nr_slot_rx), T_INT(nb_rb),
T_INT(frame_parms->N_RB_UL), T_INT(frame_parms->symbols_per_slot), T_INT(frame_parms->N_RB_UL), T_INT(frame_parms->symbols_per_slot),
T_BUFFER(&pdsch_vars[eNB_id]->rxdataF_comp0[eNB_id][0], T_BUFFER(&pdsch_vars[gNB_id]->rxdataF_comp0[gNB_id][0], 2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_slot*2));
2 * /* ulsch[UE_id]->harq_processes[harq_pid]->nb_rb */ frame_parms->N_RB_UL *12*frame_parms->symbols_per_slot*2));
#endif #endif
return(0); return(0);
...@@ -2319,7 +2324,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2319,7 +2324,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
NR_DL_UE_HARQ_t *dlsch1_harq, NR_DL_UE_HARQ_t *dlsch1_harq,
RX_type_t rx_type, RX_type_t rx_type,
unsigned char harq_pid, unsigned char harq_pid,
unsigned char eNB_id, unsigned char gNB_id,
unsigned char eNB_id_i, unsigned char eNB_id_i,
unsigned char first_symbol_flag, unsigned char first_symbol_flag,
unsigned char symbol, unsigned char symbol,
...@@ -2338,42 +2343,42 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2338,42 +2343,42 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
int16_t *pllr_symbol_layer1; int16_t *pllr_symbol_layer1;
uint32_t llr_offset_symbol; uint32_t llr_offset_symbol;
if (first_symbol_flag==1) pdsch_vars[eNB_id]->llr_offset[symbol-1] = 0; if (first_symbol_flag==1) pdsch_vars[gNB_id]->llr_offset[symbol-1] = 0;
llr_offset_symbol = pdsch_vars[eNB_id]->llr_offset[symbol-1]; llr_offset_symbol = pdsch_vars[gNB_id]->llr_offset[symbol-1];
//pllr_symbol_cw0_deint = (int8_t*)pdsch_vars[eNB_id]->llr[0]; //pllr_symbol_cw0_deint = (int8_t*)pdsch_vars[gNB_id]->llr[0];
//pllr_symbol_cw1_deint = (int8_t*)pdsch_vars[eNB_id]->llr[1]; //pllr_symbol_cw1_deint = (int8_t*)pdsch_vars[gNB_id]->llr[1];
pllr_symbol_layer0 = pdsch_vars[eNB_id]->layer_llr[0]; pllr_symbol_layer0 = pdsch_vars[gNB_id]->layer_llr[0];
pllr_symbol_layer1 = pdsch_vars[eNB_id]->layer_llr[1]; pllr_symbol_layer1 = pdsch_vars[gNB_id]->layer_llr[1];
pllr_symbol_layer0 += llr_offset_symbol; pllr_symbol_layer0 += llr_offset_symbol;
pllr_symbol_layer1 += llr_offset_symbol; pllr_symbol_layer1 += llr_offset_symbol;
pllr_symbol_cw0 = pdsch_vars[eNB_id]->llr[0]; pllr_symbol_cw0 = pdsch_vars[gNB_id]->llr[0];
pllr_symbol_cw1 = pdsch_vars[eNB_id]->llr[1]; pllr_symbol_cw1 = pdsch_vars[gNB_id]->llr[1];
pllr_symbol_cw0 += llr_offset_symbol; pllr_symbol_cw0 += llr_offset_symbol;
pllr_symbol_cw1 += llr_offset_symbol; pllr_symbol_cw1 += llr_offset_symbol;
pdsch_vars[eNB_id]->llr_offset[symbol] = len*dlsch0_harq->Qm + llr_offset_symbol; pdsch_vars[gNB_id]->llr_offset[symbol] = len*dlsch0_harq->Qm + llr_offset_symbol;
/*LOG_I(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n", /*LOG_I(PHY,"compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %x @LLR Buff(symb) %x\n",
symbol, symbol,
nb_rb,dlsch0_harq->Qm, nb_rb,dlsch0_harq->Qm,
pdsch_vars[eNB_id]->llr_length[symbol], pdsch_vars[gNB_id]->llr_length[symbol],
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
(int16_t*)pdsch_vars[eNB_id]->llr[0], (int16_t*)pdsch_vars[gNB_id]->llr[0],
pllr_symbol_cw0);*/ pllr_symbol_cw0);*/
/*printf("compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p\n", /*printf("compute LLRs [symbol %d] NbRB %d Qm %d LLRs-Length %d LLR-Offset %d @LLR Buff %p @LLR Buff(symb) %p\n",
symbol, symbol,
nb_rb,dlsch0_harq->Qm, nb_rb,dlsch0_harq->Qm,
pdsch_vars[eNB_id]->llr_length[symbol], pdsch_vars[gNB_id]->llr_length[symbol],
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
pdsch_vars[eNB_id]->llr[0], pdsch_vars[gNB_id]->llr[0],
pllr_symbol_cw0);*/ pllr_symbol_cw0);*/
switch (dlsch0_harq->Qm) { switch (dlsch0_harq->Qm) {
case 2 : case 2 :
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
nr_dlsch_qpsk_llr(frame_parms, nr_dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
symbol, symbol,
len, len,
...@@ -2384,7 +2389,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2384,7 +2389,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
nr_dlsch_qpsk_llr(frame_parms, nr_dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw1, pllr_symbol_cw1,
symbol, symbol,
len, len,
...@@ -2395,66 +2400,66 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2395,66 +2400,66 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
else if (rx_type >= rx_IC_single_stream) { else if (rx_type >= rx_IC_single_stream) {
if (dlsch1_harq->Qm == 2) { if (dlsch1_harq->Qm == 2) {
nr_dlsch_qpsk_qpsk_llr(frame_parms, nr_dlsch_qpsk_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_qpsk_qpsk_llr(frame_parms, nr_dlsch_qpsk_qpsk_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else if (dlsch1_harq->Qm == 4) { else if (dlsch1_harq->Qm == 4) {
nr_dlsch_qpsk_16qam_llr(frame_parms, nr_dlsch_qpsk_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_16qam_qpsk_llr(frame_parms, nr_dlsch_16qam_qpsk_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else { else {
nr_dlsch_qpsk_64qam_llr(frame_parms, nr_dlsch_qpsk_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_64qam_qpsk_llr(frame_parms, nr_dlsch_64qam_qpsk_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
} }
...@@ -2462,90 +2467,90 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2462,90 +2467,90 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
case 4 : case 4 :
if ((rx_type==rx_standard ) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard ) || (codeword_TB1 == -1)) {
nr_dlsch_16qam_llr(frame_parms, nr_dlsch_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], pdsch_vars[gNB_id]->llr[0],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128, pdsch_vars[gNB_id]->llr128,
beamforming_mode); beamforming_mode);
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
nr_dlsch_16qam_llr(frame_parms, nr_dlsch_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[1], pdsch_vars[gNB_id]->llr[1],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128_2ndstream, pdsch_vars[gNB_id]->llr128_2ndstream,
beamforming_mode); beamforming_mode);
} }
else if (rx_type >= rx_IC_single_stream) { else if (rx_type >= rx_IC_single_stream) {
if (dlsch1_harq->Qm == 2) { if (dlsch1_harq->Qm == 2) {
nr_dlsch_16qam_qpsk_llr(frame_parms, nr_dlsch_16qam_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_qpsk_16qam_llr(frame_parms, nr_dlsch_qpsk_16qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[gNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else if (dlsch1_harq->Qm == 4) { else if (dlsch1_harq->Qm == 4) {
nr_dlsch_16qam_16qam_llr(frame_parms, nr_dlsch_16qam_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_16qam_16qam_llr(frame_parms, nr_dlsch_16qam_16qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[gNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else { else {
nr_dlsch_16qam_64qam_llr(frame_parms, nr_dlsch_16qam_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_64qam_16qam_llr(frame_parms, nr_dlsch_64qam_16qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
} }
...@@ -2553,92 +2558,92 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2553,92 +2558,92 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
case 6 : case 6 :
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
nr_dlsch_64qam_llr(frame_parms, nr_dlsch_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
(int16_t*)pllr_symbol_cw0, (int16_t*)pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
nr_dlsch_64qam_llr(frame_parms, nr_dlsch_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw1, pllr_symbol_cw1,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
else if (rx_type >= rx_IC_single_stream) { else if (rx_type >= rx_IC_single_stream) {
if (dlsch1_harq->Qm == 2) { if (dlsch1_harq->Qm == 2) {
nr_dlsch_64qam_qpsk_llr(frame_parms, nr_dlsch_64qam_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_qpsk_64qam_llr(frame_parms, nr_dlsch_qpsk_64qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,2,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else if (dlsch1_harq->Qm == 4) { else if (dlsch1_harq->Qm == 4) {
nr_dlsch_64qam_16qam_llr(frame_parms, nr_dlsch_64qam_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
pdsch_vars[eNB_id]->layer_llr[0], pdsch_vars[gNB_id]->layer_llr[0],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128); pdsch_vars[gNB_id]->llr128);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_16qam_64qam_llr(frame_parms, nr_dlsch_16qam_64qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[gNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pdsch_vars[eNB_id]->layer_llr[1], pdsch_vars[gNB_id]->layer_llr[1],
symbol,first_symbol_flag,nb_rb, symbol,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,4,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr128_2ndstream); pdsch_vars[gNB_id]->llr128_2ndstream);
} }
} }
else { else {
nr_dlsch_64qam_64qam_llr(frame_parms, nr_dlsch_64qam_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
rxdataF_comp_ptr,//i rxdataF_comp_ptr,//i
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
dl_ch_mag_ptr,//i dl_ch_mag_ptr,//i
pdsch_vars[eNB_id]->dl_ch_rho2_ext, pdsch_vars[gNB_id]->dl_ch_rho2_ext,
(int16_t*)pllr_symbol_layer0, (int16_t*)pllr_symbol_layer0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch0_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr_offset[symbol]); pdsch_vars[gNB_id]->llr_offset[symbol]);
if (rx_type==rx_IC_dual_stream) { if (rx_type==rx_IC_dual_stream) {
nr_dlsch_64qam_64qam_llr(frame_parms, nr_dlsch_64qam_64qam_llr(frame_parms,
rxdataF_comp_ptr, rxdataF_comp_ptr,
pdsch_vars[eNB_id]->rxdataF_comp0,//i pdsch_vars[gNB_id]->rxdataF_comp0,//i
dl_ch_mag_ptr, dl_ch_mag_ptr,
pdsch_vars[eNB_id]->dl_ch_mag0,//i pdsch_vars[gNB_id]->dl_ch_mag0,//i
pdsch_vars[eNB_id]->dl_ch_rho_ext[harq_pid][round], pdsch_vars[gNB_id]->dl_ch_rho_ext[harq_pid][round],
pllr_symbol_layer1, pllr_symbol_layer1,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol), adjust_G2(frame_parms,dlsch1_harq->rb_alloc_even,6,nr_slot_rx,symbol),
pdsch_vars[eNB_id]->llr_offset[symbol]); pdsch_vars[gNB_id]->llr_offset[symbol]);
} }
} }
} }
...@@ -2646,23 +2651,23 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2646,23 +2651,23 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
case 8: case 8:
if ((rx_type==rx_standard) || (codeword_TB1 == -1)) { if ((rx_type==rx_standard) || (codeword_TB1 == -1)) {
nr_dlsch_256qam_llr(frame_parms, nr_dlsch_256qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
(int16_t*)pllr_symbol_cw0, (int16_t*)pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
pdsch_vars[eNB_id]->dl_ch_magr0, pdsch_vars[gNB_id]->dl_ch_magr0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} else if (codeword_TB0 == -1){ } else if (codeword_TB0 == -1){
nr_dlsch_256qam_llr(frame_parms, nr_dlsch_256qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw1, pllr_symbol_cw1,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
pdsch_vars[eNB_id]->dl_ch_magr0, pdsch_vars[gNB_id]->dl_ch_magr0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
break; break;
...@@ -2677,7 +2682,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2677,7 +2682,7 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
case 2 : case 2 :
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
nr_dlsch_qpsk_llr(frame_parms, nr_dlsch_qpsk_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
beamforming_mode); beamforming_mode);
...@@ -2686,36 +2691,36 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2686,36 +2691,36 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
case 4: case 4:
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
nr_dlsch_16qam_llr(frame_parms, nr_dlsch_16qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pdsch_vars[eNB_id]->llr[0], pdsch_vars[gNB_id]->llr[0],
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr128, pdsch_vars[gNB_id]->llr128,
beamforming_mode); beamforming_mode);
} }
break; break;
case 6 : case 6 :
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
nr_dlsch_64qam_llr(frame_parms, nr_dlsch_64qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
break; break;
case 8 : case 8 :
if (rx_type==rx_standard) { if (rx_type==rx_standard) {
nr_dlsch_256qam_llr(frame_parms, nr_dlsch_256qam_llr(frame_parms,
pdsch_vars[eNB_id]->rxdataF_comp0, pdsch_vars[gNB_id]->rxdataF_comp0,
pllr_symbol_cw0, pllr_symbol_cw0,
pdsch_vars[eNB_id]->dl_ch_mag0, pdsch_vars[gNB_id]->dl_ch_mag0,
pdsch_vars[eNB_id]->dl_ch_magb0, pdsch_vars[gNB_id]->dl_ch_magb0,
pdsch_vars[eNB_id]->dl_ch_magr0, pdsch_vars[gNB_id]->dl_ch_magr0,
symbol,len,first_symbol_flag,nb_rb, symbol,len,first_symbol_flag,nb_rb,
pdsch_vars[eNB_id]->llr_offset[symbol], pdsch_vars[gNB_id]->llr_offset[symbol],
beamforming_mode); beamforming_mode);
} }
break; break;
...@@ -2732,94 +2737,94 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars, ...@@ -2732,94 +2737,94 @@ static int nr_dlsch_llr(NR_UE_PDSCH **pdsch_vars,
#ifdef USER_MODE #ifdef USER_MODE
void dump_dlsch2(PHY_VARS_UE *ue,uint8_t eNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid) void dump_dlsch2(PHY_VARS_UE *ue,uint8_t gNB_id,uint8_t nr_slot_rx,unsigned int *coded_bits_per_codeword,int round, unsigned char harq_pid)
{ {
unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12; unsigned int nsymb = (ue->frame_parms.Ncp == 0) ? 14 : 12;
char fname[32],vname[32]; char fname[32],vname[32];
int N_RB_DL=ue->frame_parms.N_RB_DL; int N_RB_DL=ue->frame_parms.N_RB_DL;
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_ext0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext0",eNB_id,round); snprintf(vname, 32, "dl%d_rxF_r%d_ext0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx >1) { if (ue->frame_parms.nb_antennas_rx >1) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_ext1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_ext1",eNB_id,round); snprintf(vname, 32, "dl%d_rxF_r%d_ext1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_ext[1],12*N_RB_DL*nsymb,1,1);
} }
snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext00",eNB_id,round); snprintf(vname, 32, "dl%d_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
if (ue->transmission_mode[eNB_id]==7){ if (ue->transmission_mode[gNB_id]==7){
snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_bf_ch_r%d.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d",eNB_id,round); snprintf(vname, 32, "dl%d_bf_ch_r%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_bf_ch_estimates[0],512*nsymb,1,1);
//write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[eNB_id]->dl_bf_ch_estimates[0],512,1,1); //write_output(fname,vname,phy_vars_ue->lte_ue_pdsch_vars[gNB_id]->dl_bf_ch_estimates[0],512,1,1);
snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_bf_ch_r%d_ext00.m", gNB_id, round);
snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00",eNB_id,round); snprintf(vname, 32, "dl%d_bf_ch_r%d_ext00", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_bf_ch_estimates_ext[0],12*N_RB_DL*nsymb,1,1);
} }
if (ue->frame_parms.nb_antennas_rx == 2) { if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_ch_r%d_ext01.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext01",eNB_id,round); snprintf(vname, 32, "dl%d_ch_r%d_ext01", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
} }
if (ue->frame_parms.nb_antenna_ports_gNB == 2) { if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_ch_r%d_ext10.m", gNB_id, round);
snprintf(vname, 32, "dl%d_ch_r%d_ext10",eNB_id,round); snprintf(vname, 32, "dl%d_ch_r%d_ext10", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antennas_rx == 2) { if (ue->frame_parms.nb_antennas_rx == 2) {
snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_ch_r%d_ext11.m",gNB_id,round);
snprintf(vname, 32, "dl%d_ch_r%d_ext11",eNB_id,round); snprintf(vname, 32, "dl%d_ch_r%d_ext11",gNB_id,round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
} }
} }
snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_uespec0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_uespec0",eNB_id,round); snprintf(vname, 32, "dl%d_rxF_r%d_uespec0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_uespec_pilots[0],12*N_RB_DL,1,1);
/* /*
write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1); write_output("dlsch%d_ch_ext01.m","dl01_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[1],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1); write_output("dlsch%d_ch_ext10.m","dl10_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[2],12*N_RB_DL*nsymb,1,1);
write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[eNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1); write_output("dlsch%d_ch_ext11.m","dl11_ch0_ext",pdsch_vars[gNB_id]->dl_ch_estimates_ext[3],12*N_RB_DL*nsymb,1,1);
*/ */
snprintf(fname, 32, "dlsch%d_r%d_rho.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_r%d_rho.m", gNB_id, round);
snprintf(vname, 32, "dl_rho_r%d_%d",eNB_id,round); snprintf(vname, 32, "dl_rho_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_rho_ext[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_r%d_rho2.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_r%d_rho2.m", gNB_id, round);
snprintf(vname, 32, "dl_rho2_r%d_%d",eNB_id,round); snprintf(vname, 32, "dl_rho2_r%d_%d", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_rho2_ext[0],12*N_RB_DL*nsymb,1,1);
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_comp0.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp0",eNB_id,round); snprintf(vname, 32, "dl%d_rxF_r%d_comp0", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp0[0],12*N_RB_DL*nsymb,1,1);
if (ue->frame_parms.nb_antenna_ports_gNB == 2) { if (ue->frame_parms.nb_antenna_ports_gNB == 2) {
snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_comp1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_rxF_r%d_comp1",eNB_id,round); snprintf(vname, 32, "dl%d_rxF_r%d_comp1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1); write_output(fname,vname,ue->pdsch_vars[proc->thread_id][gNB_id]->rxdataF_comp1[harq_pid][round][0],12*N_RB_DL*nsymb,1,1);
} }
snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_rxF_r%d_llr.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_llr",eNB_id,round); snprintf(vname, 32, "dl%d_r%d_llr", gNB_id, round);
write_output(fname,vname, ue->pdsch_vars[proc->thread_id][eNB_id]->llr[0],coded_bits_per_codeword[0],1,0); write_output(fname, vname, ue->pdsch_vars[proc->thread_id][gNB_id]->llr[0], coded_bits_per_codeword[0], 1, 0);
snprintf(fname, 32, "dlsch%d_r%d_mag1.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_r%d_mag1.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag1",eNB_id,round); snprintf(vname, 32, "dl%d_r%d_mag1", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_mag0[0],12*N_RB_DL*nsymb,1,1); write_output(fname, vname, ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_mag0[0], 12*N_RB_DL*nsymb, 1, 1);
snprintf(fname, 32, "dlsch%d_r%d_mag2.m",eNB_id,round); snprintf(fname, 32, "dlsch%d_r%d_mag2.m", gNB_id, round);
snprintf(vname, 32, "dl%d_r%d_mag2",eNB_id,round); snprintf(vname, 32, "dl%d_r%d_mag2", gNB_id, round);
write_output(fname,vname,ue->pdsch_vars[proc->thread_id][eNB_id]->dl_ch_magb0[0],12*N_RB_DL*nsymb,1,1); write_output(fname, vname, ue->pdsch_vars[proc->thread_id][gNB_id]->dl_ch_magb0[0], 12*N_RB_DL*nsymb, 1, 1);
// printf("log2_maxh = %d\n",ue->pdsch_vars[eNB_id]->log2_maxh); // printf("log2_maxh = %d\n",ue->pdsch_vars[gNB_id]->log2_maxh);
} }
#endif #endif
......
...@@ -832,8 +832,8 @@ typedef struct { ...@@ -832,8 +832,8 @@ typedef struct {
int tx_total_RE[NR_MAX_SLOTS_PER_FRAME]; int tx_total_RE[NR_MAX_SLOTS_PER_FRAME];
/// \brief Maximum transmit power /// \brief Maximum transmit power
int8_t tx_power_max_dBm; int8_t tx_power_max_dBm;
/// \brief Number of eNB seen by UE /// \brief Number of gNB seen by UE
uint8_t n_connected_eNB; uint8_t n_connected_gNB;
/// \brief indicator that Handover procedure has been initiated /// \brief indicator that Handover procedure has been initiated
uint8_t ho_initiated; uint8_t ho_initiated;
/// \brief indicator that Handover procedure has been triggered /// \brief indicator that Handover procedure has been triggered
......
...@@ -762,7 +762,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t ...@@ -762,7 +762,7 @@ uint8_t get_downlink_ack(PHY_VARS_NR_UE *ue, uint8_t gNB_id, UE_nr_rxtx_proc_t
number_of_code_word = 1; number_of_code_word = 1;
} }
if (ue->n_connected_eNB > 1) { if (ue->n_connected_gNB > 1) {
LOG_E(PHY,"PUCCH ACK feedback is not implemented for mutiple gNB cells : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME); LOG_E(PHY,"PUCCH ACK feedback is not implemented for mutiple gNB cells : at line %d in function %s of file %s \n", LINE_FILE , __func__, FILE_NAME);
return (0); return (0);
} }
......
...@@ -232,7 +232,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr ...@@ -232,7 +232,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
v_return = -1; v_return = -1;
} }
ue->n_connected_eNB = 2; ue->n_connected_gNB = 2;
printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n"); printf("\n => Test : Error due to PUCCH format with multiple cells not already implemented \n");
...@@ -240,7 +240,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr ...@@ -240,7 +240,7 @@ int test_pucch_basic_error(PHY_VARS_NR_UE *ue, int gNB_id, UE_nr_rxtx_proc_t *pr
v_return = -1; v_return = -1;
} }
ue->n_connected_eNB = 1; ue->n_connected_gNB = 1;
return (v_return); return (v_return);
} }
......
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