reworking of pdcch procedures function call
This commit is contained in:
@@ -699,102 +699,100 @@ void pdcch_siso(NR_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
#ifdef NR_PDCCH_DCI_RUN
|
#ifdef NR_PDCCH_DCI_RUN
|
||||||
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc) {
|
UE_nr_rxtx_proc_t *proc,
|
||||||
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) {
|
||||||
|
|
||||||
uint32_t frame = proc->frame_rx;
|
uint32_t frame = proc->frame_rx;
|
||||||
uint32_t slot = proc->nr_slot_rx;
|
uint32_t slot = proc->nr_slot_rx;
|
||||||
NR_UE_COMMON *common_vars = &ue->common_vars;
|
NR_UE_COMMON *common_vars = &ue->common_vars;
|
||||||
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms;
|
||||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
||||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15;
|
|
||||||
|
|
||||||
uint8_t log2_maxh, aarx;
|
uint8_t log2_maxh, aarx;
|
||||||
int32_t avgs;
|
int32_t avgs;
|
||||||
int32_t avgP[4];
|
int32_t avgP[4];
|
||||||
for (int i=0;i<pdcch_vars->nb_search_space;i++) {
|
|
||||||
|
|
||||||
rel15 = &pdcch_vars->pdcch_config[i];
|
int n_rb,rb_offset;
|
||||||
int n_rb,rb_offset;
|
get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset);
|
||||||
get_coreset_rballoc(rel15->coreset.frequency_domain_resource,&n_rb,&rb_offset);
|
for (int s=rel15->coreset.StartSymbolIndex; s<(rel15->coreset.StartSymbolIndex+rel15->coreset.duration); s++) {
|
||||||
for (int s=rel15->coreset.StartSymbolIndex; s<(rel15->coreset.StartSymbolIndex+rel15->coreset.duration); s++) {
|
LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n");
|
||||||
LOG_D(PHY,"in nr_pdcch_extract_rbs_single(rxdataF -> rxdataF_ext || dl_ch_estimates -> dl_ch_estimates_ext)\n");
|
|
||||||
|
|
||||||
nr_pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
|
nr_pdcch_extract_rbs_single(common_vars->common_vars_rx_data_per_thread[proc->thread_id].rxdataF,
|
||||||
pdcch_vars->dl_ch_estimates,
|
pdcch_vars->dl_ch_estimates,
|
||||||
pdcch_vars->rxdataF_ext,
|
pdcch_vars->rxdataF_ext,
|
||||||
pdcch_vars->dl_ch_estimates_ext,
|
pdcch_vars->dl_ch_estimates_ext,
|
||||||
s,
|
s,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
rel15->coreset.frequency_domain_resource,
|
rel15->coreset.frequency_domain_resource,
|
||||||
n_rb,
|
n_rb,
|
||||||
rel15->BWPStart);
|
rel15->BWPStart);
|
||||||
|
|
||||||
LOG_D(PHY,"we enter nr_pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, pdcch_vars[eNB_id]->dl_ch_estimates_ext\n",*avgP);
|
LOG_D(PHY,"we enter nr_pdcch_channel_level(avgP=%d) => compute channel level based on ofdm symbol 0, pdcch_vars[eNB_id]->dl_ch_estimates_ext\n",*avgP);
|
||||||
LOG_D(PHY,"in nr_pdcch_channel_level(dl_ch_estimates_ext -> dl_ch_estimates_ext)\n");
|
LOG_D(PHY,"in nr_pdcch_channel_level(dl_ch_estimates_ext -> dl_ch_estimates_ext)\n");
|
||||||
// compute channel level based on ofdm symbol 0
|
// compute channel level based on ofdm symbol 0
|
||||||
nr_pdcch_channel_level(pdcch_vars->dl_ch_estimates_ext,
|
nr_pdcch_channel_level(pdcch_vars->dl_ch_estimates_ext,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
avgP,
|
avgP,
|
||||||
n_rb);
|
n_rb);
|
||||||
avgs = 0;
|
avgs = 0;
|
||||||
|
|
||||||
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++)
|
for (aarx = 0; aarx < frame_parms->nb_antennas_rx; aarx++)
|
||||||
avgs = cmax(avgs, avgP[aarx]);
|
avgs = cmax(avgs, avgP[aarx]);
|
||||||
|
|
||||||
log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx;
|
log2_maxh = (log2_approx(avgs) / 2) + 5; //+frame_parms->nb_antennas_rx;
|
||||||
#ifdef UE_DEBUG_TRACE
|
#ifdef UE_DEBUG_TRACE
|
||||||
LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
|
LOG_D(PHY,"slot %d: pdcch log2_maxh = %d (%d,%d)\n",slot,log2_maxh,avgP[0],avgs);
|
||||||
#endif
|
#endif
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
T(T_UE_PHY_PDCCH_ENERGY, T_INT(0), T_INT(0), T_INT(frame%1024), T_INT(slot),
|
T(T_UE_PHY_PDCCH_ENERGY, T_INT(0), T_INT(0), T_INT(frame%1024), T_INT(slot),
|
||||||
T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3]));
|
T_INT(avgP[0]), T_INT(avgP[1]), T_INT(avgP[2]), T_INT(avgP[3]));
|
||||||
#endif
|
#endif
|
||||||
LOG_D(PHY,"we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n",log2_maxh);
|
LOG_D(PHY,"we enter nr_pdcch_channel_compensation(log2_maxh=%d)\n",log2_maxh);
|
||||||
LOG_D(PHY,"in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n");
|
LOG_D(PHY,"in nr_pdcch_channel_compensation(rxdataF_ext x dl_ch_estimates_ext -> rxdataF_comp)\n");
|
||||||
// compute LLRs for ofdm symbol 0 only
|
// compute LLRs for ofdm symbol 0 only
|
||||||
nr_pdcch_channel_compensation(pdcch_vars->rxdataF_ext,
|
nr_pdcch_channel_compensation(pdcch_vars->rxdataF_ext,
|
||||||
pdcch_vars->dl_ch_estimates_ext,
|
pdcch_vars->dl_ch_estimates_ext,
|
||||||
pdcch_vars->rxdataF_comp,
|
pdcch_vars->rxdataF_comp,
|
||||||
NULL,
|
NULL,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
s,
|
s,
|
||||||
log2_maxh,
|
log2_maxh,
|
||||||
n_rb); // log2_maxh+I0_shift
|
n_rb); // log2_maxh+I0_shift
|
||||||
if (frame_parms->nb_antennas_rx > 1) {
|
if (frame_parms->nb_antennas_rx > 1) {
|
||||||
LOG_D(PHY,"we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx);
|
LOG_D(PHY,"we enter nr_pdcch_detection_mrc(frame_parms->nb_antennas_rx=%d)\n", frame_parms->nb_antennas_rx);
|
||||||
nr_pdcch_detection_mrc(frame_parms, pdcch_vars->rxdataF_comp,s);
|
nr_pdcch_detection_mrc(frame_parms, pdcch_vars->rxdataF_comp,s);
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"we enter nr_pdcch_llr(for symbol %d), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n",s);
|
LOG_D(PHY,"we enter nr_pdcch_llr(for symbol %d), pdcch_vars[eNB_id]->rxdataF_comp ---> pdcch_vars[eNB_id]->llr \n",s);
|
||||||
LOG_D(PHY,"in nr_pdcch_llr(rxdataF_comp -> llr)\n");
|
LOG_D(PHY,"in nr_pdcch_llr(rxdataF_comp -> llr)\n");
|
||||||
nr_pdcch_llr(frame_parms,
|
nr_pdcch_llr(frame_parms,
|
||||||
pdcch_vars->rxdataF_comp,
|
pdcch_vars->rxdataF_comp,
|
||||||
pdcch_vars->llr,
|
pdcch_vars->llr,
|
||||||
s,
|
s,
|
||||||
n_rb);
|
n_rb);
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
|
|
||||||
// T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
|
// T(T_UE_PHY_PDCCH_IQ, T_INT(frame_parms->N_RB_DL), T_INT(frame_parms->N_RB_DL),
|
||||||
// T_INT(n_pdcch_symbols),
|
// T_INT(n_pdcch_symbols),
|
||||||
// T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4));
|
// T_BUFFER(pdcch_vars[eNB_id]->rxdataF_comp, frame_parms->N_RB_DL*12*n_pdcch_symbols* 4));
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef DEBUG_DCI_DECODING
|
#ifdef DEBUG_DCI_DECODING
|
||||||
printf("demapping: slot %d, mi %d\n",slot,get_mi(frame_parms,slot));
|
printf("demapping: slot %d, mi %d\n",slot,get_mi(frame_parms,slot));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_D(PHY,"we enter nr_pdcch_demapping_deinterleaving()\n");
|
LOG_D(PHY,"we enter nr_pdcch_demapping_deinterleaving()\n");
|
||||||
nr_pdcch_demapping_deinterleaving((uint32_t *) pdcch_vars->llr,
|
nr_pdcch_demapping_deinterleaving((uint32_t *) pdcch_vars->llr,
|
||||||
(uint32_t *) pdcch_vars->e_rx,
|
(uint32_t *) pdcch_vars->e_rx,
|
||||||
rel15->coreset.duration,
|
rel15->coreset.duration,
|
||||||
n_rb,
|
n_rb,
|
||||||
rel15->coreset.RegBundleSize,
|
rel15->coreset.RegBundleSize,
|
||||||
rel15->coreset.InterleaverSize,
|
rel15->coreset.InterleaverSize,
|
||||||
rel15->coreset.ShiftIndex,
|
rel15->coreset.ShiftIndex,
|
||||||
rel15->number_of_candidates,
|
rel15->number_of_candidates,
|
||||||
rel15->CCE,
|
rel15->CCE,
|
||||||
rel15->L);
|
rel15->L);
|
||||||
/*
|
/*
|
||||||
nr_pdcch_unscrambling(rel15->rnti,
|
nr_pdcch_unscrambling(rel15->rnti,
|
||||||
frame_parms,
|
frame_parms,
|
||||||
@@ -804,10 +802,9 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
|||||||
// get_nCCE(n_pdcch_symbols, frame_parms, mi) * 72,
|
// get_nCCE(n_pdcch_symbols, frame_parms, mi) * 72,
|
||||||
rel15->coreset.pdcch_dmrs_scrambling_id);
|
rel15->coreset.pdcch_dmrs_scrambling_id);
|
||||||
*/
|
*/
|
||||||
LOG_D(PHY,"we end nr_pdcch_unscrambling()\n");
|
LOG_D(PHY,"we end nr_pdcch_unscrambling()\n");
|
||||||
LOG_D(PHY,"Ending nr_rx_pdcch() function\n");
|
LOG_D(PHY,"Ending nr_rx_pdcch() function\n");
|
||||||
|
|
||||||
}
|
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -876,63 +873,60 @@ void nr_pdcch_unscrambling(int16_t *z,
|
|||||||
#ifdef NR_PDCCH_DCI_RUN
|
#ifdef NR_PDCCH_DCI_RUN
|
||||||
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc,
|
UE_nr_rxtx_proc_t *proc,
|
||||||
fapi_nr_dci_indication_t *dci_ind) {
|
fapi_nr_dci_indication_t *dci_ind,
|
||||||
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15) {
|
||||||
|
|
||||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
||||||
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15;
|
|
||||||
for (int i=0;i<pdcch_vars->nb_search_space;i++) {
|
|
||||||
|
|
||||||
rel15 = &pdcch_vars->pdcch_config[i];
|
//int gNB_id = 0;
|
||||||
//int gNB_id = 0;
|
int16_t tmp_e[16*108];
|
||||||
int16_t tmp_e[16*108];
|
rnti_t n_rnti;
|
||||||
rnti_t n_rnti;
|
|
||||||
|
|
||||||
for (int j=0;j<rel15->number_of_candidates;j++) {
|
for (int j=0;j<rel15->number_of_candidates;j++) {
|
||||||
int CCEind = rel15->CCE[j];
|
int CCEind = rel15->CCE[j];
|
||||||
int L = rel15->L[j];
|
int L = rel15->L[j];
|
||||||
|
|
||||||
// Loop over possible DCI lengths
|
// Loop over possible DCI lengths
|
||||||
for (int k = 0; k < rel15->num_dci_options; k++) {
|
for (int k = 0; k < rel15->num_dci_options; k++) {
|
||||||
int dci_length = rel15->dci_length_options[k];
|
int dci_length = rel15->dci_length_options[k];
|
||||||
uint64_t dci_estimation[2]= {0};
|
uint64_t dci_estimation[2]= {0};
|
||||||
const t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList);
|
const t_nrPolar_params *currentPtrDCI = nr_polar_params(NR_POLAR_DCI_MESSAGE_TYPE, dci_length, L, 1, &ue->polarList);
|
||||||
|
|
||||||
LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L);
|
LOG_D(PHY, "Trying DCI candidate %d of %d number of candidates, CCE %d (%d), L %d\n", j, rel15->number_of_candidates, CCEind, CCEind*9*6*2, L);
|
||||||
|
|
||||||
nr_pdcch_unscrambling(&pdcch_vars->e_rx[CCEind*108], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e);
|
nr_pdcch_unscrambling(&pdcch_vars->e_rx[CCEind*108], rel15->coreset.scrambling_rnti, L*108, rel15->coreset.pdcch_dmrs_scrambling_id, tmp_e);
|
||||||
|
|
||||||
#ifdef DEBUG_DCI_DECODING
|
#ifdef DEBUG_DCI_DECODING
|
||||||
uint32_t * z = (uint32_t *) &pdcch_vars->e_rx[CCEind*108];
|
uint32_t * z = (uint32_t *) &pdcch_vars->e_rx[CCEind*108];
|
||||||
for (int index_z = 0; index_z < 96; index_z++){
|
for (int index_z = 0; index_z < 96; index_z++){
|
||||||
for (int i=0; i<9; i++) {
|
for (int i=0; i<9; i++) {
|
||||||
LOG_D(PHY,"z[%d]=(%d,%d) \n", (9*index_z + i), *(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]));
|
LOG_D(PHY,"z[%d]=(%d,%d) \n", (9*index_z + i), *(int16_t *) &z[index_z + i],*(1 + (int16_t *) &z[index_z + i]));
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
uint16_t crc = polar_decoder_int16(tmp_e,
|
|
||||||
dci_estimation,
|
|
||||||
1,
|
|
||||||
currentPtrDCI);
|
|
||||||
|
|
||||||
n_rnti = rel15->rnti;
|
|
||||||
|
|
||||||
if (crc == n_rnti) {
|
|
||||||
LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n",
|
|
||||||
proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
|
|
||||||
dci_ind->SFN = proc->frame_rx;
|
|
||||||
dci_ind->slot = proc->nr_slot_rx;
|
|
||||||
dci_ind->dci_list[dci_ind->number_of_dcis].rnti = n_rnti;
|
|
||||||
dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE = CCEind;
|
|
||||||
dci_ind->dci_list[dci_ind->number_of_dcis].dci_format = rel15->dci_format_options[k];
|
|
||||||
dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
|
|
||||||
memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
|
|
||||||
dci_ind->number_of_dcis++;
|
|
||||||
break; // If DCI is found, no need to check for remaining DCI lengths
|
|
||||||
} else {
|
|
||||||
LOG_D(PHY,"(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", proc->frame_rx, proc->nr_slot_rx, crc, n_rnti, rel15->dci_format_options[k]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
uint16_t crc = polar_decoder_int16(tmp_e,
|
||||||
|
dci_estimation,
|
||||||
|
1,
|
||||||
|
currentPtrDCI);
|
||||||
|
|
||||||
|
n_rnti = rel15->rnti;
|
||||||
|
|
||||||
|
if (crc == n_rnti) {
|
||||||
|
LOG_D(PHY, "(%i.%i) Received dci indication (rnti %x,dci format %d,n_CCE %d,payloadSize %d,payload %llx)\n",
|
||||||
|
proc->frame_rx, proc->nr_slot_rx,n_rnti,rel15->dci_format_options[k],CCEind,dci_length,*(unsigned long long*)dci_estimation);
|
||||||
|
dci_ind->SFN = proc->frame_rx;
|
||||||
|
dci_ind->slot = proc->nr_slot_rx;
|
||||||
|
dci_ind->dci_list[dci_ind->number_of_dcis].rnti = n_rnti;
|
||||||
|
dci_ind->dci_list[dci_ind->number_of_dcis].n_CCE = CCEind;
|
||||||
|
dci_ind->dci_list[dci_ind->number_of_dcis].dci_format = rel15->dci_format_options[k];
|
||||||
|
dci_ind->dci_list[dci_ind->number_of_dcis].payloadSize = dci_length;
|
||||||
|
memcpy((void*)dci_ind->dci_list[dci_ind->number_of_dcis].payloadBits,(void*)dci_estimation,8);
|
||||||
|
dci_ind->number_of_dcis++;
|
||||||
|
break; // If DCI is found, no need to check for remaining DCI lengths
|
||||||
|
} else {
|
||||||
|
LOG_D(PHY,"(%i.%i) Decoded crc %x does not match rnti %x for DCI format %d\n", proc->frame_rx, proc->nr_slot_rx, crc, n_rnti, rel15->dci_format_options[k]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(dci_ind->number_of_dcis);
|
return(dci_ind->number_of_dcis);
|
||||||
|
|||||||
@@ -483,31 +483,34 @@ int nr_initial_sync(UE_nr_rxtx_proc_t *proc, PHY_VARS_NR_UE *ue, int n_frames, i
|
|||||||
if (sa==1 && ret==0) {
|
if (sa==1 && ret==0) {
|
||||||
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][0];
|
||||||
uint8_t nb_symb_pdcch = pdcch_vars->nb_search_space > 0 ? pdcch_vars->pdcch_config[0].coreset.duration : 0;
|
uint8_t nb_symb_pdcch = pdcch_vars->nb_search_space > 0 ? pdcch_vars->pdcch_config[0].coreset.duration : 0;
|
||||||
|
|
||||||
int coreset_nb_rb=0;
|
int coreset_nb_rb=0;
|
||||||
int coreset_start_rb=0;
|
int coreset_start_rb=0;
|
||||||
|
|
||||||
if (pdcch_vars->nb_search_space > 0)
|
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
|
||||||
get_coreset_rballoc(pdcch_vars->pdcch_config[0].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
get_coreset_rballoc(pdcch_vars->pdcch_config[n_ss].coreset.frequency_domain_resource,&coreset_nb_rb,&coreset_start_rb);
|
||||||
|
|
||||||
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||||
nr_slot_fep_init_sync(ue,
|
nr_slot_fep_init_sync(ue,
|
||||||
proc,
|
proc,
|
||||||
l, // the UE PHY has no notion of the symbols to be monitored in the search space
|
l, // the UE PHY has no notion of the symbols to be monitored in the search space
|
||||||
pdcch_vars->slot,
|
pdcch_vars->slot,
|
||||||
pdcch_vars->sfn*fp->samples_per_frame+ue->rx_offset);
|
pdcch_vars->sfn*fp->samples_per_frame+ue->rx_offset);
|
||||||
|
|
||||||
if (coreset_nb_rb > 0)
|
if (coreset_nb_rb > 0)
|
||||||
nr_pdcch_channel_estimation(ue,
|
nr_pdcch_channel_estimation(ue,
|
||||||
proc,
|
proc,
|
||||||
0,
|
0,
|
||||||
pdcch_vars->slot,
|
pdcch_vars->slot,
|
||||||
l,
|
l,
|
||||||
fp->first_carrier_offset+(pdcch_vars->pdcch_config[0].BWPStart + coreset_start_rb)*12,
|
fp->first_carrier_offset+(pdcch_vars->pdcch_config[n_ss].BWPStart + coreset_start_rb)*12,
|
||||||
coreset_nb_rb);
|
coreset_nb_rb);
|
||||||
|
|
||||||
|
}
|
||||||
|
int dci_cnt = nr_ue_pdcch_procedures(0, ue, proc, n_ss); //gNB_id set to 0
|
||||||
|
if (dci_cnt>0){
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int dci_cnt = nr_ue_pdcch_procedures(0, ue, proc); //gNB_id set to 0
|
|
||||||
}
|
}
|
||||||
// exit_fun("debug exit");
|
// exit_fun("debug exit");
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_NR_INITIAL_UE_SYNC, VCD_FUNCTION_OUT);
|
||||||
|
|||||||
@@ -1120,7 +1120,8 @@ uint32_t dlsch_decoding_emul(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
uint8_t eNB_id);
|
uint8_t eNB_id);
|
||||||
|
|
||||||
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc);
|
UE_nr_rxtx_proc_t *proc,
|
||||||
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15);
|
||||||
|
|
||||||
|
|
||||||
/*! \brief Extract PSS and SSS resource elements
|
/*! \brief Extract PSS and SSS resource elements
|
||||||
@@ -1709,7 +1710,8 @@ uint32_t lte_gold_generic(uint32_t *x1, uint32_t *x2, uint8_t reset);
|
|||||||
|
|
||||||
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc,
|
UE_nr_rxtx_proc_t *proc,
|
||||||
fapi_nr_dci_indication_t *dci_ind);
|
fapi_nr_dci_indication_t *dci_ind,
|
||||||
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15);
|
||||||
|
|
||||||
|
|
||||||
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel estimation. It performs
|
/** \brief This function is the top-level entry point to PDSCH demodulation, after frequency-domain transformation and channel estimation. It performs
|
||||||
|
|||||||
@@ -418,7 +418,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
|||||||
|
|
||||||
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||||
PHY_VARS_NR_UE *ue,
|
PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc);
|
UE_nr_rxtx_proc_t *proc,
|
||||||
|
int n_ss);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -477,7 +477,8 @@ unsigned int nr_get_tx_amp(int power_dBm, int power_max_dBm, int N_RB_UL, int nb
|
|||||||
|
|
||||||
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
||||||
PHY_VARS_NR_UE *ue,
|
PHY_VARS_NR_UE *ue,
|
||||||
UE_nr_rxtx_proc_t *proc)
|
UE_nr_rxtx_proc_t *proc,
|
||||||
|
int n_ss)
|
||||||
{
|
{
|
||||||
int frame_rx = proc->frame_rx;
|
int frame_rx = proc->frame_rx;
|
||||||
int nr_slot_rx = proc->nr_slot_rx;
|
int nr_slot_rx = proc->nr_slot_rx;
|
||||||
@@ -485,6 +486,9 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
|||||||
fapi_nr_dci_indication_t dci_ind = {0};
|
fapi_nr_dci_indication_t dci_ind = {0};
|
||||||
nr_downlink_indication_t dl_indication;
|
nr_downlink_indication_t dl_indication;
|
||||||
|
|
||||||
|
NR_UE_PDCCH *pdcch_vars = ue->pdcch_vars[proc->thread_id][gNB_id];
|
||||||
|
fapi_nr_dl_config_dci_dl_pdu_rel15_t *rel15 = &pdcch_vars->pdcch_config[n_ss];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
// unsigned int dci_cnt=0, i; //removed for nr_ue_pdcch_procedures and added in the loop for nb_coreset_active
|
// unsigned int dci_cnt=0, i; //removed for nr_ue_pdcch_procedures and added in the loop for nb_coreset_active
|
||||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||||
@@ -669,18 +673,18 @@ int nr_ue_pdcch_procedures(uint8_t gNB_id,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_IN);
|
||||||
nr_rx_pdcch(ue, proc);
|
nr_rx_pdcch(ue, proc, rel15);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_RX_PDCCH, VCD_FUNCTION_OUT);
|
||||||
|
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DCI_DECODING, VCD_FUNCTION_IN);
|
||||||
|
|
||||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||||
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_dci_decoding_procedure with (nb_searchspace_active=%d)\n",
|
printf("<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Entering function nr_dci_decoding_procedure for search space %d)\n",
|
||||||
pdcch_vars->nb_search_space);
|
n_ss);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dci_cnt = nr_dci_decoding_procedure(ue, proc, &dci_ind);
|
dci_cnt = nr_dci_decoding_procedure(ue, proc, &dci_ind, rel15);
|
||||||
|
|
||||||
#ifdef NR_PDCCH_SCHED_DEBUG
|
#ifdef NR_PDCCH_SCHED_DEBUG
|
||||||
LOG_I(PHY,"<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%u\n",dci_cnt);
|
LOG_I(PHY,"<-NR_PDCCH_PHY_PROCEDURES_LTE_UE (nr_ue_pdcch_procedures)-> Ending function nr_dci_decoding_procedure() -> dci_cnt=%u\n",dci_cnt);
|
||||||
@@ -1708,10 +1712,11 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
proc,
|
proc,
|
||||||
l,
|
l,
|
||||||
nr_slot_rx);
|
nr_slot_rx);
|
||||||
|
}
|
||||||
|
|
||||||
dci_cnt = 0;
|
dci_cnt = 0;
|
||||||
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
|
for(int n_ss = 0; n_ss<pdcch_vars->nb_search_space; n_ss++) {
|
||||||
|
for (uint16_t l=0; l<nb_symb_pdcch; l++) {
|
||||||
// note: this only works if RBs for PDCCH are contigous!
|
// note: this only works if RBs for PDCCH are contigous!
|
||||||
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d\n",
|
LOG_D(PHY, "pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d\n",
|
||||||
fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb);
|
fp->first_carrier_offset, pdcch_vars->pdcch_config[n_ss].BWPStart, coreset_start_rb);
|
||||||
@@ -1728,9 +1733,8 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
#if UE_TIMING_TRACE
|
#if UE_TIMING_TRACE
|
||||||
stop_meas(&ue->ofdm_demod_stats);
|
stop_meas(&ue->ofdm_demod_stats);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc);
|
|
||||||
}
|
}
|
||||||
|
dci_cnt = dci_cnt + nr_ue_pdcch_procedures(gNB_id, ue, proc, n_ss);
|
||||||
}
|
}
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_UE_SLOT_FEP_PDCCH, VCD_FUNCTION_OUT);
|
||||||
|
|
||||||
|
|||||||
@@ -490,7 +490,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
|||||||
RA_config_t *ra = &mac->ra;
|
RA_config_t *ra = &mac->ra;
|
||||||
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
fapi_nr_dl_config_request_t *dl_config = &mac->dl_config_request;
|
||||||
uint8_t is_Msg3 = 0;
|
uint8_t is_Msg3 = 0;
|
||||||
printf("%p\n",mac->scg);
|
|
||||||
uint16_t n_RB_DLBWP = (mac->scg) ?
|
uint16_t n_RB_DLBWP = (mac->scg) ?
|
||||||
NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) :
|
NRRIV2BW(mac->DLbwp[0]->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE) :
|
||||||
mac->type0_PDCCH_CSS_config.num_rbs;
|
mac->type0_PDCCH_CSS_config.num_rbs;
|
||||||
|
|||||||
Reference in New Issue
Block a user