#include "du_app_mac_inf.h"
#include "mac_sch_interface.h"
#include "sch.h"
+#include "sch_tmr.h"
#include "sch_utils.h"
/**
if((prachOccasionTimingInfo.sfn%x) == y)
{
- subFrame = prachOccasionTimingInfo.slot/pow(2, cell->cellCfg.numerology);
+ subFrame = prachOccasionTimingInfo.slot/pow(2, cell->numerology);
/* check for subFrame number */
if ((1 << subFrame) & prachSubframe)
RaRspWindowStatus windowStatus=0;
#ifdef NR_TDD
- totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.scsCommon, cell->cellCfg.tddCfg.tddPeriod);
+ totalCfgSlot = calculateSlotPatternLength(cell->cellCfg.ssbScs, cell->cellCfg.tddCfg.tddPeriod);
#endif
k0K1InfoTbl = &cell->k0K1InfoTbl;
if(cell->raReq[ueId-1]->isCFRA == false)
{
msg3K2InfoTbl = &cell->msg3K2InfoTbl;
- puschMu = cell->cellCfg.numerology;
+ puschMu = cell->numerology;
msg3Delta = puschDeltaTable[puschMu];
- msg3MinSchTime = minMsg3SchTime[cell->cellCfg.numerology];
+ msg3MinSchTime = minMsg3SchTime[cell->numerology];
}
/* Calculating time frame to send DCI for RAR */
ADD_DELTA_TO_TIME(dciTime, rarTime, k0, cell->numSlots);
rarSlot = rarTime.slot;
- /* If PDSCH is already scheduled on this slot, cannot schedule PDSCH for another UE here. */
- if(cell->schDlSlotInfo[rarSlot]->pdschUe != 0)
- continue;
-
/* If Contention-FREE RA is in progress, allocate resources for
* PUCCH for next UL message */
if(cell->raReq[ueId-1]->isCFRA)
SCH_ALLOC(dciSlotAlloc->rarPdschCfg, sizeof(PdschCfg));
if(dciSlotAlloc->rarPdschCfg)
{
- memcpy(dciSlotAlloc->rarPdschCfg, &dciSlotAlloc->rarPdcchCfg->dci.pdschCfg, sizeof(PdschCfg));
+ memcpy(dciSlotAlloc->rarPdschCfg, &dciSlotAlloc->rarPdcchCfg->dci[0].pdschCfg, sizeof(PdschCfg));
}
else
{
SCH_ALLOC(rarSlotAlloc->rarPdschCfg, sizeof(PdschCfg));
if(rarSlotAlloc->rarPdschCfg)
{
- memcpy(rarSlotAlloc->rarPdschCfg, &dciSlotAlloc->rarPdcchCfg->dci.pdschCfg,sizeof(PdschCfg));
+ memcpy(rarSlotAlloc->rarPdschCfg, &dciSlotAlloc->rarPdcchCfg->dci[0].pdschCfg,sizeof(PdschCfg));
}
else
{
}
cell->schDlSlotInfo[dciSlot]->pdcchUe = ueId;
- cell->schDlSlotInfo[rarSlot]->pdschUe = ueId;
if(cell->raReq[ueId-1]->isCFRA)
cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId;
else
raReq->winStartTime.slot = rachInd->timingInfo.slot;
/* Converting window size from ms to number of slots */
- slotDuration = (1 / pow(2, cell->cellCfg.numerology));
+ slotDuration = (1 / pow(2, cell->numerology));
winNumSlots = (float)cell->cellCfg.ulCfgCommon.schInitialUlBwp.schRachCfg.prachCfgGeneric.raRspWindow / slotDuration;
/* Adding window size to window start time to get window end time */
pdcch->coresetCfg.shiftIndex = cell->cellCfg.phyCellId;
pdcch->coresetCfg.precoderGranularity = 0; /* sameAsRegBundle */
pdcch->numDlDci = 1;
- pdcch->dci.rnti = cell->raReq[ueId-1]->raRnti; /* RA-RNTI */
- pdcch->dci.scramblingId = cell->cellCfg.phyCellId;
- pdcch->dci.scramblingRnti = 0;
- pdcch->dci.cceIndex = 4; /* considering SIB1 is sent at cce 0-1-2-3 */
- pdcch->dci.aggregLevel = 4;
- pdcch->dci.beamPdcchInfo.numPrgs = 1;
- pdcch->dci.beamPdcchInfo.prgSize = 1;
- pdcch->dci.beamPdcchInfo.digBfInterfaces = 0;
- pdcch->dci.beamPdcchInfo.prg[0].pmIdx = 0;
- pdcch->dci.beamPdcchInfo.prg[0].beamIdx[0] = 0;
- pdcch->dci.txPdcchPower.beta_pdcch_1_0 = 0;
- pdcch->dci.txPdcchPower.powerControlOffsetSS = 0;
-
- pdsch = &pdcch->dci.pdschCfg;
+ pdcch->dci[0].rnti = cell->raReq[ueId-1]->raRnti; /* RA-RNTI */
+ pdcch->dci[0].scramblingId = cell->cellCfg.phyCellId;
+ pdcch->dci[0].scramblingRnti = 0;
+ pdcch->dci[0].cceIndex = 4; /* considering SIB1 is sent at cce 0-1-2-3 */
+ pdcch->dci[0].aggregLevel = 4;
+ pdcch->dci[0].beamPdcchInfo.numPrgs = 1;
+ pdcch->dci[0].beamPdcchInfo.prgSize = 1;
+ pdcch->dci[0].beamPdcchInfo.digBfInterfaces = 0;
+ pdcch->dci[0].beamPdcchInfo.prg[0].pmIdx = 0;
+ pdcch->dci[0].beamPdcchInfo.prg[0].beamIdx[0] = 0;
+ pdcch->dci[0].txPdcchPower.beta_pdcch_1_0 = 0;
+ pdcch->dci[0].txPdcchPower.powerControlOffsetSS = 0;
+
+ pdsch = &pdcch->dci[0].pdschCfg;
/* fill the PDSCH PDU */
uint8_t cwCount = 0;
pdsch->pduBitmap = 0; /* PTRS and CBG params are excluded */