* on PHY_DELTA + SCHED_DELTA + BO_DELTA *
****************************************************************/
* on PHY_DELTA + SCHED_DELTA + BO_DELTA *
****************************************************************/
- ADD_DELTA_TO_TIME(slotInd, schSlotValue->currentTime, PHY_DELTA);
- ADD_DELTA_TO_TIME(slotInd, schSlotValue->broadcastTime, PHY_DELTA + SCHED_DELTA);
- ADD_DELTA_TO_TIME(slotInd, schSlotValue->rarTime, PHY_DELTA + SCHED_DELTA);
- ADD_DELTA_TO_TIME(slotInd, schSlotValue->dlMsgTime, PHY_DELTA + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->currentTime, PHY_DELTA_DL);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->broadcastTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->rarTime, PHY_DELTA_DL + SCHED_DELTA);
+ ADD_DELTA_TO_TIME(slotInd, schSlotValue->dlMsgTime, PHY_DELTA_DL + SCHED_DELTA);
}
memset(dlMsgAlloc, 0, sizeof(DlMsgAlloc));
dlSchedInfo->dlMsgAlloc = dlMsgAlloc;
}
memset(dlMsgAlloc, 0, sizeof(DlMsgAlloc));
dlSchedInfo->dlMsgAlloc = dlMsgAlloc;
- if(ueCb->dlInfo.dlLcCtxt[lcIdx].bo)
- {
- dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].lcId = lcIdx;
-
- /* calculation for BO includse RLC and MAC header size */
- dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes = \
- ueCb->dlInfo.dlLcCtxt[lcIdx].bo + RLC_HDR_SIZE + MAC_HDR_SIZE;
- accumalatedSize += dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes;
- dlMsgAlloc->numLc++;
- }
- ueCb->dlInfo.dlLcCtxt[lcIdx].bo = 0;
+ if(ueCb->dlInfo.dlLcCtxt[lcIdx].bo)
+ {
+ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].lcId = lcIdx;
+
+ /* calculation for BO includse RLC and MAC header size */
+ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes = \
+ ueCb->dlInfo.dlLcCtxt[lcIdx].bo + MAC_HDR_SIZE;
+ accumalatedSize += dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc].schBytes;
+ dlMsgAlloc->numLc++;
+ }
+ ueCb->dlInfo.dlLcCtxt[lcIdx].bo = 0;
- schDlRsrcAllocDlMsg(dlMsgAlloc, cell, crnti, accumalatedSize, slot);
+ schDlRsrcAllocDlMsg(dlMsgAlloc, cell, crnti, &accumalatedSize, slot);
+ /* Calculated TB size could be less than the total size requested.
+ * Hence, updated the scheduled bytes report. Following is valid only for
+ * one LC.
+ * TODO : Update the scheduling byte report for multiple LC based on QCI
+ * and Priority */
+ dlMsgAlloc->lcSchInfo[dlMsgAlloc->numLc -1].schBytes = accumalatedSize;
* ****************************************************************/
uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
{
* ****************************************************************/
uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
{
- uint8_t ret = ROK;
- uint8_t ssb_rep, ueIdx, lcgIdx;
- uint16_t slot, sfnSlot = 0;
+ uint8_t ssb_rep, ueIdx, lcgIdx, ret = ROK;
+ uint16_t slot;
schCalcSlotValues(*slotInd, &dlSchedInfo.schSlotValue);
dlBrdcstAlloc = &dlSchedInfo.brdcstAlloc;
dlBrdcstAlloc->ssbTrans = NO_SSB;
schCalcSlotValues(*slotInd, &dlSchedInfo.schSlotValue);
dlBrdcstAlloc = &dlSchedInfo.brdcstAlloc;
dlBrdcstAlloc->ssbTrans = NO_SSB;
memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
dlBrdcstAlloc->ssbIdxSupported = 1;
memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
dlBrdcstAlloc->ssbIdxSupported = 1;
slot = dlSchedInfo.schSlotValue.currentTime.slot;
dlSchedInfo.cellId = cell->cellId;
/* Identify SSB ocassion*/
slot = dlSchedInfo.schSlotValue.currentTime.slot;
dlSchedInfo.cellId = cell->cellId;
/* Identify SSB ocassion*/
- dlBrdcstAlloc->ssbTrans = SSB_REPEAT;
+ if((ssb_rep == 5) && ((dlSchedInfo.schSlotValue.broadcastTime.slot == 0 || dlSchedInfo.schSlotValue.broadcastTime.slot == 10)))
+ dlBrdcstAlloc->ssbTrans = SSB_REPEAT;
+ else if((dlSchedInfo.schSlotValue.broadcastTime.sfn % (ssb_rep/10) == 0) && dlSchedInfo.schSlotValue.broadcastTime.slot == 0)
+ dlBrdcstAlloc->ssbTrans = SSB_REPEAT;
- dlBrdcstAlloc->sib1Trans = SIB1_REPITITION;
+ if((dlSchedInfo.schSlotValue.broadcastTime.sfn % (cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod/10) == 0) &&
+ (dlSchedInfo.schSlotValue.broadcastTime.slot == 0))
+ {
+ dlBrdcstAlloc->sib1Trans = SIB1_REPITITION;
+ }
for(lcgIdx=0; lcgIdx<MAX_NUM_LOGICAL_CHANNEL_GROUPS; lcgIdx++)
{
totDataReq+= ueCb->bsrInfo[lcgIdx].dataVol;
for(lcgIdx=0; lcgIdx<MAX_NUM_LOGICAL_CHANNEL_GROUPS; lcgIdx++)
{
totDataReq+= ueCb->bsrInfo[lcgIdx].dataVol;
}
if(totDataReq > 0) /* UL grant must be provided for this UE in this slot */
{
SchPuschInfo schPuschInfo;
memset(&schPuschInfo, 0, sizeof(SchPuschInfo));
}
if(totDataReq > 0) /* UL grant must be provided for this UE in this slot */
{
SchPuschInfo schPuschInfo;
memset(&schPuschInfo, 0, sizeof(SchPuschInfo));
- SCH_ALLOC(dciInfo, sizeof(DciInfo));
- if(!dciInfo)
- {
- DU_LOG("\nERROR --> SCH : Memory Allocation failed for dciInfo alloc");
- return RFAILED;
- }
- memset(dciInfo,0,sizeof(DciInfo));
- /* update the SFN and SLOT */
- memcpy(&dlSchedInfo.schSlotValue.ulDciTime, slotInd, sizeof(SlotIndInfo));
- slot = dlSchedInfo.schSlotValue.ulDciTime.slot;
- /* Update PUSCH allocation */
- schFillPuschAlloc(ueCb, slot, totDataReq, &schPuschInfo);
- /* Fill DCI for UL grant */
- schFillUlDci(ueCb, schPuschInfo, dciInfo);
- memcpy(&dciInfo->slotIndInfo, &dlSchedInfo.schSlotValue.ulDciTime, sizeof(SlotIndInfo));
+ SCH_ALLOC(dciInfo, sizeof(DciInfo));
+ if(!dciInfo)
+ {
+ DU_LOG("\nERROR --> SCH : Memory Allocation failed for dciInfo alloc");
+ return RFAILED;
+ }
+ memset(dciInfo,0,sizeof(DciInfo));
+ /* update the SFN and SLOT */
+ memcpy(&dlSchedInfo.schSlotValue.ulDciTime, slotInd, sizeof(SlotIndInfo));
+ slot = dlSchedInfo.schSlotValue.ulDciTime.slot;
+ /* Update PUSCH allocation */
+ schFillPuschAlloc(ueCb, slot, totDataReq, &schPuschInfo);
+ /* Fill DCI for UL grant */
+ schFillUlDci(ueCb, schPuschInfo, dciInfo);
+ memcpy(&dciInfo->slotIndInfo, &dlSchedInfo.schSlotValue.ulDciTime, sizeof(SlotIndInfo));