[Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-491] WG8 Alignment [UL Scheduling Information]
[o-du/l2.git] / src / cm / mac_sch_interface.h
index 0466468..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
@@ -1526,19 +1572,39 @@ typedef struct schUlBwpInfo
    uint8_t        bwpId;
 }SchUlBwpInfo;
 
+/* Serving cell configuration */
+typedef struct schServCellRecfgInfo
+{
+   SchInitalDlBwp        initDlBwp;
+   uint8_t               numDlBwpToAddOrMod;
+   SchDlBwpInfo          dlBwpToAddOrModList[MAX_NUM_BWP];
+   uint8_t               numDlBwpToRel;
+   SchDlBwpInfo          dlBwpToRelList[MAX_NUM_BWP];
+   uint8_t               firstActvDlBwpId;
+   uint8_t               defaultDlBwpId;
+   uint8_t               *bwpInactivityTmr;
+   SchPdschServCellCfg   pdschServCellCfg;
+   SchInitialUlBwp       initUlBwp;
+   uint8_t               numUlBwpToAddOrMod;
+   SchUlBwpInfo          ulBwpToAddOrModList[MAX_NUM_BWP];
+   uint8_t               numUlBwpToRel;
+   SchUlBwpInfo          ulBwpToRelList[MAX_NUM_BWP];
+   uint8_t               firstActvUlBwpId;
+}SchServCellRecfgInfo;
+
 /* Serving cell configuration */
 typedef struct schServCellCfgInfo
 {
    SchInitalDlBwp        initDlBwp;
    uint8_t               numDlBwpToAdd;
-   SchDlBwpInfo          DlBwpToAddList[MAX_NUM_BWP];
+   SchDlBwpInfo          dlBwpToAddList[MAX_NUM_BWP];
    uint8_t               firstActvDlBwpId;
    uint8_t               defaultDlBwpId;
    uint8_t               *bwpInactivityTmr;
    SchPdschServCellCfg   pdschServCellCfg;
    SchInitialUlBwp       initUlBwp;
    uint8_t               numUlBwpToAdd;
-   SchUlBwpInfo          UlBwpToAddList[MAX_NUM_BWP];
+   SchUlBwpInfo          ulBwpToAddList[MAX_NUM_BWP];
    uint8_t               firstActvUlBwpId;
 }SchServCellCfgInfo;
 
@@ -1599,6 +1665,13 @@ typedef struct schSpCellCfg
    SchServCellCfgInfo   servCellCfg;
 }SchSpCellCfg;
 
+/* Special cell Reconfiguration */
+typedef struct schSpCellRecfg
+{
+   uint8_t           servCellIdx;
+   SchServCellRecfgInfo   servCellRecfg;
+}SchSpCellRecfg;
+
 /* Uplink logical channel configuration */
 typedef struct SchUlLcCfg
 {
@@ -1618,10 +1691,9 @@ typedef struct schDlLcCfg
 /* Logical Channel configuration */
 typedef struct schLcCfg
 {
-   ConfigType     configType;
    uint8_t        lcId;
-   SchDrbQosInfo  *drbQos;
    Snssai         *snssai;
+   SchDrbQosInfo  *drbQos;
    SchDlLcCfg     dlLcCfg;
    SchUlLcCfg     ulLcCfg;
 }SchLcCfg;
@@ -1640,10 +1712,11 @@ typedef struct schModulationInfo
 }SchModulationInfo;
 
 /* UE configuration */
