new attempt to fix cdm both for sa and mimo
This commit is contained in:
@@ -455,9 +455,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
|||||||
int rbStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
int rbStart = NRRIV2PRBOFFSET(genericParameters->locationAndBandwidth, MAX_BWP_SIZE);
|
||||||
|
|
||||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||||
const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
|
const long f = sched_ctrl->active_bwp ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
|
||||||
const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? (f ? 1 : (ps->nrOfSymbols == 2 ? 1 : 2)) : (ps->nrOfSymbols == 2 ? 1 : 2);
|
|
||||||
|
|
||||||
int rbSize = 0;
|
int rbSize = 0;
|
||||||
const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
|
const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
|
||||||
if (tda == retInfo->time_domain_allocation) {
|
if (tda == retInfo->time_domain_allocation) {
|
||||||
@@ -476,9 +474,8 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
|||||||
}
|
}
|
||||||
/* check whether we need to switch the TDA allocation since the last
|
/* check whether we need to switch the TDA allocation since the last
|
||||||
* (re-)transmission */
|
* (re-)transmission */
|
||||||
if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data)
|
if (ps->time_domain_allocation != tda)
|
||||||
nr_set_pdsch_semi_static(
|
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, f, ps);
|
||||||
scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
|
|
||||||
} else {
|
} else {
|
||||||
/* the retransmission will use a different time domain allocation, check
|
/* the retransmission will use a different time domain allocation, check
|
||||||
* that we have enough resources */
|
* that we have enough resources */
|
||||||
@@ -488,7 +485,7 @@ bool allocate_dl_retransmission(module_id_t module_id,
|
|||||||
rbSize++;
|
rbSize++;
|
||||||
NR_pdsch_semi_static_t temp_ps;
|
NR_pdsch_semi_static_t temp_ps;
|
||||||
temp_ps.nrOfLayers = 1;
|
temp_ps.nrOfLayers = 1;
|
||||||
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, &temp_ps);
|
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, f, &temp_ps);
|
||||||
uint32_t new_tbs;
|
uint32_t new_tbs;
|
||||||
uint16_t new_rbSize;
|
uint16_t new_rbSize;
|
||||||
bool success = nr_find_nb_rb(retInfo->Qm,
|
bool success = nr_find_nb_rb(retInfo->Qm,
|
||||||
@@ -683,11 +680,9 @@ void pf_dl(module_id_t module_id,
|
|||||||
const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
|
const int tda = sched_ctrl->active_bwp ? RC.nrmac[module_id]->preferred_dl_tda[sched_ctrl->active_bwp->bwp_Id][slot] : 1;
|
||||||
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
NR_sched_pdsch_t *sched_pdsch = &sched_ctrl->sched_pdsch;
|
||||||
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
NR_pdsch_semi_static_t *ps = &sched_ctrl->pdsch_semi_static;
|
||||||
const long f = sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats;
|
const long f = sched_ctrl->active_bwp ? sched_ctrl->search_space->searchSpaceType->choice.ue_Specific->dci_Formats : 0;
|
||||||
const uint8_t num_dmrs_cdm_grps_no_data = sched_ctrl->active_bwp ? (f ? 1 : (ps->nrOfSymbols == 2 ? 1 : 2)) : (ps->nrOfSymbols == 2 ? 1 : 2);
|
if (ps->time_domain_allocation != tda)
|
||||||
if (ps->time_domain_allocation != tda || ps->numDmrsCdmGrpsNoData != num_dmrs_cdm_grps_no_data)
|
nr_set_pdsch_semi_static(scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, f, ps);
|
||||||
nr_set_pdsch_semi_static(
|
|
||||||
scc, UE_info->CellGroup[UE_id], sched_ctrl->active_bwp, tda, num_dmrs_cdm_grps_no_data, ps);
|
|
||||||
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
sched_pdsch->Qm = nr_get_Qm_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
||||||
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
sched_pdsch->R = nr_get_code_rate_dl(sched_pdsch->mcs, ps->mcsTableIdx);
|
||||||
sched_pdsch->pucch_allocation = alloc;
|
sched_pdsch->pucch_allocation = alloc;
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
const NR_CellGroupConfig_t *secondaryCellGroup,
|
const NR_CellGroupConfig_t *secondaryCellGroup,
|
||||||
const NR_BWP_Downlink_t *bwp,
|
const NR_BWP_Downlink_t *bwp,
|
||||||
int tda,
|
int tda,
|
||||||
uint8_t num_dmrs_cdm_grps_no_data,
|
const long dci_format,
|
||||||
NR_pdsch_semi_static_t *ps)
|
NR_pdsch_semi_static_t *ps)
|
||||||
{
|
{
|
||||||
ps->time_domain_allocation = tda;
|
ps->time_domain_allocation = tda;
|
||||||
@@ -325,12 +325,13 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
}
|
}
|
||||||
else ps->mcsTableIdx = 0;
|
else ps->mcsTableIdx = 0;
|
||||||
|
|
||||||
set_dl_dmrs_ports(ps);
|
if(dci_format == 0) // format 1_0
|
||||||
|
ps->numDmrsCdmGrpsNoData = (ps->nrOfSymbols == 2 ? 1 : 2);
|
||||||
|
else
|
||||||
|
set_dl_dmrs_ports(ps);
|
||||||
ps->dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
|
ps->dmrsConfigType = bwp!=NULL ? (bwp->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
|
||||||
|
|
||||||
// if no data in dmrs cdm group is 1 only even REs have no data
|
ps->N_PRB_DMRS = ps->numDmrsCdmGrpsNoData * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
||||||
// if no data in dmrs cdm group is 2 both odd and even REs have no data
|
|
||||||
ps->N_PRB_DMRS = num_dmrs_cdm_grps_no_data * (ps->dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
|
||||||
ps->dl_dmrs_symb_pos = fill_dmrs_mask(bwp ? bwp->bwp_Dedicated->pdsch_Config->choice.setup : NULL, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex, mapping_type);
|
ps->dl_dmrs_symb_pos = fill_dmrs_mask(bwp ? bwp->bwp_Dedicated->pdsch_Config->choice.setup : NULL, scc->dmrs_TypeA_Position, ps->nrOfSymbols, ps->startSymbolIndex, mapping_type);
|
||||||
ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos);
|
ps->N_DMRS_SLOT = get_num_dmrs(ps->dl_dmrs_symb_pos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ void nr_set_pdsch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
const NR_CellGroupConfig_t *secondaryCellGroup,
|
const NR_CellGroupConfig_t *secondaryCellGroup,
|
||||||
const NR_BWP_Downlink_t *bwp,
|
const NR_BWP_Downlink_t *bwp,
|
||||||
int tda,
|
int tda,
|
||||||
uint8_t num_dmrs_cdm_grps_no_data,
|
const long dci_format,
|
||||||
NR_pdsch_semi_static_t *ps);
|
NR_pdsch_semi_static_t *ps);
|
||||||
|
|
||||||
void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
void nr_set_pusch_semi_static(const NR_ServingCellConfigCommon_t *scc,
|
||||||
|
|||||||
Reference in New Issue
Block a user