X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_rach.c;h=c002ea744cd999486af212014d0dd3e1b9a72047;hb=73da3ffdd36c5ade0c1cccbe7d2ad4d457897b2f;hp=46b8fba68dbf05011142199d6626a7d323c6fca7;hpb=12da8be0c4941e107b9ff0d18ce5b6eb7f5f7d20;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_rach.c b/src/5gnrsch/sch_rach.c index 46b8fba68..c002ea744 100644 --- a/src/5gnrsch/sch_rach.c +++ b/src/5gnrsch/sch_rach.c @@ -40,6 +40,7 @@ #include "du_app_mac_inf.h" #include "mac_sch_interface.h" #include "sch.h" +#include "sch_tmr.h" #include "sch_utils.h" /** @@ -74,7 +75,7 @@ bool schCheckPrachOcc(SchCellCb *cell, SlotTimingInfo prachOccasionTimingInfo) 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) @@ -181,7 +182,7 @@ void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotTimingInfo ulSchedInfo->prachSchInfo.prachFormat = prachFormat; ulSchedInfo->prachSchInfo.numRa = numRa; ulSchedInfo->prachSchInfo.prachStartSymb = prachStartSymbol; - DU_LOG("\nINFO --> SCH : RACH occassion set for slot %d", prachOccasionTimingInfo.slot); + DU_LOG("\nINFO --> SCH : RACH occassion set for slot %d", prachOccasionTimingInfo.slot); } /** @@ -555,15 +556,15 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin 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 */ @@ -595,10 +596,6 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin 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) @@ -783,7 +780,6 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin } cell->schDlSlotInfo[dciSlot]->pdcchUe = ueId; - cell->schDlSlotInfo[rarSlot]->pdschUe = ueId; if(cell->raReq[ueId-1]->isCFRA) cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId; else @@ -861,7 +857,7 @@ uint8_t SchProcRachInd(Pst *pst, RachIndInfo *rachInd) 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 */