Fixes for handling NR UE DCI decoding errors
This commit is contained in:
@@ -687,8 +687,10 @@ int main( int argc, char **argv ) {
|
||||
nr_init_frame_parms_ue(frame_parms[CC_id],nrUE_config,NORMAL);
|
||||
|
||||
// Overwrite DL frequency (for FR2 testing)
|
||||
if (downlink_frequency[0][0]!=0)
|
||||
if (downlink_frequency[0][0]!=0) {
|
||||
frame_parms[CC_id]->dl_CarrierFreq = downlink_frequency[0][0];
|
||||
frame_parms[CC_id]->ul_CarrierFreq = downlink_frequency[0][0];
|
||||
}
|
||||
|
||||
init_nr_ue_vars(UE[CC_id],frame_parms[CC_id],0,abstraction_flag);
|
||||
|
||||
|
||||
@@ -3026,7 +3026,7 @@ void copy_harq_proc_struct(NR_DL_UE_HARQ_t *harq_processes_dest, NR_DL_UE_HARQ_t
|
||||
memcpy(harq_ack_dest, current_harq_ack, sizeof(nr_harq_status_t));
|
||||
}*/
|
||||
|
||||
void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1) {
|
||||
int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_id, PDSCH_t pdsch, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1) {
|
||||
|
||||
int nr_tti_rx = proc->nr_tti_rx;
|
||||
int m;
|
||||
@@ -3081,8 +3081,8 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
|
||||
#endif
|
||||
// process DLSCH received in first slot
|
||||
// skip DMRS symbols (will have to check later if PDSCH/DMRS are multiplexed
|
||||
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) == 0)
|
||||
nr_rx_pdsch(ue,
|
||||
if (((1<<m)&dlsch0->harq_processes[harq_pid]->dlDmrsSymbPos) == 0) {
|
||||
if (nr_rx_pdsch(ue,
|
||||
pdsch,
|
||||
eNB_id,
|
||||
eNB_id_i,
|
||||
@@ -3092,20 +3092,25 @@ void nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB
|
||||
first_symbol_flag,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
dlsch0->current_harq_pid);
|
||||
dlsch0->current_harq_pid) < 0)
|
||||
return -1;
|
||||
}
|
||||
else { // This is to adjust the llr offset in the case of skipping over a dmrs symbol (i.e. in case of no PDSCH REs in DMRS)
|
||||
if (pdsch == RA_PDSCH) ue->pdsch_vars_ra[eNB_id]->llr_offset[m]=ue->pdsch_vars_ra[eNB_id]->llr_offset[m-1];
|
||||
else if (pdsch == PDSCH) nr_rx_pdsch(ue,
|
||||
pdsch,
|
||||
eNB_id,
|
||||
eNB_id_i,
|
||||
proc->frame_rx,
|
||||
nr_tti_rx, // nr_tti_rx,
|
||||
m,
|
||||
first_symbol_flag,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
dlsch0->current_harq_pid);
|
||||
else if (pdsch == PDSCH) {
|
||||
if (nr_rx_pdsch(ue,
|
||||
pdsch,
|
||||
eNB_id,
|
||||
eNB_id_i,
|
||||
proc->frame_rx,
|
||||
nr_tti_rx, // nr_tti_rx,
|
||||
m,
|
||||
first_symbol_flag,
|
||||
dual_stream_UE,
|
||||
i_mod,
|
||||
dlsch0->current_harq_pid) < 0)
|
||||
return -1;
|
||||
}
|
||||
else AssertFatal(1==0,"not RA_PDSCH or PDSCH\n");
|
||||
}
|
||||
if (pdsch == PDSCH) LOG_D(PHY,"Done processing symbol %d : llr_offset %d\n",m,ue->pdsch_vars[ue->current_thread_id[nr_tti_rx]][eNB_id]->llr_offset[m]);
|
||||
@@ -4142,27 +4147,29 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
} else if (ue->dlsch_ra[0]->active == 1){
|
||||
dlsch = ue->dlsch_ra[0];
|
||||
}
|
||||
AssertFatal(dlsch != NULL, "Unsupported mode\n");
|
||||
uint8_t harq_pid = dlsch->current_harq_pid;
|
||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch->harq_processes[harq_pid];
|
||||
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
|
||||
uint16_t start_symb_sch = dlsch0_harq->start_symbol;
|
||||
int symb_dmrs = -1;
|
||||
|
||||
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
|
||||
//to update from pdsch config
|
||||
if (dlsch) {
|
||||
uint8_t harq_pid = dlsch->current_harq_pid;
|
||||
NR_DL_UE_HARQ_t *dlsch0_harq = dlsch->harq_processes[harq_pid];
|
||||
uint16_t nb_symb_sch = dlsch0_harq->nb_symbols;
|
||||
uint16_t start_symb_sch = dlsch0_harq->start_symbol;
|
||||
int symb_dmrs = -1;
|
||||
|
||||
for (int i=0;i<4;i++) if (((1<<i)&dlsch0_harq->dlDmrsSymbPos) > 0) {symb_dmrs=i;break;}
|
||||
AssertFatal(symb_dmrs>=0,"no dmrs in 0..3\n");
|
||||
LOG_D(PHY,"Initializing dmrs for symb %d DMRS mask %x\n",symb_dmrs,dlsch0_harq->dlDmrsSymbPos);
|
||||
nr_gold_pdsch(ue,symb_dmrs,0, 1);
|
||||
LOG_D(PHY," ------ --> PDSCH ChannelComp/LLR Frame.slot %d.%d ------ \n", frame_rx%1024, nr_tti_rx);
|
||||
//to update from pdsch config
|
||||
|
||||
for (int i=0;i<4;i++) if (((1<<i)&dlsch0_harq->dlDmrsSymbPos) > 0) {symb_dmrs=i;break;}
|
||||
AssertFatal(symb_dmrs>=0,"no dmrs in 0..3\n");
|
||||
LOG_D(PHY,"Initializing dmrs for symb %d DMRS mask %x\n",symb_dmrs,dlsch0_harq->dlDmrsSymbPos);
|
||||
nr_gold_pdsch(ue,symb_dmrs,0, 1);
|
||||
|
||||
for (uint16_t m=start_symb_sch;m<(nb_symb_sch+start_symb_sch) ; m++){
|
||||
nr_slot_fep(ue,
|
||||
for (uint16_t m=start_symb_sch;m<(nb_symb_sch+start_symb_sch) ; m++){
|
||||
nr_slot_fep(ue,
|
||||
m, //to be updated from higher layer
|
||||
nr_tti_rx,
|
||||
0,
|
||||
0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
LOG_D(PHY,"[UE %d] Frame %d, nr_tti_rx %d: No DCIs found\n", ue->Mod_id, frame_rx, nr_tti_rx);
|
||||
@@ -4174,9 +4181,10 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
start_meas(&ue->generic_stat);
|
||||
#endif
|
||||
// do procedures for C-RNTI
|
||||
int ret_pdsch;
|
||||
if (ue->dlsch[ue->current_thread_id[nr_tti_rx]][eNB_id][0]->active == 1) {
|
||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC, VCD_FUNCTION_IN);
|
||||
nr_ue_pdsch_procedures(ue,
|
||||
ret_pdsch = nr_ue_pdsch_procedures(ue,
|
||||
proc,
|
||||
eNB_id,
|
||||
PDSCH,
|
||||
@@ -4271,7 +4279,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
start_meas(&ue->dlsch_procedures_stat[ue->current_thread_id[nr_tti_rx]]);
|
||||
#endif
|
||||
|
||||
nr_ue_dlsch_procedures(ue,
|
||||
if (ret_pdsch >= 0)
|
||||
nr_ue_dlsch_procedures(ue,
|
||||
proc,
|
||||
eNB_id,
|
||||
PDSCH,
|
||||
|
||||
@@ -2342,7 +2342,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
|
||||
nr_ue_process_dci_freq_dom_resource_assignment(pusch_config_pdu_0_0,NULL,n_RB_ULBWP,0,dci->frequency_domain_assignment.val);
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,pusch_config_pdu_0_0,NULL,dci->time_domain_assignment.val) < 0)
|
||||
break;
|
||||
return -1;
|
||||
/* FREQ_HOPPING_FLAG */
|
||||
if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0))
|
||||
@@ -2416,7 +2416,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
|
||||
nr_ue_process_dci_freq_dom_resource_assignment(pusch_config_pdu_0_1,NULL,n_RB_ULBWP,0,dci->frequency_domain_assignment.val);
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,pusch_config_pdu_0_1,NULL,dci->time_domain_assignment.val) < 0)
|
||||
break;
|
||||
return -1;
|
||||
/* FREQ_HOPPING_FLAG */
|
||||
if ((mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.resource_allocation != 0) &&
|
||||
(mac->phy_config.config_req.ul_bwp_dedicated.pusch_config_dedicated.frequency_hopping !=0))
|
||||
@@ -2747,7 +2747,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
|
||||
nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_0,0,n_RB_DLBWP,dci->frequency_domain_assignment.val);
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_0,dci->time_domain_assignment.val) < 0)
|
||||
break;
|
||||
return -1;
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
mac->scc->dmrs_TypeA_Position,
|
||||
@@ -2872,7 +2872,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, dc
|
||||
nr_ue_process_dci_freq_dom_resource_assignment(NULL,dlsch_config_pdu_1_1,0,n_RB_DLBWP,dci->frequency_domain_assignment.val);
|
||||
/* TIME_DOM_RESOURCE_ASSIGNMENT */
|
||||
if (nr_ue_process_dci_time_dom_resource_assignment(mac,NULL,dlsch_config_pdu_1_1,dci->time_domain_assignment.val) < 0)
|
||||
break;
|
||||
return -1;
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
mac->scc->dmrs_TypeA_Position,
|
||||
|
||||
@@ -167,13 +167,16 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info, NR_UL_TIME_ALIGNMENT_
|
||||
for(i=0; i<dl_info->dci_ind->number_of_dcis; ++i){
|
||||
LOG_D(MAC,">>>NR_IF_Module i=%d, dl_info->dci_ind->number_of_dcis=%d\n",i,dl_info->dci_ind->number_of_dcis);
|
||||
|
||||
ret_mask |= (handle_dci(dl_info->module_id,
|
||||
int8_t ret = handle_dci(dl_info->module_id,
|
||||
dl_info->cc_id,
|
||||
dl_info->gNB_index,
|
||||
dl_info->dci_ind->dci_list+i)<< FAPI_NR_DCI_IND);
|
||||
dl_info->dci_ind->dci_list+i);
|
||||
|
||||
AssertFatal( nr_ue_if_module_inst[module_id] != NULL, "IF module is void!\n" );
|
||||
nr_ue_if_module_inst[module_id]->scheduled_response(&mac->scheduled_response);
|
||||
ret_mask |= (ret << FAPI_NR_DCI_IND);
|
||||
if (ret >= 0) {
|
||||
AssertFatal( nr_ue_if_module_inst[module_id] != NULL, "IF module is void!\n" );
|
||||
nr_ue_if_module_inst[module_id]->scheduled_response(&mac->scheduled_response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user