-typedef struct schUeCfg
+typedef struct schUeCfgReq
 {
    uint16_t        cellId;
    uint8_t         ueId;
+   uint8_t         beamIdx; 
    uint16_t        crnti;
    bool macCellGrpCfgPres;
    SchMacCellGrpCfg   macCellGrpCfg;
@@ -1654,23 +1727,51 @@ typedef struct schUeCfg
    SchAmbrCfg         *ambrCfg;
    SchModulationInfo  dlModInfo;
    SchModulationInfo  ulModInfo;
-   uint8_t            numLcs;
+   uint8_t            numLcsToAdd;
    SchLcCfg           schLcCfg[MAX_NUM_LC];
+}SchUeCfgReq;
+
+/* UE Re-configuration */
+typedef struct schUeRecfgReq
+{
+   uint16_t         cellId;
+   uint8_t          ueId;
+   uint8_t          beamIdx;
+   uint16_t         crnti;
+   bool             macCellGrpRecfgPres;
+   SchMacCellGrpCfg macCellGrpRecfg;
+   bool             phyCellGrpRecfgPres;
+   SchPhyCellGrpCfg phyCellGrpRecfg;
+   bool             spCellRecfgPres;
+   SchSpCellRecfg   spCellRecfg;
+   SchAmbrCfg       *ambrRecfg;
+   SchModulationInfo  dlModInfo;
+   SchModulationInfo  ulModInfo;
+   uint8_t            numLcsToAdd;
+   SchLcCfg           schLcCfgAdd[MAX_NUM_LC];
+   uint8_t            numLcsToDel;
+   uint8_t            lcIdToDel[MAX_NUM_LC];
+   uint8_t            numLcsToMod;
+   SchLcCfg           schLcCfgMod[MAX_NUM_LC];
    SchDataTransmission dataTransmissionInfo;
 #ifdef NR_DRX   
    bool     drxConfigIndicatorRelease;
 #endif
-}SchUeCfg;
+}SchUeRecfgReq;
 
 typedef struct schUeCfgRsp
 {
    uint16_t   cellId;
+   uint8_t    beamIdx;
    uint16_t   ueId;
    uint16_t   crnti;
    SchMacRsp  rsp;
    SchFailureCause cause;
 }SchUeCfgRsp;
 
+/*As per WG8, UE ReCFG and UECFG have same structure definition*/
+typedef struct schUeCfgRsp SchUeRecfgRsp;
+
 typedef struct schRachRsrcReq
 {
    SlotTimingInfo slotInd;
@@ -1770,21 +1871,21 @@ typedef struct dlHarqInd
 
 typedef struct schRrmPolicyRatio
 {
-   uint8_t policyMaxRatio;
-   uint8_t policyMinRatio;
-   uint8_t policyDedicatedRatio;
+   uint8_t maxRatio;
+   uint8_t minRatio;
+   uint8_t dedicatedRatio;
 }SchRrmPolicyRatio;
 
 typedef struct schRrmPolicyOfSlice
 {
    Snssai  snssai;
-   SchRrmPolicyRatio *rrmPolicyRatioInfo;
+   SchRrmPolicyRatio rrmPolicyRatioInfo;
 }SchRrmPolicyOfSlice;
 
 typedef struct schSliceCfgReq
 {
    uint8_t  numOfConfiguredSlice;
-   SchRrmPolicyOfSlice **listOfConfirguration;
+   SchRrmPolicyOfSlice **listOfSlices;
 }SchSliceCfgReq;
 
 typedef struct sliceRsp
@@ -1800,7 +1901,7 @@ typedef struct schSliceCfgRsp
    SliceRsp   **listOfSliceCfgRsp;
 }SchSliceCfgRsp;
 
-/*As per ORAN-WG8, Slice Cfg and ReCfg are same structures*/
+/*As per ORAN-WG8, Slice Cfg and Recfg are same structures*/
 typedef struct schSliceCfgReq SchSliceRecfgReq;
 typedef struct schSliceCfgRsp SchSliceRecfgRsp;
 
