Moving all common header file into common_def.h file
[o-du/l2.git] / src / du_app / du_cfg.c
index 05aefd0..f343561 100644 (file)
 *******************************************************************************/
 
 /* 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;
@@ -234,22 +241,22 @@ S16 readMacCfg()
    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.raSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.coresetId = CORESET_0_INDEX;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.monitoringSlot =
+   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.raSearchSpace.duration = 0;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.monitoringSymbol =
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.duration = 0;
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.monitoringSymbol =
           SS_MONITORING_SYMBOL;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
           candidate.aggLevel1  = 8;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
           candidate.aggLevel2  = 4;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
           candidate.aggLevel4  = 2;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
           candidate.aggLevel8  = 1;
-   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
+   duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.commonSearchSpace.
           candidate.aggLevel16 = 0;
    duCfgParam.macCellCfg.initialDlBwp.pdschCommon.k0 = PDSCH_K0;
        duCfgParam.macCellCfg.initialDlBwp.pdschCommon.mappingType = 
@@ -258,8 +265,10 @@ S16 readMacCfg()
           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 DL BWP */
+   /* 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 */
@@ -272,10 +281,14 @@ S16 readMacCfg()
        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);
 }
@@ -468,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;
@@ -767,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;