From e1198b3d96d7e87e105078362a306a63df0df0f0 Mon Sep 17 00:00:00 2001 From: Roberto Louro Magueta Date: Wed, 25 May 2022 17:30:17 +0100 Subject: [PATCH] Add debug logs and comment update for nrofSRS_Ports --- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 34 +++++++++++++++- openair2/RRC/NR/nr_rrc_config.c | 40 +++++++++---------- 2 files changed, 53 insertions(+), 21 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index 45327eda73..27d44755e4 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -62,6 +62,8 @@ #include "common/ran_context.h" +//#define DEBUG_DCI + extern RAN_CONTEXT_t RC; // Note the 2 scs values in the table names represent resp. scs_common and pdcch_scs @@ -1974,7 +1976,37 @@ void fill_dci_pdu_rel15(const NR_ServingCellConfigCommon_t *scc, // UL-SCH indicator pos += 1; *dci_pdu |= ((uint64_t)dci_pdu_rel15->ulsch_indicator & 0x1) << (dci_size - pos); - break; + +#ifdef DEBUG_DCI + LOG_I(NR_MAC,"============= NR_UL_DCI_FORMAT_0_1 =============\n"); + LOG_I(NR_MAC,"dci_size = %i\n", dci_size); + LOG_I(NR_MAC,"dci_pdu_rel15->format_indicator = %i\n", dci_pdu_rel15->format_indicator); + LOG_I(NR_MAC,"dci_pdu_rel15->carrier_indicator.val = %i\n", dci_pdu_rel15->carrier_indicator.val); + LOG_I(NR_MAC,"dci_pdu_rel15->ul_sul_indicator.val = %i\n", dci_pdu_rel15->ul_sul_indicator.val); + LOG_I(NR_MAC,"dci_pdu_rel15->bwp_indicator.val = %i\n", dci_pdu_rel15->bwp_indicator.val); + LOG_I(NR_MAC,"dci_pdu_rel15->frequency_domain_assignment.val = %i\n", dci_pdu_rel15->frequency_domain_assignment.val); + LOG_I(NR_MAC,"dci_pdu_rel15->time_domain_assignment.val = %i\n", dci_pdu_rel15->time_domain_assignment.val); + LOG_I(NR_MAC,"dci_pdu_rel15->frequency_hopping_flag.val = %i\n", dci_pdu_rel15->frequency_hopping_flag.val); + LOG_I(NR_MAC,"dci_pdu_rel15->mcs = %i\n", dci_pdu_rel15->mcs); + LOG_I(NR_MAC,"dci_pdu_rel15->ndi = %i\n", dci_pdu_rel15->ndi); + LOG_I(NR_MAC,"dci_pdu_rel15->rv= %i\n", dci_pdu_rel15->rv); + LOG_I(NR_MAC,"dci_pdu_rel15->harq_pid = %i\n", dci_pdu_rel15->harq_pid); + LOG_I(NR_MAC,"dci_pdu_rel15->dai[0].val = %i\n", dci_pdu_rel15->dai[0].val); + LOG_I(NR_MAC,"dci_pdu_rel15->dai[1].val = %i\n", dci_pdu_rel15->dai[1].val); + LOG_I(NR_MAC,"dci_pdu_rel15->tpc = %i\n", dci_pdu_rel15->tpc); + LOG_I(NR_MAC,"dci_pdu_rel15->srs_resource_indicator.val = %i\n", dci_pdu_rel15->srs_resource_indicator.val); + LOG_I(NR_MAC,"dci_pdu_rel15->precoding_information.val = %i\n", dci_pdu_rel15->precoding_information.val); + LOG_I(NR_MAC,"dci_pdu_rel15->antenna_ports.val = %i\n", dci_pdu_rel15->antenna_ports.val); + LOG_I(NR_MAC,"dci_pdu_rel15->srs_request.val = %i\n", dci_pdu_rel15->srs_request.val); + LOG_I(NR_MAC,"dci_pdu_rel15->csi_request.val = %i\n", dci_pdu_rel15->csi_request.val); + LOG_I(NR_MAC,"dci_pdu_rel15->cbgti.val = %i\n", dci_pdu_rel15->cbgti.val); + LOG_I(NR_MAC,"dci_pdu_rel15->ptrs_dmrs_association.val = %i\n", dci_pdu_rel15->ptrs_dmrs_association.val); + LOG_I(NR_MAC,"dci_pdu_rel15->beta_offset_indicator.val = %i\n", dci_pdu_rel15->beta_offset_indicator.val); + LOG_I(NR_MAC,"dci_pdu_rel15->dmrs_sequence_initialization.val = %i\n", dci_pdu_rel15->dmrs_sequence_initialization.val); + LOG_I(NR_MAC,"dci_pdu_rel15->ulsch_indicator = %i\n", dci_pdu_rel15->ulsch_indicator); +#endif + + break; } break; diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 5ef857efe7..a019ef28c4 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -357,26 +357,26 @@ void config_srs(NR_SetupRelease_SRS_Config_t *setup_release_srs_Config, NR_SRS_Resource_t *srs_res0=calloc(1,sizeof(*srs_res0)); srs_res0->srs_ResourceId = 0; srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1; - if (uecap && - uecap->featureSets && - uecap->featureSets->featureSetsUplink && - uecap->featureSets->featureSetsUplink->list.count > 0) { - NR_FeatureSetUplink_t *ul_feature_setup = uecap->featureSets->featureSetsUplink->list.array[0]; - switch (ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource) { - case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n1: - srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1; - break; - case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n2: - srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports2; - break; - case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n4: - srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports4; - break; - default: - LOG_E(NR_RRC, "Max Number of SRS Ports Per Resource %ld is invalid!\n", - ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource); - } - } + // if (uecap && + // uecap->featureSets && + // uecap->featureSets->featureSetsUplink && + // uecap->featureSets->featureSetsUplink->list.count > 0) { + // NR_FeatureSetUplink_t *ul_feature_setup = uecap->featureSets->featureSetsUplink->list.array[0]; + // switch (ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource) { + // case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n1: + // srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_port1; + // break; + // case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n2: + // srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports2; + // break; + // case NR_SRS_Resources__maxNumberSRS_Ports_PerResource_n4: + // srs_res0->nrofSRS_Ports = NR_SRS_Resource__nrofSRS_Ports_ports4; + // break; + // default: + // LOG_E(NR_RRC, "Max Number of SRS Ports Per Resource %ld is invalid!\n", + // ul_feature_setup->supportedSRS_Resources->maxNumberSRS_Ports_PerResource); + // } + // } srs_res0->ptrs_PortIndex = NULL; srs_res0->transmissionComb.present = NR_SRS_Resource__transmissionComb_PR_n2; srs_res0->transmissionComb.choice.n2 = calloc(1,sizeof(*srs_res0->transmissionComb.choice.n2));