#include "sch.h"
#include "sch_utils.h"
-SchCb schCb[SCH_MAX_INST];
void SchFillCfmPst(Pst *reqPst,Pst *cfmPst,RgMngmt *cfm);
+
/* local defines */
SchCellCfgCfmFunc SchCellCfgCfmOpts[] =
{
freePrbNode = isPrbAvailable(&prbAlloc->freePrbBlockList, *startPrb, numPrb);
if(!freePrbNode)
{
- DU_LOG("\nERROR --> SCH: Requested PRB unavailable");
+ DU_LOG("\nERROR --> SCH: Requested DL PRB unavailable");
return RFAILED;
}
}
{
if(fillPrbBitmap(prbAlloc->prbBitMap[symbol], *startPrb, numPrb) != ROK)
{
- DU_LOG("\nERROR --> SCH: fillPrbBitmap() failed for symbol [%d] ", symbol);
+ DU_LOG("\nERROR --> SCH: fillPrbBitmap() failed for symbol [%d] in DL", symbol);
return RFAILED;
}
}
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Allocates requested PRBs for UL
+ *
+ * @details
+ *
+ * Function : allocatePrbUl
+ *
+ * Functionality:
+ * Allocates requested PRBs in UL
+ * Keeps track of allocated PRB (using bitmap) and remaining PRBs
+ *
+ * @params[in] prbAlloc table
+ * Start symbol
+ * Number of symbols
+ * Start PRB
+ * Number of PRBs
+ *
+ * @return ROK - success
+ * RFAILED - failure
+ *
+ * ****************************************************************/
+uint8_t allocatePrbUl(SchCellCb *cell, SlotTimingInfo slotTime, \
+ uint8_t startSymbol, uint8_t symbolLength, uint16_t *startPrb, uint16_t numPrb)
+{
+ uint8_t symbol = 0;
+ uint16_t prachStartPrb, prachNumPrb, prachEndPrb;
+ bool isPrachOccasion;
+ FreePrbBlock *freePrbBlock = NULLP;
+ CmLList *freePrbNode = NULLP;
+ SchPrbAlloc *prbAlloc = &cell->schUlSlotInfo[slotTime.slot]->prbAlloc;
+
+ /* If startPrb is set to MAX_NUM_RB, it means startPrb is not known currently.
+ * Search for an appropriate location in PRB grid and allocate requested resources */
+ if(*startPrb == MAX_NUM_RB)
+ {
+ /* Check if PRACH is also scheduled in this slot */
+ isPrachOccasion = schCheckPrachOcc(cell, slotTime);
+ if(isPrachOccasion)
+ {
+ prachStartPrb = cell->cellCfg.schRachCfg.msg1FreqStart;
+ prachNumPrb = schCalcPrachNumRb(cell);
+ prachEndPrb = prachStartPrb + prachNumPrb -1;
+ }
+
+ /* Iterate through all free PRB blocks */
+ freePrbNode = prbAlloc->freePrbBlockList.first;
+ while(freePrbNode)
+ {
+ freePrbBlock = (FreePrbBlock *)freePrbNode->node;
+
+ /* If PRACH is scheduled in this slot, then check if its PRBs belong to the current free block.
+ * PRBs required for PRACH cannot be allocated to any other message */
+ if((isPrachOccasion) &&
+ ((prachStartPrb >= freePrbBlock->startPrb) && (prachStartPrb <= freePrbBlock->endPrb)) &&
+ ((prachEndPrb >= freePrbBlock->startPrb) && (prachEndPrb <= freePrbBlock->endPrb)))
+ {
+ /* Implmentation is done such that highest-numbered free-RB is allocated first */
+ if((freePrbBlock->endPrb > prachEndPrb) && ((freePrbBlock->endPrb - prachEndPrb) >= numPrb))
+ {
+ /* If sufficient free PRBs are available above PRACH message then,
+ * endPrb = freePrbBlock->endPrb
+ * startPrb = endPrb - numPrb +1;
+ */
+ *startPrb = freePrbBlock->endPrb - numPrb +1;
+ break;
+ }
+ else if((prachStartPrb > freePrbBlock->startPrb) && ((prachStartPrb - freePrbBlock->startPrb) >= numPrb))
+ {
+ /* If free PRBs are available below PRACH message then,
+ * endPrb = prachStartPrb - 1
+ * startPrb = endPrb - numPrb +1
+ */
+ *startPrb = prachStartPrb - numPrb;
+ break;
+ }
+ else
+ {
+ freePrbNode = freePrbNode->next;
+ continue;
+ }
+ }
+ else
+ {
+ /* Check if requested number of PRBs can be allocated from currect block */
+ if(freePrbBlock->numFreePrb < numPrb)
+ {
+ freePrbNode = freePrbNode->next;
+ continue;
+ }
+ *startPrb = freePrbBlock->endPrb - numPrb +1;
+ break;
+ }
+ }
+
+ /* If no free block can be used to allocated requested number of RBs */
+ if(*startPrb == MAX_NUM_RB)
+ return RFAILED;
+ }
+ else
+ {
+ /* If startPrb is known already, check if requested PRBs are available for allocation */
+ freePrbNode = isPrbAvailable(&prbAlloc->freePrbBlockList, *startPrb, numPrb);
+ if(!freePrbNode)
+ {
+ DU_LOG("\nERROR --> SCH: Requested UL PRB unavailable");
+ return RFAILED;
+ }
+ }
+
+ /* Update bitmap to allocate PRBs */
+ for(symbol=startSymbol; symbol < (startSymbol+symbolLength); symbol++)
+ {
+ if(fillPrbBitmap(prbAlloc->prbBitMap[symbol], *startPrb, numPrb) != ROK)
+ {
+ DU_LOG("\nERROR --> SCH: fillPrbBitmap() failed for symbol [%d] in UL", symbol);
+ return RFAILED;
+ }
+ }
+
+ /* Update the remaining number for free PRBs */
+ removeAllocatedPrbFromFreePrbList(&prbAlloc->freePrbBlockList, freePrbNode, *startPrb, numPrb);
+
+ return ROK;
+}
+
/**********************************************************************
End of file
**********************************************************************/
#define SCH_MU3_NUM_SLOTS 40
#define SCH_MU4_NUM_SLOTS 50
#define SCH_MAX_SFN 1024
-#ifdef NR_TDD
-#define MAX_NUM_RB 275 /* value for numerology 1, 100 MHz */
-#else
-#define MAX_NUM_RB 106 /* value for numerology 0, 20 MHz */
-#endif
#define SCH_MIB_TRANS 8 /* MIB transmission as per 38.331 is every 80 ms */
#define SCH_SIB1_TRANS 16 /* SIB1 transmission as per 38.331 is every 160 ms */
#define SCH_NUM_SC_PRB 12 /* number of SCs in a PRB */
*/
typedef struct schUlSlotInfo
{
- SchPrbAlloc prbAlloc; /*!< PRB allocated/available per symbol */
- uint8_t puschCurrentPrb; /* Current PRB for PUSCH allocation */
- bool puschPres; /*!< PUSCH presence field */
- SchPuschInfo *schPuschInfo; /*!< PUSCH info */
- bool pucchPres; /*!< PUCCH presence field */
- SchPucchInfo schPucchInfo; /*!< PUCCH info */
+ SchPrbAlloc prbAlloc; /*!< PRB allocated/available per symbol */
+ uint8_t puschCurrentPrb; /*!< Current PRB for PUSCH allocation */
+ bool puschPres; /*!< PUSCH presence field */
+ SchPuschInfo *schPuschInfo; /*!< PUSCH info */
+ bool pucchPres; /*!< PUCCH presence field */
+ SchPucchInfo schPucchInfo; /*!< PUCCH info */
}SchUlSlotInfo;
/**
uint8_t schDlRsrcAllocDlMsg(SchCellCb *cell, SlotTimingInfo slotTime, uint16_t crnti,
uint32_t *accumalatedSize, DlMsgAlloc *dlMsgAlloc);
uint16_t schAccumalateLcBoSize(SchCellCb *cell, uint16_t ueIdx);
+uint8_t allocatePrbDl(SchCellCb *cell, SlotTimingInfo slotTime, uint8_t startSymbol, uint8_t symbolLength, \
+ uint16_t *startPrb, uint16_t numPrb);
/* UL scheduling related function declarations */
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst);
+bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo);
+uint8_t schCalcPrachNumRb(SchCellCb *cell);
+void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo prachOccasionTimingInfo);
uint16_t schAllocPucchResource(SchCellCb *cell, uint16_t crnti, uint16_t slot);
uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo puschInfo, DciInfo *dciInfo);
-uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, SchPuschInfo *puschInfo);
-uint8_t allocatePrbDl(SchCellCb *cell, SlotTimingInfo slotTime, uint8_t startSymbol, uint8_t symbolLength, \
+uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo pdcchSlotTime, uint32_t dataVol, SchPuschInfo *puschInfo);
+uint8_t allocatePrbUl(SchCellCb *cell, SlotTimingInfo slotTime, uint8_t startSymbol, uint8_t symbolLength, \
uint16_t *startPrb, uint16_t numPrb);
/**********************************************************************
#include "sch.h"
#include "sch_utils.h"
-SchCb schCb[SCH_MAX_INST];
-uint16_t prachCfgIdxTable[MAX_PRACH_CONFIG_IDX][8];
-uint16_t numRbForPrachTable[MAX_RACH_NUM_RB_IDX][5];
-uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][4];
-uint8_t puschDeltaTable[MAX_MU_PUSCH];
-
SchMacUlSchInfoFunc schMacUlSchInfoOpts[] =
{
packSchMacUlSchInfo,
return(*schMacUlSchInfoOpts[pst.selector])(&pst, ulSchedInfo);
}
-/**
- * @brief resource allocation for PRACH
- *
- * @details
- *
- * Function : schPrachResAlloc
- *
- * This function handles PRACH allocation
- *
- * @param[in] SchCellCb *cell, cell cb
- * @param[in] UlSchedInfo *ulSchedInfo, UL scheduling info
- * @return void
- **/
-void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo prachOccasionTimingInfo)
-{
- uint8_t puschScs;
- uint8_t numPrachRb = 0;
- uint8_t numRa = 0;
- uint8_t freqStart = 0;
- uint8_t prachCfgIdx = 0;
- uint8_t prachFormat = 0;
- uint8_t x = 0;
- uint8_t y = 0;
- uint16_t prachSubframe = 0;
- uint8_t prachStartSymbol = 0;
- uint8_t prachOcas = 0;
- uint8_t dataType = 0;
- uint8_t idx = 0;
- uint8_t subFrame = 0;
- SchUlSlotInfo *schUlSlotInfo = NULLP;
-
- puschScs = cell->cellCfg.schInitialUlBwp.bwp.scs;
- schUlSlotInfo = cell->schUlSlotInfo[prachOccasionTimingInfo.slot];
- prachCfgIdx = cell->cellCfg.schRachCfg.prachCfgIdx;
-
- /* derive the prachCfgIdx table paramters */
- x = prachCfgIdxTable[prachCfgIdx][1];
- y = prachCfgIdxTable[prachCfgIdx][2];
- prachSubframe = prachCfgIdxTable[prachCfgIdx][3];
-
- if((prachOccasionTimingInfo.sfn%x) == y)
- {
-#ifdef NR_TDD
- subFrame = prachOccasionTimingInfo.slot/2;
-#else
- subFrame = prachOccasionTimingInfo.slot;
-#endif
- /* check for subFrame number */
- if ((1 << subFrame) & prachSubframe)
- {
- /* prach ocassion present in this subframe */
-#ifdef NR_TDD
- if(UL_SLOT != schGetSlotSymbFrmt(prachOccasionTimingInfo.slot%cell->numSlotsInPeriodicity,\
- cell->slotFrmtBitMap))
- {
- DU_LOG("\nERROR --> SCH : PrachCfgIdx %d doesn't support UL slot", prachCfgIdx);
- }
- else
-#endif
- {
- prachFormat = prachCfgIdxTable[prachCfgIdx][0];
- prachStartSymbol = prachCfgIdxTable[prachCfgIdx][4];
- prachOcas = prachCfgIdxTable[prachCfgIdx][6];
-
- /* freq domain resource determination for RACH*/
- freqStart = cell->cellCfg.schRachCfg.msg1FreqStart;
- /* numRa determined as 𝑛 belonging {0,1,.., M − 1},
- * where M is given by msg1Fdm */
- numRa = (cell->cellCfg.schRachCfg.msg1Fdm - 1);
- for(idx=0; idx<MAX_RACH_NUM_RB_IDX; idx++)
- {
- if(numRbForPrachTable[idx][0] == cell->cellCfg.schRachCfg.rootSeqLen)
- {
- if(numRbForPrachTable[idx][1] == cell->cellCfg.schRachCfg.prachSubcSpacing)
- {
- if(numRbForPrachTable[idx][2] == puschScs)
- {
- break;
- }
- }
- }
- }
- numPrachRb = numRbForPrachTable[idx][3];
- dataType |= SCH_DATATYPE_PRACH;
- /* Considering first slot in the frame for PRACH */
- idx = 0;
- //schUlSlotInfo->assignedPrb[idx] = freqStart+numPrachRb;
- }
- ulSchedInfo->dataType = dataType;
- /* prach info */
- ulSchedInfo->prachSchInfo.numPrachOcas = prachOcas;
- ulSchedInfo->prachSchInfo.prachFormat = prachFormat;
- ulSchedInfo->prachSchInfo.numRa = numRa;
- ulSchedInfo->prachSchInfo.prachStartSymb = prachStartSymbol;
- DU_LOG("\nINFO --> SCH : RACH occassion set for slot %d", prachOccasionTimingInfo.slot);
- }
- }
-}
-
/**
* @brief Function to fill Pucch Format 0
uint8_t coreset0Idx = 0;
uint8_t firstSymbol = 0;
uint8_t numSymbols = 0;
- uint8_t mcs = 4; /* MCS fixed to 4 */
+ uint8_t mcs = DEFAULT_MCS; /* MCS fixed to 4 */
uint8_t dmrsStartSymbol = 0, startSymbol = 0, numSymbol = 0;
uint16_t tbSize = 0;
uint16_t numRbs;
if(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellCfg.initUlBwp.pucchCfgPres)
{
schPucchCfg = &(cell->ueCb[ueIdx].ueCfg.spCellCfg.servCellCfg.initUlBwp.pucchCfg);
- if(schPucchCfg->dlDataToUlAck)
- {
- for(dlToUlAckIdx = 0; dlToUlAckIdx < schPucchCfg->dlDataToUlAck->dlDataToUlAckListCount; dlToUlAckIdx++)
- {
- //For now considering only the first value in the list
- k1 = schPucchCfg->dlDataToUlAck->dlDataToUlAckList[dlToUlAckIdx];
- break;
- }
- }
+ if(schPucchCfg->dlDataToUlAck)
+ {
+ for(dlToUlAckIdx = 0; dlToUlAckIdx < schPucchCfg->dlDataToUlAck->dlDataToUlAckListCount; dlToUlAckIdx++)
+ {
+ //For now considering only the first value in the list
+ k1 = schPucchCfg->dlDataToUlAck->dlDataToUlAckList[dlToUlAckIdx];
+ break;
+ }
+ }
}
pucchSlot = (slot + k1) % cell->numSlots;
#include "sch.h"
#include "sch_utils.h"
-SchCb schCb[SCH_MAX_INST];
-uint8_t puschDeltaTable[MAX_MU_PUSCH];
+/**
+ * @brief Checks if PRACH can be scheduled in current slot
+ *
+ * @details
+ *
+ * Function : schCheckPrachOcc
+ *
+ * This function checks if PRACH can be scheduled in
+ * current slot
+ *
+ * @param[in] Cell Cb
+ * Slot timing
+ * @return TRUE
+ * FALSE
+ **/
+bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo)
+{
+ uint8_t prachCfgIdx = 0;
+ uint8_t x = 0;
+ uint8_t y = 0;
+ uint8_t subFrame = 0;
+ uint16_t prachSubframe = 0;
+
+ prachCfgIdx = cell->cellCfg.schRachCfg.prachCfgIdx;
+
+ /* derive the prachCfgIdx table paramters */
+ x = prachCfgIdxTable[prachCfgIdx][1];
+ y = prachCfgIdxTable[prachCfgIdx][2];
+ prachSubframe = prachCfgIdxTable[prachCfgIdx][3];
+
+ if((prachOccasionTimingInfo.sfn%x) == y)
+ {
+ subFrame = prachOccasionTimingInfo.slot/pow(2, cell->cellCfg.numerology);
+
+ /* check for subFrame number */
+ if ((1 << subFrame) & prachSubframe)
+ {
+ /* prach ocassion present in this subframe */
+#ifdef NR_TDD
+ if(UL_SLOT != schGetSlotSymbFrmt(prachOccasionTimingInfo.slot % cell->numSlotsInPeriodicity,\
+ cell->slotFrmtBitMap))
+ {
+ DU_LOG("\nERROR --> SCH : PrachCfgIdx %d doesn't support UL slot", prachCfgIdx);
+ return FALSE;
+ }
+#endif
+ return TRUE;
+ }
+ }
+ return FALSE;
+}
+
+/**
+ * @brief Calculate number of PRBs to be allocated for PRACH
+ *
+ * @details
+ *
+ * Function : schCalcPrachNumRb
+ *
+ * Calculate number of PRBs to be allocated for PRACH
+ *
+ * @param[in] SchCellCb *cell, cell cb
+ * @return Number of PRBs
+ **/
+uint8_t schCalcPrachNumRb(SchCellCb *cell)
+{
+ uint8_t tableIdx = 0;
+ uint16_t puschScs = fetchScsValue(cell->cellCfg.schInitialUlBwp.bwp.scs);
+
+ for(tableIdx=0; tableIdx < MAX_RACH_NUM_RB_IDX; tableIdx++)
+ {
+ if((numRbForPrachTable[tableIdx][0] == cell->cellCfg.schRachCfg.rootSeqLen) &&
+ (numRbForPrachTable[tableIdx][1] == cell->cellCfg.schRachCfg.prachSubcSpacing) &&
+ (numRbForPrachTable[tableIdx][2] == puschScs))
+ {
+ return numRbForPrachTable[tableIdx][3];
+ }
+ }
+ return 0;
+}
+
+/**
+ * @brief resource allocation for PRACH
+ *
+ * @details
+ *
+ * Function : schPrachResAlloc
+ *
+ * This function handles PRACH allocation
+ *
+ * @param[in] SchCellCb *cell, cell cb
+ * @param[in] UlSchedInfo *ulSchedInfo, UL scheduling info
+ * @return void
+ **/
+void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo prachOccasionTimingInfo)
+{
+ uint8_t numPrachRb = 0;
+ uint8_t numRa = 0;
+ uint8_t prachCfgIdx = 0;
+ uint8_t prachFormat = 0;
+ uint8_t prachStartSymbol = 0;
+ uint8_t prachDuration = 0;
+ uint8_t prachOcas = 0;
+ uint8_t dataType = 0;
+ uint16_t freqStart = 0;
+
+ /* If this slot is not a PRACH occassion, return */
+ if(!schCheckPrachOcc(cell, prachOccasionTimingInfo))
+ return;
+
+ prachCfgIdx = cell->cellCfg.schRachCfg.prachCfgIdx;
+ prachFormat = prachCfgIdxTable[prachCfgIdx][0];
+ prachStartSymbol = prachCfgIdxTable[prachCfgIdx][4];
+ prachOcas = prachCfgIdxTable[prachCfgIdx][6];
+ prachDuration = prachCfgIdxTable[prachCfgIdx][7];
+
+ /* numRa determined as 𝑛 belonging {0,1,.., M − 1},
+ * where M is given by msg1Fdm */
+ numRa = (cell->cellCfg.schRachCfg.msg1Fdm - 1);
+
+ /* freq domain resource determination for RACH*/
+ freqStart = cell->cellCfg.schRachCfg.msg1FreqStart;
+ numPrachRb = schCalcPrachNumRb(cell);
+ /* Allocate PRACH resources from the UL resource bitmap */
+ allocatePrbUl(cell, prachOccasionTimingInfo, prachStartSymbol, prachDuration, &freqStart, numPrachRb);
+
+ /* prach info */
+ dataType |= SCH_DATATYPE_PRACH;
+ ulSchedInfo->dataType = dataType;
+ ulSchedInfo->prachSchInfo.numPrachOcas = prachOcas;
+ ulSchedInfo->prachSchInfo.prachFormat = prachFormat;
+ ulSchedInfo->prachSchInfo.numRa = numRa;
+ ulSchedInfo->prachSchInfo.prachStartSymb = prachStartSymbol;
+ DU_LOG("\nINFO --> SCH : RACH occassion set for slot %d", prachOccasionTimingInfo.slot);
+}
/**
* @brief calculate ra-rnti function.
* @param[out] msg3NumRb
* @return void
**/
-SchPuschInfo* schAllocMsg3Pusch(Inst schInst, uint16_t crnti, uint8_t k2Index, uint16_t msg3Slot)
+SchPuschInfo* schAllocMsg3Pusch(Inst schInst, uint16_t crnti, uint8_t k2Index, SlotTimingInfo msg3SlotTime)
{
SchCellCb *cell = NULLP;
SchUlSlotInfo *schUlSlotInfo = NULLP;
- uint8_t startSymb = 0;
- uint8_t symbLen = 0;
- uint8_t startRb = 0;
- uint8_t numRb = 0;
- uint8_t idx = 0;
- uint8_t mcs = 4;
- uint16_t tbSize = 0;
+ uint8_t mcs = DEFAULT_MCS;
+ uint8_t startSymb = 0;
+ uint8_t symbLen = 0;
+ uint16_t startRb = 0;
+ uint16_t numRb = 0;
+ uint16_t tbSize = 0;
cell = schCb[schInst].cells[schInst];
if(cell == NULL)
return NULLP;
}
+ /* Allocate time-domain and frequency-domain resource for MSG3 PUSCH */
startSymb = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].startSymbol;
symbLen = cell->cellCfg.schInitialUlBwp.puschCommon.timeDomRsrcAllocList[k2Index].symbolLength;
- startRb = cell->schUlSlotInfo[msg3Slot]->puschCurrentPrb;
- tbSize = schCalcTbSize(8); /* 6 bytes msg3 and 2 bytes header */
- numRb = schCalcNumPrb(tbSize, mcs, NUM_PDSCH_SYMBOL);
-
- /* allocating 1 extra RB for now */
- numRb++;
- /* increment PUSCH PRB */
- cell->schUlSlotInfo[msg3Slot]->puschCurrentPrb += numRb;
-
- for(idx=startSymb; idx<symbLen; idx++)
- {
- //cell->schUlSlotInfo[msg3Slot]->assignedPrb[idx] = startRb + numRb;
- }
- schUlSlotInfo = cell->schUlSlotInfo[msg3Slot];
+ startRb = MAX_NUM_RB;
+ tbSize = schCalcTbSize(8); /* 6 bytes msg3 and 2 bytes header */
+ numRb = schCalcNumPrb(tbSize, mcs, symbLen);
+ numRb++; /* allocating 1 extra RB for now */
+ allocatePrbUl(cell, msg3SlotTime, startSymb, symbLen, &startRb, numRb);
+ /* Fill PUSCH scheduling details in Slot structure */
+ schUlSlotInfo = cell->schUlSlotInfo[msg3SlotTime.slot];
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
DU_LOG("\nERROR --> SCH : Memory allocation failed in schAllocMsg3Pusch");
return NULLP;
}
+
tbSize = 0; /* since nPrb has been incremented, recalculating tbSize */
tbSize = schCalcTbSizeFromNPrb(numRb, mcs, NUM_PDSCH_SYMBOL);
tbSize = tbSize / 8 ; /*bits to byte conversion*/
+
schUlSlotInfo->schPuschInfo->crnti = crnti;
schUlSlotInfo->schPuschInfo->harqProcId = SCH_HARQ_PROC_ID;
schUlSlotInfo->schPuschInfo->resAllocType = SCH_ALLOC_TYPE_1;
schUlSlotInfo->schPuschInfo->tbInfo.mcsTable = SCH_MCS_TABLE_QAM_64;
schUlSlotInfo->schPuschInfo->tbInfo.ndi = NEW_TRANSMISSION; /* new transmission */
schUlSlotInfo->schPuschInfo->tbInfo.rv = 0;
- schUlSlotInfo->schPuschInfo->tbInfo.tbSize = tbSize; /*Considering 2 PRBs */
+ schUlSlotInfo->schPuschInfo->tbInfo.tbSize = tbSize;
schUlSlotInfo->schPuschInfo->dmrsMappingType = DMRS_MAP_TYPE_A; /* Setting Type-A */
schUlSlotInfo->schPuschInfo->nrOfDmrsSymbols = NUM_DMRS_SYMBOLS;
schUlSlotInfo->schPuschInfo->dmrsAddPos = DMRS_ADDITIONAL_POS;
#ifdef NR_TDD
uint8_t totalCfgSlot = 0;
#endif
- uint16_t dciSlot = 0, rarSlot = 0, msg3Slot = 0;
- SlotTimingInfo dciTime, rarTime;
+ uint16_t dciSlot = 0, rarSlot = 0;
+ SlotTimingInfo dciTime, rarTime, msg3Time;
RarAlloc *dciSlotAlloc = NULLP; /* Stores info for transmission of PDCCH for RAR */
RarAlloc *rarSlotAlloc = NULLP; /* Stores info for transmission of RAR PDSCH */
SchPuschInfo *msg3PuschInfo = NULLP; /* Stores MSG3 PUSCH scheduling information */
k2 = k2 + msg3Delta;
if(k2 >= msg3MinSchTime)
{
- msg3Slot = (rarSlot + k2) % cell->numSlots;
+ ADD_DELTA_TO_TIME(rarTime, msg3Time, k2);
#ifdef NR_TDD
- if(schGetSlotSymbFrmt(msg3Slot % totalCfgSlot, cell->slotFrmtBitMap) == DL_SLOT)
+ if(schGetSlotSymbFrmt(msg3Time.slot % totalCfgSlot, cell->slotFrmtBitMap) == DL_SLOT)
continue;
#endif
k2Found = true;
}
/* Allocate resources for msg3 */
- msg3PuschInfo = schAllocMsg3Pusch(cell->instIdx, cell->raReq[ueIdx]->rachInd->crnti, k2Index, msg3Slot);
+ msg3PuschInfo = schAllocMsg3Pusch(cell->instIdx, cell->raReq[ueIdx]->rachInd->crnti, k2Index, msg3Time);
if(msg3PuschInfo)
{
/* Fill RAR info */
{
uint8_t coreset0Idx = 0;
uint8_t firstSymbol = 0, numSymbols = 0;
- uint8_t mcs = 4; /* MCS fixed to 4 */
+ uint8_t mcs = DEFAULT_MCS; /* MCS fixed to 4 */
uint8_t dmrsStartSymbol, startSymbol, numSymbol ;
uint16_t numRbs = 0;
uint16_t tbSize = 0;
packSchMacDlAlloc
};
-SchCb schCb[SCH_MAX_INST];
-
/*******************************************************************
*
* @brief Handles sending DL broadcast alloc to MAC
return RFAILED;
}
memset(dciInfo,0,sizeof(DciInfo));
+
/* update the SFN and SLOT */
memcpy(&dlSchedInfo.schSlotValue.ulDciTime, slotInd, sizeof(SlotTimingInfo));
- slot = dlSchedInfo.schSlotValue.ulDciTime.slot;
+
/* Update PUSCH allocation */
- schFillPuschAlloc(ueCb, slot, totDataReq, &schPuschInfo);
+ schFillPuschAlloc(ueCb, dlSchedInfo.schSlotValue.ulDciTime, totDataReq, &schPuschInfo);
+
/* Fill DCI for UL grant */
schFillUlDci(ueCb, schPuschInfo, dciInfo);
memcpy(&dciInfo->slotIndInfo, &dlSchedInfo.schSlotValue.ulDciTime, sizeof(SlotTimingInfo));
schInitDlSlot(cell->schDlSlotInfo[slot]);
schUlResAlloc(cell, schInst);
-
return ret;
}
MacProcSchCellDeleteRsp, /* TC */
packSchCellDeleteRsp /* LWLC */
};
+
/*******************************************************************
*
* @brief Fill and send UE cfg response to MAC
* RFAILED - failure
*
* ****************************************************************/
-uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, SchPuschInfo *puschInfo)
+uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo pdcchSlotTime, uint32_t dataVol, SchPuschInfo *puschInfo)
{
- uint16_t puschSlot = 0;
uint16_t startRb = 0;
uint8_t numRb = 0;
uint16_t tbSize = 0;
uint8_t buffer = 5;
- uint8_t idx = 0;
+ uint8_t k2=0, startSymb=0 , symbLen=0;
SchCellCb *cellCb = ueCb->cellCb;
SchUlSlotInfo *schUlSlotInfo = NULLP;
- uint8_t k2=0, startSymb=0 , symbLen=11;
+ SlotTimingInfo puschTime;
+ /* TODO : Scheduler to decide on which slot PUSCH is to be scheduled based on K2 Index table */
if(ueCb->ueCfg.spCellCfgPres == true)
{
k2 = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].k2;
startSymb = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].startSymbol;
symbLen = ueCb->ueCfg.spCellCfg.servCellCfg.initUlBwp.puschCfg.timeDomRsrcAllocList[0].symbolLength;
}
- puschSlot = (pdcchSlot + k2) % cellCb->numSlots;
+ ADD_DELTA_TO_TIME(pdcchSlotTime, puschTime, k2);
- startRb = cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb;
+ startRb = MAX_NUM_RB;
tbSize = schCalcTbSize(dataVol + buffer); /* 2 bytes header + some buffer */
numRb = schCalcNumPrb(tbSize, ueCb->ueCfg.ulModInfo.mcsIndex, symbLen);
- /* increment PUSCH PRB */
-
- cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb += numRb;
+ allocatePrbUl(cellCb, puschTime, startSymb, symbLen, &startRb, numRb);
puschInfo->crnti = ueCb->crnti;
puschInfo->harqProcId = SCH_HARQ_PROC_ID;
puschInfo->nrOfDmrsSymbols = NUM_DMRS_SYMBOLS;
puschInfo->dmrsAddPos = DMRS_ADDITIONAL_POS;
- /* Update pusch in cell */
- for(idx=startSymb; idx<symbLen; idx++)
- {
- //cellCb->schUlSlotInfo[puschSlot]->assignedPrb[idx] = startRb + numRb;
- }
-
- schUlSlotInfo = cellCb->schUlSlotInfo[puschSlot];
-
+ schUlSlotInfo = cellCb->schUlSlotInfo[puschTime.slot];
SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
if(!schUlSlotInfo->schPuschInfo)
{
**/
void removeAllocatedPrbFromFreePrbList(CmLListCp *freePrbBlockList, CmLList *node, uint16_t startPrb, uint16_t numPrb)
{
- uint8_t endPrb;
+ uint16_t endPrb;
FreePrbBlock *newBlock = NULLP;
FreePrbBlock *freeBlock = (FreePrbBlock *)node->node;
_pst.selector = ODU_SELECTOR_TC; \
}
+/* Table array declarations */
int8_t coresetIdxTable[MAX_CORESET_INDEX][4];
int8_t searchSpaceIdxTable[MAX_SEARCH_SPACE_INDEX][4];
uint8_t defaultUlAckTbl[DEFAULT_UL_ACK_LIST_COUNT];
uint8_t minMsg3SchTime[MAX_NUM_MU];
+uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][4];
+uint8_t puschDeltaTable[MAX_MU_PUSCH];
+uint16_t prachCfgIdxTable[MAX_PRACH_CONFIG_IDX][8];
+uint16_t numRbForPrachTable[MAX_RACH_NUM_RB_IDX][5];
/* Functions declarations : Linked list handler */
uint8_t addNodeToLList(CmLListCp *llist, void *blockToAdd, CmLList *currNode);
while(numPrbGrp)
{
mask = 1;
- printf("startPrbGrp [%d] numPrbGrp [%d] diff [%d]\n",startPrbGrp, numPrbGrp, (prbGrpStartBit - startPrbGrp));
mask = mask << (prbGrpStartBit - startPrbGrp);
freqAllocBitMap = freqAllocBitMap | mask;
startPrbGrp++;
return ROK;
}
+/*******************************************************************
+ *
+ * @brief Function to map Sub carrier spacing enum value to value in kHz
+ *
+ * @details
+ *
+ * Function : fetchScsValue
+ *
+ * Functionality:
+ * Function to map Sub carrier spacing enum value to value in kHz
+ *
+ * @params[in] sub-carrier spacing enum value
+ * @return sub-carrier spacing value in kHz
+ *
+ * ****************************************************************/
+uint16_t fetchScsValue(uint8_t scsEnumValue)
+{
+ switch(scsEnumValue)
+ {
+ case SCS_15KHZ:
+ case SCS_30KHZ:
+ case SCS_60KHZ:
+ case SCS_120KHZ:
+ case SCS_240KHZ:
+ return (15 * pow(2,scsEnumValue));
+ default:
+ return 15;
+ }
+}
+
/*******************************************************************
*
* @brief SGetSBuf with debug logs
#define PUCCH_FORMAT_3 3
#define PUCCH_FORMAT_4 4
+#define DEFAULT_MCS 4
+
#define BANDWIDTH_20MHZ 20
#define BANDWIDTH_100MHZ 100
/* PRB allocation as per 38.101, Section 5.3.2 */
#define TOTAL_PRB_20MHZ_MU0 106
#define TOTAL_PRB_100MHZ_MU1 273
+#ifdef NR_TDD
+#define MAX_NUM_RB TOTAL_PRB_100MHZ_MU1 /* value for numerology 1, 100 MHz */
+#else
+#define MAX_NUM_RB TOTAL_PRB_20MHZ_MU0 /* value for numerology 0, 20 MHz */
+#endif
#define ODU_THROUGHPUT_PRINT_TIME_INTERVAL 5 /* in milliseconds */
void fillCoresetFeqDomAllocMap(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain);
void oduCpyFixBufToMsg(uint8_t *fixBuf, Buffer *mBuf, uint16_t len);
uint8_t buildPlmnId(Plmn plmn, uint8_t *buf);
+uint16_t fetchScsValue(uint8_t scsEnumValue);
uint8_t SGetSBufNewForDebug(char *file, char *func, char *line, Region region, Pool pool, Data **ptr, Size size);
uint8_t SPutSBufNewForDebug(char *file, char *func, char *line, Region region, Pool pool, Data *ptr, Size size);
#define SEARCHSPACE_4_INDEX 4
#define SS_MONITORING_SLOT_SL1 0 /* all slots */
#define SS_MONITORING_SYMBOL 0x2000; /* symbol-0, set 14th bit */
-#define SIB1_MCS 4
/* Macro for Ue Context */
#define MAX_NUM_SR_CFG_PER_CELL_GRP 8 /* Max number of scheduling request config per cell group */
/* DL carrier configuration */
duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
-#ifdef NR_TDD
- duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH_100MHZ;
-#else
- duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH_20MHZ;
-#endif
+ duCfgParam.macCellCfg.dlCarrCfg.bw = NR_BANDWIDTH;
duCfgParam.macCellCfg.dlCarrCfg.freq = NR_DL_ARFCN;
duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
/* UL Carrier configuration */
duCfgParam.macCellCfg.ulCarrCfg.pres = TRUE;
-#ifdef NR_TDD
- duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH_100MHZ;
-#else
- duCfgParam.macCellCfg.ulCarrCfg.bw = BANDWIDTH_20MHZ;
-#endif
+ duCfgParam.macCellCfg.dlCarrCfg.bw = NR_BANDWIDTH;
duCfgParam.macCellCfg.ulCarrCfg.freq = NR_UL_ARFCN;
duCfgParam.macCellCfg.ulCarrCfg.k0[0] = 1;
duCfgParam.macCellCfg.ulCarrCfg.k0[1] = 1;
/* SSB configuration */
duCfgParam.macCellCfg.ssbCfg.ssbPbchPwr = SSB_PBCH_PWR;
duCfgParam.macCellCfg.ssbCfg.bchPayloadFlag = BCH_PAYLOAD;
-#ifdef NR_TDD
- duCfgParam.macCellCfg.ssbCfg.scsCmn = SCS_30KHZ;
-#else
- duCfgParam.macCellCfg.ssbCfg.scsCmn = SCS_15KHZ;
-#endif
+ duCfgParam.macCellCfg.ssbCfg.scsCmn = NR_SCS;
duCfgParam.macCellCfg.ssbCfg.ssbOffsetPointA = OFFSET_TO_POINT_A;
duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PRDCTY_MS_20;
duCfgParam.macCellCfg.prachCfg.pres = TRUE;
duCfgParam.macCellCfg.prachCfg.prachCfgIdx = PRACH_CONFIG_IDX;
duCfgParam.macCellCfg.prachCfg.prachSeqLen = PRACH_SEQ_LEN;
- duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = PRACH_SUBCARRIER_SPACING;
+ duCfgParam.macCellCfg.prachCfg.prachSubcSpacing = fetchScsValue(PRACH_SUBCARRIER_SPACING);
duCfgParam.macCellCfg.prachCfg.prachRstSetCfg = PRACH_RESTRICTED_SET_CFG;
duCfgParam.macCellCfg.prachCfg.msg1Fdm = NUM_PRACH_FDM;
duCfgParam.macCellCfg.prachCfg.msg1FreqStart = PRACH_FREQ_START;
duCfgParam.macCellCfg.sib1Cfg.sib1RepetitionPeriod = SIB1_REPETITION_PERIOD;
duCfgParam.macCellCfg.sib1Cfg.coresetZeroIndex = CORESET_0_INDEX;
duCfgParam.macCellCfg.sib1Cfg.searchSpaceZeroIndex = SEARCHSPACE_0_INDEX;
- duCfgParam.macCellCfg.sib1Cfg.sib1Mcs = SIB1_MCS;
+ duCfgParam.macCellCfg.sib1Cfg.sib1Mcs = DEFAULT_MCS;
/* fill Intial DL BWP */
duCfgParam.macCellCfg.initialDlBwp.bwp.firstPrb = 0;
duCfgParam.macCellCfg.initialDlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */
-#ifdef NR_TDD
- duCfgParam.macCellCfg.initialDlBwp.bwp.scs = SCS_30KHZ; /* numerology is 1, 30Khz */
-#else
- duCfgParam.macCellCfg.initialDlBwp.bwp.scs = SCS_15KHZ; /* numerology is 0, 15Khz */
-#endif
+ duCfgParam.macCellCfg.initialDlBwp.bwp.scs = NR_SCS;
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;
/* fill Intial UL BWP */
duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0;
duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_20MHZ_MU0; /* configured to total BW */
-#ifdef NR_TDD
- duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SCS_30KHZ; /* numerology is 1, 30Khz */
-#else
- duCfgParam.macCellCfg.initialUlBwp.bwp.scs = SCS_15KHZ; /* numerology is 0, 15Khz */
-#endif
+ duCfgParam.macCellCfg.initialUlBwp.bwp.scs = NR_SCS;
duCfgParam.macCellCfg.initialUlBwp.bwp.cyclicPrefix = NORMAL_CYCLIC_PREFIX;
duCfgParam.macCellCfg.initialUlBwp.puschCommon.numTimeDomRsrcAlloc = 2;
duCfgParam.macCellCfg.initialUlBwp.puschCommon.timeDomRsrcAllocList[0].k2 = PUSCH_K2_CFG1;
srvCellCfgComm->dlCfg.freqBandInd = NR_FREQ_BAND;
srvCellCfgComm->dlCfg.offsetToPointA = OFFSET_TO_POINT_A;
srvCellCfgComm->dlCfg.dlScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
-#ifdef NR_TDD
- srvCellCfgComm->dlCfg.dlScsCarrier.scs = SCS_30KHZ;
- srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = BANDWIDTH_100MHZ;
-#else
- srvCellCfgComm->dlCfg.dlScsCarrier.scs = SCS_15KHZ;
- srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = BANDWIDTH_20MHZ;
-#endif
+ srvCellCfgComm->dlCfg.dlScsCarrier.scs = NR_SCS;
+ srvCellCfgComm->dlCfg.dlScsCarrier.scsBw = NR_BANDWIDTH;
srvCellCfgComm->dlCfg.locAndBw = FREQ_LOC_BW;
/* Configuring PDCCH Config Common For SIB1 */
/* Configuring UL Config Common */
srvCellCfgComm->ulCfg.ulScsCarrier.scsOffset = SSB_SUBCARRIER_OFFSET;
-#ifdef NR_TDD
- srvCellCfgComm->ulCfg.ulScsCarrier.scs = SCS_30KHZ;
- srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = BANDWIDTH_100MHZ;
-#else
- srvCellCfgComm->ulCfg.ulScsCarrier.scs = SCS_15KHZ;
- srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = BANDWIDTH_20MHZ;
-#endif
+ srvCellCfgComm->ulCfg.ulScsCarrier.scs = NR_SCS;
+ srvCellCfgComm->ulCfg.ulScsCarrier.scsBw = NR_BANDWIDTH;
srvCellCfgComm->ulCfg.pMax = UL_P_MAX;
srvCellCfgComm->ulCfg.locAndBw = FREQ_LOC_BW;
srvCellCfgComm->ulCfg.timeAlignTimerComm = TimeAlignmentTimer_infinity;
#define NR_DL_ARFCN 623400
#define NR_UL_ARFCN 623400
#define NR_FREQ_BAND 78
+#define NR_SCS SCS_30KHZ
+#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
+#define NR_SCS SCS_15KHZ
+#define NR_BANDWIDTH BANDWIDTH_20MHZ
#endif
#define DU_TAC 1
#define SUL_ARFCN 100
#define SUL_BAND 2
-
-
#define TIME_CFG 0
#define CARRIER_IDX 1
#define NUM_TX_ANT 2
/* MACRO defines for PRACH Configuration */
#define PRACH_CONFIG_IDX 88
-#define PRACH_FREQ_START 0
+#define PRACH_MAX_PRB 24 /* As per (spec 38.211-Table 6.3.3.2-1), max allocated PRBs can go upto 24 */
+#define PRACH_FREQ_START (MAX_NUM_RB - PRACH_MAX_PRB) /* In order to allocate PRACH from end of the resource grid */
#define PRACH_SEQ_LEN SHORT_SEQUENCE
-#define PRACH_SUBCARRIER_SPACING 0
+#define PRACH_SUBCARRIER_SPACING NR_SCS
#define PRACH_RESTRICTED_SET_CFG 0
#define NUM_PRACH_FDM 1
#define ROOT_SEQ_IDX 0
/* Macro define for PUCCH Configuration */
#define PUCCH_RSRC_COMMON 0
-#define PUCCH_GROUP_HOPPING 2 /* disable */
+#define PUCCH_GROUP_HOPPING 0 /* Neither sequence hopping nor group hopping */
#define PUCCH_P0_NOMINAL -74
/* MACRO defines for TDD DL-UL Configuration */
DU_LOG("\nERROR --> DU_APP : System Task creation for DU APP failed");
return RFAILED;
}
- //ODU_SET_THREAD_AFFINITY(&du_app_stsk, SS_AFFINITY_MODE_EXCL, 16, 0);
+ ODU_SET_THREAD_AFFINITY(&du_app_stsk, SS_AFFINITY_MODE_EXCL, 16, 0);
/* system task for EGTP */
if(ODU_CREATE_TASK(PRIOR0, &egtp_stsk) != ROK)
DU_LOG("\nERROR --> DU_APP : System Task creation for EGTP failed");
return RFAILED;
}
- //ODU_SET_THREAD_AFFINITY(&egtp_stsk, SS_AFFINITY_MODE_EXCL, 17, 0);
+ ODU_SET_THREAD_AFFINITY(&egtp_stsk, SS_AFFINITY_MODE_EXCL, 17, 0);
/* system task for RLC_DL and MAC */
if(ODU_CREATE_TASK(PRIOR0, &rlc_mac_cl_stsk) != ROK)
}
pthread_attr_init(&attr);
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- //ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 18, 0);
+ ODU_SET_THREAD_AFFINITY(&rlc_mac_cl_stsk, SS_AFFINITY_MODE_EXCL, 18, 0);
/* system task for RLC UL */
if(ODU_CREATE_TASK(PRIOR1, &rlc_ul_stsk) != ROK)
DU_LOG("\nERROR --> DU_APP : System Task creation for RLC UL failed");
return RFAILED;
}
- //ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 19, 0);
+ ODU_SET_THREAD_AFFINITY(&rlc_ul_stsk, SS_AFFINITY_MODE_EXCL, 19, 0);
/* system task for SCTP receiver thread */
if(ODU_CREATE_TASK(PRIOR0, &sctp_stsk) != ROK)
DU_LOG("\nERROR --> DU_APP : System Task creation for SCTP failed");
return RFAILED;
}
- //ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 20, 0);
+ ODU_SET_THREAD_AFFINITY(&sctp_stsk, SS_AFFINITY_MODE_EXCL, 20, 0);
/* system task for lower-mac receiver thread */
if(ODU_CREATE_TASK(PRIOR0, &lwr_mac_stsk) != ROK)
DU_LOG("\nERROR --> DU_APP : System Task creation for Lower MAC failed");
return RFAILED;
}
- //ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 21, 0);
+ ODU_SET_THREAD_AFFINITY(&lwr_mac_stsk, SS_AFFINITY_MODE_EXCL, 21, 0);
#ifndef INTEL_WLS_MEM
/* system task for phy stub's slot indication generator thread */
void fillDefaultModulation(MacUeCfg *ueCfg)
{
ueCfg->dlModInfo.modOrder = MOD_ORDER_QPSK;
- ueCfg->dlModInfo.mcsIndex = SIB1_MCS;
+ ueCfg->dlModInfo.mcsIndex = DEFAULT_MCS;
ueCfg->dlModInfo.mcsTable = MCS_TABLE_QAM64; /* Spec 38.214-Table 5.1.3.1-1 */
ueCfg->ulModInfo.modOrder = MOD_ORDER_QPSK;
- ueCfg->ulModInfo.mcsIndex = SIB1_MCS;
+ ueCfg->ulModInfo.mcsIndex = DEFAULT_MCS;
ueCfg->ulModInfo.mcsTable = MCS_TABLE_QAM64; /* Spec 38.214-Table 5.1.3.1-1 */
}