PUCCH CHANGES AT SCH AND LOWER MAC 78/4278/9
authorBalaji Shankaran <balaji.shankaran@radisys.com>
Tue, 30 Jun 2020 13:47:26 +0000 (19:17 +0530)
committerBalaji Shankaran <balaji.shankaran@radisys.com>
Thu, 23 Jul 2020 08:25:10 +0000 (13:55 +0530)
JIRA ID: ODUHIGH-178

Change-Id: I9e218924481606956fe49ed8a0dcdd1f244e2247
Signed-off-by: Balaji Shankaran <balaji.shankaran@radisys.com>
13 files changed:
src/5gnrmac/lwr_mac_fsm.c
src/5gnrmac/rg_lmm.c
src/5gnrmac/rg_tom.c
src/5gnrsch/sch.h
src/5gnrsch/sch_common.c
src/5gnrsch/sch_slot_ind.c
src/5gnrsch/sch_utils.c
src/5gnrsch/sch_utils.h
src/cm/du_app_mac_inf.h
src/cm/mac_sch_interface.h
src/du_app/du_cfg.c
src/du_app/du_cfg.h
src/phy_stub/l1_bdy1.c

index 355c98b..4373c70 100644 (file)
@@ -72,6 +72,7 @@
 #define SSB_PDU_TYPE 3
 #define PRACH_PDU_TYPE 0
 #define PUSCH_PDU_TYPE 1
+#define PUCCH_PDU_TYPE 2
 #define PDU_PRESENT 1
 #define SET_MSG_LEN(x, size) x += size
 
@@ -3428,20 +3429,19 @@ uint8_t getnPdus(fapi_ul_tti_req_t *ulTtiReq, MacUlSlot *currUlSlot)
                }
                if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_PUSCH_UCI)
                {
-                       pduCount++;
-                       ulTtiReq->nUlsch++;
-                       ulTtiReq->nUlsch = PDU_PRESENT;
-               }
-               if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_UCI)
-               {
-                       pduCount++;
-                       ulTtiReq->nUlcch = PDU_PRESENT;
-               }
-               if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_SRS)
-               {
-                       pduCount++;
-               }
-       }
+                  pduCount++;
+         ulTtiReq->nUlsch = PDU_PRESENT;
+      }
+      if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_UCI)
+      {
+         pduCount++;
+         ulTtiReq->nUlcch = PDU_PRESENT;
+      }
+      if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_SRS)
+      {
+         pduCount++;
+      }
+   }
    return pduCount;
 }
 #endif
@@ -3576,6 +3576,56 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, MacCellCfg *macCellCfg, Ma
          sizeof(ulTtiReqPdu->pduSize) + sizeof(fapi_ul_pusch_pdu_t)));
    }
 }
