X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_slot_ind.c;h=f9292914abd43cdb15a88f2eac5912dce4175289;hb=5256719522354a90ea688e9c95a1212d0104b34e;hp=62c1bbbcac913ac024ce6a36cc90f15ac8fff9b5;hpb=29d69003fa60ca371d31f79a474c9619f19648cd;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c index 62c1bbbca..f9292914a 100644 --- a/src/5gnrsch/sch_slot_ind.c +++ b/src/5gnrsch/sch_slot_ind.c @@ -242,8 +242,6 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t } } - schAllocPucchResource(cell, pucchTime, crnti, ueCb, isRetx, *hqP); - cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId; /*Re-setting the BO's of all DL LCs in this UE*/ @@ -315,11 +313,11 @@ void schCalcSlotValues(SlotTimingInfo slotInd, SchSlotValue *schSlotValue, uint1 * on PHY_DELTA + SCHED_DELTA + BO_DELTA * ****************************************************************/ - ADD_DELTA_TO_TIME(slotInd, schSlotValue->currentTime, PHY_DELTA_DL, numOfSlots); - ADD_DELTA_TO_TIME(slotInd, schSlotValue->broadcastTime, PHY_DELTA_DL + SCHED_DELTA, numOfSlots); - ADD_DELTA_TO_TIME(slotInd, schSlotValue->rarTime, PHY_DELTA_DL + SCHED_DELTA, numOfSlots); - ADD_DELTA_TO_TIME(slotInd, schSlotValue->dlMsgTime, PHY_DELTA_DL + SCHED_DELTA, numOfSlots); - ADD_DELTA_TO_TIME(slotInd, schSlotValue->ulDciTime, PHY_DELTA_DL + SCHED_DELTA, numOfSlots); + ADD_DELTA_TO_TIME(slotInd, schSlotValue->currentTime, gConfigInfo.gPhyDeltaDl, numOfSlots); + ADD_DELTA_TO_TIME(slotInd, schSlotValue->broadcastTime, gConfigInfo.gPhyDeltaDl + SCHED_DELTA, numOfSlots); + ADD_DELTA_TO_TIME(slotInd, schSlotValue->rarTime, gConfigInfo.gPhyDeltaDl + SCHED_DELTA, numOfSlots); + ADD_DELTA_TO_TIME(slotInd, schSlotValue->dlMsgTime, gConfigInfo.gPhyDeltaDl + SCHED_DELTA, numOfSlots); + ADD_DELTA_TO_TIME(slotInd, schSlotValue->ulDciTime, gConfigInfo.gPhyDeltaDl + SCHED_DELTA, numOfSlots); } /******************************************************************* @@ -422,10 +420,11 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, { uint8_t numK0 = 0, k0TblIdx = 0, k0Val = 0, k0Index =0 ; uint8_t k1TblIdx = 0, k1Index = 0, k1Val = 0, numK1 = 0; + uint8_t ret = RFAILED; SchUeCb *ueCb = NULLP; SchK0K1TimingInfoTbl *k0K1InfoTbl; - ADD_DELTA_TO_TIME(currTime, (*pdcchTime), PHY_DELTA_DL + SCHED_DELTA, cell->numSlots); + ADD_DELTA_TO_TIME(currTime, (*pdcchTime), gConfigInfo.gPhyDeltaDl + SCHED_DELTA, cell->numSlots); #ifdef NR_TDD if(schGetSlotSymbFrmt(pdcchTime->slot, cell->slotFrmtBitMap) != DL_SLOT) { @@ -434,14 +433,14 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, } #endif + ueCb = &cell->ueCb[ueId-1]; if(dedMsg == true) { - ueCb = &cell->ueCb[ueId-1]; k0K1InfoTbl = &ueCb->k0K1InfoTbl; if(schDlCandidateSelection(ueCb, *pdcchTime, pdcchAllocInfo) == false) { - DU_LOG("\nDEBUG --> SCH: DL candidate Selection failed bcz PDCCH is unavailable for this slot"); - return false; + DU_LOG("\nDEBUG --> SCH: DL candidate Selection failed bcz PDCCH is unavailable for this slot"); + return false; } } else @@ -520,9 +519,20 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId, pdcchTime->cellId = cell->cellId; pdschTime->cellId = cell->cellId; + cell->schUlSlotInfo[pucchTime->slot]->pucchUe = ueId; + + /*Availability of PUCCH for HARQ resources*/ + ret = schAllocPucchResource(cell, *pucchTime, ueCb, hqP, pdcchAllocInfo); + if(ret == RFAILED) + { + /*DL allocation can't go through as PUCCH is unavailable*/ + return false; + } return true; } } + + /* * Number of symbols in case of retransmisson should be same as it was in * original transmisson. Symbol availablity checks need to be added. @@ -567,7 +577,7 @@ uint8_t schProcDlPageAlloc(SchCellCb *cell, SlotTimingInfo currTime, Inst schIns { dlPageAlloc.cellId = currTime.cellId; - ADD_DELTA_TO_TIME(currTime, dlPageAlloc.dlPageTime, PHY_DELTA_DL + SCHED_DELTA, cell->numSlots); + ADD_DELTA_TO_TIME(currTime, dlPageAlloc.dlPageTime, gConfigInfo.gPhyDeltaDl + SCHED_DELTA, cell->numSlots); dlPageAlloc.shortMsgInd = FALSE; pdschTime = dlPageAlloc.dlPageTime;