Merge remote-tracking branch 'origin/develop' into develop-CSI
# Conflicts: # openair1/PHY/INIT/nr_init.c # openair1/PHY/NR_REFSIG/nr_refsig.h # openair1/PHY/NR_TRANSPORT/nr_csi_rs.c # openair1/PHY/NR_TRANSPORT/nr_transport_proto.h # openair1/SCHED_NR/phy_procedures_nr_gNB.c # openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c # openair2/RRC/NR/MESSAGES/asn1_msg.c # openair2/RRC/NR/MESSAGES/asn1_msg.h
This commit is contained in:
@@ -154,7 +154,7 @@ typedef enum {
|
||||
{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_N2, "vert. log. antenna ports", 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_PDSCHANTENNAPORTS_XP, "XP log. antenna ports", 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_PUSCHANTENNAPORTS, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_SIB1TDA, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_SIB1TDA, NULL, 0, iptr:NULL, defintval:1, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DOCSIRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_DOSRS, NULL, 0, iptr:NULL, defintval:0, TYPE_INT, 0}, \
|
||||
{GNB_CONFIG_STRING_NRCELLID, NULL, 0, u64ptr:NULL, defint64val:1, TYPE_UINT64, 0}, \
|
||||
|
||||
@@ -281,7 +281,6 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti){
|
||||
LOG_D(MAC, "In %s: returning rnti_type %s \n", __FUNCTION__, rnti_types[rnti_type]);
|
||||
|
||||
return rnti_type;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -874,6 +873,18 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
if(pdsch_TimeDomainAllocationList && rnti!=SI_RNTI)
|
||||
mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType;
|
||||
|
||||
struct NR_DMRS_DownlinkConfig *dl_dmrs_config = NULL;
|
||||
if(mac->DLbwp[0])
|
||||
dl_dmrs_config = (mappingtype == typeA) ?
|
||||
mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup :
|
||||
mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup;
|
||||
|
||||
dlsch_config_pdu_1_0->nscid = 0;
|
||||
if(dl_dmrs_config && dl_dmrs_config->scramblingID0)
|
||||
dlsch_config_pdu_1_0->dlDmrsScramblingId = *dl_dmrs_config->scramblingID0;
|
||||
else
|
||||
dlsch_config_pdu_1_0->dlDmrsScramblingId = mac->physCellId;
|
||||
|
||||
/* dmrs symbol positions*/
|
||||
dlsch_config_pdu_1_0->dlDmrsSymbPos = fill_dmrs_mask(pdsch_config,
|
||||
(get_softmodem_params()->nsa) ? mac->scc->dmrs_TypeA_Position : mac->mib->dmrs_TypeA_Position,
|
||||
@@ -881,8 +892,9 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
dlsch_config_pdu_1_0->start_symbol,
|
||||
mappingtype,
|
||||
1);
|
||||
dlsch_config_pdu_1_0->dmrsConfigType = (mac->DLbwp[0] != NULL) ?
|
||||
(mac->DLbwp[0]->bwp_Dedicated->pdsch_Config->choice.setup->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? 0 : 1) : 0;
|
||||
dlsch_config_pdu_1_0->dmrsConfigType = (dl_dmrs_config != NULL) ?
|
||||
(dl_dmrs_config->dmrs_Type == NULL ? 0 : 1) : 0;
|
||||
|
||||
/* number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214 version 15.9.0 Release 15 */
|
||||
if (dlsch_config_pdu_1_0->number_symbols == 2)
|
||||
dlsch_config_pdu_1_0->n_dmrs_cdm_groups = 1;
|
||||
@@ -1075,7 +1087,30 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
if(pdsch_TimeDomainAllocationList)
|
||||
mappingtype = pdsch_TimeDomainAllocationList->list.array[dci->time_domain_assignment.val]->mappingType;
|
||||
|
||||
dlsch_config_pdu_1_1->dmrsConfigType = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2;
|
||||
struct NR_DMRS_DownlinkConfig *dl_dmrs_config = (mappingtype == typeA) ?
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup :
|
||||
pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup;
|
||||
|
||||
switch (dci->dmrs_sequence_initialization.val) {
|
||||
case 0:
|
||||
dlsch_config_pdu_1_1->nscid = 0;
|
||||
if(dl_dmrs_config->scramblingID0)
|
||||
dlsch_config_pdu_1_1->dlDmrsScramblingId = *dl_dmrs_config->scramblingID0;
|
||||
else
|
||||
dlsch_config_pdu_1_1->dlDmrsScramblingId = mac->physCellId;
|
||||
break;
|
||||
case 1:
|
||||
dlsch_config_pdu_1_1->nscid = 1;
|
||||
if(dl_dmrs_config->scramblingID1)
|
||||
dlsch_config_pdu_1_1->dlDmrsScramblingId = *dl_dmrs_config->scramblingID1;
|
||||
else
|
||||
dlsch_config_pdu_1_1->dlDmrsScramblingId = mac->physCellId;
|
||||
break;
|
||||
default:
|
||||
AssertFatal(1==0,"Invalid dmrs sequence initialization value\n");
|
||||
}
|
||||
|
||||
dlsch_config_pdu_1_1->dmrsConfigType = dl_dmrs_config->dmrs_Type == NULL ? NFAPI_NR_DMRS_TYPE1 : NFAPI_NR_DMRS_TYPE2;
|
||||
|
||||
/* TODO: fix number of DM-RS CDM groups without data according to subclause 5.1.6.2 of 3GPP TS 38.214,
|
||||
using tables 7.3.1.2.2-1, 7.3.1.2.2-2, 7.3.1.2.2-3, 7.3.1.2.2-4 of 3GPP TS 38.212 */
|
||||
@@ -1136,17 +1171,11 @@ int8_t nr_ue_process_dci(module_id_t module_id, int cc_id, uint8_t gNB_index, fr
|
||||
|
||||
/* ANTENNA_PORTS */
|
||||
uint8_t n_codewords = 1; // FIXME!!!
|
||||
long *max_length = NULL;
|
||||
long *dmrs_type = NULL;
|
||||
long *max_length = dl_dmrs_config->maxLength;
|
||||
long *dmrs_type = dl_dmrs_config->dmrs_Type;
|
||||
|
||||
dlsch_config_pdu_1_1->n_front_load_symb = 1; // default value
|
||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA) {
|
||||
max_length = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->maxLength;
|
||||
dmrs_type = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeA->choice.setup->dmrs_Type;
|
||||
}
|
||||
if (pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB) {
|
||||
max_length = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->maxLength;
|
||||
dmrs_type = pdsch_Config->dmrs_DownlinkForPDSCH_MappingTypeB->choice.setup->dmrs_Type;
|
||||
}
|
||||
|
||||
if ((dmrs_type == NULL) && (max_length == NULL)){
|
||||
// Table 7.3.1.2.2-1: Antenna port(s) (1000 + DMRS port), dmrs-Type=1, maxLength=1
|
||||
dlsch_config_pdu_1_1->n_dmrs_cdm_groups = table_7_3_2_3_3_1[dci->antenna_ports.val][0];
|
||||
|
||||
@@ -734,6 +734,11 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
? pusch_Config->dmrs_UplinkForPUSCH_MappingTypeA->choice.setup : pusch_Config->dmrs_UplinkForPUSCH_MappingTypeB->choice.setup;
|
||||
}
|
||||
|
||||
pusch_config_pdu->scid = 0;
|
||||
pusch_config_pdu->ul_dmrs_scrambling_id = mac->physCellId;
|
||||
if(*dci_format == NR_UL_DCI_FORMAT_0_1)
|
||||
pusch_config_pdu->scid = dci->dmrs_sequence_initialization.val;
|
||||
|
||||
/* TRANSFORM PRECODING ------------------------------------------------------------------------------------------*/
|
||||
|
||||
if (pusch_config_pdu->transform_precoding == NR_PUSCH_Config__transformPrecoder_enabled) {
|
||||
@@ -759,6 +764,14 @@ int nr_config_pusch_pdu(NR_UE_MAC_INST_t *mac,
|
||||
LOG_D(NR_MAC,"TRANSFORM PRECODING IS ENABLED. CDM groups: %d, U: %d \n", pusch_config_pdu->num_dmrs_cdm_grps_no_data,
|
||||
pusch_config_pdu->dfts_ofdm.low_papr_group_number);
|
||||
}
|
||||
else {
|
||||
if (pusch_config_pdu->scid == 0 &&
|
||||
NR_DMRS_ulconfig->transformPrecodingDisabled->scramblingID0)
|
||||
pusch_config_pdu->ul_dmrs_scrambling_id = *NR_DMRS_ulconfig->transformPrecodingDisabled->scramblingID0;
|
||||
if (pusch_config_pdu->scid == 1 &&
|
||||
NR_DMRS_ulconfig->transformPrecodingDisabled->scramblingID1)
|
||||
pusch_config_pdu->ul_dmrs_scrambling_id = *NR_DMRS_ulconfig->transformPrecodingDisabled->scramblingID1;
|
||||
}
|
||||
|
||||
/* TRANSFORM PRECODING --------------------------------------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -621,6 +621,8 @@ void schedule_nr_sib1(module_id_t module_idP, frame_t frameP, sub_frame_t slotP)
|
||||
1, &is_typeA,
|
||||
&startSymbolIndex, &nrOfSymbols);
|
||||
|
||||
AssertFatal((startSymbolIndex+nrOfSymbols)<14,"SIB1 TDA %d would cause overlap with CSI-RS. Please select a different SIB1 TDA.\n",time_domain_allocation);
|
||||
|
||||
int mappingtype = is_typeA? typeA: typeB;
|
||||
uint16_t dlDmrsSymbPos = fill_dmrs_mask(NULL, gNB_mac->common_channels->ServingCellConfigCommon->dmrs_TypeA_Position, nrOfSymbols, startSymbolIndex, mappingtype, 1);
|
||||
|
||||
|
||||
@@ -519,4 +519,7 @@ bool nr_find_nb_rb(uint16_t Qm,
|
||||
void nr_sr_reporting(int Mod_idP, frame_t frameP, sub_frame_t slotP);
|
||||
|
||||
void dump_mac_stats(gNB_MAC_INST *gNB, char *output, int strlen, bool reset_rsrp);
|
||||
|
||||
void process_CellGroup(NR_CellGroupConfig_t *CellGroup, NR_UE_sched_ctrl_t *sched_ctrl);
|
||||
|
||||
#endif /*__LAYER2_NR_MAC_PROTO_H__*/
|
||||
|
||||
@@ -1713,15 +1713,14 @@ void fill_mastercellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig, NR_CellGr
|
||||
}
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
int uid,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
const gNB_RrcConfigurationReq* configuration)
|
||||
{
|
||||
const gNB_RrcConfigurationReq* configuration) {
|
||||
|
||||
NR_SpCellConfig_t *SpCellConfig = cellGroupConfig->spCellConfig;
|
||||
if (SpCellConfig == NULL) return;
|
||||
|
||||
NR_ServingCellConfigCommon_t *scc = carrier->servingcellconfigcommon;
|
||||
NR_ServingCellConfigCommon_t *scc = configuration->scc;
|
||||
|
||||
// Config CSI-RS
|
||||
if (configuration->do_CSIRS) {
|
||||
@@ -1752,7 +1751,7 @@ void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
for (int i=0; i<DL_BWP_list->list.count; i++){
|
||||
NR_BWP_Downlink_t *bwp = DL_BWP_list->list.array[i];
|
||||
int scs = bwp->bwp_Common->genericParameters.subcarrierSpacing;
|
||||
set_dl_mcs_table(scs, configuration->force_256qam_off ? NULL : uecap, bwp->bwp_Dedicated, carrier->servingcellconfigcommon);
|
||||
set_dl_mcs_table(scs, configuration->force_256qam_off ? NULL : uecap, bwp->bwp_Dedicated, scc);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2231,10 +2230,10 @@ int16_t do_RRCReconfiguration(
|
||||
|
||||
if(cellGroupConfig!=NULL){
|
||||
update_cellGroupConfig(cellGroupConfig,
|
||||
carrier,
|
||||
ue_context_pP->local_uid,
|
||||
ue_context_pP->ue_context.UE_Capability_nr,
|
||||
configuration);
|
||||
|
||||
enc_rval = uper_encode_to_buffer(&asn_DEF_NR_CellGroupConfig,
|
||||
NULL,
|
||||
(void *)cellGroupConfig,
|
||||
|
||||
@@ -112,7 +112,6 @@ void fill_initial_cellGroupConfig(int uid,
|
||||
const gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
void update_cellGroupConfig(NR_CellGroupConfig_t *cellGroupConfig,
|
||||
rrc_gNB_carrier_data_t *carrier,
|
||||
int uid,
|
||||
NR_UE_NR_Capability_t *uecap,
|
||||
const gNB_RrcConfigurationReq *configuration);
|
||||
|
||||
@@ -38,6 +38,7 @@ void set_csirs_periodicity(NR_NZP_CSI_RS_Resource_t *nzpcsi0, int uid, int nb_sl
|
||||
|
||||
nzpcsi0->periodicityAndOffset = calloc(1,sizeof(*nzpcsi0->periodicityAndOffset));
|
||||
int ideal_period = nb_slots_per_period*MAX_MOBILES_PER_GNB;
|
||||
|
||||
if (ideal_period<5) {
|
||||
nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots4;
|
||||
nzpcsi0->periodicityAndOffset->choice.slots4 = nb_slots_per_period*uid;
|
||||
|
||||
Reference in New Issue
Block a user