[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-492] WG8 Alignment [DCI Information] 31/10431/2
authorlal.harshita <Harshita.Lal@radisys.com>
Fri, 10 Feb 2023 06:27:36 +0000 (11:57 +0530)
committerlal.harshita <Harshita.Lal@radisys.com>
Fri, 10 Feb 2023 08:55:32 +0000 (14:25 +0530)
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
Change-Id: I88a3a2a001a873388f85e4bdace4d55a74acea25
Signed-off-by: lal.harshita <Harshita.Lal@radisys.com>
src/5gnrmac/lwr_mac_fsm.c
src/5gnrsch/sch_fcfs.c
src/5gnrsch/sch_slice_based.c
src/5gnrsch/sch_ue_mgr.c
src/cm/mac_sch_interface.h

index a7c087b..1cfc943 100644 (file)
@@ -4505,11 +4505,11 @@ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo)
        * RBLen = length of contiguously allocted RBs
        * Spec 38.214 Sec 5.1.2.2.2
        */
-      if(schDciInfo->formatType == FORMAT0_0)
+      if(schDciInfo->dciFormatInfo.formatType == FORMAT0_0)
       {
          coreset1Size = schDciInfo->coresetCfg.coreSetSize;
-         rbLen = schDciInfo->format.format0_0.freqAlloc.numPrb;
-         rbStart = schDciInfo->format.format0_0.freqAlloc.startPrb;
+         rbLen = schDciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb;
+         rbStart = schDciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb;
 
          if((rbLen >=1) && (rbLen <= coreset1Size - rbStart))
          {
@@ -4522,15 +4522,15 @@ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo)
             freqDomResAssignSize = ceil(log2(coreset1Size * (coreset1Size + 1) / 2));
          }
          /* Fetching DCI field values */
-         dciFormatId      = schDciInfo->formatType; /* DCI indentifier for UL DCI */
-         timeDomResAssign = schDciInfo->format.format0_0.rowIndex;
-         freqHopFlag      = schDciInfo->format.format0_0.freqHopFlag; 
-         modNCodScheme    = schDciInfo->format.format0_0.mcs;
-         ndi              = schDciInfo->format.format0_0.ndi; 
-         redundancyVer    = schDciInfo->format.format0_0.rv;
-         harqProcessNum   = schDciInfo->format.format0_0.harqProcId; 
-         puschTpc         = schDciInfo->format.format0_0.tpcCmd;
-         ul_SlInd         = schDciInfo->format.format0_0.sUlCfgd;
+         dciFormatId      = schDciInfo->dciFormatInfo.formatType; /* DCI indentifier for UL DCI */
+         timeDomResAssign = schDciInfo->dciFormatInfo.format.format0_0.rowIndex;
+         freqHopFlag      = schDciInfo->dciFormatInfo.format.format0_0.freqHopFlag; 
+         modNCodScheme    = schDciInfo->dciFormatInfo.format.format0_0.mcs;
+         ndi              = schDciInfo->dciFormatInfo.format.format0_0.ndi; 
+         redundancyVer    = schDciInfo->dciFormatInfo.format.format0_0.rvIndex;
+         harqProcessNum   = schDciInfo->dciFormatInfo.format.format0_0.harqProcId; 
+         puschTpc         = schDciInfo->dciFormatInfo.format.format0_0.tpcCmd;
+         ul_SlInd         = schDciInfo->dciFormatInfo.format.format0_0.sulIndicator;
      
          /* Reversing bits in each DCI field */
          dciFormatId      = reverseBits(dciFormatId, dciFormatIdSize);
index 01119bb..259158e 100644 (file)
@@ -942,7 +942,6 @@ uint8_t schFcfsScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTime, ui
             {
                /* Fill DCI for UL grant */
                schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP);
-               memcpy(&dciInfo->slotIndInfo, &dciTime, sizeof(SlotTimingInfo));
                ueCb->srRcvd = false;
                ueCb->bsrRcvd = false;
                cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId;
index 2ed18e2..80f4af0 100644 (file)
@@ -941,7 +941,6 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi
             {
                /* Fill DCI for UL grant */
                schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP);
