From 604190ac7e354996f34ebfae0cdd00962811393f Mon Sep 17 00:00:00 2001 From: Balaji Shankaran Date: Tue, 15 Sep 2020 18:49:00 +0530 Subject: [PATCH] fix for Tb Size Change-Id: Ice2b3209a991b8d92daed86f718f8bb6f5d61954 Signed-off-by: Balaji Shankaran --- src/5gnrsch/sch_ue_mgr.c | 2 +- src/phy_stub/l1_bdy1.c | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index d3fbde649..37e8e7700 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -194,7 +194,7 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, S puschSlot = (pdcchSlot + k2) % SCH_NUM_SLOTS; startRb = cellCb->schUlSlotInfo[puschSlot]->puschCurrentPrb; - tbSize = schCalcTbSize((dataVol + buffer)/8); /* 2 bytes header + some buffer */ + tbSize = schCalcTbSize(dataVol + buffer); /* 2 bytes header + some buffer */ numRb = schCalcNumPrb(tbSize, mcs, numPdschSymbols); /* increment PUSCH PRB */ diff --git a/src/phy_stub/l1_bdy1.c b/src/phy_stub/l1_bdy1.c index 4b1792b1c..a7e144d9b 100644 --- a/src/phy_stub/l1_bdy1.c +++ b/src/phy_stub/l1_bdy1.c @@ -922,8 +922,13 @@ PUBLIC S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg) if(ulTtiReq->pdus[numPdus-1].pduType == 2) { DU_LOG("\nPHY STUB: PUCCH PDU"); - l1BuildAndSendUciInd((ulTtiReq->slot + SLOT_DELAY), ulTtiReq->sfn, \ - ulTtiReq->pdus[numPdus-1].pdu.pucch_pdu); + fapi_ul_tti_req_t ulTtiSlotInd; + memset(&ulTtiSlotInd, 0, sizeof(fapi_ul_tti_req_t)); + ulTtiSlotInd.slot = ulTtiReq->slot; + ulTtiSlotInd.sfn = ulTtiReq->sfn; + ADD_DELTA_TO_TIME(ulTtiSlotInd, ulTtiSlotInd, SLOT_DELAY); + l1BuildAndSendUciInd(ulTtiSlotInd.slot, ulTtiSlotInd.sfn, \ + ulTtiReq->pdus[numPdus-1].pdu.pucch_pdu); } numPdus--; } -- 2.16.6