adding a check for dci format in fill_dmrs_mask
This commit is contained in:
@@ -3645,7 +3645,14 @@ int is_nr_UL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon, sl
|
|||||||
else return(slot_in_period >= slots1+tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0);
|
else return(slot_in_period >= slots1+tdd_UL_DL_ConfigurationCommon->pattern2->nrofDownlinkSlots ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols, int startSymbol, mappingType_t mappingtype, int length) {
|
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,
|
||||||
|
int dci_format,
|
||||||
|
int dmrs_TypeA_Position,
|
||||||
|
int NrOfSymbols,
|
||||||
|
int startSymbol,
|
||||||
|
mappingType_t mappingtype,
|
||||||
|
int length)
|
||||||
|
{
|
||||||
|
|
||||||
int dmrs_AdditionalPosition = 0;
|
int dmrs_AdditionalPosition = 0;
|
||||||
NR_DMRS_DownlinkConfig_t *dmrs_config = NULL;
|
NR_DMRS_DownlinkConfig_t *dmrs_config = NULL;
|
||||||
@@ -3654,8 +3661,8 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Posi
|
|||||||
|
|
||||||
int l0 = 0; // type B
|
int l0 = 0; // type B
|
||||||
if (mappingtype == typeA) {
|
if (mappingtype == typeA) {
|
||||||
if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0=2;
|
if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos2) l0 = 2;
|
||||||
else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0=3;
|
else if (dmrs_TypeA_Position == NR_ServingCellConfigCommon__dmrs_TypeA_Position_pos3) l0 = 3;
|
||||||
else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position);
|
else AssertFatal(1==0,"Illegal dmrs_TypeA_Position %d\n",(int)dmrs_TypeA_Position);
|
||||||
}
|
}
|
||||||
// in case of DCI FORMAT 1_0 or dedicated pdsch config not received additionposition = pos2, len1 should be used
|
// in case of DCI FORMAT 1_0 or dedicated pdsch config not received additionposition = pos2, len1 should be used
|
||||||
@@ -3664,7 +3671,8 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Posi
|
|||||||
|
|
||||||
if (pdsch_Config != NULL) {
|
if (pdsch_Config != NULL) {
|
||||||
if (mappingtype == typeA) { // Type A
|
if (mappingtype == typeA) { // Type A
|
||||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
if (dci_format != NR_DL_DCI_FORMAT_1_0 &&
|
||||||
|
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
||||||
dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup;
|
dmrs_config = (NR_DMRS_DownlinkConfig_t *)pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup;
|
||||||
} else if (mappingtype == typeB) {
|
} else if (mappingtype == typeB) {
|
||||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB && pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->present == NR_SetupRelease_DMRS_DownlinkConfig_PR_setup)
|
||||||
@@ -3673,10 +3681,9 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Posi
|
|||||||
AssertFatal(1==0,"Incorrect Mappingtype\n");
|
AssertFatal(1==0,"Incorrect Mappingtype\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
AssertFatal(dmrs_config != NULL," DMRS configs not present in PDSCH DMRS Downlink config\n");
|
|
||||||
|
|
||||||
// default values of additionalposition is pos2
|
// default values of additionalposition is pos2
|
||||||
if (dmrs_config->dmrs_AdditionalPosition != NULL) dmrs_AdditionalPosition = *dmrs_config->dmrs_AdditionalPosition;
|
if (dmrs_config && dmrs_config->dmrs_AdditionalPosition != NULL)
|
||||||
|
dmrs_AdditionalPosition = *dmrs_config->dmrs_AdditionalPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t ld, row, column;
|
uint8_t ld, row, column;
|
||||||
@@ -3730,7 +3737,7 @@ int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Posi
|
|||||||
uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int ss_type)
|
uint8_t get_pdsch_mcs_table(long *mcs_Table, int dci_format, int rnti_type, int ss_type)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Set downlink MCS table (Semi-persistend scheduling ignored for now)
|
// Set downlink MCS table (Semi-persistent scheduling ignored for now)
|
||||||
uint8_t mcsTableIdx = 0; // default value
|
uint8_t mcsTableIdx = 0; // default value
|
||||||
if (mcs_Table &&
|
if (mcs_Table &&
|
||||||
*mcs_Table == NR_PDSCH_Config__mcs_Table_qam256 &&
|
*mcs_Table == NR_PDSCH_Config__mcs_Table_qam256 &&
|
||||||
|
|||||||
@@ -61,7 +61,13 @@ uint64_t from_nrarfcn(int nr_bandP, uint8_t scs_index, uint32_t dl_nrarfcn);
|
|||||||
|
|
||||||
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
|
uint32_t to_nrarfcn(int nr_bandP, uint64_t dl_CarrierFreq, uint8_t scs_index, uint32_t bw);
|
||||||
|
|
||||||
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,int dmrs_TypeA_Position,int NrOfSymbols,int startSymbol,mappingType_t mappingtype,int length);
|
int16_t fill_dmrs_mask(const NR_PDSCH_Config_t *pdsch_Config,
|
||||||
|
int dci_format,
|
||||||
|
int dmrs_TypeA_Position,
|
||||||
|
int NrOfSymbols,
|
||||||
|
int startSymbol,
|
||||||
|
mappingType_t mappingtype,
|
||||||
|
int length);
|
||||||
|
|
||||||
int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slot_t slotP);
|
int is_nr_DL_slot(NR_TDD_UL_DL_ConfigCommon_t *tdd_UL_DL_ConfigurationCommon,slot_t slotP);
|
||||||
|
|
||||||
|
|||||||
@@ -897,6 +897,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
|||||||
|
|
||||||
/* dmrs symbol positions*/
|
/* dmrs symbol positions*/
|
||||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||||
|
NR_DL_DCI_FORMAT_1_0,
|
||||||
(get_softmodem_params()->nsa) ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position,
|
(get_softmodem_params()->nsa) ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position,
|
||||||
dlsch_config_pdu_1_0->number_symbols,
|
dlsch_config_pdu_1_0->number_symbols,
|
||||||
dlsch_config_pdu_1_0->start_symbol,
|
dlsch_config_pdu_1_0->start_symbol,
|
||||||
@@ -1306,6 +1307,7 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
|||||||
|
|
||||||
/* dmrs symbol positions*/
|
/* dmrs symbol positions*/
|
||||||
dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_Config,
|
dlsch_config_pdu_1_1->dlDmrsSymbPos = fill_dmrs_mask(pdsch_Config,
|
||||||
|
NR_DL_DCI_FORMAT_1_1,
|
||||||
mac->scc? mac->scc->dmrs_TypeA_Position:mac->mib->dmrs_TypeA_Position,
|
mac->scc? mac->scc->dmrs_TypeA_Position:mac->mib->dmrs_TypeA_Position,
|
||||||
dlsch_config_pdu_1_1->number_symbols,
|
dlsch_config_pdu_1_1->number_symbols,
|
||||||
dlsch_config_pdu_1_1->start_symbol,
|
dlsch_config_pdu_1_1->start_symbol,
|
||||||
|
|||||||
@@ -268,7 +268,7 @@ NR_pdsch_dmrs_t get_dl_dmrs_params(const NR_ServingCellConfigCommon_t *scc,
|
|||||||
dmrs.dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
|
dmrs.dmrsConfigType = NFAPI_NR_DMRS_TYPE1;
|
||||||
|
|
||||||
dmrs.N_PRB_DMRS = dmrs.numDmrsCdmGrpsNoData * (dmrs.dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
dmrs.N_PRB_DMRS = dmrs.numDmrsCdmGrpsNoData * (dmrs.dmrsConfigType == NFAPI_NR_DMRS_TYPE1 ? 6 : 4);
|
||||||
dmrs.dl_dmrs_symb_pos = fill_dmrs_mask(pdsch_Config, scc->dmrs_TypeA_Position, tda_info->nrOfSymbols, tda_info->startSymbolIndex, tda_info->mapping_type, frontloaded_symb);
|
dmrs.dl_dmrs_symb_pos = fill_dmrs_mask(pdsch_Config, dci_format, scc->dmrs_TypeA_Position, tda_info->nrOfSymbols, tda_info->startSymbolIndex, tda_info->mapping_type, frontloaded_symb);
|
||||||
dmrs.N_DMRS_SLOT = get_num_dmrs(dmrs.dl_dmrs_symb_pos);
|
dmrs.N_DMRS_SLOT = get_num_dmrs(dmrs.dl_dmrs_symb_pos);
|
||||||
LOG_D(NR_MAC,"Filling dmrs info, ps->N_PRB_DMRS %d, ps->dl_dmrs_symb_pos %x, ps->N_DMRS_SLOT %d\n",dmrs.N_PRB_DMRS,dmrs.dl_dmrs_symb_pos,dmrs.N_DMRS_SLOT);
|
LOG_D(NR_MAC,"Filling dmrs info, ps->N_PRB_DMRS %d, ps->dl_dmrs_symb_pos %x, ps->N_DMRS_SLOT %d\n",dmrs.N_PRB_DMRS,dmrs.dl_dmrs_symb_pos,dmrs.N_DMRS_SLOT);
|
||||||
return dmrs;
|
return dmrs;
|
||||||
|
|||||||
Reference in New Issue
Block a user