-               memcpy(&dciInfo->slotIndInfo, &dciTime, sizeof(SlotTimingInfo));
                ueCb->srRcvd = false;
                ueCb->bsrRcvd = false;
                cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId;
index 254d212..8bfa40a 100644 (file)
@@ -963,7 +963,7 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi
 uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo *dciInfo)
 {
    SchCellCb         *cellCb  = raCb->cell;
-   dciInfo->cellId = cellCb->cellId;
+   
    dciInfo->crnti  = raCb->tcrnti;
    SchUlHqProcCb *msg3HqProc = &raCb->msg3HqProc;
    if (msg3HqProc == NULLP)
@@ -995,24 +995,24 @@ uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo
    dciInfo->coresetCfg.cceIndex            = 0; /* 0-3 for UL and 4-7 for DL */
    dciInfo->coresetCfg.aggregationLevel    = 4; /* same as for sib1 */
    
-   dciInfo->formatType = FORMAT0_0;
+   dciInfo->dciFormatInfo.formatType = FORMAT0_0;
    msg3HqProc->tbInfo.rvIdx++;
    msg3HqProc->tbInfo.rv = schCmnDlRvTbl[msg3HqProc->tbInfo.rvIdx & 0x03];
    /* fill UL grant */
-   dciInfo->format.format0_0.resourceAllocType   = msg3HqProc->puschResType;
-   dciInfo->format.format0_0.freqAlloc.startPrb  = msg3HqProc->puschStartPrb;
-   dciInfo->format.format0_0.freqAlloc.numPrb    = msg3HqProc->puschNumPrb;
-   dciInfo->format.format0_0.timeAlloc.startSymb = msg3HqProc->strtSymbl;
-   dciInfo->format.format0_0.timeAlloc.numSymb   = msg3HqProc->numSymbl;
-   dciInfo->format.format0_0.rowIndex            = 0; /* row Index */
-   dciInfo->format.format0_0.mcs                 = msg3HqProc->tbInfo.iMcs;
-   dciInfo->format.format0_0.harqProcId          = msg3HqProc->procId;
-   dciInfo->format.format0_0.puschHopFlag        = FALSE; /* disabled */
-   dciInfo->format.format0_0.freqHopFlag         = FALSE; /* disabled */
-   dciInfo->format.format0_0.ndi                 = msg3HqProc->tbInfo.ndi; /* new transmission */
-   dciInfo->format.format0_0.rv                  = msg3HqProc->tbInfo.rv;
-   dciInfo->format.format0_0.tpcCmd              = 0; //Sphoorthi TODO: check
-   dciInfo->format.format0_0.sUlCfgd             = FALSE; /* SUL not configured */
+   dciInfo->dciFormatInfo.format.format0_0.resourceAllocType                  = msg3HqProc->puschResType;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAllocType             = msg3HqProc->puschResType;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb  = msg3HqProc->puschStartPrb;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb    = msg3HqProc->puschNumPrb;
+   dciInfo->dciFormatInfo.format.format0_0.timeAlloc.startSymb = msg3HqProc->strtSymbl;
+   dciInfo->dciFormatInfo.format.format0_0.timeAlloc.numSymb   = msg3HqProc->numSymbl;
+   dciInfo->dciFormatInfo.format.format0_0.rowIndex            = 0; /* row Index */
+   dciInfo->dciFormatInfo.format.format0_0.mcs                 = msg3HqProc->tbInfo.iMcs;
+   dciInfo->dciFormatInfo.format.format0_0.harqProcId          = msg3HqProc->procId;
+   dciInfo->dciFormatInfo.format.format0_0.freqHopFlag         = FALSE; /* disabled */
+   dciInfo->dciFormatInfo.format.format0_0.ndi                 = msg3HqProc->tbInfo.ndi; /* new transmission */
+   dciInfo->dciFormatInfo.format.format0_0.rvIndex             = msg3HqProc->tbInfo.rv;
+   dciInfo->dciFormatInfo.format.format0_0.tpcCmd              = 0; //Sphoorthi TODO: check
+   dciInfo->dciFormatInfo.format.format0_0.sulIndicator             = FALSE; /* SUL not configured */
    
    /* Fill DCI Structure */
    dciInfo->dciInfo.rnti                              = raCb->tcrnti;
@@ -1077,7 +1077,6 @@ uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, b
      coreset1 = ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdcchCfg.cRSetToAddModList[0];
    }
    