@@ -1866,7 +1967,7 @@ typedef uint8_t (*MacSchDlRlcBoInfoFunc) ARGS((
 
 typedef uint8_t (*MacSchAddUeConfigReqFunc) ARGS((
         Pst         *pst,           /* Post structure */
-        SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
+        SchUeCfgReq    *ueCfgToSch));   /* Scheduler UE Cfg */
 
 typedef uint8_t (*SchUeCfgRspFunc) ARGS((
         Pst         *pst,           /* Post structure */
@@ -1891,11 +1992,11 @@ typedef uint8_t (*MacSchSrUciIndFunc) ARGS((
 
 typedef uint8_t (*MacSchModUeConfigReqFunc) ARGS((
         Pst         *pst,           /* Post structure */
-        SchUeCfg    *ueCfgToSch));   /* Scheduler UE Cfg */
+        SchUeRecfgReq    *ueRecfgToSch));   /* Scheduler UE Recfg */
 
-typedef uint8_t (*SchUeReCfgRspFunc) ARGS((
+typedef uint8_t (*SchUeRecfgRspFunc) ARGS((
         Pst         *pst,           /* Post structure */
-        SchUeCfgRsp *cfgRsp));       /* Scheduler UE Cfg response */
+        SchUeRecfgRsp *recfgRsp));       /* Scheduler UE Cfg response */
 
 typedef uint8_t (*MacSchRachRsrcReqFunc) ARGS((
     Pst         *pst,                    /* Post structure */
@@ -1936,11 +2037,11 @@ typedef uint8_t (*SchSliceCfgRspFunc)    ARGS((
 
 typedef uint8_t (*MacSchSliceRecfgReqFunc) ARGS((
    Pst          *pst,           /* Post structure */
-   SchSliceRecfgReq *schSliceRecfgReq));  /* Scheduler Slice ReCfg Req */
+   SchSliceRecfgReq *schSliceRecfgReq));  /* Scheduler Slice Recfg Req */
 
 typedef uint8_t (*SchSliceRecfgRspFunc)    ARGS((
         Pst            *pst,            /* Post Structure */                         
-        SchSliceRecfgRsp  *schSliceRecfgRsp /* Cell ReCfg Cfm */
+        SchSliceRecfgRsp  *schSliceRecfgRsp /* Cell Recfg Cfm */
         ));
 
 typedef uint8_t (*MacSchPagingIndFunc) ARGS((
@@ -1969,10 +2070,12 @@ uint8_t packMacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
 uint8_t MacSchCrcInd(Pst *pst, CrcIndInfo *crcInd);
 uint8_t packMacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
 uint8_t MacSchDlRlcBoInfo(Pst *pst, DlRlcBoInfo *dlBoInfo);
-uint8_t packMacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
-uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
+uint8_t packMacSchAddUeConfigReq(Pst *pst, SchUeCfgReq *ueCfgToSch);
+uint8_t MacSchAddUeConfigReq(Pst *pst, SchUeCfgReq *ueCfgToSch);
 uint8_t packSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
 uint8_t MacProcSchUeCfgRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
+uint8_t packSchUeRecfgRsp(Pst *pst, SchUeRecfgRsp *cfgRsp);
+uint8_t MacProcSchUeRecfgRsp(Pst *pst, SchUeRecfgRsp *reCfgRsp);
 uint8_t MacSchSlotInd ARGS((Pst * pst, SlotTimingInfo * slotInd));
 uint8_t packMacSchSlotInd(Pst * pst, SlotTimingInfo * slotInd);
 uint8_t unpackMacSchSlotInd(MacSchSlotIndFunc func, Pst *pst, Buffer  *mBuf);
@@ -1982,10 +2085,10 @@ uint8_t packMacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
 uint8_t packMacSchDlHarqInd(Pst *pst, DlHarqInd *dlHarqInd);
 uint8_t MacSchDlHarqInd(Pst *pst, DlHarqInd *dlHarqInd);
 uint8_t MacSchSrUciInd(Pst *pst, SrUciIndInfo *uciInd);
-uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
-uint8_t MacSchModUeConfigReq(Pst *pst, SchUeCfg *ueCfgToSch);
-uint8_t packSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
-uint8_t MacProcSchUeReconfigRsp(Pst *pst, SchUeCfgRsp *cfgRsp);
+uint8_t packMacSchModUeConfigReq(Pst *pst, SchUeRecfgReq *ueRecfgToSch);
+uint8_t MacSchModUeConfigReq(Pst *pst, SchUeRecfgReq *ueRecfgToSch);
+uint8_t packSchUeReconfigRsp(Pst *pst, SchUeRecfgRsp *recfgRsp);
+uint8_t MacProcSchUeReconfigRsp(Pst *pst, SchUeRecfgRsp *recfgRsp);
 uint8_t packMacSchRachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq);
 uint8_t MacSchRachRsrcReq(Pst *pst, SchRachRsrcReq *schRachRsrcReq);
 uint8_t packSchRachRsrcRsp(Pst *pst, SchRachRsrcRsp *schRachRsrcRsp);