clang formatting

This commit is contained in:
francescomani
2022-12-06 09:18:22 +01:00
parent 0ab8c8d976
commit ba28a365c0
6 changed files with 117 additions and 190 deletions
@@ -2529,7 +2529,6 @@ uint8_t nr_get_csi_measurements(NR_UE_MAC_INST_t *mac,
const int n_slots_frame = nr_slots_per_frame[scs]; const int n_slots_frame = nr_slots_per_frame[scs];
if (((n_slots_frame*frame + slot - offset)%period) == 0 && pucch_Config) { if (((n_slots_frame*frame + slot - offset)%period) == 0 && pucch_Config) {
LOG_D(NR_MAC, "Preparing CSI report in frame %d slot %d CSI report ID %d\n", frame, slot, csi_report_id); LOG_D(NR_MAC, "Preparing CSI report in frame %d slot %d CSI report ID %d\n", frame, slot, csi_report_id);
NR_PUCCH_CSI_Resource_t *pucchcsires = csirep->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list.array[0]; NR_PUCCH_CSI_Resource_t *pucchcsires = csirep->reportConfigType.choice.periodic->pucch_CSI_ResourceList.list.array[0];
NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[1]; // set with formats >1 NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[1]; // set with formats >1
@@ -217,8 +217,7 @@ void nr_csi_meas_reporting(int Mod_idP,
if ((sched_frame*n_slots_frame + sched_slot - offset)%period != 0) if ((sched_frame*n_slots_frame + sched_slot - offset)%period != 0)
continue; continue;
AssertFatal(is_xlsch_in_slot(RC.nrmac[Mod_idP]->ulsch_slot_bitmap[sched_slot / 64], sched_slot), AssertFatal(is_xlsch_in_slot(RC.nrmac[Mod_idP]->ulsch_slot_bitmap[sched_slot / 64], sched_slot), "CSI reporting slot %d is not set for an uplink slot\n", sched_slot);
"CSI reporting slot %d is not set for an uplink slot\n", sched_slot);
LOG_D(NR_MAC, "CSI reporting in frame %d slot %d CSI report ID %ld\n", sched_frame, sched_slot, csirep->reportConfigId); LOG_D(NR_MAC, "CSI reporting in frame %d slot %d CSI report ID %ld\n", sched_frame, sched_slot, csirep->reportConfigId);
const NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[1]; // set with formats >1 const NR_PUCCH_ResourceSet_t *pucchresset = pucch_Config->resourceSetToAddModList->list.array[1]; // set with formats >1
+2 -16
View File
@@ -985,7 +985,6 @@ void fill_initial_SpCellConfig(int uid,
pucchcsires1->pucch_Resource=2; pucchcsires1->pucch_Resource=2;
if (configuration->do_CSIRS) { if (configuration->do_CSIRS) {
NR_CSI_ResourceConfig_t *csires0 = calloc(1,sizeof(*csires0)); NR_CSI_ResourceConfig_t *csires0 = calloc(1,sizeof(*csires0));
csires0->csi_ResourceConfigId = bwp_id; csires0->csi_ResourceConfigId = bwp_id;
csires0->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB; csires0->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_nzp_CSI_RS_SSB;
@@ -1000,7 +999,6 @@ void fill_initial_SpCellConfig(int uid,
} }
if (configuration->do_CSIRS && pdsch_AntennaPorts > 1) { if (configuration->do_CSIRS && pdsch_AntennaPorts > 1) {
NR_CSI_ResourceConfig_t *csires2 = calloc(1,sizeof(*csires2)); NR_CSI_ResourceConfig_t *csires2 = calloc(1,sizeof(*csires2));
csires2->csi_ResourceConfigId = bwp_id+10; csires2->csi_ResourceConfigId = bwp_id+10;
csires2->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_csi_IM_ResourceSetList; csires2->csi_RS_ResourceSetList.present = NR_CSI_ResourceConfig__csi_RS_ResourceSetList_PR_csi_IM_ResourceSetList;
@@ -1012,21 +1010,9 @@ void fill_initial_SpCellConfig(int uid,
csires2->resourceType = NR_CSI_ResourceConfig__resourceType_periodic; csires2->resourceType = NR_CSI_ResourceConfig__resourceType_periodic;
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires2); ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ResourceConfigToAddModList->list,csires2);
config_csi_meas_report(csi_MeasConfig, config_csi_meas_report(csi_MeasConfig, scc, pucchcsires1, pdsch_Config, &configuration->pdsch_AntennaPorts, NR_MAX_SUPPORTED_DL_LAYERS, bwp_id, uid);
scc,
pucchcsires1,
pdsch_Config,
&configuration->pdsch_AntennaPorts,
NR_MAX_SUPPORTED_DL_LAYERS,
bwp_id,
uid);
} }
config_rsrp_meas_report(csi_MeasConfig, config_rsrp_meas_report(csi_MeasConfig, scc, pucchcsires1, configuration->do_CSIRS, bwp_id + 10, uid);
scc,
pucchcsires1,
configuration->do_CSIRS,
bwp_id+10,
uid);
} }
pdsch_servingcellconfig->codeBlockGroupTransmission = NULL; pdsch_servingcellconfig->codeBlockGroupTransmission = NULL;
pdsch_servingcellconfig->xOverhead = NULL; pdsch_servingcellconfig->xOverhead = NULL;
+24 -63
View File
@@ -748,15 +748,13 @@ void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs) {
pucchspatial->referenceSignal.present = NR_PUCCH_SpatialRelationInfo__referenceSignal_PR_ssb_Index; pucchspatial->referenceSignal.present = NR_PUCCH_SpatialRelationInfo__referenceSignal_PR_ssb_Index;
pucchspatial->referenceSignal.choice.ssb_Index = 0; pucchspatial->referenceSignal.choice.ssb_Index = 0;
pucchspatial->pucch_PathlossReferenceRS_Id = PL_ref_RS->pucch_PathlossReferenceRS_Id; pucchspatial->pucch_PathlossReferenceRS_Id = PL_ref_RS->pucch_PathlossReferenceRS_Id;
pucchspatial->p0_PUCCH_Id = p00->p0_PUCCH_Id; pucchspatial->p0_PUCCH_Id = p00->p0_PUCCH_Id;
pucchspatial->closedLoopIndex = NR_PUCCH_SpatialRelationInfo__closedLoopIndex_i0; pucchspatial->closedLoopIndex = NR_PUCCH_SpatialRelationInfo__closedLoopIndex_i0;
ASN_SEQUENCE_ADD(&pucch_Config->spatialRelationInfoToAddModList->list,pucchspatial); ASN_SEQUENCE_ADD(&pucch_Config->spatialRelationInfoToAddModList->list,pucchspatial);
} }
static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, static void set_SR_periodandoffset(NR_SchedulingRequestResourceConfig_t *schedulingRequestResourceConfig, const NR_ServingCellConfigCommon_t *scc)
const NR_ServingCellConfigCommon_t *scc)
{ {
const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
int sr_slot = 1; // in FDD SR in slot 1 int sr_slot = 1; // in FDD SR in slot 1
@@ -1202,16 +1200,11 @@ void set_phr_config(NR_MAC_CellGroupConfig_t *mac_CellGroupConfig)
mac_CellGroupConfig->phr_Config->choice.setup->phr_Tx_PowerFactorChange = NR_PHR_Config__phr_Tx_PowerFactorChange_dB1; mac_CellGroupConfig->phr_Config->choice.setup->phr_Tx_PowerFactorChange = NR_PHR_Config__phr_Tx_PowerFactorChange_dB1;
} }
void set_csi_meas_periodicity(const NR_ServingCellConfigCommon_t *scc, void set_csi_meas_periodicity(const NR_ServingCellConfigCommon_t *scc, NR_CSI_ReportConfig_t *csirep, int uid, bool is_rsrp)
NR_CSI_ReportConfig_t *csirep,
int uid,
bool is_rsrp)
{ {
const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL; const NR_TDD_UL_DL_Pattern_t *tdd = scc->tdd_UL_DL_ConfigurationCommon ? &scc->tdd_UL_DL_ConfigurationCommon->pattern1 : NULL;
const int n_slots_frame = slotsperframe[*scc->ssbSubcarrierSpacing]; const int n_slots_frame = slotsperframe[*scc->ssbSubcarrierSpacing];
const int n_ul_slots_period = tdd ? (tdd->nrofUplinkSlots + (tdd->nrofUplinkSymbols>0)) : const int n_ul_slots_period = tdd ? (tdd->nrofUplinkSlots + (tdd->nrofUplinkSymbols > 0)) : n_slots_frame;
n_slots_frame;
const int n_slots_period = tdd ? n_slots_frame / get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity) : n_slots_frame; const int n_slots_period = tdd ? n_slots_frame / get_nb_periods_per_frame(tdd->dl_UL_TransmissionPeriodicity) : n_slots_frame;
const int ideal_period = MAX_MOBILES_PER_GNB * 2 * n_slots_period / n_ul_slots_period; // 2 reports per UE const int ideal_period = MAX_MOBILES_PER_GNB * 2 * n_slots_period / n_ul_slots_period; // 2 reports per UE
AssertFatal(ideal_period < 320, "Not enough UL slots to accomodate all possible UEs. Need to rework the implementation\n"); AssertFatal(ideal_period < 320, "Not enough UL slots to accomodate all possible UEs. Need to rework the implementation\n");
@@ -1222,50 +1215,38 @@ void set_csi_meas_periodicity(const NR_ServingCellConfigCommon_t *scc,
if (ideal_period < 5) { if (ideal_period < 5) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots4; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots4;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots4 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots4 = offset;
} } else if (ideal_period < 6) {
else if (ideal_period<6) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots5; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots5;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots5 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots5 = offset;
} } else if (ideal_period < 9) {
else if (ideal_period<9) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots8; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots8;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots8 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots8 = offset;
} } else if (ideal_period < 11) {
else if (ideal_period<11) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots10; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots10;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots10 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots10 = offset;
} } else if (ideal_period < 17) {
else if (ideal_period<17) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots16; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots16;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots16 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots16 = offset;
} } else if (ideal_period < 21) {
else if (ideal_period<21) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots20; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots20;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots20 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots20 = offset;
} } else if (ideal_period < 41) {
else if (ideal_period<41) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots40; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots40;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots40 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots40 = offset;
} } else if (ideal_period < 81) {
else if (ideal_period<81) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots80; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots80;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots80 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots80 = offset;
} } else if (ideal_period < 161) {
else if (ideal_period<161) {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots160; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots160;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots160 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots160 = offset;
} } else {
else {
csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots320; csirep->reportConfigType.choice.periodic->reportSlotConfig.present = NR_CSI_ReportPeriodicityAndOffset_PR_slots320;
csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = offset; csirep->reportConfigType.choice.periodic->reportSlotConfig.choice.slots320 = offset;
} }
} }
void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports, void config_csi_codebook(const rrc_pdsch_AntennaPorts_t *antennaports, const int max_layers, struct NR_CodebookConfig *codebookConfig)
const int max_layers,
struct NR_CodebookConfig *codebookConfig)
{ {
const int num_ant_ports = antennaports->N1 * antennaports->N2 * antennaports->XP; const int num_ant_ports = antennaports->N1 * antennaports->N2 * antennaports->XP;
codebookConfig->codebookType.present = NR_CodebookConfig__codebookType_PR_type1; codebookConfig->codebookType.present = NR_CodebookConfig__codebookType_PR_type1;
codebookConfig->codebookType.choice.type1 = calloc(1, sizeof(*codebookConfig->codebookType.choice.type1)); codebookConfig->codebookType.choice.type1 = calloc(1, sizeof(*codebookConfig->codebookType.choice.type1));
@@ -1305,8 +1286,7 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.two_two_TypeI_SinglePanel_Restriction.buf = calloc(8, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.two_two_TypeI_SinglePanel_Restriction.buf = calloc(8, sizeof(uint8_t));
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
moreThanTwo->n1_n2.choice.two_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.two_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else if (antennaports->N1 == 4) {
else if (antennaports->N1 == 4) {
AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n"); AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n");
moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_one_TypeI_SinglePanel_Restriction; moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_four_one_TypeI_SinglePanel_Restriction;
moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.size = 2; moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.size = 2;
@@ -1314,12 +1294,8 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.buf = calloc(2, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.buf = calloc(2, sizeof(uint8_t));
for (int i = 0; i < 2; i++) for (int i = 0; i < 2; i++)
moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.four_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else
else AssertFatal(1 == 0, "N1 %d and N2 %d not supported for %d antenna ports\n", antennaports->N1, antennaports->N2, num_ant_ports);
AssertFatal(1==0,"N1 %d and N2 %d not supported for %d antenna ports\n",
antennaports->N1,
antennaports->N2,
num_ant_ports);
break; break;
case 12: case 12:
if (antennaports->N1 == 3) { if (antennaports->N1 == 3) {
@@ -1330,8 +1306,7 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.three_two_TypeI_SinglePanel_Restriction.buf = calloc(12, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.three_two_TypeI_SinglePanel_Restriction.buf = calloc(12, sizeof(uint8_t));
for (int i = 0; i < 12; i++) for (int i = 0; i < 12; i++)
moreThanTwo->n1_n2.choice.three_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.three_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else if (antennaports->N1 == 6) {
else if (antennaports->N1 == 6) {
AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n"); AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n");
moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_one_TypeI_SinglePanel_Restriction; moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_six_one_TypeI_SinglePanel_Restriction;
moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.size = 3; moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.size = 3;
@@ -1339,12 +1314,8 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.buf = calloc(3, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.buf = calloc(3, sizeof(uint8_t));
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.six_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else
else AssertFatal(1 == 0, "N1 %d and N2 %d not supported for %d antenna ports\n", antennaports->N1, antennaports->N2, num_ant_ports);
AssertFatal(1==0,"N1 %d and N2 %d not supported for %d antenna ports\n",
antennaports->N1,
antennaports->N2,
num_ant_ports);
break; break;
case 16: case 16:
if (antennaports->N1 == 4) { if (antennaports->N1 == 4) {
@@ -1355,8 +1326,7 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.four_two_TypeI_SinglePanel_Restriction.buf = calloc(16, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.four_two_TypeI_SinglePanel_Restriction.buf = calloc(16, sizeof(uint8_t));
for (int i = 0; i < 16; i++) for (int i = 0; i < 16; i++)
moreThanTwo->n1_n2.choice.four_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.four_two_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else if (antennaports->N1 == 8) {
else if (antennaports->N1 == 8) {
AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n"); AssertFatal(antennaports->N2 == 1, "N1 and N2 not in accordace with the specifications\n");
moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_one_TypeI_SinglePanel_Restriction; moreThanTwo->n1_n2.present = NR_CodebookConfig__codebookType__type1__subType__typeI_SinglePanel__nrOfAntennaPorts__moreThanTwo__n1_n2_PR_eight_one_TypeI_SinglePanel_Restriction;
moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.size = 4; moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.size = 4;
@@ -1364,12 +1334,8 @@ void config_csi_codebook(const rrc_pdsch_AntennaPorts_t* antennaports,
moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.buf = calloc(4, sizeof(uint8_t)); moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.buf = calloc(4, sizeof(uint8_t));
for (int i = 0; i < 4; i++) for (int i = 0; i < 4; i++)
moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter moreThanTwo->n1_n2.choice.eight_one_TypeI_SinglePanel_Restriction.buf[i] = 0xff; // TODO verify the meaning of this parameter
} } else
else AssertFatal(1 == 0, "N1 %d and N2 %d not supported for %d antenna ports\n", antennaports->N1, antennaports->N2, num_ant_ports);
AssertFatal(1==0,"N1 %d and N2 %d not supported for %d antenna ports\n",
antennaports->N1,
antennaports->N2,
num_ant_ports);
break; break;
default: default:
AssertFatal(1 == 0, "%d antenna ports not supported\n", num_ant_ports); AssertFatal(1 == 0, "%d antenna ports not supported\n", num_ant_ports);
@@ -1387,7 +1353,6 @@ void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
int rep_id, int rep_id,
int uid) int uid)
{ {
NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep));
csirep->reportConfigId = rep_id; csirep->reportConfigId = rep_id;
csirep->carrier = NULL; csirep->carrier = NULL;
@@ -1451,7 +1416,6 @@ void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
int rep_id, int rep_id,
int uid) int uid)
{ {
NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep)); NR_CSI_ReportConfig_t *csirep = calloc(1, sizeof(*csirep));
csirep->reportConfigId = rep_id; csirep->reportConfigId = rep_id;
csirep->carrier = NULL; csirep->carrier = NULL;
@@ -1462,8 +1426,7 @@ void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
if (do_csi) { if (do_csi) {
if (csires->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->nzp_CSI_RS_ResourceSetList) if (csires->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->nzp_CSI_RS_ResourceSetList)
resource_id = csires->csi_ResourceConfigId; resource_id = csires->csi_ResourceConfigId;
} } else {
else {
if (csires->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->csi_SSB_ResourceSetList) if (csires->csi_RS_ResourceSetList.choice.nzp_CSI_RS_SSB->csi_SSB_ResourceSetList)
resource_id = csires->csi_ResourceConfigId; resource_id = csires->csi_ResourceConfigId;
} }
@@ -1482,8 +1445,7 @@ void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
if (do_csi) { if (do_csi) {
csirep->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP; csirep->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_cri_RSRP;
csirep->reportQuantity.choice.cri_RSRP = (NULL_t)0; csirep->reportQuantity.choice.cri_RSRP = (NULL_t)0;
} } else {
else {
csirep->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP; csirep->reportQuantity.present = NR_CSI_ReportConfig__reportQuantity_PR_ssb_Index_RSRP;
csirep->reportQuantity.choice.ssb_Index_RSRP = (NULL_t)0; csirep->reportQuantity.choice.ssb_Index_RSRP = (NULL_t)0;
} }
@@ -1493,4 +1455,3 @@ void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
*csirep->groupBasedBeamReporting.choice.disabled->nrofReportedRS = NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1; *csirep->groupBasedBeamReporting.choice.disabled->nrofReportedRS = NR_CSI_ReportConfig__groupBasedBeamReporting__disabled__nrofReportedRS_n1;
ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ReportConfigToAddModList->list, csirep); ASN_SEQUENCE_ADD(&csi_MeasConfig->csi_ReportConfigToAddModList->list, csirep);
} }
+1 -6
View File
@@ -58,12 +58,7 @@ void set_dl_DataToUL_ACK(NR_PUCCH_Config_t *pucch_Config, int min_feedback_time)
void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs); void set_pucch_power_config(NR_PUCCH_Config_t *pucch_Config, int do_csirs);
void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc, void scheduling_request_config(const NR_ServingCellConfigCommon_t *scc,
NR_PUCCH_Config_t *pucch_Config); NR_PUCCH_Config_t *pucch_Config);
void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, void config_rsrp_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, const NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_PUCCH_CSI_Resource_t *pucchcsires, int do_csi, int rep_id, int uid);
const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_PUCCH_CSI_Resource_t *pucchcsires,
int do_csi,
int rep_id,
int uid);
void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig, void config_csi_meas_report(NR_CSI_MeasConfig_t *csi_MeasConfig,
const NR_ServingCellConfigCommon_t *servingcellconfigcommon, const NR_ServingCellConfigCommon_t *servingcellconfigcommon,
NR_PUCCH_CSI_Resource_t *pucchcsires, NR_PUCCH_CSI_Resource_t *pucchcsires,
+2 -15
View File
@@ -411,21 +411,8 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
pucchcsires1->uplinkBandwidthPartId = bwp->bwp_Id; pucchcsires1->uplinkBandwidthPartId = bwp->bwp_Id;
pucchcsires1->pucch_Resource=2; pucchcsires1->pucch_Resource=2;
config_csi_meas_report(csi_MeasConfig, config_csi_meas_report(csi_MeasConfig, servingcellconfigcommon, pucchcsires1, bwp->bwp_Dedicated->pdsch_Config, pdschap, NR_MAX_SUPPORTED_DL_LAYERS, bwp->bwp_Id, uid);
servingcellconfigcommon, config_rsrp_meas_report(csi_MeasConfig, servingcellconfigcommon, pucchcsires1, do_csirs, bwp->bwp_Id + 10, uid);
pucchcsires1,
bwp->bwp_Dedicated->pdsch_Config,
pdschap,
NR_MAX_SUPPORTED_DL_LAYERS,
bwp->bwp_Id,
uid);
config_rsrp_meas_report(csi_MeasConfig,
servingcellconfigcommon,
pucchcsires1,
do_csirs,
bwp->bwp_Id+10,
uid);
} }
secondaryCellGroup->spCellConfig->spCellConfigDedicated->sCellDeactivationTimer=NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->sCellDeactivationTimer=NULL;
secondaryCellGroup->spCellConfig->spCellConfigDedicated->crossCarrierSchedulingConfig=NULL; secondaryCellGroup->spCellConfig->spCellConfigDedicated->crossCarrierSchedulingConfig=NULL;