+
+void fillPucchPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, MacCellCfg *macCellCfg,\
+  MacUlSlot *currUlSlot, uint32_t *msgLen)
+{
+   if(ulTtiReqPdu != NULLP)
+   {
+          ulTtiReqPdu->pduType                  = PUCCH_PDU_TYPE;
+          ulTtiReqPdu->u.pucch_pdu.rnti         = currUlSlot->ulInfo.schPucchInfo.rnti;
+               /* TODO : Fill handle in raCb when scheduling pucch and access here */
+          ulTtiReqPdu->u.pucch_pdu.handle       = 100;
+          ulTtiReqPdu->u.pucch_pdu.bwpSize      = macCellCfg->initialUlBwp.bwp.numPrb;
+          ulTtiReqPdu->u.pucch_pdu.bwpStart     = macCellCfg->initialUlBwp.bwp.firstPrb;
+          ulTtiReqPdu->u.pucch_pdu.subCarrierSpacing = macCellCfg->initialUlBwp.bwp.scs;
+          ulTtiReqPdu->u.pucch_pdu.cyclicPrefix = macCellCfg->initialUlBwp.bwp.cyclicPrefix;
+          ulTtiReqPdu->u.pucch_pdu.formatType   = currUlSlot->ulInfo.schPucchInfo.pucchFormat; /* Supporting PUCCH Format 0 */
+          ulTtiReqPdu->u.pucch_pdu.multiSlotTxIndicator = 0; /* No Multi Slot transmission */
+          ulTtiReqPdu->u.pucch_pdu.pi2Bpsk              = 0; /* Disabled */
+          ulTtiReqPdu->u.pucch_pdu.prbStart     = currUlSlot->ulInfo.schPucchInfo.fdAlloc.startPrb;
+          ulTtiReqPdu->u.pucch_pdu.prbSize      = currUlSlot->ulInfo.schPucchInfo.fdAlloc.numPrb;
+          ulTtiReqPdu->u.pucch_pdu.startSymbolIndex = currUlSlot->ulInfo.schPucchInfo.tdAlloc.startSymb;
+          ulTtiReqPdu->u.pucch_pdu.nrOfSymbols  = currUlSlot->ulInfo.schPucchInfo.tdAlloc.numSymb;
+          ulTtiReqPdu->u.pucch_pdu.freqHopFlag  = 0; /* Disabled */
+          ulTtiReqPdu->u.pucch_pdu.secondHopPrb = 0;
+          ulTtiReqPdu->u.pucch_pdu.groupHopFlag = 0;     
+          ulTtiReqPdu->u.pucch_pdu.sequenceHopFlag = 0;
+          ulTtiReqPdu->u.pucch_pdu.hoppingId    = 0;
+          ulTtiReqPdu->u.pucch_pdu.initialCyclicShift = 0;
+          ulTtiReqPdu->u.pucch_pdu.dataScramblingId = 0; /* Valid for Format 2, 3, 4 */
+          ulTtiReqPdu->u.pucch_pdu.timeDomainOccIdx = 0; /* Valid for Format 1 */
+          ulTtiReqPdu->u.pucch_pdu.preDftOccIdx     = 0; /* Valid for Format 4 */
+          ulTtiReqPdu->u.pucch_pdu.preDftOccLen     = 0; /* Valid for Format 4 */
+          ulTtiReqPdu->u.pucch_pdu.addDmrsFlag      = 0; /* Valid for Format 3, 4 */
+          ulTtiReqPdu->u.pucch_pdu.dmrsScramblingId = 0; /* Valid for Format 2 */
+          ulTtiReqPdu->u.pucch_pdu.dmrsCyclicShift  = 0; /* Valid for Format 4 */
+          ulTtiReqPdu->u.pucch_pdu.srFlag           = currUlSlot->ulInfo.schPucchInfo.srFlag;
+          ulTtiReqPdu->u.pucch_pdu.bitLenHarq       = currUlSlot->ulInfo.schPucchInfo.numHarqBits;
+          ulTtiReqPdu->u.pucch_pdu.bitLenCsiPart1   = 0; /* Valid for Format 2, 3, 4 */
+          ulTtiReqPdu->u.pucch_pdu.bitLenCsiPart2   = 0; /* Valid for Format 2, 3, 4 */
+      ulTtiReqPdu->u.pucch_pdu.beamforming.numPrgs = 0; /* Not Supported */
+      ulTtiReqPdu->u.pucch_pdu.beamforming.prgSize = 0;
+      ulTtiReqPdu->u.pucch_pdu.beamforming.digBfInterfaces = 0;
+      ulTtiReqPdu->u.pucch_pdu.beamforming.pmi_bfi[0].pmIdx = 0;
+      ulTtiReqPdu->u.pucch_pdu.beamforming.pmi_bfi[0].beamIdx[0].beamidx = 0;
+
+      ulTtiReqPdu->pduSize = sizeof(fapi_ul_pucch_pdu_t);
+      SET_MSG_LEN(*msgLen, (sizeof(ulTtiReqPdu->pduType) + \
+         sizeof(ulTtiReqPdu->pduSize) + sizeof(fapi_ul_pucch_pdu_t)));
+       }
+}
+
 #endif
 
 /*******************************************************************
@@ -3626,8 +3676,8 @@ uint16_t handleUlTtiReq(SlotIndInfo currTimingInfo)
                if(ulTtiReq != NULLP)
                {
                        memset(ulTtiReq, 0, msgSize);
-                       ulTtiReq->sfn  = currTimingInfo.sfn;
-                       ulTtiReq->slot = currTimingInfo.slot;
+                       ulTtiReq->sfn  = ulTtiReqTimingInfo.sfn;
+                       ulTtiReq->slot = ulTtiReqTimingInfo.slot;
                        ulTtiReq->nPdus = getnPdus(ulTtiReq, currUlSlot);
                        ulTtiReq->nGroup = 0;
                        if(ulTtiReq->nPdus > 0)
@@ -3647,9 +3697,15 @@ uint16_t handleUlTtiReq(SlotIndInfo currTimingInfo)
                                        pduIdx++;
                                        fillPuschPdu(&ulTtiReq->pdus[pduIdx], &macCellCfg, currUlSlot, &msgLen);
                                }
-
+                               /* Fill PUCCH PDU */
+            if(currUlSlot->ulInfo.dataType & SCH_DATATYPE_UCI)
+                               {
+                                       pduIdx++;
+                                       fillPucchPdu(&ulTtiReq->pdus[pduIdx], &macCellCfg, currUlSlot, &msgLen);
+                               }
                                if((currUlSlot->ulInfo.dataType & SCH_DATATYPE_PRACH) || \
-                                               (currUlSlot->ulInfo.dataType & SCH_DATATYPE_PUSCH))
+                                               (currUlSlot->ulInfo.dataType & SCH_DATATYPE_PUSCH)|| \
+                                               (currUlSlot->ulInfo.dataType & SCH_DATATYPE_UCI))
                                {
                                        msgLen += (sizeof(fapi_ul_tti_req_t) - sizeof(fapi_msg_t));
                                        fillMsgHeader(&ulTtiReq->header, FAPI_UL_TTI_REQUEST, msgLen);
@@ -3666,13 +3722,13 @@ uint16_t handleUlTtiReq(SlotIndInfo currTimingInfo)
                                DU_LOG("\nLWR_MAC: Sending UL TTI Request");
                                LwrMacSendToPhy(ulTtiReq->header.message_type_id, msgSize, (void *)ulTtiReq);
                        }
