X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2Fdu_app%2Fdu_cfg.c;h=f3435616edd2854f9b0a9862149b47032f3c0d4f;hb=refs%2Fchanges%2F77%2F4377%2F11;hp=7dc8d0d88623aff113c8c5e2de7f3f9257870ef6;hpb=483d527d19566ecca87eee46a198bab6c890c6bb;p=o-du%2Fl2.git diff --git a/src/du_app/du_cfg.c b/src/du_app/du_cfg.c index 7dc8d0d88..f3435616e 100644 --- a/src/du_app/du_cfg.c +++ b/src/du_app/du_cfg.c @@ -17,6 +17,12 @@ *******************************************************************************/ /* This file contains all utility functions */ +#include "common_def.h" +#include "legtp.h" +#include "lrg.h" +#include "lkw.x" +#include "lrg.x" +#include "du_cfg.h" #include "du_mgr.h" #include "du_sys_info_hdl.h" #include "MIB.h" @@ -159,7 +165,7 @@ S16 readMacCfg() duCfgParam.macCellCfg.ssbCfg.scsCmn = SUBCARRIER_SPACING; duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A; duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS; - duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITY; + duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITY_20MS; duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET; duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */ duCfgParam.macCellCfg.ssbCfg.ssbMask[1] = 0; @@ -186,6 +192,7 @@ S16 readMacCfg() duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG; duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM; duCfgParam.macCellCfg.prachCfg.msg1FreqStart = PRACH_FREQ_START; + duCfgParam.macCellCfg.prachCfg.rootSeqLen = ROOT_SEQ_LEN; duCfgParam.macCellCfg.prachCfg.fdm[0].rootSeqIdx = ROOT_SEQ_IDX; duCfgParam.macCellCfg.prachCfg.fdm[0].numRootSeq = NUM_ROOT_SEQ; duCfgParam.macCellCfg.prachCfg.fdm[0].k1 = 1; @@ -228,9 +235,60 @@ S16 readMacCfg() duCfgParam.macCellCfg.sib1Cfg.searchSpaceZeroIndex = SEARCHSPACE_0_INDEX; duCfgParam.macCellCfg.sib1Cfg.sib1Mcs = SIB1_MCS; + + /* fill Intial DL BWP */ + duCfgParam.macCellCfg.initialDlBwp.bwp.firstPrb = 0; + duCfgParam.macCellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */ + duCfgParam.macCellCfg.initialDlBwp.bwp.scs = SUBCARRIER_SPACING; /* numerology is 0, 15Khz */ + 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 = + SS_MONITORING_SLOT_SL1; /* sl1 - all slots */ + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol = + SS_MONITORING_SYMBOL; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + candidate.aggLevel1 = 8; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + candidate.aggLevel2 = 4; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + candidate.aggLevel4 = 2; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + candidate.aggLevel8 = 1; + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace. + candidate.aggLevel16 = 0; + duCfgParam.macCellCfg.initialDlBwp.pdschCommon.k0 = PDSCH_K0; + duCfgParam.macCellCfg.initialDlBwp.pdschCommon.mappingType = + PDSCH_MAPPING_TYPE_A; + duCfgParam.macCellCfg.initialDlBwp.pdschCommon.startSymbol = + PDSCH_START_SYMBOL; + duCfgParam.macCellCfg.initialDlBwp.pdschCommon.lengthSymbol = + PDSCH_LENGTH_SYMBOL; + /* ra-searchSpace ID is set to 1 */ + duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX; + + /* fill Intial UL BWP */ + duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0; + duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */ + duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SUBCARRIER_SPACING; /* numerology is 0, 15Khz */ + duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX; + duCfgParam.macCellCfg.initialUlBwp.puschCommon.k2 = PUSCH_K2; + duCfgParam.macCellCfg.initialUlBwp.puschCommon.mappingType = + PUSCH_MAPPING_TYPE_A; + duCfgParam.macCellCfg.initialUlBwp.puschCommon.startSymbol = + PUSCH_START_SYMBOL; + duCfgParam.macCellCfg.initialUlBwp.puschCommon.lengthSymbol = + PUSCH_LENGTH_SYMBOL; + + duCfgParam.macCellCfg.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; + /* This should be calculated based on (number of mandatory parameters) + (number of otional parameters being filled) */ - duCfgParam.macCellCfg.numTlv = 39; + duCfgParam.macCellCfg.numTlv = 40; RETVALUE(ROK); } @@ -259,6 +317,35 @@ S16 fillDuPort(U16 *duPort) RETVALUE(ROK); } +/******************************************************************* +* +* @brief Configures the DU Parameters +* +* @details +* +* Function : calcSliv +* +* Functionality: +* - calculate SLIV value from start and length field +* +* @params[in] start symbol +* @params[in] length of symbols +* @return SLIV value +* +* ****************************************************************/ +uint16_t calcSliv(uint8_t startSymbol, uint8_t lengthSymbol) +{ + uint16_t sliv = 0; + if((lengthSymbol-1) <= 7) + { + sliv = 14 * (lengthSymbol-1) + startSymbol; + } + else + { + sliv = 14 * (14-lengthSymbol+1) + (14-1-startSymbol); + } + return sliv; +} /******************************************************************* @@ -324,7 +411,7 @@ S16 fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm) pdschCfg.k0 = PDSCH_K0; pdschCfg.mapType = \ PDSCH_TimeDomainResourceAllocation__mappingType_typeA; - pdschCfg.startSymbAndLen = PDSCH_START_SYMB_AND_LEN; + pdschCfg.sliv = calcSliv(PDSCH_START_SYMBOL,PDSCH_LENGTH_SYMBOL); srvCellCfgComm->dlCfg.pdschCfg = pdschCfg; /* Configuring BCCH Config for SIB1 */ @@ -370,9 +457,9 @@ S16 fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm) /* Configuring PUSCH Config Common for SIB1 */ puschCfg.present = BWP_UplinkCommon__pusch_ConfigCommon_PR_setup; - puschCfg.k2 = PUSCH_K0; + puschCfg.k2 = PUSCH_K2; puschCfg.mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA; - puschCfg.startSymbAndLen = PUSCH_START_SYMB_AND_LEN; + puschCfg.sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL); puschCfg.msg3DeltaPreamble = PUSCH_MSG3_DELTA_PREAMBLE; puschCfg.p0NominalWithGrant = PUSCH_P0_NOMINAL_WITH_GRANT; srvCellCfgComm->ulCfg.puschCfg = puschCfg; @@ -394,7 +481,7 @@ S16 fillServCellCfgCommSib(SrvCellCfgCommSib *srvCellCfgComm) srvCellCfgComm->tddCfg = tddCfg; srvCellCfgComm->ssbPosInBurst = 192; - srvCellCfgComm->ssbPrdServingCell = SSB_PERIODICITY; + srvCellCfgComm->ssbPrdServingCell = SSB_PERIODICITY_20MS; srvCellCfgComm->ssPbchBlockPwr = SSB_PBCH_PWR; return ROK; @@ -693,7 +780,7 @@ S16 duReadCfg() pst.dstInst = pst.srcInst; pst.dstProcId = pst.srcProcId; pst.event = EVTCFG; - pst.selector = DU_SELECTOR_TC; + pst.selector = ODU_SELECTOR_TC; pst.pool= DU_POOL;