-   dciInfo->cellId = cellCb->cellId;
    dciInfo->crnti  = ueCb->crnti;
 
    /* fill bwp cfg */
@@ -1103,23 +1102,25 @@ uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, b
    dciInfo->coresetCfg.cceIndex            = 0; /* 0-3 for UL and 4-7 for DL */
    dciInfo->coresetCfg.aggregationLevel    = 4; /* same as for sib1 */
    
-   dciInfo->formatType = FORMAT0_0;
+   dciInfo->dciFormatInfo.formatType = FORMAT0_0;
    
    /* fill UL grant */
-   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 */
-   dciInfo->format.format0_0.mcs                 = puschInfo->tbInfo.mcs;
-   dciInfo->format.format0_0.harqProcId          = puschInfo->harqProcId;
-   dciInfo->format.format0_0.puschHopFlag        = FALSE; /* disabled */
-   dciInfo->format.format0_0.freqHopFlag         = FALSE; /* disabled */
-   dciInfo->format.format0_0.ndi                 = puschInfo->tbInfo.ndi; /* new transmission */
-   dciInfo->format.format0_0.rv                  = puschInfo->tbInfo.rv;
-   dciInfo->format.format0_0.tpcCmd              = 0; //Sphoorthi TODO: check
-   dciInfo->format.format0_0.sUlCfgd             = FALSE; /* SUL not configured */
+   dciInfo->dciFormatInfo.format.format0_0.resourceAllocType   = puschInfo->fdAlloc.resAllocType;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAllocType = puschInfo->fdAlloc.resAllocType;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb  = \
+   puschInfo->fdAlloc.resAlloc.type1.startPrb;
+   dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb    = \
+   puschInfo->fdAlloc.resAlloc.type1.numPrb;
+   dciInfo->dciFormatInfo.format.format0_0.timeAlloc.startSymb = puschInfo->tdAlloc.startSymb;
+   dciInfo->dciFormatInfo.format.format0_0.timeAlloc.numSymb   = puschInfo->tdAlloc.numSymb;
+   dciInfo->dciFormatInfo.format.format0_0.rowIndex            = 0; /* row Index */
+   dciInfo->dciFormatInfo.format.format0_0.mcs                 = puschInfo->tbInfo.mcs;
+   dciInfo->dciFormatInfo.format.format0_0.harqProcId          = puschInfo->harqProcId;
+   dciInfo->dciFormatInfo.format.format0_0.freqHopFlag         = FALSE; /* disabled */
+   dciInfo->dciFormatInfo.format.format0_0.ndi                 = puschInfo->tbInfo.ndi; /* new transmission */
+   dciInfo->dciFormatInfo.format.format0_0.rvIndex             = puschInfo->tbInfo.rv;
+   dciInfo->dciFormatInfo.format.format0_0.tpcCmd              = 0; //Sphoorthi TODO: check
+   dciInfo->dciFormatInfo.format.format0_0.sulIndicator             = FALSE; /* SUL not configured */
    
    /* Fill DCI Structure */
    dciInfo->dciInfo.rnti                              = ueCb->crnti;
index 5e97724..db34fd7 100644 (file)
@@ -469,6 +469,7 @@ typedef struct
    uint8_t     totNumSsb;       /*S = Total Number of Actual SSB transmitted*/
 }SchSsbCfg;
 
+/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information  */
 typedef struct bwpCfg
 {
    uint8_t         subcarrierSpacing;
@@ -976,56 +977,80 @@ typedef struct schSlotValue
    SlotTimingInfo ulDciTime;
 }SchSlotValue;
 
