X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch_utils.h;h=195378441a7699d0cd5de7a26f6db442f0d92bf4;hb=5007af25423493fbc002e30d847aa05d44bc180e;hp=329c70e32a2e247ce6d897fb4827f21f062b4fef;hpb=6b44407d464a5a4e060999255233a7cfe78bb0fa;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch_utils.h b/src/5gnrsch/sch_utils.h index 329c70e32..195378441 100644 --- a/src/5gnrsch/sch_utils.h +++ b/src/5gnrsch/sch_utils.h @@ -47,12 +47,12 @@ /* allocate and zero out a static buffer */ #define SCH_ALLOC(_datPtr, _size) \ { \ - int _ret; \ + uint8_t _ret; \ _ret = SGetSBuf(SCH_MEM_REGION, SCH_POOL, \ (Data **)&_datPtr, _size); \ if(_ret == ROK) \ { \ - cmMemset((U8*)_datPtr, 0, _size); \ + memset(_datPtr, 0, _size); \ } \ else \ { \ @@ -67,32 +67,36 @@ { \ SPutSBuf(SCH_MEM_REGION, SCH_POOL, \ (Data *)_datPtr, _size); \ + _datPtr = NULLP; \ } \ } /* Fill post structure for msg from SCH to MAC */ #define FILL_PST_SCH_TO_MAC(_pst, _inst) \ { \ - _pst.srcProcId = SFndProcId(); \ - _pst.dstProcId = SFndProcId(); \ - _pst.srcEnt = ENTRG; \ - _pst.dstEnt = ENTRG; \ + _pst.srcProcId = ODU_GET_PROCID(); \ + _pst.dstProcId = ODU_GET_PROCID(); \ + _pst.srcEnt = ENTMAC; \ + _pst.dstEnt = ENTMAC; \ _pst.srcInst = 1; \ _pst.dstInst = 0; \ _pst.selector = ODU_SELECTOR_TC; \ } -extern int8_t coresetIdxTable[MAX_CORESET_INDEX][4]; -extern int8_t searchSpaceIdxTable[MAX_SEARCH_SPACE_INDEX][4]; +int8_t coresetIdxTable[MAX_CORESET_INDEX][4]; +int8_t searchSpaceIdxTable[MAX_SEARCH_SPACE_INDEX][4]; /* functions declarations */ -void schAllocFreqDomRscType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain); -uint16_t schCalcTbSize(uint16_t payLoadSize); +void freqDomRscAllocType0(uint16_t startPrb, uint16_t prbSize, uint8_t *freqDomain); +uint16_t schCalcTbSize(uint32_t payLoadSize); uint16_t schCalcNumPrb(uint16_t tbSize, uint16_t mcs, uint8_t numSymbols); +uint16_t schCalcTbSizeFromNPrb(uint16_t numPrb, uint16_t mcs, uint8_t numSymbols); SchUeCb* schGetUeCb(SchCellCb *cellCb, uint16_t crnti); void schInitUlSlot(SchUlSlotInfo *schUlSlotInfo); void schInitDlSlot(SchDlSlotInfo *schDlSlotInfo); - +#ifdef NR_TDD +SlotConfig schGetSlotSymbFrmt(uint16_t slot, uint32_t bitMap); +#endif /********************************************************************** End of file