-                       memset(&currUlSlot, 0, sizeof(MacUlSlot));
+                       memset(currUlSlot, 0, sizeof(MacUlSlot));
                        return ROK;
                }
                else
                {
                        DU_LOG("\nLWR_MAC: Failed to allocate memory for UL TTI Request");
-                       memset(&currUlSlot, 0, sizeof(MacUlSlot));
+                       memset(currUlSlot, 0, sizeof(MacUlSlot));
                        return RFAILED;
                }
        }
index 9e49c55..68321b7 100755 (executable)
@@ -2114,7 +2114,7 @@ int MacHdlCellCfgReq
    Pst cfmPst;
    uint16_t ret = ROK;
    RgCellCb      *cellCb;
-       MacCellCb     *macCellCb;
+       MacCellCb     *macCellCb = NULLP;
    Inst inst = pst->dstInst;
 
    cmMemset((U8 *)&cfmPst, 0, sizeof(Pst));
@@ -2135,6 +2135,7 @@ int MacHdlCellCfgReq
       DU_LOG("\nMAC : macCellCb is NULL at handling of macCellCfg\n");
       return RFAILED;
    }
+       memset(macCellCb, 0, sizeof(MacCellCb));
    macCb.macCell = macCellCb;
    macCb.macCell->cellId = macCellCfg->cellId;
    /* Send cell cfg to scheduler */
index 316d216..fae39dd 100755 (executable)
@@ -85,6 +85,9 @@ invoked by PHY towards MAC
 #include "ss_rbuf.x"
 #endif
 
