schCellCfg.schRachCfg.raRspWindow = macCellCfg->prachCfg.raRspWindow;
/* fill initial DL BWP */
- schCellCfg.schInitialBwp.bwp.firstPrb = macCellCfg->initialBwp.bwp.firstPrb;
- schCellCfg.schInitialBwp.bwp.numPrb = macCellCfg->initialBwp.bwp.numPrb;
- schCellCfg.schInitialBwp.bwp.scs = macCellCfg->initialBwp.bwp.scs;
- schCellCfg.schInitialBwp.bwp.cyclicPrefix = macCellCfg->initialBwp.bwp.cyclicPrefix;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.searchSpaceId = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.searchSpaceId;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.coresetId = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.coresetId;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.monitoringSlot = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.monitoringSlot;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.duration = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.duration;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.monitoringSymbol = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.monitoringSymbol;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel1 = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel1;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel2 = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel2;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel4 = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel4;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel8 = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel8;
- schCellCfg.schInitialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel16 = macCellCfg->initialBwp.pdcchCommon.raSearchSpace.candidate.aggLevel16;
+ schCellCfg.schInitialDlBwp.bwp.firstPrb = macCellCfg->initialDlBwp.bwp.firstPrb;
+ schCellCfg.schInitialDlBwp.bwp.numPrb = macCellCfg->initialDlBwp.bwp.numPrb;
+ schCellCfg.schInitialDlBwp.bwp.scs = macCellCfg->initialDlBwp.bwp.scs;
+ schCellCfg.schInitialDlBwp.bwp.cyclicPrefix = macCellCfg->initialDlBwp.bwp.cyclicPrefix;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.searchSpaceId =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.searchSpaceId;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.coresetId =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.coresetId;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.monitoringSlot =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.monitoringSlot;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.duration =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.duration;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.monitoringSymbol =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.monitoringSymbol;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel1 =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel1;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel2 =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel2;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel4 =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel4;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel8 =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel8;
+ schCellCfg.schInitialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel16 =
+ macCellCfg->initialDlBwp.pdcchCommon.raSearchSpace.candidate.aggLevel16;
+ schCellCfg.schInitialDlBwp.pdschCommon.k0 = macCellCfg->initialDlBwp.pdschCommon.k0;
+ schCellCfg.schInitialDlBwp.pdschCommon.mappingType =
+ macCellCfg->initialDlBwp.pdschCommon.mappingType;
+ schCellCfg.schInitialDlBwp.pdschCommon.startSymbol =
+ macCellCfg->initialDlBwp.pdschCommon.startSymbol;
+ schCellCfg.schInitialDlBwp.pdschCommon.lengthSymbol =
+ macCellCfg->initialDlBwp.pdschCommon.lengthSymbol;
+
+ /* fill initial DL BWP */
+ schCellCfg.schInitialUlBwp.bwp.firstPrb = macCellCfg->initialUlBwp.bwp.firstPrb;
+ schCellCfg.schInitialUlBwp.bwp.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;
+
cfgPst.srcProcId = pst->dstProcId;
cfgPst.dstProcId = pst->srcProcId;
schDlAlloc->assignedPrb[itr] = 0;
schUlAlloc->assignedPrb[itr] = 0;
}
+ schUlAlloc->schPuschInfo = NULLP;
for(uint8_t itr=0; itr<MAX_SSB_IDX; itr++)
{
#define SCHED_DELTA 1
#define RAR_DELAY 1
#define SCH_MAX_UE 1
+#define PUSCH_START_RB 15
#define SI_RNTI 0xFFFF
#define P_RNTI 0xFFFE
*/
typedef struct schUlAlloc
{
- uint16_t totalPrb; /*!< Number of RBs in the cell */
- uint16_t assignedPrb[SCH_SYMBOL_PER_SLOT]; /*!< Num RBs and corresponding symbols allocated */
- uint8_t prachStartSymb; /*!< Start symbol for PRACH */
+ uint16_t totalPrb; /*!< Number of RBs in the cell */
+ uint16_t assignedPrb[SCH_SYMBOL_PER_SLOT]; /*!< Num RBs and corresponding symbols allocated */
+ bool puschPres; /*!< PUSCH presence field */
+ SchPuschInfo *schPuschInfo; /*!< PUSCH info */
}SchUlAlloc;
/**
for(idx=0; idx<dlBrdcstAlloc->ssbIdxSupported; idx++)
{
ssbInfo.ssbIdx = idx;
- ssbInfo.fdAlloc.ssbStartPrbIdx = ssbStartPrb;
- ssbInfo.fdAlloc.ssbPrbDuration = SCH_SSB_PRB_DURATION;
- ssbInfo.tdAlloc.ssbStartSymbIdx = ssbStartSymb;
- ssbInfo.tdAlloc.ssbSymbolDuration = SCH_SSB_SYMB_DURATION;
+ ssbInfo.fdAlloc.startPrb = ssbStartPrb;
+ ssbInfo.fdAlloc.numPrb = SCH_SSB_PRB_DURATION;
+ ssbInfo.tdAlloc.startSymb = ssbStartSymb;
+ ssbInfo.tdAlloc.numSymb = SCH_SSB_SYMB_DURATION;
dlBrdcstAlloc->ssbInfo[idx] = ssbInfo;
dlAlloc->ssbInfo[idx] = ssbInfo;
{
int ret = ROK;
UlSchInfo ulSchInfo;
+ SchUlAlloc *ulAlloc;
+
/* Schedule resources for PRACH */
schPrachResAlloc(cell, &ulSchInfo);
+
+ ulAlloc = cell->ulAlloc[cell->slotInfo.slot];
+
+ if(ulAlloc->schPuschInfo)
+ {
+ ulSchInfo.dataType |= SCH_DATATYPE_PUSCH;
+ memcpy(&ulSchInfo.schPuschInfo, ulAlloc->schPuschInfo,
+ sizeof(SchPuschInfo));
+ SCH_FREE(ulAlloc->schPuschInfo, sizeof(SchPuschInfo));
+ }
+
//send msg to MAC
ret = sendUlSchInfoToMac(&ulSchInfo, schInst);
if(ret != ROK)
extern SchCb schCb[SCH_MAX_INST];
extern int8_t coresetIdxTable[MAX_CORESET_INDEX][4];
extern int8_t searchSpaceIdxTable[MAX_SEARCH_SPACE_INDEX][4];
+extern uint8_t puschDeltaTable[MAX_MU_PUSCH];
/**
* @brief calculate ra-rnti function.
schCb[schInst].cells[schInst]->raCb[0].tcrnti = tcrnti;
}
+/**
+ * @brief resource allocation for msg3 PUSCH
+ *
+ * @details
+ *
+ * Function : schAllocMsg3Pusch
+ *
+ * This function handles msg3 PUSCH allocation
+ *
+ * @param[in] Inst schInst, SCH instance
+ * @param[in] slot, current slot
+ * @param[out] msg3StartRb
+ * @param[out] msg3NumRb
+ * @return void
+ **/
+uint8_t schAllocMsg3Pusch(Inst schInst, uint16_t slot, uint16_t *msg3StartRb,
+uint8_t *msg3NumRb)
+{
+ SchCellCb *cell = NULLP;
+ SchUlAlloc *ulAlloc = NULLP;
+ uint8_t puschMu = 0;
+ uint8_t msg3SlotAlloc = 0;
+ uint8_t delta = 0;
+ uint8_t k2 = 0;
+ uint8_t startSymb = 0;
+ uint8_t symbLen = 0;
+ uint8_t startRb = 0;
+ uint8_t numRb = 0;
+ uint8_t idx = 0;
+
+
+ cell = schCb[schInst].cells[schInst];
+ puschMu = cell->cellCfg.puschMu;
+ delta = puschDeltaTable[puschMu];
+ k2 = cell->cellCfg.schInitialUlBwp.puschCommon.k2;
+ startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.startSymbol;
+ symbLen = cell->cellCfg.schInitialUlBwp.puschCommon.lengthSymbol;
+
+ /* Slot allocation for msg3 based on 38.214 section 6.1.2.1 */
+ msg3SlotAlloc = slot + k2 + delta;
+ msg3SlotAlloc = msg3SlotAlloc % SCH_NUM_SLOTS;
+
+ startRb = PUSCH_START_RB;
+
+ /* formula used for calculation of rbSize, 38.214 section 6.1.4.2
+ * Ninfo = S.Nre.R.Qm.v
+ * Nre' = Nsc.NsymPdsch-NdmrsSymb-Noh
+ * Nre = min(156,Nre').nPrb */
+ numRb = 1; /* based on above calculation */
+
+ /* allocating 1 extra RB for now */
+ numRb++;
+
+ for(idx=startSymb; idx<symbLen; idx++)
+ {
+ cell->ulAlloc[msg3SlotAlloc]->assignedPrb[idx] = startRb + numRb;
+ }
+ ulAlloc = cell->ulAlloc[msg3SlotAlloc];
+
+ SCH_ALLOC(ulAlloc->schPuschInfo, sizeof(SchPuschInfo));
+ if(!ulAlloc->schPuschInfo)
+ {
+ DU_LOG("SCH: Memory allocation failed in schAllocMsg3Pusch");
+ return RFAILED;
+ }
+ ulAlloc->schPuschInfo->harqProcId = SCH_HARQ_PROC_ID;
+ ulAlloc->schPuschInfo->resAllocType = SCH_ALLOC_TYPE_1;
+ ulAlloc->schPuschInfo->fdAlloc.startPrb = startRb;
+ ulAlloc->schPuschInfo->fdAlloc.numPrb = numRb;
+ ulAlloc->schPuschInfo->tdAlloc.startSymb = startSymb;
+ ulAlloc->schPuschInfo->tdAlloc.numSymb = symbLen;
+ ulAlloc->schPuschInfo->tbInfo.mcs = 4;
+ ulAlloc->schPuschInfo->tbInfo.ndi = 1; /* new transmission */
+ ulAlloc->schPuschInfo->tbInfo.rv = 0;
+ ulAlloc->schPuschInfo->tbInfo.tbSize = 24; /*Considering 2 PRBs */
+
+ *msg3StartRb = startRb;
+ *msg3NumRb = numRb;
+
+ return ROK;
+}
+
+
+
/**
* @brief process rach indication function.
*
{
SchCellCb *cell = schCb[schInst].cells[schInst];
uint16_t raRnti = 0;
+ uint16_t slot;
+ uint16_t msg3StartRb;
+ uint8_t msg3NumRb;
+ uint8_t ret = ROK;
+ /* RAR will sent in the next slot */
+ slot = (rachInd->timingInfo.slot+SCHED_DELTA+RAR_DELAY)%SCH_NUM_SLOTS;
- SchDlAlloc *dlAlloc =
- cell->dlAlloc[(rachInd->timingInfo.slot+SCHED_DELTA+RAR_DELAY)%SCH_NUM_SLOTS]; /* RAR will sent in the next slot */
+ SchDlAlloc *dlAlloc = cell->dlAlloc[slot];
RarInfo *rarInfo = &(dlAlloc->rarInfo);
/* rar message presense in next slot ind and will be scheduled */
/* create raCb at SCH */
createSchRaCb(rachInd->crnti,schInst);
- /* fill RAR info */
- rarInfo->raRnti = raRnti;
- rarInfo->tcrnti = rachInd->crnti;
- rarInfo->RAPID = rachInd->preambleIdx;
- rarInfo->ta = rachInd->timingAdv;
- rarInfo->msg3StartRb = 0; /* will be set during implementation of msg3 */
- rarInfo->msg3NumRb = 0; /* will be set during implementation of msg3 */
+ /* allocate resources for msg3 */
+ ret = schAllocMsg3Pusch(schInst, slot, &msg3StartRb, &msg3NumRb);
+ if(ret == ROK)
+ {
- return ROK;
+ /* fill RAR info */
+ rarInfo->raRnti = raRnti;
+ rarInfo->tcrnti = rachInd->crnti;
+ rarInfo->RAPID = rachInd->preambleIdx;
+ rarInfo->ta = rachInd->timingAdv;
+ rarInfo->msg3StartRb = msg3StartRb;
+ rarInfo->msg3NumRb = msg3NumRb;
+ }
+ return ret;
}
/**
uint8_t numSymbols = 0;
uint8_t offset = 0;
uint8_t FreqDomainResource[6] = {0};
- SchBwpDlCfg *initialBwp = &schCb[inst].cells[inst]->cellCfg.schInitialBwp;
+ SchBwpDlCfg *initialBwp = &schCb[inst].cells[inst]->cellCfg.schInitialDlBwp;
PdcchCfg *pdcch = &rarAlloc->rarPdcchCfg;
PdschCfg *pdsch = &rarAlloc->rarPdschCfg;
* Nre = min(156,Nre') . nPrb */
pdsch->freqAlloc.rbSize = 1; /* This value is calculated from above formulae */
pdsch->freqAlloc.vrbPrbMapping = 0; /* non-interleaved */
- pdsch->timeAlloc.startSymbolIndex = 2; /* spec-38.214, Table 5.1.2.1-1 */
- pdsch->timeAlloc.numSymbols = 12;
+ pdsch->timeAlloc.startSymbolIndex = initialBwp->pdschCommon.startSymbol;
+ pdsch->timeAlloc.numSymbols = initialBwp->pdschCommon.lengthSymbol;
pdsch->beamPdschInfo.numPrgs = 1;
pdsch->beamPdschInfo.prgSize = 1;
pdsch->beamPdschInfo.digBfInterfaces = 0;
{10, 1, 0, 682, 0, 2, 2, 6 } /* index 255 */
};
+/* Defintion of delta value Table 6.1.2.1.1-5 spec 38.214 */
+uint8_t puschDeltaTable[MAX_MU_PUSCH] = { 2, 3, 4, 6 };
/**
* @brief frequency domain allocation function.
#define MAX_SEARCH_SPACE_INDEX 16
#define MAX_RACH_NUM_RB_IDX 16
#define MAX_PRACH_CONFIG_IDX 256
+#define MAX_MU_PUSCH 4
#define SET_BITS(_startBit, _numBits, _byte) \
{ \
SearchSpaceCfg raSearchSpace;
}PdcchConfigCommon;
+typedef struct pdschConfigCommon
+{
+ uint8_t k0;
+ uint8_t mappingType;
+ uint8_t startSymbol;
+ uint8_t lengthSymbol;
+}PdschConfigCommon;
+
+typedef struct puschConfigCommon
+{
+ /* PUSCH-TimeDomainResourceAllocation info */
+ uint8_t k2;
+ uint8_t mappingType;
+ uint8_t startSymbol;
+ uint8_t lengthSymbol;
+}PuschConfigCommon;
+
typedef struct bwpDlConfig
{
BwpParams bwp;
PdcchConfigCommon pdcchCommon;
+ PdschConfigCommon pdschCommon;
}BwpDlConfig;
+typedef struct bwpUlConfig
+{
+ BwpParams bwp;
+ // rach config common sent in PrachCfg
+ // pucch info not required
+ PuschConfigCommon puschCommon;
+}BwpUlConfig;
+
typedef struct macCellCfg
{
U16 transId;
TDDCfg tddCfg; /* TDD periodicity and slot configuration */
RSSIMeasUnit rssiUnit; /* RSSI measurement unit */
Sib1CellCfg sib1Cfg;
- BwpDlConfig initialBwp;
+ BwpDlConfig initialDlBwp;
+ BwpUlConfig initialUlBwp;
}MacCellCfg;
typedef struct macCellCfgCfm
#define MAX_NUM_PRG 1 /* max value should be later 275 */
#define MAX_DIG_BF_INTERFACES 0 /* max value should be later 255 */
#define MAX_CODEWORDS 1 /* max should be 2 */
+#define SCH_HARQ_PROC_ID 1 /* harq proc id */
+#define SCH_ALLOC_TYPE_1 1 /*sch res alloc type */
/* Datatype in UL SCH Info */
#define SCH_DATATYPE_PUSCH 1
SchSearchSpaceCfg raSearchSpace;
}SchPdcchCfgCmn;
+typedef struct schPdschCfgCmn
+{
+ uint8_t k0;
+ uint8_t mappingType;
+ uint8_t startSymbol;
+ uint8_t lengthSymbol;
+}SchPdschCfgCmn;
+
+typedef struct schPuschCfgCmn
+{
+ uint8_t k2;
+ uint8_t mappingType;
+ uint8_t startSymbol;
+ uint8_t lengthSymbol;
+}SchPuschCfgCmn;
+
typedef struct schBwpDlCfg
{
SchBwpParams bwp;
SchPdcchCfgCmn pdcchCommon;
+ SchPdschCfgCmn pdschCommon;
}SchBwpDlCfg;
+typedef struct schBwpUlCfg
+{
+ SchBwpParams bwp;
+ SchPuschCfgCmn puschCommon;
+}SchBwpUlCfg;
+
typedef struct schCellCfg
{
uint16_t cellId; /* Cell Id */
SchSsbCfg ssbSchCfg; /* SSB config */
SchSib1Cfg sib1SchCfg; /* SIB1 config */
SchRachCfg schRachCfg; /* PRACH config */
- SchBwpDlCfg schInitialBwp;
+ SchBwpDlCfg schInitialDlBwp; /* Initial DL BWP */
+ SchBwpUlCfg schInitialUlBwp; /* Initial UL BWP */
+ uint8_t puschMu; /* PUSCH MU */
}SchCellCfg;
typedef struct schCellCfgCfm
typedef struct timeDomainAlloc
{
- uint16_t ssbStartSymbIdx;
- uint16_t ssbSymbolDuration;
+ uint16_t startSymb;
+ uint16_t numSymb;
}TimeDomainAlloc;
typedef struct freqDomainAlloc
{
- uint16_t ssbStartPrbIdx;
- uint16_t ssbPrbDuration;
+ uint16_t startPrb;
+ uint16_t numPrb;
}FreqDomainAlloc;
typedef struct ssbInfo
uint16_t msg3StartRb;
uint8_t msg3NumRb;
uint16_t tcrnti;
- uint8_t rarPdu[8];
- uint8_t rarPduLen;
+ uint8_t rarPdu[8];
+ uint8_t rarPduLen;
}RarInfo;
typedef struct rarAlloc
uint8_t isRarPres;
RarAlloc rarAlloc;
}DlAlloc;
+
+typedef struct tbInfo
+{
+ uint8_t mcs; /* MCS */
+ uint8_t ndi; /* NDI */
+ uint8_t rv; /* Redundancy Version */
+ uint16_t tbSize; /* TB Size */
+}TbInfo;
+
+typedef struct schPuschInfo
+{
+ uint8_t harqProcId; /* HARQ Process ID */
+ uint8_t resAllocType; /* Resource allocation type */
+ FreqDomainAlloc fdAlloc; /* Freq domain allocation */
+ TimeDomainAlloc tdAlloc; /* Time domain allocation */
+ TbInfo tbInfo; /* TB info */
+}SchPuschInfo;
+
+
typedef struct ulSchInfo
{
uint16_t cellId; /* Cell Id */
SlotIndInfo slotIndInfo; /* Slot Info: sfn, slot number */
uint8_t dataType; /* Type of info being scheduled */
PrachSchInfo prachSchInfo; /* Prach scheduling info */
+ SchPuschInfo schPuschInfo; /* Pusch scheduling info */
}UlSchInfo;
typedef struct rachIndInfo
/* fill Intial DL BWP */
- duCfgParam.macCellCfg.initialBwp.bwp.firstPrb = 0;
- duCfgParam.macCellCfg.initialBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */
- duCfgParam.macCellCfg.initialBwp.bwp.scs = SUBCARRIER_SPACING; /* numerology is 0, 15Khz */
- duCfgParam.macCellCfg.initialBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.coresetId = CORESET_0_INDEX;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.monitoringSlot =
+ 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.raSearchSpace.searchSpaceId = SEARCHSPACE_1_INDEX;
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.coresetId = CORESET_0_INDEX;
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.monitoringSlot =
SS_MONITORING_SLOT_SL1; /* sl1 - all slots */
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.duration = 0;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.monitoringSymbol =
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.duration = 0;
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.monitoringSymbol =
SS_MONITORING_SYMBOL;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
candidate.aggLevel1 = 8;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
candidate.aggLevel2 = 4;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
candidate.aggLevel4 = 2;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
candidate.aggLevel8 = 1;
- duCfgParam.macCellCfg.initialBwp.pdcchCommon.raSearchSpace.
+ duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpace.
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;
+
+ /* fill Intial DL 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;
+
/* This should be calculated based on
(number of mandatory parameters) + (number of otional parameters being filled) */
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;
+}
/*******************************************************************
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 */
/* 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;
/* MACRCO Ddefine for PDSCH Configuration */
#define PDSCH_K0 0
-#define PDSCH_START_SYMB_AND_LEN 53
+#define PDSCH_START_SYMBOL 2
+#define PDSCH_LENGTH_SYMBOL 12
+
/* MACRO Define for PUSCH Configuration */
-#define PUSCH_K0 3
-#define PUSCH_START_SYMB_AND_LEN 55
+#define PUSCH_K2 3
+#define PUSCH_START_SYMBOL 0
+#define PUSCH_LENGTH_SYMBOL 14
+
#define PUSCH_MSG3_DELTA_PREAMBLE 0
#define PUSCH_P0_NOMINAL_WITH_GRANT -70
PERMIT_HIGH_PRIOR_SESSION_AND_MOBILE_TERM_SERVICE
}F1UacStandardAction;
+typedef enum
+{
+ PDSCH_MAPPING_TYPE_A,
+ PDSCH_MAPPING_TYPE_B,
+}pdschMappingType;
+
+typedef enum
+{
+ PUSCH_MAPPING_TYPE_A,
+ PUSCH_MAPPING_TYPE_B,
+}puschMappingType;
+
+
typedef struct f1RrcVersion
{
char rrcVer[30]; /* Latest RRC Version */
typedef struct pdschCfgCommon
{
uint8_t present;
- long k0;
- long mapType; /* Mapping Type */
- long startSymbAndLen; /* Start Symbol and Length */
+ long k0;
+ long mapType; /* Mapping Type */
+ uint16_t sliv;
}PdschCfgCommon;
typedef struct bcchCfg
typedef struct puschCfgCommon
{
- uint8_t present;
- long k2;
- long mapType;
- long startSymbAndLen;
- long msg3DeltaPreamble;
- long p0NominalWithGrant;
+ uint8_t present;
+ long k2;
+ long mapType;
+ uint16_t sliv;
+ long msg3DeltaPreamble;
+ long p0NominalWithGrant;
}PuschCfgCommon;
typedef struct pucchCfgCommon
*timeDomRsrcAllocInfo->k0 = duPdschCfg.k0;
timeDomRsrcAllocInfo->mappingType = duPdschCfg.mapType;
- timeDomRsrcAllocInfo->startSymbolAndLength = duPdschCfg.startSymbAndLen;
+ timeDomRsrcAllocInfo->startSymbolAndLength = duPdschCfg.sliv;
break;
}
*timeDomRsrcAllocInfo->k2 = duPuschCfg.k2;
timeDomRsrcAllocInfo->mappingType = duPuschCfg.mapType;
- timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.startSymbAndLen;
+ timeDomRsrcAllocInfo->startSymbolAndLength = duPuschCfg.sliv;
/* Msg3 Delta Preamble */
DU_ALLOC(setup->msg3_DeltaPreamble, sizeof(long));