X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch.h;h=5322e8c8868dabbfa1b33a69299c3d14952aeea2;hb=604190ac7e354996f34ebfae0cdd00962811393f;hp=101cb97a0b3d968014bd6d4492f76f2de0c6ffd0;hpb=a5530e70a9d414952dadd1688aa9b4280c0dbb5a;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.h b/src/5gnrsch/sch.h index 101cb97a0..5322e8c88 100644 --- a/src/5gnrsch/sch.h +++ b/src/5gnrsch/sch.h @@ -43,8 +43,10 @@ #define CRC_FAILED 0 #define CRC_PASSED 1 +#define UL_GRANT_SIZE 224 -extern uint8_t schProcessRachInd(RachIndInfo *rachInd, Inst schInst); +typedef struct schCellCb SchCellCb; +typedef struct schUeCb SchUeCb; typedef enum { @@ -97,22 +99,38 @@ typedef struct schUlSlotInfo { uint16_t totalPrb; /*!< Number of RBs in the cell */ uint16_t assignedPrb[SCH_SYMBOL_PER_SLOT]; /*!< Num RBs and corresponding symbols allocated */ + uint8_t puschCurrentPrb; /* Current PRB for PUSCH allocation */ bool puschPres; /*!< PUSCH presence field */ SchPuschInfo *schPuschInfo; /*!< PUSCH info */ bool pucchPres; /*!< PUCCH presence field */ SchPucchInfo schPucchInfo; /*!< PUCCH info */ }SchUlSlotInfo; +/** +@brief +* BSR info per slot per UE. +*/ +typedef struct bsrInfo +{ + uint8_t priority; /* CG priority */ + uint32_t dataVol; /* Data volume requested in bytes */ +}BsrInfo; + + + /** * @brief * UE control block */ typedef struct schUeCb { - uint16_t ueIdx; - uint16_t crnti; - SchUeCfg ueCfg; - SchUeState state; + uint16_t ueIdx; + uint16_t crnti; + SchUeCfg ueCfg; + SchUeState state; + SchCellCb *cellCb; + bool srRcvd; + BsrInfo bsrInfo[MAX_NUM_LOGICAL_CHANNEL_GROUPS]; }SchUeCb; /** @@ -157,6 +175,10 @@ 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); +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); + /********************************************************************** End of file **********************************************************************/