NR PRS scheduling for generalised slot periodicity
This commit is contained in:
@@ -63,12 +63,12 @@ void nr_set_ssb_first_subcarrier(nfapi_nr_config_request_scf_t *cfg, NR_DL_FRAME
|
|||||||
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier,cfg->ssb_table.ssb_offset_point_a.value,sco);
|
LOG_D(PHY, "SSB first subcarrier %d (%d,%d)\n", fp->ssb_start_subcarrier,cfg->ssb_table.ssb_offset_point_a.value,sco);
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t check_prs_slot_gNB(uint8_t *prs_rsc_id, NR_gNB_PRS *prs_vars, int nr_slot_tx)
|
uint8_t check_prs_slot_gNB(uint8_t *prs_rsc_id, NR_gNB_PRS *prs_vars, NR_DL_FRAME_PARMS *fp, int frame_tx, int nr_slot_tx)
|
||||||
{
|
{
|
||||||
uint8_t is_prs_slot = 0, rsc_id = 0;
|
uint8_t is_prs_slot = 0, rsc_id = 0;
|
||||||
for(rsc_id = 0; rsc_id < prs_vars->NumPRSResources; rsc_id++)
|
for(rsc_id = 0; rsc_id < prs_vars->NumPRSResources; rsc_id++)
|
||||||
{
|
{
|
||||||
if((prs_vars->prs_cfg[rsc_id].PRSResourceSetPeriod[1] + prs_vars->prs_cfg[rsc_id].PRSResourceOffset) == nr_slot_tx)
|
if((prs_vars->prs_cfg[rsc_id].PRSResourceSetPeriod[1] + prs_vars->prs_cfg[rsc_id].PRSResourceOffset) == ((frame_tx*fp->slots_per_frame+nr_slot_tx)%prs_vars->prs_cfg[rsc_id].PRSResourceSetPeriod[0]))
|
||||||
{
|
{
|
||||||
is_prs_slot = 1;
|
is_prs_slot = 1;
|
||||||
*prs_rsc_id = rsc_id;
|
*prs_rsc_id = rsc_id;
|
||||||
@@ -159,10 +159,10 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for PRS slot
|
// Check for PRS slot
|
||||||
is_prs_slot = check_prs_slot_gNB(&rsc_id, &gNB->prs_vars, slot);
|
is_prs_slot = check_prs_slot_gNB(&rsc_id, &gNB->prs_vars, fp, frame, slot);
|
||||||
if(is_prs_slot)
|
if(is_prs_slot)
|
||||||
{
|
{
|
||||||
LOG_D(PHY,"gNB_TX: frame %d, slot %d, slots_per_frame %d, PRS Resource ID %d\n",frame,slot, fp->slots_per_frame, rsc_id);
|
LOG_D(PHY,"gNB_TX: frame %d, slot %d, PRS Resource ID %d\n",frame, slot, rsc_id);
|
||||||
nr_generate_prs(gNB->nr_gold_prs[slot],&gNB->common_vars.txdataF[0][txdataF_offset], AMP, &gNB->prs_vars.prs_cfg[rsc_id], cfg, fp);
|
nr_generate_prs(gNB->nr_gold_prs[slot],&gNB->common_vars.txdataF[0][txdataF_offset], AMP, &gNB->prs_vars.prs_cfg[rsc_id], cfg, fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ void nr_fep_full(RU_t *ru, int slot);
|
|||||||
void nr_fep_full_2thread(RU_t *ru, int slot);
|
void nr_fep_full_2thread(RU_t *ru, int slot);
|
||||||
void feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
|
void feptx_prec(RU_t *ru,int frame_tx,int tti_tx);
|
||||||
int nr_phy_init_RU(RU_t *ru);
|
int nr_phy_init_RU(RU_t *ru);
|
||||||
uint8_t check_prs_slot_gNB(uint8_t *prs_rsc_id, NR_gNB_PRS *prs_vars, int nr_slot_tx);
|
uint8_t check_prs_slot_gNB(uint8_t *prs_rsc_id, NR_gNB_PRS *prs_vars, NR_DL_FRAME_PARMS *fp, int frame_tx, int nr_slot_tx);
|
||||||
void nr_phy_free_RU(RU_t *ru);
|
void nr_phy_free_RU(RU_t *ru);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -373,7 +373,7 @@ int get_tx_harq_id(NR_UE_ULSCH_t *ulsch, int slot_tx);
|
|||||||
|
|
||||||
int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
||||||
int is_ssb_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
int is_ssb_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL_FRAME_PARMS *fp);
|
||||||
uint8_t check_prs_slot_nrUE(PHY_VARS_NR_UE *ue, uint8_t *prs_gNB_id, uint8_t *prs_rsc_id, int nr_slot_rx);
|
uint8_t check_prs_slot_nrUE(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *fp, uint8_t *prs_gNB_id, uint8_t *prs_rsc_id, int frame_rx, int nr_slot_rx);
|
||||||
|
|
||||||
/*! \brief This function prepares the dl indication to pass to the MAC
|
/*! \brief This function prepares the dl indication to pass to the MAC
|
||||||
@param
|
@param
|
||||||
|
|||||||
@@ -1374,14 +1374,15 @@ int is_pbch_in_slot(fapi_nr_config_request_t *config, int frame, int slot, NR_DL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t check_prs_slot_nrUE(PHY_VARS_NR_UE *ue, uint8_t *prs_gNB_id, uint8_t *prs_rsc_id, int nr_slot_rx)
|
uint8_t check_prs_slot_nrUE(PHY_VARS_NR_UE *ue, NR_DL_FRAME_PARMS *fp, uint8_t *prs_gNB_id, uint8_t *prs_rsc_id, int frame_rx, int nr_slot_rx)
|
||||||
{
|
{
|
||||||
uint8_t is_prs_slot = 0, rsc_id = 0, gNB_id = 0;
|
uint8_t is_prs_slot = 0, rsc_id = 0, gNB_id = 0;
|
||||||
for(gNB_id = 0; gNB_id < ue->prs_active_gNBs; gNB_id++)
|
for(gNB_id = 0; gNB_id < ue->prs_active_gNBs; gNB_id++)
|
||||||
{
|
{
|
||||||
for(rsc_id = 0; rsc_id < ue->prs_vars[gNB_id]->NumPRSResources; rsc_id++)
|
for(rsc_id = 0; rsc_id < ue->prs_vars[gNB_id]->NumPRSResources; rsc_id++)
|
||||||
{
|
{
|
||||||
if((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) == nr_slot_rx)
|
if((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) ==
|
||||||
|
((frame_rx*fp->slots_per_frame + nr_slot_rx)%ue->prs_vars[gNB_id]->prs_resource[rsc_id].prs_cfg.PRSResourceSetPeriod[0]))
|
||||||
{
|
{
|
||||||
is_prs_slot = 1;
|
is_prs_slot = 1;
|
||||||
*prs_rsc_id = rsc_id;
|
*prs_rsc_id = rsc_id;
|
||||||
@@ -1481,7 +1482,7 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check for PRS slot
|
// Check for PRS slot
|
||||||
is_prs_slot = check_prs_slot_nrUE(ue, &prs_gNB_id, &rsc_id, nr_slot_rx);
|
is_prs_slot = check_prs_slot_nrUE(ue, fp, &prs_gNB_id, &rsc_id, frame_rx, nr_slot_rx);
|
||||||
if (is_prs_slot)
|
if (is_prs_slot)
|
||||||
{
|
{
|
||||||
for(int j = ue->prs_start_symb; j < ue->prs_end_symb; j++)
|
for(int j = ue->prs_start_symb; j < ue->prs_end_symb; j++)
|
||||||
|
|||||||
Reference in New Issue
Block a user