+uint16_t handleDlTtiReq(SlotIndInfo currTimingInfo);
+uint16_t handleUlTtiReq(SlotIndInfo currTimingInfo);
+
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifndef LTEMAC_DLUE_TMGOPTMZ 
 PRIVATE S16 rgTOMUtlProcDlSf ARGS(( RgDlSf *dlSf, RgCellCb   *cellCb,
index 30a206a..99044f2 100644 (file)
@@ -38,6 +38,7 @@
 #define MSG4_DELAY  1
 #define SCH_MAX_UE  1
 #define PUSCH_START_RB 15
+#define PUCCH_NUM_PRB_FORMAT_0 1  /* number of PRBs in freq domain, spec 38.213 - 9.2.1 */
 #define SI_RNTI 0xFFFF
 #define P_RNTI  0xFFFE
 
@@ -120,6 +121,8 @@ typedef struct schUlSlotInfo
        uint16_t     assignedPrb[SCH_SYMBOL_PER_SLOT]; /*!< Num RBs and corresponding symbols allocated */
        bool         puschPres; /*!< PUSCH presence field */
        SchPuschInfo *schPuschInfo; /*!< PUSCH info */
+       bool         pucchPres; /*!< PUCCH presence field */
+       SchPucchInfo schPucchInfo; /*!< PUCCH info */
 }SchUlSlotInfo;
 
 /**
@@ -159,8 +162,9 @@ uint8_t schBroadcastAlloc(SchCellCb *cell, DlBrdcstAlloc *dlBrdcstAlloc,uint16_t
 uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst inst);
 uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst);
 uint8_t schDlRsrcAllocMsg4(Msg4Alloc *msg4Alloc, SchCellCb *cell, uint16_t slot);
-
-
+uint16_t schCalcTbSize(uint16_t payLoadSize);
+uint16_t schCalcNumPrb(uint16_t tbSize, uint16_t mcs, uint8_t numSymbols);
+uint16_t schAllocPucchResource(SchCellCb *cell, uint16_t crnti, uint16_t slot);
 /**********************************************************************
          End of file
 **********************************************************************/
index 3e14282..30c0049 100644 (file)
@@ -66,6 +66,7 @@ File:     sch_common.c
 extern SchCb schCb[SCH_MAX_INST];
 extern uint16_t prachCfgIdxTable[MAX_PRACH_CONFIG_IDX][8];
 extern uint16_t numRbForPrachTable[MAX_RACH_NUM_RB_IDX][5];
+extern uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][4];
 
 SchMacUlSchInfoFunc schMacUlSchInfoOpts[] =
 {
@@ -246,6 +247,31 @@ void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotIndInfo pra
        }
 }
 
+uint16_t fillPucchResourceInfo(SchPucchInfo *schPucchInfo, Inst inst)
+{
+   /* derive pucchResourceSet from schCellCfg */
+   SchCellCb  *cell = schCb[inst].cells[inst];
+   SchPucchCfgCmn *pucchCfg = &cell->cellCfg.schInitialUlBwp.pucchCommon;
+       uint8_t pucchIdx = pucchCfg->pucchResourceCommon;
+       SchBwpParams *ulBwp = &cell->cellCfg.schInitialUlBwp.bwp;
+
+   schPucchInfo->fdAlloc.startPrb = ulBwp->freqAlloc.startPrb + pucchResourceSet[pucchIdx][3];
+   schPucchInfo->fdAlloc.numPrb = PUCCH_NUM_PRB_FORMAT_0;
+   schPucchInfo->tdAlloc.startSymb = pucchResourceSet[pucchIdx][1];
+   schPucchInfo->tdAlloc.numSymb = pucchResourceSet[pucchIdx][2];
+       schPucchInfo->pucchFormat = pucchResourceSet[pucchIdx][0];
+
+   /* set HARQ flag to true */
+   schPucchInfo->harqFlag = true;
+   schPucchInfo->numHarqBits = 1; /* 1 bit for HARQ */
+
+   /* set SR and UCI flag to false */
+   schPucchInfo->srFlag  = false;
+   schPucchInfo->uciFlag = false;
+
+   return ROK;
+}
+
 /**
  * @brief resource allocation for UL
  *
@@ -262,8 +288,9 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
 {
    int ret = ROK;
        UlSchedInfo ulSchedInfo;
-   SchUlSlotInfo  *schUlSlotInfo;
+   SchUlSlotInfo  *schUlSlotInfo = NULLP;
    SlotIndInfo ulTimingInfo;
+       memset(&ulSchedInfo, 0, sizeof(UlSchedInfo));
 
    /* add PHY delta */
    ADD_DELTA_TO_TIME(cell->slotInfo,ulTimingInfo,PHY_DELTA+SCHED_DELTA);