+typedef struct freqDomainAlloc
+{
+   uint8_t          resAllocType; /* Resource allocation type */
+   union
+   {
+      ResAllocType0    type0;
+      ResAllocType1    type1;
+   }resAlloc;
+}FreqDomainAlloc;
+
+/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */
 typedef struct format0_0
 {
    uint8_t         resourceAllocType;
-   /* since we are using type-1, hence rbBitmap excluded */
-   FreqDomainRsrc  freqAlloc;
+   FreqDomainAlloc freqAlloc;
    TimeDomainAlloc timeAlloc;
    uint16_t        rowIndex;
    uint8_t         mcs;
-   uint8_t         harqProcId;   /* HARQ Process ID */
-   bool            puschHopFlag;
+   uint8_t         harqProcId;  
    bool            freqHopFlag;
-   uint8_t         ndi;    /* NDI */
-   uint8_t         rv;     /* Redundancy Version */
+   uint8_t         ndi;    
+   uint8_t         rvIndex;     
    uint8_t         tpcCmd;
-   bool            sUlCfgd;
+   bool            sulIndicator;
 }Format0_0;
 
+/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */
 typedef struct format0_1
 {
-/* TBD */
-
+   uint8_t         carrierIndicator;
+   bool            sulIndicator;
+   uint8_t         bwpIndicator;
+   uint8_t         resourceAlloc;
+   FreqDomainRsrc  freqAlloc;
+   TimeDomainAlloc timeAlloc;
+   uint16_t        rowIndex;
+   uint8_t         mcs;
+   uint8_t         harqProcId;  
+   bool            freqHopFlag;
+   uint8_t         ndi;   
+   uint8_t         rvIndex;    
+   uint8_t         firstDownlinkAssignmentIndex;
+   uint8_t         secondDownlinkAssignmentIndex;
+   uint8_t         tpcCommand;
+   uint8_t         srsResourceSetIndicator;
+   uint8_t         srsResourceIndicator;
+   uint8_t         tpmi;
+   uint8_t         antennaPorts;
+   uint8_t         srsRequest;
+   uint8_t         csiRequest;
+   uint8_t         cbgTransmissionInfo;
+   uint8_t         ptrsDmrs;
+   uint8_t         betaOffsetIndicator;
+   bool            dmrsSequenceInitialization;
+   bool            ulschIndicatior;
 }Format0_1;
 
-typedef struct format1_0
+typedef struct dciFormat
 {
-/* TBD */
-
-}Format1_0;
-
-typedef struct format1_1
-{
-/* TBD */
-}Format1_1;
-
-typedef struct dciInfo
-{
-   uint16_t      cellId;   
-   uint16_t      crnti;          /* CRNI */
-   SlotTimingInfo   slotIndInfo;    /* Slot Info: sfn, slot number */
-   BwpCfg        bwpCfg;         /* BWP Cfg */
-   CoresetCfg    coresetCfg;     /* Coreset1 Cfg */
-   FormatType    formatType;     /* DCI Format */
+   FormatType     formatType;     /* DCI Format */
    union
    {
       Format0_0  format0_0;      /* Format 0_0 */
       Format0_1  format0_1;      /* Format 0_1 */
-      Format1_0  format1_0;      /* Format 1_0 */
-      Format1_1  format1_1;      /* Format 1_1 */
    }format;
-   DlDCI    dciInfo;
+}DciFormat;
+
+typedef struct dciInfo
+{
+   uint16_t       crnti;          /* CRNTI */
+   BwpCfg         bwpCfg;         /* BWP Cfg */
+   CoresetCfg     coresetCfg;     /* Coreset1 Cfg */
+   DciFormat      dciFormatInfo;  /* Dci Format */
+   DlDCI          dciInfo;        /* DlDCI */
 }DciInfo;
 
 
@@ -1074,16 +1099,6 @@ typedef struct tbInfo
    SchMcsTable  mcsTable;  /* MCS Table */
 }TbInfo;
 
-typedef struct freqDomainAlloc
-{
-   uint8_t          resAllocType; /* Resource allocation type */
-   union
-   {
-      ResAllocType0    type0;
-      ResAllocType1    type1;
-   }resAlloc;
-}FreqDomainAlloc;
-
 typedef struct schPuschInfo
 {
    uint8_t          harqProcId;   /* HARQ Process ID */