From: lal.harshita Date: Tue, 1 Aug 2023 07:45:43 +0000 (+0530) Subject: [Epic-ID: ODUHIGH-518] Alignment to latest ORAN WG8 Spec: O-RAN.WG8.AAD.0-R003-v09.00 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=95d4c229dc30cec27c98ee66b5b689779a48dcc9;p=o-du%2Fl2.git [Epic-ID: ODUHIGH-518] Alignment to latest ORAN WG8 Spec: O-RAN.WG8.AAD.0-R003-v09.00 Change-Id: I19a1a105dd081414c3d5f0395576b7642b0ba473 Signed-off-by: svaidhya --- diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index d0b8fe6be..bbc67cc13 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -4311,12 +4311,12 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu ulTtiReqPdu->pdu.pusch_pdu.rnti = currUlSlot->ulInfo.crnti; /* TODO : Fill handle in raCb when scheduling pusch and access here */ ulTtiReqPdu->pdu.pusch_pdu.handle = 100; - ulTtiReqPdu->pdu.pusch_pdu.bwpSize = macCellCfg->initialUlBwp.bwp.numPrb; - ulTtiReqPdu->pdu.pusch_pdu.bwpStart = macCellCfg->initialUlBwp.bwp.firstPrb; + ulTtiReqPdu->pdu.pusch_pdu.bwpSize = macCellCfg->cellCfg.initialUlBwp.bwp.numPrb; + ulTtiReqPdu->pdu.pusch_pdu.bwpStart = macCellCfg->cellCfg.initialUlBwp.bwp.firstPrb; ulTtiReqPdu->pdu.pusch_pdu.subCarrierSpacing = \ - macCellCfg->initialUlBwp.bwp.scs; + macCellCfg->cellCfg.initialUlBwp.bwp.scs; ulTtiReqPdu->pdu.pusch_pdu.cyclicPrefix = \ - macCellCfg->initialUlBwp.bwp.cyclicPrefix; + macCellCfg->cellCfg.initialUlBwp.bwp.cyclicPrefix; ulTtiReqPdu->pdu.pusch_pdu.targetCodeRate = 308; ulTtiReqPdu->pdu.pusch_pdu.qamModOrder = currUlSlot->ulInfo.schPuschInfo.tbInfo.qamOrder; ulTtiReqPdu->pdu.pusch_pdu.mcsIndex = currUlSlot->ulInfo.schPuschInfo.tbInfo.mcs; @@ -4401,10 +4401,10 @@ void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu ulTtiReqPdu->pdu.pucch_pdu.rnti = currUlSlot->ulInfo.crnti; /* TODO : Fill handle in raCb when scheduling pucch and access here */ ulTtiReqPdu->pdu.pucch_pdu.handle = 100; - ulTtiReqPdu->pdu.pucch_pdu.bwpSize = macCellCfg->initialUlBwp.bwp.numPrb; - ulTtiReqPdu->pdu.pucch_pdu.bwpStart = macCellCfg->initialUlBwp.bwp.firstPrb; - ulTtiReqPdu->pdu.pucch_pdu.subCarrierSpacing = macCellCfg->initialUlBwp.bwp.scs; - ulTtiReqPdu->pdu.pucch_pdu.cyclicPrefix = macCellCfg->initialUlBwp.bwp.cyclicPrefix; + ulTtiReqPdu->pdu.pucch_pdu.bwpSize = macCellCfg->cellCfg.initialUlBwp.bwp.numPrb; + ulTtiReqPdu->pdu.pucch_pdu.bwpStart = macCellCfg->cellCfg.initialUlBwp.bwp.firstPrb; + ulTtiReqPdu->pdu.pucch_pdu.subCarrierSpacing = macCellCfg->cellCfg.initialUlBwp.bwp.scs; + ulTtiReqPdu->pdu.pucch_pdu.cyclicPrefix = macCellCfg->cellCfg.initialUlBwp.bwp.cyclicPrefix; ulTtiReqPdu->pdu.pucch_pdu.formatType = currUlSlot->ulInfo.schPucchInfo.pucchFormat; /* Supporting PUCCH Format 0 */ ulTtiReqPdu->pdu.pucch_pdu.multiSlotTxIndicator = 0; /* No Multi Slot transmission */ diff --git a/src/5gnrmac/mac.h b/src/5gnrmac/mac.h index 64ff813fb..647299f6d 100644 --- a/src/5gnrmac/mac.h +++ b/src/5gnrmac/mac.h @@ -241,6 +241,7 @@ struct macCellCb MacUeRecfg *ueRecfgTmpData[MAX_NUM_UE]; MacUeCb ueCb[MAX_NUM_UE]; MacCellCfg macCellCfg; + uint8_t numerology; SlotTimingInfo currTime; }; diff --git a/src/5gnrmac/mac_cfg_hdl.c b/src/5gnrmac/mac_cfg_hdl.c index ac05143dc..fee5f4f77 100644 --- a/src/5gnrmac/mac_cfg_hdl.c +++ b/src/5gnrmac/mac_cfg_hdl.c @@ -135,7 +135,7 @@ uint8_t SchSendCfgCfm(Pst *pst, RgMngmt *cfm) uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { Pst cfmPst; - uint16_t cellIdx; + uint16_t cellIdx, scsInKhz = 0; uint8_t ret = ROK, plmnIdx = 0,sliceIdx = 0; MacCellCb *macCellCb; @@ -152,7 +152,11 @@ uint8_t MacProcCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) GET_CELL_IDX(macCellCfg->cellId, cellIdx); macCb.macCell[cellIdx] = macCellCb; macCb.macCell[cellIdx]->cellId = macCellCfg->cellId; - macCb.macCell[cellIdx]->numOfSlots = 10 * (1 << macCellCfg->cellCfg.numerology); + scsInKhz = convertScsEnumValToScsVal(macCellCfg->cellCfg.subCarrSpacing); + + /*Ref : 3GPP 38.211 Table 4.2-1: SCS = (2 ^ numerology * 15kHz)*/ + macCb.macCell[cellIdx]->numerology = log2(scsInKhz/BASE_SCS); + macCb.macCell[cellIdx]->numOfSlots = 10 * (1 << (macCb.macCell[cellIdx]->numerology)); memcpy(&macCb.macCell[cellIdx]->macCellCfg, macCellCfg, sizeof(MacCellCfg)); MAC_ALLOC(macCb.macCell[cellIdx]->macCellCfg.cellCfg.sib1Cfg.sib1Pdu, \ @@ -268,50 +272,50 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) } schCellCfg.dupMode = macCellCfg->cellCfg.dupType; - schCellCfg.numerology = macCellCfg->cellCfg.numerology; schCellCfg.dlBandwidth = macCellCfg->carrCfg.dlBw; schCellCfg.ulBandwidth = macCellCfg->carrCfg.ulBw; schCellCfg.dlCfgCommon.schFreqInfoDlSib.offsetToPointA = macCellCfg->ssbCfg.ssbOffsetPointA; + schCellCfg.dlCfgCommon.schFreqInfoDlSib.schSpcCarrier[0].subCarrierSpacing = macCellCfg->ssbCfg.scsCmn; /* fill initial DL BWP */ - schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.freqAlloc.startPrb = macCellCfg->initialDlBwp.bwp.firstPrb; - schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.freqAlloc.numPrb = macCellCfg->initialDlBwp.bwp.numPrb; - schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.scs = macCellCfg->initialDlBwp.bwp.scs; - schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.cyclicPrefix = macCellCfg->initialDlBwp.bwp.cyclicPrefix; + schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.freqAlloc.startPrb = macCellCfg->cellCfg.initialDlBwp.bwp.firstPrb; + schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.freqAlloc.numPrb = macCellCfg->cellCfg.initialDlBwp.bwp.numPrb; + schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.scs = macCellCfg->cellCfg.initialDlBwp.bwp.scs; + schCellCfg.dlCfgCommon.schInitialDlBwp.bwp.cyclicPrefix = macCellCfg->cellCfg.initialDlBwp.bwp.cyclicPrefix; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.coresetId = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.coresetId; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.duration = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.duration; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel1 = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel1; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel1; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel2 = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel2; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel2; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel4 = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel4; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel4; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel8 = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel8; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel8; schCellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel16 = - macCellCfg->initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel16; + macCellCfg->cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.candidate.aggLevel16; - schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.numTimeDomAlloc = macCellCfg->initialDlBwp.pdschCommon.numTimeDomAlloc; - for(rsrcListIdx = 0; rsrcListIdxinitialDlBwp.pdschCommon.numTimeDomAlloc; rsrcListIdx++) + schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.numTimeDomAlloc = macCellCfg->cellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc; + for(rsrcListIdx = 0; rsrcListIdxcellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc; rsrcListIdx++) { schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].k0 = - macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].k0; + macCellCfg->cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].k0; schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType = - macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType; + macCellCfg->cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType; schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol = - macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol; + macCellCfg->cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol; schCellCfg.dlCfgCommon.schInitialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].lengthSymbol = - macCellCfg->initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].lengthSymbol; + macCellCfg->cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[rsrcListIdx].lengthSymbol; } /* fill SIB1 scheduler parameters */ @@ -323,10 +327,10 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) } /* fill initial UL BWP */ - schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.freqAlloc.startPrb = macCellCfg->initialUlBwp.bwp.firstPrb; - schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.freqAlloc.numPrb = macCellCfg->initialUlBwp.bwp.numPrb; - schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.scs = macCellCfg->initialUlBwp.bwp.scs; - schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.cyclicPrefix = macCellCfg->initialUlBwp.bwp.cyclicPrefix; + schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.freqAlloc.startPrb = macCellCfg->cellCfg.initialUlBwp.bwp.firstPrb; + schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.freqAlloc.numPrb = macCellCfg->cellCfg.initialUlBwp.bwp.numPrb; + schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.scs = macCellCfg->cellCfg.initialUlBwp.bwp.scs; + schCellCfg.ulCfgCommon.schInitialUlBwp.bwp.cyclicPrefix = macCellCfg->cellCfg.initialUlBwp.bwp.cyclicPrefix; /* fill RACH config params */ schCellCfg.ulCfgCommon.schInitialUlBwp.schRachCfg.prachCfgGeneric.prachCfgIdx = macCellCfg->prachCfg.prachCfgIdx; schCellCfg.ulCfgCommon.schInitialUlBwp.schRachCfg.prachCfgGeneric.msg1Fdm = macCellCfg->prachCfg.msg1Fdm; @@ -345,21 +349,21 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) macCellCfg->prachCfg.prachSubcSpacing; schCellCfg.ulCfgCommon.schInitialUlBwp.pucchCommon.pucchResourceCommon = \ - macCellCfg->initialUlBwp.pucchCommon.pucchResourceCommon; + macCellCfg->cellCfg.initialUlBwp.pucchCommon.pucchResourceCommon; schCellCfg.ulCfgCommon.schInitialUlBwp.pucchCommon.pucchGroupHopping = \ - macCellCfg->initialUlBwp.pucchCommon.pucchGroupHopping; + macCellCfg->cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping; schCellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.numTimeDomRsrcAlloc = \ - macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc; - for(rsrcListIdx = 0; rsrcListIdx < macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc; rsrcListIdx++) + macCellCfg->cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc; + for(rsrcListIdx = 0; rsrcListIdx < macCellCfg->cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc; rsrcListIdx++) { schCellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].k2 = - macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].k2; + macCellCfg->cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].k2; schCellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType = - macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType; + macCellCfg->cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].mappingType; schCellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol = - macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol; + macCellCfg->cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].startSymbol; schCellCfg.ulCfgCommon.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].symbolLength = - macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].symbolLength; + macCellCfg->cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[rsrcListIdx].symbolLength; } #ifdef NR_TDD @@ -371,10 +375,10 @@ uint8_t MacSchCellCfgReq(Pst *pst, MacCellCfg *macCellCfg) { schCellCfg.ssbPosInBurst[ssbMaskIdx] = macCellCfg->ssbCfg.ssbMask[ssbMaskIdx]; } - schCellCfg.ssbPeriod = ssbPeriodicity[macCellCfg->ssbCfg.ssbPeriod]; + schCellCfg.ssbPeriod = ssbPeriodicity[macCellCfg->ssbCfg.ssbPeriod]; schCellCfg.ssbFrequency = macCellCfg->cellCfg.ssbFreq; schCellCfg.dmrsTypeAPos = macCellCfg->ssbCfg.dmrsTypeAPos; - schCellCfg.scsCommon = macCellCfg->ssbCfg.scsCmn; + schCellCfg.ssbScs = macCellCfg->cellCfg.subCarrSpacing; schCellCfg.pdcchCfgSib1.coresetZeroIndex = macCellCfg->cellCfg.sib1Cfg.pdcchCfgSib1.coresetZeroIndex; schCellCfg.pdcchCfgSib1.searchSpaceZeroIndex = macCellCfg->cellCfg.sib1Cfg.pdcchCfgSib1.searchSpaceZeroIndex; schCellCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr; diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 8d8dba6b9..293add2bb 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -381,7 +381,7 @@ void schInitTddSlotCfg(SchCellCb *cell, SchCellCfg *schCellCfg) int8_t slotIdx, symbIdx; periodicityInMicroSec = schGetPeriodicityInMsec(schCellCfg->tddCfg.tddPeriod); - cell->numSlotsInPeriodicity = (periodicityInMicroSec * pow(2, schCellCfg->numerology))/1000; + cell->numSlotsInPeriodicity = (periodicityInMicroSec * pow(2, cell->numerology))/1000; cell->slotFrmtBitMap = 0; schFillSlotConfig(cell, schCellCfg->tddCfg); for(slotIdx = cell->numSlotsInPeriodicity-1; slotIdx >= 0; slotIdx--) @@ -434,7 +434,7 @@ void fillSsbStartSymb(SchCellCb *cellCb) { uint8_t cnt, scs, symbIdx, ssbStartSymbArr[SCH_MAX_SSB_BEAM]; - scs = cellCb->cellCfg.scsCommon; + scs = cellCb->cellCfg.ssbScs; memset(ssbStartSymbArr, 0, sizeof(SCH_MAX_SSB_BEAM)); symbIdx = 0; @@ -496,6 +496,7 @@ void fillSsbStartSymb(SchCellCb *cellCb) **/ uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg) { + uint16_t scsInKhz = 0; SchCellCb *cell= NULLP; SCH_ALLOC(cell, sizeof(SchCellCb)); if(!cell) @@ -506,7 +507,11 @@ uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg) cell->cellId = schCellCfg->cellId; cell->instIdx = inst; - switch(schCellCfg->numerology) + scsInKhz = convertScsEnumValToScsVal(schCellCfg->ssbScs); + + /*Ref : 3GPP 38.211 Table 4.2-1: SCS = (2 ^ numerology * 15kHz)*/ + cell->numerology = log2(scsInKhz/BASE_SCS); + switch(cell->numerology) { case SCH_NUMEROLOGY_0: { @@ -534,7 +539,7 @@ uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg) } break; default: - DU_LOG("\nERROR --> SCH : Numerology %d not supported", schCellCfg->numerology); + DU_LOG("\nERROR --> SCH : Numerology %d not supported", cell->numerology); } #ifdef NR_TDD schInitTddSlotCfg(cell, schCellCfg); @@ -795,7 +800,7 @@ uint8_t SchProcCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) cellCb->macInst = pst->srcInst; /* derive the SIB1 config parameters */ - ret = fillSchSib1Cfg(schCellCfg->numerology, schCellCfg->dlBandwidth, cellCb->numSlots, + ret = fillSchSib1Cfg(cellCb->numerology, schCellCfg->dlBandwidth, cellCb->numSlots, &(schCellCfg->pdcchCfgSib1), &(cellCb->sib1SchCfg), schCellCfg->phyCellId, schCellCfg->dlCfgCommon.schFreqInfoDlSib.offsetToPointA, schCellCfg->sib1PduLen); diff --git a/src/5gnrsch/sch.h b/src/5gnrsch/sch.h index 9184ed991..4feaa1828 100644 --- a/src/5gnrsch/sch.h +++ b/src/5gnrsch/sch.h @@ -615,6 +615,7 @@ typedef struct schCellCb SchDlSlotInfo **schDlSlotInfo; /*!< SCH resource allocations in DL */ SchUlSlotInfo **schUlSlotInfo; /*!< SCH resource allocations in UL */ SchCellCfg cellCfg; /*!< Cell ocnfiguration */ + uint8_t numerology; bool firstSsbTransmitted; bool firstSib1Transmitted; uint8_t ssbStartSymbArr[SCH_MAX_SSB_BEAM]; /*!< start symbol per SSB beam */ diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index 9c0b20601..da6fd9cf0 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -1092,7 +1092,7 @@ SchPdschConfig pdschDedCfg, uint8_t ulAckListCount, uint8_t *UlAckTbl) /* Initialization the K0K1 structure, total num of slot and calculating the slot pattern length. */ memset(k0K1InfoTbl, 0, sizeof(SchK0K1TimingInfoTbl)); k0K1InfoTbl->tblSize = cell->numSlots; - totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.scsCommon, cell->cellCfg.tddCfg.tddPeriod); + totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.ssbScs, cell->cellCfg.tddCfg.tddPeriod); /* Storing time domain resource allocation list based on common or * dedicated configuration availability. */ @@ -1322,7 +1322,7 @@ SchK2TimingInfoTbl *msg3K2InfoTbl, SchK2TimingInfoTbl *k2InfoTbl) k2InfoTbl->tblSize = cell->numSlots; if(msg3K2InfoTbl) msg3K2InfoTbl->tblSize = cell->numSlots; - totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.scsCommon, cell->cellCfg.tddCfg.tddPeriod); + totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.ssbScs, cell->cellCfg.tddCfg.tddPeriod); /* Checking all possible indexes for K2. */ for(slotIdx = 0; slotIdx < cell->numSlots; slotIdx++) @@ -1340,7 +1340,7 @@ SchK2TimingInfoTbl *msg3K2InfoTbl, SchK2TimingInfoTbl *k2InfoTbl) k2Val = timeDomRsrcAllocList[k2Index].k2; if(!k2Val) { - switch(cell->cellCfg.scsCommon) + switch(cell->cellCfg.ssbScs) { case SCS_15KHZ: k2Val = DEFAULT_K2_VALUE_FOR_SCS15; @@ -1390,7 +1390,7 @@ SchK2TimingInfoTbl *msg3K2InfoTbl, SchK2TimingInfoTbl *k2InfoTbl) if(msg3K2InfoTbl) { - msg3Delta = puschDeltaTable[cell->cellCfg.numerology]; + msg3Delta = puschDeltaTable[cell->numerology]; /* Check for K2 for MSG3 */ /* Current slot + k2 should be either UL or FLEXI slot. @@ -2225,7 +2225,7 @@ bool schGetMsg3K2(SchCellCb *cell, SchUlHqProcCb* msg3HqProc, uint16_t dlTime, S SchK2TimingInfoTbl *msg3K2InfoTbl=NULLP; SlotTimingInfo currTime, msg3TempTime; currTime = cell->slotInfo; - puschMu = cell->cellCfg.numerology; + puschMu = cell->numerology; if (isRetx) { @@ -2241,7 +2241,7 @@ bool schGetMsg3K2(SchCellCb *cell, SchUlHqProcCb* msg3HqProc, uint16_t dlTime, S { numK2 = cell->msg3K2InfoTbl.k2TimingInfo[dlTime].numK2; msg3K2InfoTbl = &cell->k2InfoTbl; - msg3MinSchTime = minMsg3SchTime[cell->cellCfg.numerology]; + msg3MinSchTime = minMsg3SchTime[cell->numerology]; msg3Delta = puschDeltaTable[puschMu]; } diff --git a/src/5gnrsch/sch_rach.c b/src/5gnrsch/sch_rach.c index a4a48a086..8d5b79ca7 100644 --- a/src/5gnrsch/sch_rach.c +++ b/src/5gnrsch/sch_rach.c @@ -74,7 +74,7 @@ bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo) if((prachOccasionTimingInfo.sfn%x) == y) { - subFrame = prachOccasionTimingInfo.slot/pow(2, cell->cellCfg.numerology); + subFrame = prachOccasionTimingInfo.slot/pow(2, cell->numerology); /* check for subFrame number */ if ((1 << subFrame) & prachSubframe) @@ -555,15 +555,15 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin RaRspWindowStatus windowStatus=0; #ifdef NR_TDD - totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.scsCommon, cell->cellCfg.tddCfg.tddPeriod); + totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.ssbScs, cell->cellCfg.tddCfg.tddPeriod); #endif k0K1InfoTbl = &cell->k0K1InfoTbl; if(cell->raReq[ueId-1]->isCFRA == false) { msg3K2InfoTbl = &cell->msg3K2InfoTbl; - puschMu = cell->cellCfg.numerology; + puschMu = cell->numerology; msg3Delta = puschDeltaTable[puschMu]; - msg3MinSchTime = minMsg3SchTime[cell->cellCfg.numerology]; + msg3MinSchTime = minMsg3SchTime[cell->numerology]; } /* Calculating time frame to send DCI for RAR */ @@ -861,7 +861,7 @@ uint8_t SchProcRachInd(Pst *pst, RachIndInfo *rachInd) raReq->winStartTime.slot = rachInd->timingInfo.slot; /* Converting window size from ms to number of slots */ - slotDuration = (1 / pow(2, cell->cellCfg.numerology)); + slotDuration = (1 / pow(2, cell->numerology)); winNumSlots = (float)cell->cellCfg.ulCfgCommon.schInitialUlBwp.schRachCfg.prachCfgGeneric.raRspWindow / slotDuration; /* Adding window size to window start time to get window end time */ diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 9116d10ff..1711ecbe4 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -321,7 +321,7 @@ uint8_t fillSchUeCbFrmCfgReq(Inst inst, SchUeCb *ueCb, SchUeCfgReq *ueCfg) schInitDrxHarqCb(&ueCb->ulHqEnt.procs[idx].ulDrxHarqCb); } /* convert all the drx configuration recived in ms/subms into number of slots and store into the drxUeCb */ - schFillDrxUeCb(ueCb->cellCb->cellCfg.numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb); + schFillDrxUeCb(ueCb->cellCb->numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb); /* Calculate the onduration timer and short cycle timer (if shortcycle configuration is present) as soon as we * recived ueCfg request */ schAddUeInOndurationList(ueCb->cellCb, ueCb, 0); @@ -331,7 +331,7 @@ uint8_t fillSchUeCbFrmCfgReq(Inst inst, SchUeCb *ueCb, SchUeCfgReq *ueCfg) { /* convert all the drx configuration recived in ms/subms into number * of slots and store into the drxUeCb */ - schFillDrxUeCb(ueCb->cellCb->cellCfg.numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb); + schFillDrxUeCb(ueCb->cellCb->numerology, ueCfg->macCellGrpCfg.drxCfg, &ueCb->drxUeCb); /* Recalculate/Restart timer based on their presence */ schDrxUeReCfgTimer(ueCb->cellCb, ueCb); @@ -488,7 +488,7 @@ uint8_t fillSchUeCbFrmRecfgReq(Inst inst, SchUeCb *ueCb, SchUeRecfgReq *ueRecfg) schInitDrxHarqCb(&ueCb->ulHqEnt.procs[idx].ulDrxHarqCb); } /* convert all the drx configuration recived in ms/subms into number of slots and store into the drxUeCb */ - schFillDrxUeCb(ueCb->cellCb->cellCfg.numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb); + schFillDrxUeCb(ueCb->cellCb->numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb); /* Calculate the onduration timer and short cycle timer (if shortcycle configuration is present) as soon as we * recived ueCfg request */ schAddUeInOndurationList(ueCb->cellCb, ueCb, 0); @@ -498,7 +498,7 @@ uint8_t fillSchUeCbFrmRecfgReq(Inst inst, SchUeCb *ueCb, SchUeRecfgReq *ueRecfg) { /* convert all the drx configuration recived in ms/subms into number * of slots and store into the drxUeCb */ - schFillDrxUeCb(ueCb->cellCb->cellCfg.numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb); + schFillDrxUeCb(ueCb->cellCb->numerology, ueRecfg->macCellGrpRecfg.drxCfg, &ueCb->drxUeCb); /* Recalculate/Restart timer based on their presence */ schDrxUeReCfgTimer(ueCb->cellCb, ueCb); diff --git a/src/cm/common_def.h b/src/cm/common_def.h index c58d28afb..ffc921ea2 100644 --- a/src/cm/common_def.h +++ b/src/cm/common_def.h @@ -126,6 +126,9 @@ #define MAX_SFN 1024 +/*First SCS in kHz as per 3gpp spec 38.211 Table 4.2-1 */ +#define BASE_SCS 15 + /* Defining macros for common utility functions */ #define ODU_GET_MSG_BUF SGetMsg #define ODU_PUT_MSG_BUF SPutMsg diff --git a/src/cm/du_app_mac_inf.h b/src/cm/du_app_mac_inf.h index 56bb46108..7cb789700 100644 --- a/src/cm/du_app_mac_inf.h +++ b/src/cm/du_app_mac_inf.h @@ -656,62 +656,6 @@ typedef struct sib1CellCfg SchPageCfg pagingCfg; } Sib1CellCfg; - -typedef struct cellCfg -{ - MacOpState opState; - MacAdminState adminState; - MacCellState cellState; - PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */ - uint32_t phyCellId; /* Physical cell id */ - uint32_t tac; - uint32_t ssbFreq; - uint16_t subCarrSpacing; - DuplexMode dupType; /* Duplex type: TDD/FDD */ - uint8_t numerology; /* Supported numerology */ - Sib1CellCfg sib1Cfg; /* SIB1 config */ -}CellCfg; - -typedef struct ssbCfg -{ - uint32_t ssbPbchPwr; /* SSB block power */ - uint8_t scsCmn; /* subcarrier spacing for common */ - uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */ - SSBPeriod ssbPeriod; /* SSB Periodicity in msec */ - uint8_t ssbScOffset; /* Subcarrier Offset */ - uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */ - uint8_t beamId[NUM_SSB]; - BetaPss betaPss; - BchPduOpt bchPayloadFlag; /* Options for generation of payload */ - uint8_t mibPdu[3]; /* MIB payload */ - uint8_t dmrsTypeAPos; /* DMRS Type A position */ -}SsbCfg; - -typedef struct fdmInfo -{ - uint16_t rootSeqIdx; /* Root sequence index */ - uint8_t numRootSeq; /* Number of root sequences required for FD */ - uint16_t k1; /* Frequency Offset for each FD */ - uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */ -}PrachFdmInfo; - -typedef struct prachCfg -{ - PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */ - uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */ - uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */ - uint8_t prachCfgIdx; /* PRACH Cfg Index */ - PrachFdmInfo fdm[8]; /* FDM info */ - RstSetCfg prachRstSetCfg; /* PRACH restricted set config */ - uint8_t ssbPerRach; /* SSB per RACH occassion */ - uint8_t totalNumRaPreamble; /* Total number of RA preambles */ - uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */ - uint16_t msg1FreqStart; /* Msg1-FrequencyStart */ - uint8_t raContResTmr; /* RA Contention Resoultion Timer */ - uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */ - uint8_t raRspWindow; /* RA Response Window */ -}PrachCfg; - typedef struct bwpParams { uint16_t firstPrb; @@ -777,7 +721,6 @@ typedef struct puschTimeDomRsrcAlloc uint8_t startSymbolAndLength; }PuschTimeDomRsrcAlloc; - typedef struct puschConfigCommon { /* PUSCH-TimeDomainResourceAllocation info */ @@ -800,6 +743,63 @@ typedef struct bwpUlConfig PuschConfigCommon puschCommon; }BwpUlConfig; + +typedef struct cellCfg +{ + MacOpState opState; + MacAdminState adminState; + MacCellState cellState; + PlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */ + uint32_t phyCellId; /* Physical cell id */ + uint32_t tac; + uint32_t ssbFreq; + uint16_t subCarrSpacing; + DuplexMode dupType; /* Duplex type: TDD/FDD */ + Sib1CellCfg sib1Cfg; /* SIB1 config */ + BwpDlConfig initialDlBwp; /* Initial DL BWP */ + BwpUlConfig initialUlBwp; /* Initial UL BWP */ +}CellCfg; + +typedef struct ssbCfg +{ + uint32_t ssbPbchPwr; /* SSB block power */ + uint8_t scsCmn; /* subcarrier spacing for common */ + uint16_t ssbOffsetPointA; /* SSB subcarrier offset from point A */ + SSBPeriod ssbPeriod; /* SSB Periodicity in msec */ + uint8_t ssbScOffset; /* Subcarrier Offset */ + uint32_t ssbMask[SSB_MASK_SIZE]; /* Bitmap for actually transmitted SSB. */ + uint8_t beamId[NUM_SSB]; + BetaPss betaPss; + BchPduOpt bchPayloadFlag; /* Options for generation of payload */ + uint8_t mibPdu[3]; /* MIB payload */ + uint8_t dmrsTypeAPos; /* DMRS Type A position */ +}SsbCfg; + +typedef struct fdmInfo +{ + uint16_t rootSeqIdx; /* Root sequence index */ + uint8_t numRootSeq; /* Number of root sequences required for FD */ + uint16_t k1; /* Frequency Offset for each FD */ + uint8_t zeroCorrZoneCfg; /* Zero correlation zone cofig */ +}PrachFdmInfo; + +typedef struct prachCfg +{ + PrachSeqLen prachSeqLen; /* RACH Sequence length: Long/short */ + uint8_t prachSubcSpacing; /* Subcarrier spacing of RACH */ + uint8_t msg1Fdm; /* Number of RACH frequency domain occasions/ PRACH FDM (1,2,4,8) */ + uint8_t prachCfgIdx; /* PRACH Cfg Index */ + PrachFdmInfo fdm[8]; /* FDM info */ + RstSetCfg prachRstSetCfg; /* PRACH restricted set config */ + uint8_t ssbPerRach; /* SSB per RACH occassion */ + uint8_t totalNumRaPreamble; /* Total number of RA preambles */ + uint8_t numCbPreamblePerSsb; /* Number of CB preamble per SSB */ + uint16_t msg1FreqStart; /* Msg1-FrequencyStart */ + uint8_t raContResTmr; /* RA Contention Resoultion Timer */ + uint8_t rsrpThreshSsb; /* RSRP Threshold SSB */ + uint8_t raRspWindow; /* RA Response Window */ +}PrachCfg; + #ifdef NR_DRX /* The following list of structures is taken from the DRX-Config section of specification 33.331. */ typedef struct drxOnDurationTimer @@ -860,18 +860,31 @@ typedef struct beamformingConf uint32_t digitalAzimuth; }BeamformingConf; +typedef struct csiRsCfg +{ + uint8_t *csiFreqDomainAlloc; + uint8_t csiNrofPorts; + uint8_t csirsfirstOFDMSymbolInTimeDomain; + uint8_t csirsfirstOFDMSymbolInTimeDomain2; + uint8_t csirscdmType; + uint8_t csirsdensity; + uint8_t csirsdensitydot5; + uint8_t powerControlOffset; + uint8_t powerControlOffsetSS; + uint16_t periodicityAndOffset; +}CsiRsCfg; + typedef struct macCellCfg { uint16_t cellId; /* Cell Id */ CarrierCfg carrCfg; /* Carrier configuration */ CellCfg cellCfg; /* Cell Configuration*/ SsbCfg ssbCfg; /* SSB configuration */ + CsiRsCfg csiRsCfg; /*Reference: 38.331 CSI-MeasConfig*/ PrachCfg prachCfg; /* PRACH Configuration */ #ifdef NR_TDD TDDCfg tddCfg; /* TDD periodicity and slot configuration */ #endif - BwpDlConfig initialDlBwp; /* Initial DL BWP */ - BwpUlConfig initialUlBwp; /* Initial UL BWP */ PrecodingConf precodingConf; BeamformingConf beamCfg; }MacCellCfg; @@ -1531,7 +1544,7 @@ typedef struct macUeCreateReq { uint16_t cellId; uint8_t ueId; - uint8_t beamIdx; + uint8_t beamIdx; uint16_t crnti; bool macCellGrpCfgPres; MacCellGrpCfg macCellGrpCfg; diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 88b347e36..f3d4799d5 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -884,7 +884,6 @@ typedef struct schCellCfg uint16_t phyCellId; /* Physical cell id */ SchPlmnInfoList plmnInfoList[MAX_PLMN]; /* Consits of PlmnId and Snssai list */ SchDuplexMode dupMode; /* Duplex type: TDD/FDD */ - uint8_t numerology; /* Supported numerology */ uint8_t dlBandwidth; /* Supported B/W */ uint8_t ulBandwidth; /* Supported B/W */ SchDlCfgCommon dlCfgCommon; /*Spec 38.331 DownlinkConfigCommonSIB*/ @@ -899,8 +898,8 @@ typedef struct schCellCfg SchSSBPeriod ssbPeriod; /* SSB Periodicity in msec */ uint32_t ssbFrequency; /* SB frequency in kHz*/ uint8_t dmrsTypeAPos; - uint8_t scsCommon; /* subcarrier spacing for common [0-3]*/ - SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/ + uint8_t ssbScs; /* SSB subcarrier spacing*/ + SchPdcchConfigSib1 pdcchCfgSib1; /* Req to configure CORESET#0 and SearchSpace#0*/ uint32_t ssbPbchPwr; /* SSB block power */ uint8_t ssbSubcOffset; /* Subcarrier Offset(Kssb) */ uint16_t sib1PduLen; diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index 4c7a1c591..5c3059cf4 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -169,7 +169,7 @@ uint8_t readMacCfg() } } } - duCfgParam.macCellCfg.cellCfg.numerology = NR_NUMEROLOGY; + duCfgParam.macCellCfg.cellCfg.subCarrSpacing = NR_SCS; duCfgParam.macCellCfg.cellCfg.dupType = DUPLEX_MODE; /* SSB configuration */ @@ -248,77 +248,77 @@ uint8_t readMacCfg() } /* fill Intial DL BWP */ - duCfgParam.macCellCfg.initialDlBwp.bwp.firstPrb = 0; - duCfgParam.macCellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ - duCfgParam.macCellCfg.initialDlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; - duCfgParam.macCellCfg.initialDlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.firstPrb = 0; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ + duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.coresetId = CORESET_0_INDEX; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSlot = SS_MONITORING_SLOT_SL1; /* sl1 - all slots */ - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol = SS_MONITORING_SYMBOL; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. candidate.aggLevel1 = 8; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. candidate.aggLevel2 = 4; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. candidate.aggLevel4 = 2; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. candidate.aggLevel8 = 1; - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. candidate.aggLevel16 = 0; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc = NUM_TIME_DOM_RSRC_ALLOC; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.numTimeDomAlloc = NUM_TIME_DOM_RSRC_ALLOC; idx = 0; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG1; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG1; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType = PDSCH_MAPPING_TYPE_A; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol = PDSCH_START_SYMBOL; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol = PDSCH_LENGTH_SYMBOL; idx++; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG2; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].k0 = PDSCH_K0_CFG2; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].mappingType = PDSCH_MAPPING_TYPE_A; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].startSymbol = PDSCH_START_SYMBOL; - duCfgParam.macCellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol = + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdschCommon.timeDomRsrcAllocList[idx].lengthSymbol = PDSCH_LENGTH_SYMBOL; /* ra-searchSpace ID is set to 1 */ - duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX; + duCfgParam.macCellCfg.cellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX; /* fill Intial UL BWP */ - duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0; - duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ - duCfgParam.macCellCfg.initialUlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; - duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].mappingType = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.firstPrb = 0; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */ + duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.scs = duCfgParam.macCellCfg.ssbCfg.scsCmn; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].mappingType = PUSCH_MAPPING_TYPE_A; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol = PUSCH_START_SYMBOL; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].symbolLength = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].symbolLength = PUSCH_LENGTH_SYMBOL; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].k2 = PUSCH_K2_CFG2; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].mappingType = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].k2 = PUSCH_K2_CFG2; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].mappingType = PUSCH_MAPPING_TYPE_A; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].startSymbol = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].startSymbol = PUSCH_START_SYMBOL; - duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].symbolLength = + duCfgParam.macCellCfg.cellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].symbolLength = PUSCH_LENGTH_SYMBOL; duCfgParam.macCellCfg.ssbCfg.dmrsTypeAPos = DMRS_TYPE_A_POS; /* fill PUCCH config common */ - duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON; - duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON; + duCfgParam.macCellCfg.cellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING; #ifndef O1_ENABLE diff --git a/src/du_app/du_cfg.h b/src/du_app/du_cfg.h index 348b9d078..3b0a0d42e 100644 --- a/src/du_app/du_cfg.h +++ b/src/du_app/du_cfg.h @@ -46,7 +46,6 @@ //TODO: while testing for TDD, Mu1 and 100 MHz, this flag must be enabled #ifdef NR_TDD #define DUPLEX_MODE DUP_MODE_TDD -#define NR_NUMEROLOGY 1 #define NR_DL_ARFCN 623400 #define NR_UL_ARFCN 623400 #define NR_FREQ_BAND 78 @@ -54,7 +53,6 @@ #define NR_BANDWIDTH BANDWIDTH_100MHZ #else #define DUPLEX_MODE DUP_MODE_FDD -#define NR_NUMEROLOGY 0 #define NR_DL_ARFCN 428000 #define NR_UL_ARFCN 390000 #define NR_FREQ_BAND 1