[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-491] WG8 Alignment [UL Scheduling Information] 82/10282/6
authorlal.harshita <Harshita.Lal@radisys.com>
Wed, 18 Jan 2023 10:18:21 +0000 (15:48 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Mon, 6 Feb 2023 13:38:23 +0000 (19:08 +0530)
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
Change-Id: I4e5dac272bdc98007d9c04168092bb24379d9883
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
src/5gnrmac/lwr_mac_fsm.c
src/5gnrsch/sch_common.c
src/5gnrsch/sch_rach.c
src/5gnrsch/sch_ue_mgr.c
src/cm/mac_sch_interface.h

index 9c4b1b8..cb8c02e 100644 (file)
@@ -4208,11 +4208,11 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
       ulTtiReqPdu->pdu.pusch_pdu.numDmrsCdmGrpsNoData = 1;
       ulTtiReqPdu->pdu.pusch_pdu.dmrsPorts = 0;
       ulTtiReqPdu->pdu.pusch_pdu.resourceAlloc = \
-        currUlSlot->ulInfo.schPuschInfo.resAllocType;
+        currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAllocType;
       ulTtiReqPdu->pdu.pusch_pdu.rbStart = \
-         currUlSlot->ulInfo.schPuschInfo.fdAlloc.startPrb;
+         currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAlloc.type1.startPrb;
       ulTtiReqPdu->pdu.pusch_pdu.rbSize = \
-        currUlSlot->ulInfo.schPuschInfo.fdAlloc.numPrb;
+        currUlSlot->ulInfo.schPuschInfo.fdAlloc.resAlloc.type1.numPrb;
       ulTtiReqPdu->pdu.pusch_pdu.vrbToPrbMapping = 0;
       ulTtiReqPdu->pdu.pusch_pdu.frequencyHopping = 0;
       ulTtiReqPdu->pdu.pusch_pdu.txDirectCurrentLocation = 0;
@@ -4221,12 +4221,14 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
          currUlSlot->ulInfo.schPuschInfo.tdAlloc.startSymb;
       ulTtiReqPdu->pdu.pusch_pdu.nrOfSymbols = \
          currUlSlot->ulInfo.schPuschInfo.tdAlloc.numSymb;
+#ifdef INTEL_FAPI
       ulTtiReqPdu->pdu.pusch_pdu.mappingType = \
          currUlSlot->ulInfo.schPuschInfo.dmrsMappingType;
       ulTtiReqPdu->pdu.pusch_pdu.nrOfDmrsSymbols = \
          currUlSlot->ulInfo.schPuschInfo.nrOfDmrsSymbols;
       ulTtiReqPdu->pdu.pusch_pdu.dmrsAddPos = \
          currUlSlot->ulInfo.schPuschInfo.dmrsAddPos;
+#endif
       ulTtiReqPdu->pdu.pusch_pdu.puschData.rvIndex = \
          currUlSlot->ulInfo.schPuschInfo.tbInfo.rv;
       ulTtiReqPdu->pdu.pusch_pdu.puschData.harqProcessId = \
@@ -4273,7 +4275,7 @@ void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
    {
       ulTtiReqPdu->pduType                  = PUCCH_PDU_TYPE;
       memset(&ulTtiReqPdu->pdu.pucch_pdu, 0, sizeof(fapi_ul_pucch_pdu_t));
-      ulTtiReqPdu->pdu.pucch_pdu.rnti         = currUlSlot->ulInfo.schPucchInfo.rnti;
+      ulTtiReqPdu->pdu.pucch_pdu.rnti         = currUlSlot->ulInfo.crnti;
       /* TODO : Fill handle in raCb when scheduling pucch and access here */
       ulTtiReqPdu->pdu.pucch_pdu.handle       = 100;
       ulTtiReqPdu->pdu.pucch_pdu.bwpSize      = macCellCfg->initialUlBwp.bwp.numPrb;
@@ -4283,8 +4285,8 @@ void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
       ulTtiReqPdu->pdu.pucch_pdu.formatType   = currUlSlot->ulInfo.schPucchInfo.pucchFormat; /* Supporting PUCCH Format 0 */
       ulTtiReqPdu->pdu.pucch_pdu.multiSlotTxIndicator = 0; /* No Multi Slot transmission */
       
-      ulTtiReqPdu->pdu.pucch_pdu.prbStart     = currUlSlot->ulInfo.schPucchInfo.fdAlloc.startPrb;
-      ulTtiReqPdu->pdu.pucch_pdu.prbSize      = currUlSlot->ulInfo.schPucchInfo.fdAlloc.numPrb;
+      ulTtiReqPdu->pdu.pucch_pdu.prbStart     = currUlSlot->ulInfo.schPucchInfo.fdAlloc.resAlloc.type1.startPrb;
+      ulTtiReqPdu->pdu.pucch_pdu.prbSize      = currUlSlot->ulInfo.schPucchInfo.fdAlloc.resAlloc.type1.numPrb;
       ulTtiReqPdu->pdu.pucch_pdu.startSymbolIndex = currUlSlot->ulInfo.schPucchInfo.tdAlloc.startSymb;
       ulTtiReqPdu->pdu.pucch_pdu.nrOfSymbols  = currUlSlot->ulInfo.schPucchInfo.tdAlloc.numSymb;
       ulTtiReqPdu->pdu.pucch_pdu.freqHopFlag  = currUlSlot->ulInfo.schPucchInfo.intraFreqHop;
@@ -4299,18 +4301,18 @@ void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
       ulTtiReqPdu->pdu.pucch_pdu.timeDomainOccIdx = currUlSlot->ulInfo.schPucchInfo.timeDomOCC; 
       ulTtiReqPdu->pdu.pucch_pdu.preDftOccIdx = currUlSlot->ulInfo.schPucchInfo.occIdx; /* Valid for Format 4 only */
       ulTtiReqPdu->pdu.pucch_pdu.preDftOccLen = currUlSlot->ulInfo.schPucchInfo.occLen; /* Valid for Format 4 only */
-      ulTtiReqPdu->pdu.pucch_pdu.pi2Bpsk = currUlSlot->ulInfo.schPucchInfo.cmnFormatCfg.pi2BPSK;
-      ulTtiReqPdu->pdu.pucch_pdu.addDmrsFlag = currUlSlot->ulInfo.schPucchInfo.cmnFormatCfg.addDmrs;/* Valid for Format 3, 4 only */
+      ulTtiReqPdu->pdu.pucch_pdu.pi2Bpsk = currUlSlot->ulInfo.schPucchInfo.pi2BPSK;
+      ulTtiReqPdu->pdu.pucch_pdu.addDmrsFlag = currUlSlot->ulInfo.schPucchInfo.addDmrs;/* Valid for Format 3, 4 only */
       ulTtiReqPdu->pdu.pucch_pdu.dmrsScramblingId = 0; /* Valid for Format 2 */
       ulTtiReqPdu->pdu.pucch_pdu.dmrsCyclicShift  = 0; /* Valid for Format 4 */
       ulTtiReqPdu->pdu.pucch_pdu.srFlag           = currUlSlot->ulInfo.schPucchInfo.srFlag;
-      ulTtiReqPdu->pdu.pucch_pdu.bitLenHarq       = currUlSlot->ulInfo.schPucchInfo.numHarqBits;
+      ulTtiReqPdu->pdu.pucch_pdu.bitLenHarq       = currUlSlot->ulInfo.schPucchInfo.harqInfo.harqBitLength;
       ulTtiReqPdu->pdu.pucch_pdu.bitLenCsiPart1   = 0; /* Valid for Format 2, 3, 4 */
       ulTtiReqPdu->pdu.pucch_pdu.bitLenCsiPart2   = 0; /* Valid for Format 2, 3, 4 */
-      ulTtiReqPdu->pdu.pucch_pdu.beamforming.numPrgs = 0; /* Not Supported */
-      ulTtiReqPdu->pdu.pucch_pdu.beamforming.prgSize = 0;
-      ulTtiReqPdu->pdu.pucch_pdu.beamforming.digBfInterface = 0;
-      ulTtiReqPdu->pdu.pucch_pdu.beamforming.rx_bfi[0].beamIdx[0].beamidx = 0;
+      ulTtiReqPdu->pdu.pucch_pdu.beamforming.numPrgs = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.numPrgs; 
+      ulTtiReqPdu->pdu.pucch_pdu.beamforming.prgSize = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.prgSize;
+      ulTtiReqPdu->pdu.pucch_pdu.beamforming.digBfInterface = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.digBfInterfaces;
+      ulTtiReqPdu->pdu.pucch_pdu.beamforming.rx_bfi[0].beamIdx[0].beamidx = currUlSlot->ulInfo.schPucchInfo.beamPucchInfo.prg[0].beamIdx[0];
 
       ulTtiReqPdu->pduSize = sizeof(fapi_ul_pucch_pdu_t);
 
index c8a6cca..a79daf4 100644 (file)
@@ -128,7 +128,7 @@ uint8_t schBroadcastSib1Alloc(SchCellCb *cell, SlotTimingInfo slotTime, DlBrdcst
 {
    uint8_t dmrsStartSymbol, startSymbol, numSymbol ;
    DmrsInfo dmrs;
-   FreqDomainAlloc freqAlloc;
+   ResAllocType1 freqAlloc;
    TimeDomainAlloc timeAlloc;
    SchDlSlotInfo *schDlSlotInfo = NULLP;
 
@@ -224,7 +224,7 @@ void fillPucchFormat0(SchPucchInfo *ulSchedPucch, SchPucchResrcInfo *resrcInfo)
 {
    if(resrcInfo->SchPucchFormat.format0)
    {
-      ulSchedPucch->fdAlloc.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
+      ulSchedPucch->fdAlloc.resAlloc.type1.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
       ulSchedPucch->pucchFormat  = PUCCH_FORMAT_0;
       ulSchedPucch->initialCyclicShift =  resrcInfo->SchPucchFormat.format0->initialCyclicShift;
       ulSchedPucch->tdAlloc.numSymb = resrcInfo->SchPucchFormat.format0->numSymbols;
@@ -249,7 +249,7 @@ void fillPucchFormat1(SchPucchInfo *ulSchedPucch, SchPucchResrcInfo *resrcInfo)
 {
    if(resrcInfo->SchPucchFormat.format1)
    {
-      ulSchedPucch->fdAlloc.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
+      ulSchedPucch->fdAlloc.resAlloc.type1.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
       ulSchedPucch->pucchFormat  = PUCCH_FORMAT_1;
       ulSchedPucch->initialCyclicShift =  resrcInfo->SchPucchFormat.format1->initialCyclicShift;
       ulSchedPucch->tdAlloc.numSymb = resrcInfo->SchPucchFormat.format1->numSymbols;
@@ -281,23 +281,24 @@ uint8_t fillUlSchedPucchFormat(uint8_t pucchFormat, SchPucchInfo *ulSchedPucch,\
    {
       case PUCCH_FORMAT_0:
          {
-           if(resrcInfo)
+            if(resrcInfo)
                fillPucchFormat0(ulSchedPucch, resrcInfo);
             return ret;
-        }
+         }
       case PUCCH_FORMAT_1:
          {
-           if(resrcInfo)
-           {
+            if(resrcInfo)
+            {
                fillPucchFormat1(ulSchedPucch, resrcInfo);
-           }
-           if(formatCfg)
-           {
-               memcpy(&ulSchedPucch->cmnFormatCfg, formatCfg, sizeof(SchPucchFormatCfg));
-           }
-           return ret;
-        }/* To Add support for more Pucch Format */
-      
+            }
+            if(formatCfg)
+            {
+               ulSchedPucch->addDmrs = formatCfg->addDmrs;
+               ulSchedPucch->pi2BPSK = formatCfg->pi2BPSK;
+            }
+            return ret;
+         }/* To Add support for more Pucch Format */
+
       default:
          DU_LOG("\nERROR  --> SCH : Invalid PUCCH format[%d] in fillUlSchedPucchFormatCfg()", pucchFormat);
         ret = RFAILED;
@@ -341,7 +342,7 @@ uint8_t fillUlSchedPucchDedicatedCfg(SchCellCb *cell, SchPucchCfg *pucchDedCfg,\
             {
                ulSchedPucch->intraFreqHop = pucchDedCfg->resrc->resrcToAddModList[resrcIdx].intraFreqHop;
                ulSchedPucch->secondPrbHop = pucchDedCfg->resrc->resrcToAddModList[resrcIdx].secondPrbHop;
-               ulSchedPucch->fdAlloc.startPrb = pucchDedCfg->resrc->resrcToAddModList[resrcIdx].startPrb;
+               ulSchedPucch->fdAlloc.resAlloc.type1.startPrb = pucchDedCfg->resrc->resrcToAddModList[resrcIdx].startPrb;
                ulSchedPucch->pucchFormat = pucchDedCfg->resrc->resrcToAddModList[resrcIdx].pucchFormat;
                ret = fillUlSchedPucchFormat(ulSchedPucch->pucchFormat, ulSchedPucch,\
                      &pucchDedCfg->resrc->resrcToAddModList[resrcIdx], NULLP);
@@ -364,7 +365,6 @@ uint8_t fillUlSchedPucchDedicatedCfg(SchCellCb *cell, SchPucchCfg *pucchDedCfg,\
 
    if(pucchDedCfg->format1)
    {
-      memset(&ulSchedPucch->cmnFormatCfg, 0, sizeof(SchPucchFormatCfg));
       ret = fillUlSchedPucchFormat(ulSchedPucch->pucchFormat, ulSchedPucch, NULLP, pucchDedCfg->format1);
       if(ret == RFAILED)
          return ret;
@@ -382,14 +382,12 @@ uint8_t fillUlSchedPucchDedicatedCfg(SchCellCb *cell, SchPucchCfg *pucchDedCfg,\
       {
          srPeriodicity = pucchDedCfg->schedReq->schedAddModList[schedReqIdx].periodicity;
          srOffset      = pucchDedCfg->schedReq->schedAddModList[schedReqIdx].offset;
-        break;
+         break;
       }
       if(((numSlots * slotInfo->sfn + slotInfo->slot - srOffset) % srPeriodicity) == 0)
       {
          ulSchedPucch->srFlag  = true;
-         ulSchedPucch->uciFlag = true;
       }
-      ulSchedPucch->harqFlag  = true;//check how to enable?
    }
    return ret;
 }
@@ -407,9 +405,9 @@ uint8_t fillUlSchedPucchDedicatedCfg(SchCellCb *cell, SchPucchCfg *pucchDedCfg,\
  *  @return  ROK/RFAILED
  **/
 
-uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTimingInfo slotInfo)
+uint16_t fillPucchResourceInfo(uint8_t ueId, SchPucchInfo *schPucchInfo, Inst inst, SlotTimingInfo slotInfo)
 {
-   uint8_t ret = ROK, ueId = 0, ueIdx = 0, pucchIdx = 0;
+   uint8_t ret = ROK,  ueIdx = 0, pucchIdx = 0;
    SchCellCb  *cell = schCb[inst].cells[inst];
    SchPucchCfgCmn *pucchCfg = NULLP;
    SchBwpParams *ulBwp = NULLP;
@@ -418,10 +416,9 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming
 #endif
    uint16_t startPrb;
 
-   GET_UE_ID(schPucchInfo->rnti, ueId);
    ueIdx = ueId -1;
 #ifdef NR_DRX 
-   ueCb = schGetUeCb(cell, schPucchInfo->rnti);
+   ueCb = &(cell->ueCb[ueIdx]); 
    if(ueCb->ueDrxInfoPres)
    {
       if(!ueCb->drxUeCb.drxUlUeActiveStatus)
@@ -452,15 +449,14 @@ uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst, SlotTiming
             &startPrb, PUCCH_NUM_PRB_FORMAT_0_1_4);
       if (ret == ROK)
       {
-         schPucchInfo->fdAlloc.startPrb = ulBwp->freqAlloc.startPrb + pucchResourceSet[pucchIdx][3];
-         schPucchInfo->fdAlloc.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
+         schPucchInfo->fdAlloc.resAlloc.type1.startPrb = ulBwp->freqAlloc.startPrb + pucchResourceSet[pucchIdx][3];
+         schPucchInfo->fdAlloc.resAlloc.type1.numPrb = PUCCH_NUM_PRB_FORMAT_0_1_4;
          schPucchInfo->tdAlloc.startSymb = pucchResourceSet[pucchIdx][1];
          schPucchInfo->tdAlloc.numSymb = pucchResourceSet[pucchIdx][2];
          schPucchInfo->pucchFormat = pucchResourceSet[pucchIdx][0];
 
          /* set SR and UCI flag to false */
          schPucchInfo->srFlag  = true;
-         schPucchInfo->uciFlag = true;
       }
    }
    return ROK;
@@ -504,7 +500,7 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
    schUlSlotInfo = cell->schUlSlotInfo[ulTimingInfo.slot]; 
    if(schUlSlotInfo->schPuschInfo)
    {
-      ulSchedInfo.crnti = schUlSlotInfo->schPuschInfo->crnti;
+      GET_CRNTI(ulSchedInfo.crnti, schUlSlotInfo->puschUe);
       /* Check the ue drx status if the UE is active for uplink scheduling or not  */
 #ifdef NR_DRX 
       ueCb = schGetUeCb(cell, ulSchedInfo.crnti);
@@ -523,7 +519,8 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
 
    if(schUlSlotInfo->pucchPres)
    {
-      ret = fillPucchResourceInfo(&schUlSlotInfo->schPucchInfo, schInst, ulTimingInfo);
+      GET_CRNTI(ulSchedInfo.crnti, schUlSlotInfo->pucchUe);
+      ret = fillPucchResourceInfo(schUlSlotInfo->pucchUe, &schUlSlotInfo->schPucchInfo, schInst, ulTimingInfo);
       if (ret == ROK)
       {
          ulSchedInfo.dataType |= SCH_DATATYPE_UCI;
@@ -765,12 +762,10 @@ uint16_t schAllocPucchResource(SchCellCb *cell, SlotTimingInfo pucchTime, uint16
    memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
 
    schUlSlotInfo->pucchPres = true;
-   schUlSlotInfo->schPucchInfo.rnti = crnti;
    if(ueCb != NULLP)
    {
       /* set HARQ flag to true */
-      schUlSlotInfo->schPucchInfo.harqFlag = true;
-      schUlSlotInfo->schPucchInfo.numHarqBits = 1; /* 1 bit for HARQ */
+      schUlSlotInfo->schPucchInfo.harqInfo.harqBitLength = 1; /* 1 bit for HARQ */
       ADD_DELTA_TO_TIME(pucchTime, pucchTime, 3, cell->numSlots); /* SLOT_DELAY=3 */
       cmLListAdd2Tail(&(ueCb->hqDlmap[pucchTime.slot]->hqList), &hqP->ulSlotLnk);
    }
index ed2612c..bf4c116 100644 (file)
@@ -456,11 +456,10 @@ SchPuschInfo* schAllocMsg3Pusch(Inst schInst, uint16_t crnti, uint8_t k2Index, S
    tbSize = schCalcTbSizeFromNPrb(numRb, mcs, NUM_PDSCH_SYMBOL);
    tbSize = tbSize / 8 ; /*bits to byte conversion*/
 
-   schUlSlotInfo->schPuschInfo->crnti             = crnti;
    schUlSlotInfo->schPuschInfo->harqProcId        = msg3HqProc->procId;
-   schUlSlotInfo->schPuschInfo->resAllocType      = SCH_ALLOC_TYPE_1;
-   schUlSlotInfo->schPuschInfo->fdAlloc.startPrb  = startRb;
-   schUlSlotInfo->schPuschInfo->fdAlloc.numPrb    = numRb;
+   schUlSlotInfo->schPuschInfo->fdAlloc.resAllocType      = SCH_ALLOC_TYPE_1;
+   schUlSlotInfo->schPuschInfo->fdAlloc.resAlloc.type1.startPrb  = startRb;
+   schUlSlotInfo->schPuschInfo->fdAlloc.resAlloc.type1.numPrb    = numRb;
    schUlSlotInfo->schPuschInfo->tdAlloc.startSymb = startSymb;
    schUlSlotInfo->schPuschInfo->tdAlloc.numSymb   = symbLen;
    schUlSlotInfo->schPuschInfo->tbInfo.qamOrder   = QPSK_MODULATION;  /* QPSK modulation */
@@ -469,25 +468,30 @@ SchPuschInfo* schAllocMsg3Pusch(Inst schInst, uint16_t crnti, uint8_t k2Index, S
    schUlSlotInfo->schPuschInfo->tbInfo.ndi        = NEW_TRANSMISSION; /* new transmission */
    schUlSlotInfo->schPuschInfo->tbInfo.rv              = 0;
    schUlSlotInfo->schPuschInfo->tbInfo.tbSize     = tbSize;
+#ifdef INTEL_FAPI   
    schUlSlotInfo->schPuschInfo->dmrsMappingType   = DMRS_MAP_TYPE_A;  /* Setting Type-A */
    schUlSlotInfo->schPuschInfo->nrOfDmrsSymbols   = NUM_DMRS_SYMBOLS;
    schUlSlotInfo->schPuschInfo->dmrsAddPos        = DMRS_ADDITIONAL_POS;
+#endif   
+   
    if(!isRetx)
    {
       msg3HqProc->strtSymbl = startSymb;
       msg3HqProc->numSymbl = symbLen;
-      msg3HqProc->puschResType = schUlSlotInfo->schPuschInfo->resAllocType;
-      msg3HqProc->puschStartPrb = schUlSlotInfo->schPuschInfo->fdAlloc.startPrb;
-      msg3HqProc->puschNumPrb = schUlSlotInfo->schPuschInfo->fdAlloc.numPrb;
+      msg3HqProc->puschResType = schUlSlotInfo->schPuschInfo->fdAlloc.resAllocType;
+      msg3HqProc->puschStartPrb = schUlSlotInfo->schPuschInfo->fdAlloc.resAlloc.type1.startPrb;
+      msg3HqProc->puschNumPrb = schUlSlotInfo->schPuschInfo->fdAlloc.resAlloc.type1.numPrb;
       msg3HqProc->tbInfo.qamOrder = schUlSlotInfo->schPuschInfo->tbInfo.qamOrder;
       msg3HqProc->tbInfo.iMcs = schUlSlotInfo->schPuschInfo->tbInfo.mcs;
       msg3HqProc->tbInfo.mcsTable = schUlSlotInfo->schPuschInfo->tbInfo.mcsTable;
       msg3HqProc->tbInfo.ndi = schUlSlotInfo->schPuschInfo->tbInfo.ndi;
       msg3HqProc->tbInfo.rv = schUlSlotInfo->schPuschInfo->tbInfo.rv;
       msg3HqProc->tbInfo.tbSzReq = schUlSlotInfo->schPuschInfo->tbInfo.tbSize;
+#ifdef INTEL_FAPI      
       msg3HqProc->dmrsMappingType = schUlSlotInfo->schPuschInfo->dmrsMappingType;
       msg3HqProc->nrOfDmrsSymbols = schUlSlotInfo->schPuschInfo->nrOfDmrsSymbols;
       msg3HqProc->dmrsAddPos = schUlSlotInfo->schPuschInfo->dmrsAddPos;
+#endif
    }
    return schUlSlotInfo->schPuschInfo;
 }
@@ -711,8 +715,8 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin
             dciSlotAlloc->rarInfo.ulGrant.bwpSize = cell->cellCfg.schInitialUlBwp.bwp.freqAlloc.numPrb;
             /* Spec 38.213, section 8.2, 0 : MSG3 PUSCH will be transmitted without frequency hopping */
             dciSlotAlloc->rarInfo.ulGrant.freqHopFlag = 0;
-            dciSlotAlloc->rarInfo.ulGrant.msg3FreqAlloc.startPrb = msg3PuschInfo->fdAlloc.startPrb;
-            dciSlotAlloc->rarInfo.ulGrant.msg3FreqAlloc.numPrb = msg3PuschInfo->fdAlloc.numPrb;
+            dciSlotAlloc->rarInfo.ulGrant.msg3FreqAlloc.startPrb = msg3PuschInfo->fdAlloc.resAlloc.type1.startPrb;
+            dciSlotAlloc->rarInfo.ulGrant.msg3FreqAlloc.numPrb = msg3PuschInfo->fdAlloc.resAlloc.type1.numPrb;
             dciSlotAlloc->rarInfo.ulGrant.k2Index = k2Index;
             dciSlotAlloc->rarInfo.ulGrant.mcs = msg3PuschInfo->tbInfo.mcs;
             dciSlotAlloc->rarInfo.ulGrant.tpc = 3;  /* TODO : Check appropriate value to be filled */
index 61db4b2..0923f95 100644 (file)
@@ -909,11 +909,10 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi
 
    if (isRetx == FALSE)
    {
-      puschInfo.crnti             = ueCb->crnti;
-      puschInfo.harqProcId        = SCH_HARQ_PROC_ID;
-      puschInfo.resAllocType      = SCH_ALLOC_TYPE_1;
-      puschInfo.fdAlloc.startPrb  = startPrb;
-      puschInfo.fdAlloc.numPrb    = numRb;
+      puschInfo.harqProcId                       = SCH_HARQ_PROC_ID;
+      puschInfo.fdAlloc.resAllocType             = SCH_ALLOC_TYPE_1;
+      puschInfo.fdAlloc.resAlloc.type1.startPrb  = startPrb;
+      puschInfo.fdAlloc.resAlloc.type1.numPrb    = numRb;
       puschInfo.tdAlloc.startSymb = startSymb;
       puschInfo.tdAlloc.numSymb   = symbLen;
       puschInfo.tbInfo.qamOrder   = ueCb->ueCfg.ulModInfo.modOrder;
@@ -922,12 +921,14 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi
       puschInfo.tbInfo.ndi        = 1; /* new transmission */
       puschInfo.tbInfo.rv         = 0;
       puschInfo.tbInfo.tbSize     = tbSize;
+#ifdef INTEL_FAPI      
       puschInfo.dmrsMappingType   = DMRS_MAP_TYPE_A;  /* Setting Type-A */
       puschInfo.nrOfDmrsSymbols   = NUM_DMRS_SYMBOLS;
       puschInfo.dmrsAddPos        = DMRS_ADDITIONAL_POS;
-      hqP->puschResType = puschInfo.resAllocType;
-      hqP->puschStartPrb = puschInfo.fdAlloc.startPrb;
-      hqP->puschNumPrb = puschInfo.fdAlloc.numPrb;
+#endif      
+      hqP->puschResType = puschInfo.fdAlloc.resAllocType;
+      hqP->puschStartPrb = puschInfo.fdAlloc.resAlloc.type1.startPrb;
+      hqP->puschNumPrb = puschInfo.fdAlloc.resAlloc.type1.numPrb;
       hqP->strtSymbl = puschInfo.tdAlloc.startSymb;
       hqP->numSymbl = puschInfo.tdAlloc.numSymb;
       hqP->tbInfo.qamOrder = puschInfo.tbInfo.qamOrder;
@@ -937,17 +938,18 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi
       hqP->tbInfo.rv = puschInfo.tbInfo.rv;
       hqP->tbInfo.rvIdx = 0;
       hqP->tbInfo.tbSzReq = puschInfo.tbInfo.tbSize;
+#ifdef INTEL_FAPI      
       hqP->dmrsMappingType = puschInfo.dmrsMappingType;
       hqP->nrOfDmrsSymbols = puschInfo.nrOfDmrsSymbols;
       hqP->dmrsAddPos = puschInfo.dmrsAddPos;
+#endif
    }
    else
    {
-      puschInfo.crnti             = ueCb->crnti;
-      puschInfo.harqProcId        = hqP->procId;
-      puschInfo.resAllocType      = hqP->puschResType;
-      puschInfo.fdAlloc.startPrb  = hqP->puschStartPrb;
-      puschInfo.fdAlloc.numPrb    = hqP->puschNumPrb;
+      puschInfo.harqProcId                       = hqP->procId;
+      puschInfo.fdAlloc.resAllocType             = hqP->puschResType;
+      puschInfo.fdAlloc.resAlloc.type1.startPrb  = hqP->puschStartPrb;
+      puschInfo.fdAlloc.resAlloc.type1.numPrb    = hqP->puschNumPrb;
       puschInfo.tdAlloc.startSymb = hqP->strtSymbl;
       puschInfo.tdAlloc.numSymb   = hqP->numSymbl;
       puschInfo.tbInfo.qamOrder   = hqP->tbInfo.qamOrder;
@@ -957,10 +959,12 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi
       hqP->tbInfo.rvIdx = (hqP->tbInfo.rvIdx +1) & 0x3;
       puschInfo.tbInfo.rv         = schCmnDlRvTbl[hqP->tbInfo.rvIdx];
       puschInfo.tbInfo.tbSize     = hqP->tbInfo.tbSzReq;
+#ifdef INTEL_FAPI      
       puschInfo.dmrsMappingType   = hqP->dmrsMappingType;  /* Setting Type-A */
       puschInfo.nrOfDmrsSymbols   = hqP->nrOfDmrsSymbols;
       puschInfo.dmrsAddPos        = hqP->dmrsAddPos;
-   }
+#endif 
+  }
   schUlSlotInfo = cellCb->schUlSlotInfo[puschTime.slot];
   SCH_ALLOC(schUlSlotInfo->schPuschInfo, sizeof(SchPuschInfo));
   if(!schUlSlotInfo->schPuschInfo)
@@ -1057,11 +1061,10 @@ uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo
    dciInfo->dciInfo.pdschCfg                          = NULL; /* No DL data being sent */
    msg3HqProc->tbInfo.txCntr++;
 
-  puschInfo->crnti             = raCb->tcrnti;
-  puschInfo->harqProcId        = msg3HqProc->procId;
-  puschInfo->resAllocType      = msg3HqProc->puschResType;
-  puschInfo->fdAlloc.startPrb  = msg3HqProc->puschStartPrb;
-  puschInfo->fdAlloc.numPrb    = msg3HqProc->puschNumPrb;
+  puschInfo->harqProcId                       = msg3HqProc->procId;
+  puschInfo->fdAlloc.resAllocType             = msg3HqProc->puschResType;
+  puschInfo->fdAlloc.resAlloc.type1.startPrb  = msg3HqProc->puschStartPrb;
+  puschInfo->fdAlloc.resAlloc.type1.numPrb    = msg3HqProc->puschNumPrb;
   puschInfo->tdAlloc.startSymb = msg3HqProc->strtSymbl;
   puschInfo->tdAlloc.numSymb   = msg3HqProc->numSymbl;
   puschInfo->tbInfo.qamOrder   = msg3HqProc->tbInfo.qamOrder;
@@ -1070,10 +1073,11 @@ uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo
   puschInfo->tbInfo.ndi        = msg3HqProc->tbInfo.ndi; /* retransmission */
   puschInfo->tbInfo.rv         = msg3HqProc->tbInfo.rvIdx;
   puschInfo->tbInfo.tbSize     = msg3HqProc->tbInfo.tbSzReq;
+#ifdef INTEL_FAPI
   puschInfo->dmrsMappingType   = msg3HqProc->dmrsMappingType;  /* Setting Type-A */
   puschInfo->nrOfDmrsSymbols   = msg3HqProc->nrOfDmrsSymbols;
   puschInfo->dmrsAddPos        = msg3HqProc->dmrsAddPos;
-
+#endif
    return ROK;
 }
 
@@ -1133,9 +1137,9 @@ uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, b
    dciInfo->formatType = FORMAT0_0;
    
    /* fill UL grant */
-   dciInfo->format.format0_0.resourceAllocType   = puschInfo->resAllocType;
-   dciInfo->format.format0_0.freqAlloc.startPrb  = puschInfo->fdAlloc.startPrb;
-   dciInfo->format.format0_0.freqAlloc.numPrb    = puschInfo->fdAlloc.numPrb;
+   dciInfo->format.format0_0.resourceAllocType   = puschInfo->fdAlloc.resAllocType;
+   dciInfo->format.format0_0.freqAlloc.startPrb  = puschInfo->fdAlloc.resAlloc.type1.startPrb;
+   dciInfo->format.format0_0.freqAlloc.numPrb    = puschInfo->fdAlloc.resAlloc.type1.numPrb;
    dciInfo->format.format0_0.timeAlloc.startSymb = puschInfo->tdAlloc.startSymb;
    dciInfo->format.format0_0.timeAlloc.numSymb   = puschInfo->tdAlloc.numSymb;
    dciInfo->format.format0_0.rowIndex            = 0; /* row Index */
index ec2c5a8..13cbf5d 100644 (file)
@@ -442,12 +442,16 @@ typedef struct timeDomainAlloc
    uint16_t numSymb;
 }TimeDomainAlloc;
 
-typedef struct freqDomainAlloc
+typedef struct resAllocType0 
+{
+   uint8_t rbBitmap[36];
+}ResAllocType0;
+
+typedef struct resAllocType1 
 {
    uint16_t startPrb;
    uint16_t numPrb;
-}FreqDomainAlloc;
-
+}ResAllocType1;
 
 typedef struct
 {
@@ -467,7 +471,7 @@ typedef struct bwpCfg
 {
    uint8_t         subcarrierSpacing;
    uint8_t         cyclicPrefix;
-   FreqDomainAlloc freqAlloc;  
+   ResAllocType1   freqAlloc;  
 }BwpCfg;
 
 typedef struct prg
@@ -513,7 +517,7 @@ typedef struct pdschFreqAlloc
 {
    uint8_t  resourceAllocType;
    /* since we are using type-1, rbBitmap excluded */
-   FreqDomainAlloc freqAlloc;
+   ResAllocType1 freqAlloc;
    uint8_t  vrbPrbMapping;
 } PdschFreqAlloc;
 
@@ -640,7 +644,7 @@ typedef struct schRachCfg
 
 typedef struct schBwpParams
 {
-   FreqDomainAlloc freqAlloc;
+   ResAllocType1   freqAlloc;
    uint8_t         scs;
    uint8_t         cyclicPrefix;
 }SchBwpParams;
@@ -845,7 +849,7 @@ typedef struct ssbInfo
 {
    uint8_t         ssbIdx;          /* SSB Index */
    TimeDomainAlloc tdAlloc; /* Time domain allocation */
-   FreqDomainAlloc fdAlloc; /* Freq domain allocation */
+   ResAllocType1   fdAlloc; /* Freq domain allocation */
 }SsbInfo;
 
 typedef struct sib1AllocInfo
@@ -861,7 +865,7 @@ typedef struct prachSchInfo
    uint8_t  prachFormat;    /* PRACH Format */
    uint8_t  numRa;          /* Freq domain ocassion */
    uint8_t  prachStartSymb; /* Freq domain ocassion */
-}PrachSchInfo;
+}SchPrachInfo;
 
 /* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
 typedef struct dlBrdcstAlloc
@@ -885,7 +889,7 @@ typedef struct msg3UlGrant
 {
    uint8_t         freqHopFlag;
    uint16_t        bwpSize;
-   FreqDomainAlloc msg3FreqAlloc;
+   ResAllocType1   msg3FreqAlloc;
    uint8_t         k2Index;
    uint8_t         mcs;
    uint8_t         tpc;
@@ -967,7 +971,7 @@ typedef struct format0_0
 {
    uint8_t         resourceAllocType;
    /* since we are using type-1, hence rbBitmap excluded */
-   FreqDomainAlloc freqAlloc;
+   ResAllocType1   freqAlloc;
    TimeDomainAlloc timeAlloc;
    uint16_t        rowIndex;
    uint8_t         mcs;
@@ -1052,27 +1056,59 @@ typedef struct dlPageAlloc
 
 typedef struct tbInfo
 {
-   uint8_t  qamOrder;  /* Modulation Order */
-   uint8_t  mcs;       /* MCS */
+   uint8_t      mcs;       /* MCS */
+   uint8_t      ndi;       /* NDI */
+   uint8_t      rv;        /* Redundancy Version */
+   uint16_t     tbSize;    /* TB Size */
+   uint8_t      qamOrder;  /* Modulation Order */
    SchMcsTable  mcsTable;  /* MCS Table */
-   uint8_t  ndi;       /* NDI */
-   uint8_t  rv;        /* Redundancy Version */
-   uint16_t tbSize;    /* TB Size */
 }TbInfo;
 
+typedef struct freqDomainAlloc
+{
+   uint8_t          resAllocType; /* Resource allocation type */
+   union
+   {
+      ResAllocType0    type0;
+      ResAllocType1    type1;
+   }resAlloc;
+}FreqDomainAlloc;
+
 typedef struct schPuschInfo
 {
-   uint16_t         crnti;
    uint8_t          harqProcId;   /* HARQ Process ID */
-   uint8_t          resAllocType; /* Resource allocation type */
    FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
    TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
    TbInfo           tbInfo;       /* TB info */
+#ifdef INTEL_FAPI    
    uint8_t          dmrsMappingType;
    uint8_t          nrOfDmrsSymbols;
    uint8_t          dmrsAddPos;
+#endif
 }SchPuschInfo;
 
+typedef struct harqInfo
+{
+   uint16_t    harqAckBitLength;
+   uint8_t     betaOffsetHarqAck;
+}HarqInfo;
+
+typedef struct csiInfo
+{
+   uint16_t csiBits;
+   uint8_t  betaOffsetCsi;
+}CsiInfo;
+
+typedef struct harqAckInfo
+{
+   uint16_t    harqBitLength;
+}HarqFdbkInfo;
+
+typedef struct csiPartInfo
+{
+   uint16_t csiBits;
+}csiFdbkInfo;
+
 typedef struct schPucchFormatCfg
 {
    uint8_t interSlotFreqHop;
@@ -1085,33 +1121,43 @@ typedef struct schPucchFormatCfg
 
 typedef struct schPucchInfo
 {
-   uint16_t         rnti;
-   uint8_t          pucchFormat;
-   FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
-   TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
+   FreqDomainAlloc  fdAlloc;      
+   TimeDomainAlloc  tdAlloc;      
    uint8_t          srFlag;
-   uint8_t          harqFlag;
-   uint8_t          numHarqBits;
-   uint8_t          uciFlag;
-   uint8_t          numUciBits;
+   HarqFdbkInfo     harqInfo;
+   csiFdbkInfo      csiInfo;
+   BeamformingInfo  beamPucchInfo;
+   uint8_t          pucchFormat;
    uint8_t          intraFreqHop;
    uint16_t         secondPrbHop;
    uint8_t          initialCyclicShift;
    uint8_t          occLen;
    uint8_t          occIdx;
    uint8_t          timeDomOCC;
-   SchPucchFormatCfg cmnFormatCfg;
+   uint8_t          addDmrs;
+   bool             pi2BPSK;
 }SchPucchInfo;
 
+typedef struct schPuschUci
+{
+   uint8_t          harqProcId;   /* HARQ Process ID */
+   FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
+   TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
+   TbInfo           tbInfo;       /* TB information */
+   HarqInfo         harqInfo;    /* Harq Information */
+   CsiInfo          csiInfo;    /* Csi information*/
+}SchPuschUci;
+
 typedef struct ulSchedInfo
 {
-   uint16_t      cellId;         /* Cell Id */
-   uint16_t      crnti;          /* CRNI */
+   uint16_t         cellId;         /* Cell Id */
+   uint16_t         crnti;          /* CRNI */
    SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
-   uint8_t       dataType;       /* Type of info being scheduled */
-   PrachSchInfo  prachSchInfo;   /* Prach scheduling info */
-   SchPuschInfo  schPuschInfo;   /* Pusch scheduling info */
-   SchPucchInfo  schPucchInfo;   /* Pusch scheduling info */
+   uint8_t          dataType;       /* Type of info being scheduled */
+   SchPrachInfo     prachSchInfo;   /* Prach scheduling info */
+   SchPuschInfo     schPuschInfo;   /* Pusch scheduling info */
+   SchPuschUci      schPuschUci;    /* Pusch Uci */
+   SchPucchInfo     schPucchInfo;   /* Pucch and Uci scheduling info */
 }UlSchedInfo;
 
 typedef struct rachIndInfo