JIRA ID = ODUHIGH-298 RB configuration at MAC/SCH/RLC for ue modification
[o-du/l2.git] / src / 5gnrsch / sch.h
index e1388a7..8cc2921 100644 (file)
@@ -28,8 +28,7 @@
 #define MAX_NUM_RB 106 /* value for numerology 0 15Khz */
 #define SCH_MIB_TRANS 80 
 #define SCH_NUM_SC_PRB 12 /* number of SCs in a PRB */
-#define SCH_MAX_SSB_BEAM 4 /* since we are supporting only SCS=15KHz */
-#define SCH_SCS_15KHZ 0 /* numerology 0 and 15Khz */
+#define SCH_MAX_SSB_BEAM 8 /* since we are supporting only SCS=15KHz and 30KHz */
 #define SCH_SYMBOL_PER_SLOT 14
 #define SCH_SSB_NUM_SYMB 4
 #define SCH_SSB_NUM_PRB 20
@@ -49,7 +48,6 @@
 #define CRC_FAILED 0
 #define CRC_PASSED 1
 
-#define RLC_HDR_SIZE  3   /* 3 bytes of RLC Header size */
 #define MAC_HDR_SIZE  3   /* 3 bytes of MAC Header */
 #define UL_GRANT_SIZE 224
 
@@ -144,7 +142,7 @@ typedef struct schLcCtxt
    uint8_t lcId;     // logical Channel ID
    uint8_t lcp;      // logical Channel Prioritization
    SchLcState lcState;
-   uint16_t bo;
+   uint32_t bo;
 }SchDlLcCtxt;
 
 typedef struct schDlCb
@@ -170,6 +168,21 @@ typedef struct schUlCb
    SchUlLcCtxt ulLcCtxt[MAX_NUM_LC];
 }SchUlCb;
 
+typedef struct schUeCfgCb
+{
+   uint16_t        cellId;
+   uint16_t        crnti;
+   bool macCellGrpCfgPres;
+   SchMacCellGrpCfg   macCellGrpCfg;
+   bool phyCellGrpCfgPres;
+   SchPhyCellGrpCfg   phyCellGrpCfg;
+   bool spCellCfgPres;
+   SchSpCellCfg       spCellCfg;
+   SchAmbrCfg         *ambrCfg;
+   SchModulationInfo  dlModInfo;
+   SchModulationInfo  ulModInfo;
+}SchUeCfgCb;
+
 /**
  * @brief
  * UE control block
@@ -178,7 +191,7 @@ typedef struct schUeCb
 {
    uint16_t   ueIdx;
    uint16_t   crnti;
-   SchUeCfg   ueCfg;
+   SchUeCfgCb ueCfg;
    SchUeState state;
    SchCellCb  *cellCb;
    bool       srRcvd;
@@ -201,6 +214,8 @@ typedef struct schCellCb
    SchDlSlotInfo **schDlSlotInfo;                   /*!< SCH resource allocations in DL */
    SchUlSlotInfo **schUlSlotInfo;                   /*!< SCH resource allocations in UL */
    SchCellCfg    cellCfg;                           /*!< Cell ocnfiguration */
+   bool          firstSsbTransmitted;
+   bool          firstSib1Transmitted;
    uint8_t       ssbStartSymbArr[SCH_MAX_SSB_BEAM]; /*!<start symbol per SSB beam */
    SchRaCb       raCb[MAX_NUM_UE];                  /*!< Rach Cb */
    uint16_t      numActvUe;                         /*!<Number of active UEs */
@@ -233,14 +248,14 @@ 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(DlMsgAlloc *msg4Alloc, SchCellCb *cell, uint16_t slot);
-uint16_t schCalcTbSize(uint16_t payLoadSize);
+uint16_t schCalcTbSize(uint32_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);
 uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst);
 uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo puschInfo, DciInfo *dciInfo);
 uint8_t schFillPuschAlloc(SchUeCb *ueCb, uint16_t pdcchSlot, uint32_t dataVol, SchPuschInfo *puschInfo);
 uint8_t schDlRsrcAllocDlMsg(DlMsgAlloc *dlMsgAlloc, SchCellCb *cell, uint16_t crnti,
-   uint16_t accumalatedSize, uint16_t slot);
+   uint32_t *accumalatedSize, uint16_t slot);
 uint16_t schAccumalateLcBoSize(SchCellCb *cell, uint16_t ueIdx);
 
 /**********************************************************************