@@ -276,7 +303,6 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
        schPrachResAlloc(cell, &ulSchedInfo, ulTimingInfo);
 
        schUlSlotInfo = cell->schUlSlotInfo[ulTimingInfo.slot]; 
-       
        if(schUlSlotInfo->schPuschInfo)
        {
       ulSchedInfo.crnti = cell->raCb[0].tcrnti;
@@ -287,13 +313,21 @@ uint8_t schUlResAlloc(SchCellCb *cell, Inst schInst)
                schUlSlotInfo->schPuschInfo = NULL;
        }
 
+       if(schUlSlotInfo->pucchPres)
+       {
+               ulSchedInfo.dataType |= SCH_DATATYPE_UCI;
+               fillPucchResourceInfo(&schUlSlotInfo->schPucchInfo, schInst);
+               memcpy(&ulSchedInfo.schPucchInfo, &schUlSlotInfo->schPucchInfo,
+                               sizeof(SchPucchInfo));
+               memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
+       }
+
        //send msg to MAC
    ret = sendUlSchInfoToMac(&ulSchedInfo, schInst);
    if(ret != ROK)
    {
       DU_LOG("\nSending UL Sch info from SCH to MAC failed");
    }
-    
        memset(cell->schUlSlotInfo[ulTimingInfo.slot], 0, sizeof(SchUlSlotInfo));
 
        return ret;
@@ -433,6 +467,21 @@ uint8_t schDlRsrcAllocMsg4(Msg4Alloc *msg4Alloc, SchCellCb *cell, uint16_t slot)
    return ROK;
 }
 
+uint16_t schAllocPucchResource(SchCellCb *cell,uint16_t crnti, uint16_t slot)
+{
+   uint8_t k1 = 1; /* dl-DataToUL-ACK RRC parameter will received from DU-APP msg4-pucch config */
+   uint16_t pucchSlot = (slot + k1)  % SCH_NUM_SLOTS;
+       SchUlSlotInfo  *schUlSlotInfo = NULLP;
+   
+       schUlSlotInfo = cell->schUlSlotInfo[pucchSlot];
+       memset(&schUlSlotInfo->schPucchInfo, 0, sizeof(SchPucchInfo));
+
+       schUlSlotInfo->pucchPres = true;
+       schUlSlotInfo->schPucchInfo.rnti = crnti;
+
+   return ROK;
+}
+
 /**********************************************************************
   End of file
  **********************************************************************/
index e3fb9d9..3f4b7e8 100644 (file)
@@ -269,9 +269,13 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
           sizeof(Msg4Info));
              
        /* pdcch and pdsch data is filled */
-       schDlRsrcAllocMsg4(msg4Alloc, cell, slot); 
-                SCH_FREE(cell->schDlSlotInfo[slot]->msg4Info, sizeof(Msg4Info));
-                cell->schDlSlotInfo[slot]->msg4Info = NULL;
+       schDlRsrcAllocMsg4(msg4Alloc, cell, dlSchedInfo.schSlotValue.msg4Time.slot); 
+
+                /* PUCCH resource */
+       schAllocPucchResource(cell, msg4Alloc->msg4Info.crnti, dlSchedInfo.schSlotValue.msg4Time.slot);
+
+                SCH_FREE(cell->schDlSlotInfo[dlSchedInfo.schSlotValue.msg4Time.slot]->msg4Info, sizeof(Msg4Info));
+                cell->schDlSlotInfo[dlSchedInfo.schSlotValue.msg4Time.slot]->msg4Info = NULL;
    }
 
 
