Fixing PRS resource repetition handling
This commit is contained in:
@@ -52,6 +52,7 @@ static inline int abs32(int x)
|
||||
|
||||
int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
uint8_t rsc_id,
|
||||
uint8_t rep_num,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
NR_DL_FRAME_PARMS *frame_params)
|
||||
@@ -62,8 +63,8 @@ int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
int32_t **prs_chestF = ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_ch_estimates;
|
||||
int32_t **prs_chestT = ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_ch_estimates_time;
|
||||
int slot_prs;
|
||||
if(prs_cfg->PRSResourceRepetition > 1)
|
||||
slot_prs = proc->nr_slot_rx - prs_cfg->PRSResourceTimeGap;
|
||||
if(rep_num > 0)
|
||||
slot_prs = (proc->nr_slot_rx - prs_cfg->PRSResourceTimeGap)%frame_params->slots_per_frame;
|
||||
else
|
||||
slot_prs = proc->nr_slot_rx;
|
||||
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
/* A function to perform the channel estimation of DL PRS signal */
|
||||
int nr_prs_channel_estimation(uint8_t gNB_id,
|
||||
uint8_t rsc_id,
|
||||
uint8_t rep_num,
|
||||
PHY_VARS_NR_UE *ue,
|
||||
UE_nr_rxtx_proc_t *proc,
|
||||
NR_DL_FRAME_PARMS *frame_params);
|
||||
|
||||
@@ -147,14 +147,14 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
||||
{
|
||||
for (int i = 0; i < gNB->prs_vars.prs_cfg[rsc_id].PRSResourceRepetition; i++)
|
||||
{
|
||||
if( (((frame*fp->slots_per_frame + slot) - (gNB->prs_vars.prs_cfg[rsc_id].PRSResourceSetPeriod[1] + gNB->prs_vars.prs_cfg[rsc_id].PRSResourceOffset))%gNB->prs_vars.prs_cfg[rsc_id].PRSResourceSetPeriod[0]) == i*gNB->prs_vars.prs_cfg[rsc_id].PRSResourceTimeGap )
|
||||
if( (((frame*fp->slots_per_frame + slot) - (gNB->prs_vars.prs_cfg[rsc_id].PRSResourceSetPeriod[1] + gNB->prs_vars.prs_cfg[rsc_id].PRSResourceOffset)+gNB->prs_vars.prs_cfg[rsc_id].PRSResourceSetPeriod[0])%gNB->prs_vars.prs_cfg[rsc_id].PRSResourceSetPeriod[0]) == i*gNB->prs_vars.prs_cfg[rsc_id].PRSResourceTimeGap )
|
||||
{
|
||||
if (gNB->prs_vars.prs_cfg[rsc_id].PRSResourceRepetition > 1)
|
||||
slot_prs = slot - gNB->prs_vars.prs_cfg[rsc_id].PRSResourceTimeGap;
|
||||
if (i > 0)
|
||||
slot_prs = (slot - gNB->prs_vars.prs_cfg[rsc_id].PRSResourceTimeGap + fp->slots_per_frame)%fp->slots_per_frame;
|
||||
else
|
||||
slot_prs = slot;
|
||||
|
||||
LOG_D(PHY,"gNB_TX: frame %d, slot %d, PRS Resource ID %d\n",frame, slot, rsc_id);
|
||||
LOG_D(PHY,"gNB_TX: frame %d, slot %d, slot_prs %d, PRS Resource ID %d\n",frame, slot, slot_prs, rsc_id);
|
||||
nr_generate_prs(gNB->nr_gold_prs[rsc_id][slot_prs],&gNB->common_vars.txdataF[0][txdataF_offset], AMP, &gNB->prs_vars.prs_cfg[rsc_id], cfg, fp);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1387,7 +1387,6 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
int slot_pbch;
|
||||
int slot_ssb;
|
||||
fapi_nr_config_request_t *cfg = &ue->nrUE_config;
|
||||
int num_prs = 0;
|
||||
|
||||
uint8_t nb_symb_pdcch = phy_pdcch_config->nb_search_space > 0 ? phy_pdcch_config->pdcch_config[0].coreset.duration : 0;
|
||||
uint8_t dci_cnt = 0;
|
||||
@@ -1470,15 +1469,14 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
||||
{
|
||||
if( (((frame_rx*fp->slots_per_frame + nr_slot_rx) - (ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.PRSResourceSetPeriod[1] + ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.PRSResourceOffset))%ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.PRSResourceSetPeriod[0]) == i*ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.PRSResourceTimeGap)
|
||||
{
|
||||
for(int j = ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.SymbolStart; (j < (ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.SymbolStart+ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.NumPRSSymbols)); j++)
|
||||
for(int j = ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.SymbolStart; j < (ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.SymbolStart+ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.NumPRSSymbols); j++)
|
||||
{
|
||||
nr_slot_fep(ue,
|
||||
proc,
|
||||
(j%fp->symbols_per_slot),
|
||||
nr_slot_rx);
|
||||
}
|
||||
nr_prs_channel_estimation(gNB_id,rsc_id,ue,proc,fp);
|
||||
num_prs++;
|
||||
nr_prs_channel_estimation(gNB_id,rsc_id,i,ue,proc,fp);
|
||||
}
|
||||
} // for i
|
||||
} // for rsc_id
|
||||
|
||||
Reference in New Issue
Block a user