schCellCfg.schInitialUlBwp.bwp.freqAlloc.numPrb = macCellCfg->initialUlBwp.bwp.numPrb;
schCellCfg.schInitialUlBwp.bwp.scs = macCellCfg->initialUlBwp.bwp.scs;
schCellCfg.schInitialUlBwp.bwp.cyclicPrefix = macCellCfg->initialUlBwp.bwp.cyclicPrefix;
- schCellCfg.schInitialUlBwp.puschCommon.k2 = macCellCfg->initialUlBwp.puschCommon.k2;
- schCellCfg.schInitialUlBwp.puschCommon.mappingType =
- macCellCfg->initialUlBwp.puschCommon.mappingType;
- schCellCfg.schInitialUlBwp.puschCommon.startSymbol =
- macCellCfg->initialUlBwp.puschCommon.startSymbol;
- schCellCfg.schInitialUlBwp.puschCommon.lengthSymbol =
- macCellCfg->initialUlBwp.puschCommon.lengthSymbol;
+ schCellCfg.schInitialUlBwp.puschCommon.numTimeDomRsrcAlloc = \
+ macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc;
+ for(idx = 0; idx < macCellCfg->initialUlBwp.puschCommon.numTimeDomRsrcAlloc; idx++)
+ {
+ schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].k2 =
+ macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].k2;
+ schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].mappingType =
+ macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].mappingType;
+ schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].startSymbol =
+ macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].startSymbol;
+ schCellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[idx].symbolLength =
+ macCellCfg->initialUlBwp.puschCommon.timeDomRsrcAllocList[idx].symbolLength;
+ }
#ifdef NR_TDD
memcpy(&schCellCfg.tddCfg, &macCellCfg->tddCfg, sizeof(TDDCfg));
#endif
uint16_t tbSize = 0;
cell = schCb[schInst].cells[schInst];
- startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.startSymbol;
- symbLen = cell->cellCfg.schInitialUlBwp.puschCommon.lengthSymbol;
+ startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol;
+ symbLen = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[0].symbolLength;
startRb = cell->schUlSlotInfo[msg3SlotAlloc]->puschCurrentPrb;
tbSize = schCalcTbSize(8); /* 6 bytes msg3 and 2 bytes header */
//puschMu = cell->cellCfg.puschMu;
delta = puschDeltaTable[puschMu];
- k2 = cell->cellCfg.schInitialUlBwp.puschCommon.k2;
+ k2 = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2;
/* RAR will sent with a delay of RAR_DELAY */
rarSlot = (rachInd->timingInfo.slot+RAR_DELAY+PHY_DELTA_DL)%cell->numSlots;
#ifdef NR_TDD
uint8_t pucchGroupHopping;
}PucchConfigCommon;
+/* PUSCH Time Domain Resource Allocation */
+typedef struct puschTimeDomRsrcAlloc
+{
+ uint8_t k2;
+ CommonMappingType mappingType;
+ uint8_t startSymbol;
+ uint8_t symbolLength;
+ uint8_t startSymbolAndLength;
+}PuschTimeDomRsrcAlloc;
+
+
typedef struct puschConfigCommon
{
/* PUSCH-TimeDomainResourceAllocation info */
- uint8_t k2;
- uint8_t mappingType;
- uint8_t startSymbol;
- uint8_t lengthSymbol;
+ uint8_t numTimeDomRsrcAlloc;
+ PuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
}PuschConfigCommon;
typedef struct bwpDlConfig
TransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
}DmrsUlCfg;
-/* PUSCH Time Domain Resource Allocation */
-typedef struct puschTimeDomRsrcAlloc
-{
- uint8_t k2;
- CommonMappingType mappingType;
- uint8_t startSymbol;
- uint8_t symbolLength;
- uint8_t startSymbolAndLength;
-}PuschTimeDomRsrcAlloc;
-
/* PUSCH Configuration */
typedef struct puschCfg
{
uint8_t pucchGroupHopping;
}SchPucchCfgCmn;
+/* PUSCH Time Domain Resource Allocation */
+typedef struct schPuschTimeDomRsrcAlloc
+{
+ uint8_t k2;
+ SchTimeDomRsrcAllocMappingType mappingType;
+ uint8_t startSymbol;
+ uint8_t symbolLength;
+}SchPuschTimeDomRsrcAlloc;
+
typedef struct schPuschCfgCmn
{
- uint8_t k2;
- uint8_t mappingType;
- uint8_t startSymbol;
- uint8_t lengthSymbol;
+ uint8_t numTimeDomRsrcAlloc;
+ SchPuschTimeDomRsrcAlloc timeDomRsrcAllocList[MAX_NUM_UL_ALLOC]; /* PUSCH time domain UL resource allocation list */
}SchPuschCfgCmn;
typedef struct schBwpDlCfg
SchTransPrecodDisabled transPrecodDisabled; /* Transform precoding disabled */
}SchDmrsUlCfg;
-/* PUSCH Time Domain Resource Allocation */
-typedef struct schPuschTimeDomRsrcAlloc
-{
- uint8_t k2;
- SchTimeDomRsrcAllocMappingType mappingType;
- uint8_t startSymbol;
- uint8_t symbolLength;
-}SchPuschTimeDomRsrcAlloc;
-
/* PUSCH Configuration */
typedef struct schPuschCfg
{
#define PDSCH_MAPPING_TYPE_B 1
/* MACRO Define for PUSCH Configuration */
-#define PUSCH_K2 3
+#define PUSCH_K2_CFG1 3
+#define PUSCH_K2_CFG2 4
#define PUSCH_MSG3_DELTA_PREAMBLE 0
#define PUSCH_P0_NOMINAL_WITH_GRANT -70
return RFAILED;
}
- elementCnt = 1;
+ elementCnt = 2;
timeDomAllocList->choice.setup->list.count = elementCnt;
timeDomAllocList->choice.setup->list.size = \
elementCnt * sizeof(PUSCH_TimeDomainResourceAllocation_t *);
DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
- *(timeDomAlloc->k2) = PUSCH_K2;
+ *(timeDomAlloc->k2) = PUSCH_K2_CFG1;
timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
timeDomAlloc->startSymbolAndLength = 66;
+
+ idx++;
+ timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
+ CU_ALLOC(timeDomAlloc->k2, sizeof(long));
+ if(!timeDomAlloc->k2)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ return RFAILED;
+ }
+ *(timeDomAlloc->k2) = PUSCH_K2_CFG2;
+ timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
+ timeDomAlloc->startSymbolAndLength = 66;
+
return ROK;
}
duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SCS_15KHZ; /* numerology is 0, 15Khz */
#endif
duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.k2 = PUSCH_K2;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.mappingType =
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].mappingType =
PUSCH_MAPPING_TYPE_A;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.startSymbol =
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].startSymbol =
PUSCH_START_SYMBOL;
- duCfgParam.macCellCfg.initialUlBwp.puschCommon.lengthSymbol =
+ duCfgParam.macCellCfg.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 =
+ PUSCH_MAPPING_TYPE_A;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].startSymbol =
+ PUSCH_START_SYMBOL;
+ duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[1].symbolLength =
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;
srvCellCfgComm->ulCfg.rachCfg = rachCfg;
/* Configuring PUSCH Config Common for SIB1 */
- puschCfg.present = BWP_UplinkCommon__pusch_ConfigCommon_PR_setup;
- puschCfg.k2 = PUSCH_K2;
- puschCfg.mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
- puschCfg.sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
+ puschCfg.puschCfgPresent = BWP_UplinkCommon__pusch_ConfigCommon_PR_setup;
+ puschCfg.numTimeDomRsrcAlloc = 2;
+ puschCfg.timeDomAllocList[0].k2 = PUSCH_K2_CFG1;
+ puschCfg.timeDomAllocList[0].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
+ puschCfg.timeDomAllocList[0].sliv = calcSliv(PUSCH_START_SYMBOL,PUSCH_LENGTH_SYMBOL);
+ puschCfg.timeDomAllocList[1].k2 = PUSCH_K2_CFG2;
+ puschCfg.timeDomAllocList[1].mapType = PUSCH_TimeDomainResourceAllocation__mappingType_typeA;
+ puschCfg.timeDomAllocList[1].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;
#define PDSCH_NUM_HARQ_PROC 5
/* MACRO Define for PUSCH Configuration */
-#define PUSCH_K2 3
+#define MAX_UL_ALLOC 16
+#define PUSCH_K2_CFG1 3
+#define PUSCH_K2_CFG2 4
#define PUSCH_START_SYMBOL 3
#define PUSCH_LENGTH_SYMBOL 11
long restrictedSetCfg; /* Restricted set configuration */
}RachCfgCommon;
-typedef struct puschCfgCommon
+typedef struct puschCfgCmnTimeDomAlloc
{
- uint8_t present;
long k2;
long mapType;
uint16_t sliv;
+}PuschCfgCmnTimeDomAlloc;
+
+typedef struct puschCfgCommon
+{
+ uint8_t puschCfgPresent;
+ uint8_t numTimeDomRsrcAlloc;
+ PuschCfgCmnTimeDomAlloc timeDomAllocList[MAX_UL_ALLOC];
long msg3DeltaPreamble;
long p0NominalWithGrant;
}PuschCfgCommon;
return RFAILED;
}
- elementCnt = 1;
+ elementCnt = 2;
timeDomAllocList->choice.setup->list.count = elementCnt;
timeDomAllocList->choice.setup->list.size = \
elementCnt * sizeof(PUSCH_TimeDomainResourceAllocation_t *);
DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
return RFAILED;
}
- *(timeDomAlloc->k2) = PUSCH_K2;
+ *(timeDomAlloc->k2) = PUSCH_K2_CFG1;
+ timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
+ timeDomAlloc->startSymbolAndLength = calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
+
+ idx++;
+ timeDomAlloc = timeDomAllocList->choice.setup->list.array[idx];
+ DU_ALLOC(timeDomAlloc->k2, sizeof(long));
+ if(!timeDomAlloc->k2)
+ {
+ DU_LOG("\nERROR --> F1AP : Memory allocation failed in BuildPuschTimeDomAllocList");
+ return RFAILED;
+ }
+ *(timeDomAlloc->k2) = PUSCH_K2_CFG2;
timeDomAlloc->mappingType = PUSCH_MAPPING_TYPE_A;
timeDomAlloc->startSymbolAndLength = calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
+
return ROK;
}
duPuschCfg = duCfgParam.sib1Params.srvCellCfgCommSib.ulCfg.puschCfg;
- puschCfg->present = duPuschCfg.present;
+ puschCfg->present = duPuschCfg.puschCfgPresent;
switch(puschCfg->present)
{
case BWP_UplinkCommon__pusch_ConfigCommon_PR_NOTHING:
DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
return RFAILED;
}
- elementCnt = ODU_VALUE_ONE;
+ elementCnt = duPuschCfg.numTimeDomRsrcAlloc;
setup->pusch_TimeDomainAllocationList->list.count = elementCnt;
setup->pusch_TimeDomainAllocationList->list.size = \
elementCnt * sizeof(PUSCH_TimeDomainResourceAllocation_t *);
}
}
- idx = 0;
- timeDomRsrcAllocInfo = setup->pusch_TimeDomainAllocationList->list.array[idx];
-
- /* K2 */
- DU_ALLOC(timeDomRsrcAllocInfo->k2, sizeof(long));
- if(!timeDomRsrcAllocInfo->k2)
- {
- DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
- return RFAILED;
- }
- *timeDomRsrcAllocInfo->k2 = duPuschCfg.k2;
-
- timeDomRsrcAllocInfo->mappingType = duPuschCfg.mapType;
- timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.sliv;
+ for(idx = 0; idx < elementCnt; idx++)
+ {
+ timeDomRsrcAllocInfo = setup->pusch_TimeDomainAllocationList->list.array[idx];
+ /* K2 */
+ DU_ALLOC(timeDomRsrcAllocInfo->k2, sizeof(long));
+ if(!timeDomRsrcAllocInfo->k2)
+ {
+ DU_LOG("\nERROR --> DU APP : PUSCH Config memory alloc failed");
+ return RFAILED;
+ }
+ *timeDomRsrcAllocInfo->k2 = duPuschCfg.timeDomAllocList[idx].k2;
+ timeDomRsrcAllocInfo->mappingType = duPuschCfg.timeDomAllocList[idx].mapType;
+ timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.timeDomAllocList[idx].sliv;
+ }
/* Msg3 Delta Preamble */
DU_ALLOC(setup->msg3_DeltaPreamble, sizeof(long));
if(!setup->msg3_DeltaPreamble)
initUlBwp->puschCfg.dmrsUlCfgForPuschMapTypeA.transPrecodDisabled. \
scramblingId0 = SCRAMBLING_ID;
initUlBwp->puschCfg.resourceAllocType = RESOURCEALLOCATION_TYPE1;
- initUlBwp->puschCfg.numTimeDomRsrcAlloc = 1;
+ initUlBwp->puschCfg.numTimeDomRsrcAlloc = 2;
idx = 0;
if(initUlBwp->puschCfg.numTimeDomRsrcAlloc <= MAX_NUM_UL_ALLOC)
{
- initUlBwp->puschCfg.timeDomRsrcAllocList[idx].k2 = PUSCH_K2;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].k2 = PUSCH_K2_CFG1;
initUlBwp->puschCfg.timeDomRsrcAllocList[idx].mappingType =\
MAPPING_TYPEA;
initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbol = PUSCH_START_SYMBOL;
initUlBwp->puschCfg.timeDomRsrcAllocList[idx].symbolLength = PUSCH_LENGTH_SYMBOL;
initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbolAndLength =\
calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
+
+ idx++;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].k2 = PUSCH_K2_CFG2;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].mappingType = MAPPING_TYPEA;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbol = PUSCH_START_SYMBOL;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].symbolLength = PUSCH_LENGTH_SYMBOL;
+ initUlBwp->puschCfg.timeDomRsrcAllocList[idx].startSymbolAndLength =\
+ calcSliv(PUSCH_START_SYMBOL, PUSCH_LENGTH_SYMBOL);
}
initUlBwp->puschCfg.transformPrecoder = TRANSFORM_PRECODER_DISABLED;
}