index 1f0035a..8a5f298 100644 (file)
@@ -429,6 +429,27 @@ uint16_t mcsTable[32][3] = {
       {  30,   4,     0},   /* mcs index 30 */
       {  31,   6,     0}};  /* mcs index 31 */
 
+/* PUCCH resource sets before dedicated PUCCH resource configuration */
+/* Table 9.2.1-1 spec 38.213      */ 
+uint8_t pucchResourceSet[MAX_PUCCH_RES_SET_IDX][4] = {
+{ 0,  12,  2,  0 }, /* index  0 */
+{ 0,  12,  2,  0 }, /* index  1 */
+{ 0,  12,  2,  3 }, /* index  2 */
+{ 1,  10,  4,  0 }, /* index  3 */
+{ 1,  10,  4,  0 }, /* index  4 */
+{ 1,  10,  4,  2 }, /* index  5 */
+{ 1,  10,  4,  4 }, /* index  6 */
+{ 1,   4, 10,  0 }, /* index  7 */
+{ 1,   4, 10,  0 }, /* index  8 */
+{ 1,   4, 10,  2 }, /* index  9 */
+{ 1,   4, 10,  4 }, /* index 10 */
+{ 1,   0, 14,  0 }, /* index 11 */
+{ 1,   0, 14,  0 }, /* index 12 */
+{ 1,   0, 14,  2 }, /* index 13 */
+{ 1,   0, 14,  4 }, /* index 14 */
+{ 1,   0, 14,  0 }, /* index 15 */
+};
+
 /**
  * @brief frequency domain allocation function. 
  *
index ec7d0e0..1e33397 100644 (file)
 *******************************************************************************/
 
 #include <stdint.h>
+#include <math.h>
 
 /* macros */
 #define MAX_CORESET_INDEX      16
 #define MAX_SEARCH_SPACE_INDEX 16
 #define MAX_RACH_NUM_RB_IDX    16
+#define MAX_PUCCH_RES_SET_IDX  16
 #define MAX_PRACH_CONFIG_IDX   256
 #define MAX_MU_PUSCH           4
 #define TOTAL_TBSIZE_VALUES    93
index a3ff480..c9855a2 100644 (file)
@@ -248,6 +248,12 @@ typedef struct pdschConfigCommon
        uint8_t lengthSymbol;
 }PdschConfigCommon;
 
+typedef struct pucchConfigCommon
+{
+   uint8_t pucchResourceCommon;
+       uint8_t pucchGroupHopping;
+}PucchConfigCommon;
+
 typedef struct puschConfigCommon
 {
    /* PUSCH-TimeDomainResourceAllocation info */
@@ -268,7 +274,7 @@ typedef struct bwpUlConfig
 {
    BwpParams      bwp;
        // rach config common sent in PrachCfg
-       // pucch info not required
+       PucchConfigCommon pucchCommon;
        PuschConfigCommon puschCommon;
 }BwpUlConfig;
 
index 513fc7e..650dca2 100644 (file)
@@ -304,6 +304,12 @@ typedef struct schPdschCfgCmn
    uint8_t lengthSymbol;
 }SchPdschCfgCmn;
 
+typedef struct schPucchCfgCmn
+{
+   uint8_t pucchResourceCommon;
+   uint8_t pucchGroupHopping;
+}SchPucchCfgCmn;
+
 typedef struct schPuschCfgCmn
 {
    uint8_t k2;
@@ -322,6 +328,7 @@ typedef struct schBwpDlCfg
 typedef struct schBwpUlCfg
 {
    SchBwpParams   bwp;
+       SchPucchCfgCmn pucchCommon;
        SchPuschCfgCmn puschCommon;
 }SchBwpUlCfg;
 
@@ -406,6 +413,7 @@ typedef struct rarAlloc
 
 typedef struct msg4Info
 {
+   uint16_t crnti;
        uint8_t  ndi;
        uint8_t  harqProcNum;
        uint8_t  dlAssignIdx;
@@ -413,7 +421,6 @@ typedef struct msg4Info
        uint8_t  pucchResInd;
        uint8_t  harqFeedbackInd;
        uint8_t  dciFormatId;
-   uint16_t crnti;
    uint8_t  *msg4Pdu;
    uint16_t  msg4PduLen;
 }Msg4Info;
@@ -469,6 +476,18 @@ typedef struct schPuschInfo
    TbInfo           tbInfo;       /* TB info */
 }SchPuschInfo;
 
