WINDOW_EXPIRED
}RaRspWindowStatus;
+typedef enum
+{
+ SEARCH,
+ CREATE,
+ DELETE
+}ActionTypeLcLL;
/**
* @brief
* Structure holding LTE MAC's General Configuration information.
uint32_t bo;
uint16_t pduSessionId; /*Pdu Session Id*/
Snssai *snssai; /*S-NSSAI assoc with LCID*/
+ bool isDedicated; /*Flag containing Dedicated S-NSSAI or not*/
}SchDlLcCtxt;
typedef struct schDlCb
{
- uint8_t numDlLc;
SchDlLcCtxt dlLcCtxt[MAX_NUM_LC];
}SchDlCb;
uint8_t bsd; // bucketSizeDuration
uint16_t pduSessionId; /*Pdu Session Id*/
Snssai *snssai; /*S-NSSAI assoc with LCID*/
+ bool isDedicated; /*Flag containing Dedicated S-NSSAI or not*/
}SchUlLcCtxt;
typedef struct schUlCb
{
- uint8_t numUlLc;
SchUlLcCtxt ulLcCtxt[MAX_NUM_LC];
}SchUlCb;
SchModulationInfo ulModInfo;
}SchUeCfgCb;
+/*Following structures to keep record and estimations of PRB allocated for each
+ * LC taking into consideration the RRM policies*/
+typedef struct lcInfo
+{
+ uint8_t lcId; /*LCID for which BO are getting recorded*/
+ uint32_t reqBO; /*Size of the BO requested/to be allocated for this LC*/
+ uint32_t allocBO; /*TBS/BO Size which is actually allocated*/
+ uint8_t allocPRB; /*PRB count which is allocated based on RRM policy/FreePRB*/
+}LcInfo;
+
+typedef struct dedicatedLCInfo
+{
+ CmLListCp dedLcList; /*Linklist of LC assoc with RRMPolicyMemberList*/
+ uint16_t rsvdDedicatedPRB; /*Number of PRB reserved for this Dedicated S-NSSAI*/
+}DedicatedLCInfo;
+
+typedef struct schLcPrbEstimate
+{
+ /* TODO: For Multiple RRMPolicies, Make DedicatedLcInfo as array/Double Pointer
+ * and have separate DedLCInfo for each RRMPolcyMemberList*/
+ /* Dedicated LC List will be allocated, if any available*/
+ DedicatedLCInfo *dedLcInfo; /*Contain LCInfo per RRMPolicy*/
+
+ CmLListCp defLcList; /*Linklist of LC assoc with Default S-NSSAI(s)*/
+
+ /* SharedPRB number can be used by any LC.
+ * Need to calculate in every Slot based on PRB availability*/
+ uint16_t sharedNumPrb;
+}SchLcPrbEstimate;
+
/**
* @brief
* UE control block
BsrInfo bsrInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS];
SchUlCb ulInfo;
SchDlCb dlInfo;
+ SchLcPrbEstimate dlLcPrbEst; /*DL PRB Alloc Estimate among different LC*/
+ SchLcPrbEstimate ulLcPrbEst; /*UL PRB Alloc Estimate among different LC*/
}SchUeCb;
/**
void schProcessRaReq(SlotTimingInfo currTime, SchCellCb *cellCb);
uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueIdx, RarAlloc *rarAlloc, uint8_t k0Index);
uint8_t schDlRsrcAllocMsg4(SchCellCb *cell, SlotTimingInfo slotTime, DlMsgAlloc *msg4Alloc);
-uint8_t schDlRsrcAllocDlMsg(SchCellCb *cell, SlotTimingInfo slotTime, uint16_t crnti,
- uint32_t *accumalatedSize, DlMsgAlloc *dlMsgAlloc);
+uint8_t schDlRsrcAllocDlMsg(SchCellCb *cell, SlotTimingInfo slotTime, uint16_t crnti,\
+ uint32_t tbSize, DlMsgAlloc *dlMsgAlloc, uint16_t startPRB);
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);
+uint16_t searchLargestFreeBlockDL(SchCellCb *cell, SlotTimingInfo slotTime,uint16_t *startPrb);
+void updateGrantSizeForBoRpt(CmLListCp *lcLL, DlMsgAlloc *dlMsgAlloc, uint32_t *accumalatedBOSize);
/* UL scheduling related function declarations */
uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst);
uint8_t allocatePrbUl(SchCellCb *cell, SlotTimingInfo slotTime, uint8_t startSymbol, uint8_t symbolLength, \
uint16_t *startPrb, uint16_t numPrb);
+/*Generic Functions*/
+LcInfo* handleLcLList(CmLListCp *lcLL, uint8_t lcId, ActionTypeLcLL action);
+void prbAllocUsingRRMPolicy(CmLListCp *lcLL, bool dedicatedPRB, uint16_t mcsIdx,uint8_t numSymbols,\
+ uint16_t *sharedPRB, uint16_t *reservedPRB, bool *isTxPayloadLenAdded);
+
/**********************************************************************
End of file
**********************************************************************/