SsbInfo ssbInfo;
schDlSlotInfo = cell->schDlSlotInfo[slot];
+
if(dlBrdcstAlloc->ssbTrans)
{
ssbStartPrb = cell->cellCfg.ssbSchCfg.ssbOffsetPointA; //+Kssb
ssbStartSymb = cell->ssbStartSymbArr[dlBrdcstAlloc->ssbIdxSupported-1]; /*since we are
- supporting only 1 ssb beam */
+ supporting only 1 ssb beam */
/* Assign interface structure */
for(idx=0; idx<dlBrdcstAlloc->ssbIdxSupported; idx++)
{
- ssbInfo.ssbIdx = idx;
- ssbInfo.fdAlloc.startPrb = ssbStartPrb;
- ssbInfo.fdAlloc.numPrb = SCH_SSB_NUM_PRB;
- ssbInfo.tdAlloc.startSymb = ssbStartSymb;
- ssbInfo.tdAlloc.numSymb = SCH_SSB_NUM_SYMB;
- dlBrdcstAlloc->ssbInfo[idx] = ssbInfo;
- schDlSlotInfo->ssbInfo[idx] = ssbInfo;
+ ssbInfo.ssbIdx = idx;
+ ssbInfo.fdAlloc.startPrb = ssbStartPrb;
+ ssbInfo.fdAlloc.numPrb = SCH_SSB_NUM_PRB;
+ ssbInfo.tdAlloc.startSymb = ssbStartSymb;
+ ssbInfo.tdAlloc.numSymb = SCH_SSB_NUM_SYMB;
+ dlBrdcstAlloc->ssbInfo[idx] = ssbInfo;
+ schDlSlotInfo->ssbInfo[idx] = ssbInfo;
}
schDlSlotInfo->ssbPres = true;
schDlSlotInfo->ssbIdxSupported = dlBrdcstAlloc->ssbIdxSupported;
for(idx=ssbStartSymb; idx<ssbStartSymb+SCH_SSB_NUM_SYMB; idx++)
{
- schDlSlotInfo->assignedPrb[idx] = ssbStartPrb + SCH_SSB_NUM_PRB + 1; /* +1 for kSsb */
+ schDlSlotInfo->assignedPrb[idx] = ssbStartPrb + SCH_SSB_NUM_PRB + 1; /* +1 for kSsb */
}
}
numSib1Prb = schCalcNumPrb(tbSize,mcs,numPdschSymbols);
for(idx=0; idx<SCH_SYMBOL_PER_SLOT; idx++)
{
- schDlSlotInfo->assignedPrb[idx] = ssbStartPrb + SCH_SSB_NUM_PRB + 1 + numSib1Prb; /* 10 PRBs for sib1 */
+ schDlSlotInfo->assignedPrb[idx] = ssbStartPrb + SCH_SSB_NUM_PRB + 1 + numSib1Prb; /* 10 PRBs for sib1 */
}
memcpy(&dlBrdcstAlloc->sib1Alloc.bwp, &cell->cellCfg.sib1SchCfg.bwp, sizeof(BwpCfg));
memcpy(&dlBrdcstAlloc->sib1Alloc.sib1PdcchCfg, &cell->cellCfg.sib1SchCfg.sib1PdcchCfg, sizeof(PdcchCfg));
memset(&ulSchedInfo, 0, sizeof(UlSchedInfo));
/* add PHY delta */
- ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA+SCHED_DELTA);
+ ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA_UL+SCHED_DELTA);
ulSchedInfo.cellId = cell->cellId;
ulSchedInfo.slotIndInfo.cellId = ulSchedInfo.cellId;
ulSchedInfo.slotIndInfo.slot = ulTimingInfo.slot;
/* Schedule resources for PRACH */
- schPrachResAlloc(cell, &ulSchedInfo, ulTimingInfo);
+ if(cell->firstSib1Transmitted)
+ schPrachResAlloc(cell, &ulSchedInfo, ulTimingInfo);
schUlSlotInfo = cell->schUlSlotInfo[ulTimingInfo.slot];
if(schUlSlotInfo->schPuschInfo)
*
* ****************************************************************/
uint8_t schDlRsrcAllocDlMsg(DlMsgAlloc *dlMsgAlloc, SchCellCb *cell, uint16_t crnti,
- uint16_t accumalatedSize, uint16_t slot)
+ uint32_t *accumalatedSize, uint16_t slot)
{
uint8_t ueIdx;
uint16_t tbSize = 0;
pdsch->codeword[cwCount].mcsIndex = ueCb.ueCfg.dlModInfo.mcsIndex;
pdsch->codeword[cwCount].mcsTable = ueCb.ueCfg.dlModInfo.mcsTable;
pdsch->codeword[cwCount].rvIndex = 0;
- tbSize = schCalcTbSize(accumalatedSize);
+ tbSize = schCalcTbSize(*accumalatedSize);
+ if(tbSize < *accumalatedSize)
+ *accumalatedSize = tbSize;
pdsch->codeword[cwCount].tbSize = tbSize;
}
pdsch->dataScramblingId = cell->cellCfg.phyCellId;