+typedef struct schPucchInfo
+{
+   uint16_t         rnti;
+   uint8_t          pucchFormat;
+   FreqDomainAlloc  fdAlloc;      /* Freq domain allocation */
+   TimeDomainAlloc  tdAlloc;      /* Time domain allocation */
+       uint8_t          srFlag;
+       uint8_t          harqFlag;
+       uint8_t          numHarqBits;
+       uint8_t          uciFlag;
+       uint8_t          numUciBits;
+}SchPucchInfo;
 
 typedef struct ulSchedInfo
 {
@@ -478,6 +497,7 @@ typedef struct ulSchedInfo
        uint8_t       dataType;       /* Type of info being scheduled */
        PrachSchInfo  prachSchInfo;   /* Prach scheduling info */
        SchPuschInfo  schPuschInfo;   /* Pusch scheduling info */
+       SchPucchInfo  schPucchInfo;   /* Pusch scheduling info */
 }UlSchedInfo;
 
 typedef struct rachIndInfo
index 4bc0340..197d9c5 100644 (file)
@@ -261,6 +261,7 @@ S16 readMacCfg()
           PDSCH_LENGTH_SYMBOL;
        /* ra-searchSpace ID is set to 1 */
    duCfgParam.macCellCfg.initialDlBwp.pdcchCommon.raSearchSpaceId = SEARCHSPACE_1_INDEX;
+
    /* fill Intial UL BWP */
    duCfgParam.macCellCfg.initialUlBwp.bwp.firstPrb = 0;
    duCfgParam.macCellCfg.initialUlBwp.bwp.numPrb = TOTAL_PRB_BW; /* configured to total BW */
@@ -275,6 +276,9 @@ S16 readMacCfg()
           PUSCH_LENGTH_SYMBOL;
 
        duCfgParam.macCellCfg.dmrsTypeAPos = DMRS_TYPE_A_POS; 
+   /* fill PUCCH config common */
+   duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchResourceCommon = PUCCH_RSRC_COMMON;
+   duCfgParam.macCellCfg.initialUlBwp.pucchCommon.pucchGroupHopping = PUCCH_GROUP_HOPPING;
 
    /* This should be calculated based on
       (number of mandatory parameters) + (number of otional parameters being filled) */
index 0a4c60e..12656ab 100644 (file)
 
 /* Macro define for PUCCH Configuration */
 #define PUCCH_RSRC_COMMON  0
+#define PUCCH_GROUP_HOPPING 2 /* disable */
 #define PUCCH_P0_NOMINAL   -74
 
 /* MACRO defines for TDD DL-UL Configuration */
index 6a21f11..cedcc3c 100644 (file)
@@ -697,13 +697,19 @@ PUBLIC S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg)
        while(numPdus)
        {
                if(ulTtiReq->pdus[numPdus-1].pduType == 0)
+               {
                        DU_LOG("\nPHY STUB: PRACH PDU");
+               }
       if(ulTtiReq->pdus[numPdus-1].pduType == 1)
       {
          DU_LOG("\nPHY STUB: PUSCH PDU");                      
          l1BuildAndSendRxDataInd(ulTtiReq->slot, ulTtiReq->sfn, \
                           ulTtiReq->pdus[numPdus-1].u.pusch_pdu); 
       }
+               if(ulTtiReq->pdus[numPdus-1].pduType == 2)
+          {
+                  DU_LOG("\nPHY STUB: PUCCH PDU");
+               }
                numPdus--;
        }