X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Frg_sch.h;h=5385fd2611a8a54219d04064b733e837c5caa981;hb=a26e316791d661712939df53aa8a2e5b74b951e9;hp=ede35a8f01034b93f81aab474997c9523b879960;hpb=3235ecfc7414aa0b72d0ad50db63ae8b5626045b;p=o-du%2Fl2.git diff --git a/src/5gnrsch/rg_sch.h b/src/5gnrsch/rg_sch.h index ede35a8f0..5385fd261 100755 --- a/src/5gnrsch/rg_sch.h +++ b/src/5gnrsch/rg_sch.h @@ -330,7 +330,7 @@ rgSchCb[_inst].rgSchUlDelta = TFU_ENV_HQFBKIND_ULDELTA + delta;\ /*CA_DEV_DS_FIX*/ #define RGSCH_INVALID_CELL_IDX 255 #define RGSCH_PCELL_INDEX 0 -#define RG_SCH_CELLINDEX(_cell) (U8)((_cell->cellId >= rgSchCb[_cell->instIdx].genCfg.startCellId) ?\ +#define RG_SCH_CELLINDEX(_cell) (uint8_t)((_cell->cellId >= rgSchCb[_cell->instIdx].genCfg.startCellId) ?\ (_cell->cellId - rgSchCb[_cell->instIdx].genCfg.startCellId)&(CM_LTE_MAX_CELLS-1): 0) #define RG_SCH_GET_SCELL_INDEX(_ueCb, _cell) _ueCb->cellIdToCellIdxMap[RG_SCH_CELLINDEX(_cell)] /* RACHO */ @@ -373,12 +373,12 @@ rgSchCb[_inst].rgSchUlDelta = TFU_ENV_HQFBKIND_ULDELTA + delta;\ (_time2.sfn*10 + _time2.subframe))*/ #define RG_SCH_ADD_TO_CRNT_TIME_EMTC(crntTime, toFill, incr) \ - if ((crntTime.subframe + (incr)) >= RGSCH_NUM_SUB_FRAMES) \ + if ((crntTime.slot + (incr)) >= RGSCH_NUM_SUB_FRAMES) \ toFill.sfn = (crntTime.sfn + \ - (crntTime.subframe + (incr)) / RGSCH_NUM_SUB_FRAMES); \ + (crntTime.slot + (incr)) / RGSCH_NUM_SUB_FRAMES); \ else \ toFill.sfn = crntTime.sfn; \ - toFill.subframe = (crntTime.subframe + (incr)) % RGSCH_NUM_SUB_FRAMES; \ + toFill.subframe = (crntTime.slot + (incr)) % RGSCH_NUM_SUB_FRAMES; \ if (toFill.sfn >= RGSCH_MAX_SFN) \ { \ toFill.hSfn = (crntTime.hSfn + 1) % RGSCH_MAX_SFN; \ @@ -459,28 +459,28 @@ do \ #else -#define RGSCH_SUBFRAME_INDEX(x) ( ( ((x).sfn) * RGSCH_NUM_SUB_FRAMES_5G ) + (x).subframe ) +#define RGSCH_SUBFRAME_INDEX(x) ( ( ((x).sfn) * RGSCH_NUM_SUB_FRAMES_5G ) + (x).slot ) #endif /* Note: In RGSCH_CALC_SF_DIFF, _time1 should be the latest */ #define RGSCH_CALC_SF_DIFF(_time1, _time2)\ - (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.subframe) < (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G +_time2.subframe)?\ - (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.subframe) -\ - (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time2.subframe) : \ - (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.subframe) - (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G +_time2.subframe)\ + (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.slot) < (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G +_time2.slot)?\ + (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.slot) -\ + (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time2.slot) : \ + (_time1.sfn*RGSCH_NUM_SUB_FRAMES_5G+_time1.slot) - (_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G +_time2.slot)\ /*Addef for L2Meas*/ /*LTE_L2_MEAS_PHASE2*/ #define RGSCH_CALC_SFN_SF_DIFF(_time1,_sfnCycle, _time2)\ -(((_time1.sfn+RGSCH_MAX_SFN * _sfnCycle)*RGSCH_NUM_SUB_FRAMES_5G) + _time1.subframe -\ -(_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G + _time2.subframe)) +(((_time1.sfn+RGSCH_MAX_SFN * _sfnCycle)*RGSCH_NUM_SUB_FRAMES_5G) + _time1.slot -\ +(_time2.sfn*RGSCH_NUM_SUB_FRAMES_5G + _time2.slot)) #define RG_SCH_ADD_TO_CRNT_TIME(crntTime, toFill, incr) \ - if ((crntTime.subframe + (incr)) >= RGSCH_NUM_SUB_FRAMES_5G) \ + if ((crntTime.slot + (incr)) >= RGSCH_NUM_SUB_FRAMES_5G) \ toFill.sfn = (crntTime.sfn + \ - (crntTime.subframe + (incr)) / RGSCH_NUM_SUB_FRAMES_5G); \ + (crntTime.slot + (incr)) / RGSCH_NUM_SUB_FRAMES_5G); \ else \ toFill.sfn = crntTime.sfn; \ - toFill.subframe = (crntTime.subframe + (incr)) % RGSCH_NUM_SUB_FRAMES_5G; \ + toFill.slot = (crntTime.slot + (incr)) % RGSCH_NUM_SUB_FRAMES_5G; \ if (toFill.sfn >= RGSCH_MAX_SFN) \ { \ toFill.sfn = toFill.sfn % RGSCH_MAX_SFN; \ @@ -490,7 +490,7 @@ do \ do \ { \ S32 _subframe;\ - _subframe = _crntDl.sfn * RGSCH_NUM_SUB_FRAMES_5G + _crntDl.subframe; \ + _subframe = _crntDl.sfn * RGSCH_NUM_SUB_FRAMES_5G + _crntDl.slot; \ _subframe = _subframe - decr; \ if(_subframe < 0) \ { \ @@ -498,7 +498,7 @@ do \ } \ _subframe = _subframe % RGSCH_MAX_SUBFRM_5G; \ _prevDl.sfn = _subframe / RGSCH_NUM_SUB_FRAMES_5G; \ - _prevDl.subframe = _subframe % RGSCH_NUM_SUB_FRAMES_5G; \ + _prevDl.slot = _subframe % RGSCH_NUM_SUB_FRAMES_5G; \ } while(0) /* ccpu00133109: Removed RGSCHSUBFRMCRNTTIME as it is not giving proper output @@ -507,10 +507,10 @@ do \ #define RGSCHCPYTIMEINFO(src, dst) \ dst.sfn = src.sfn; \ - dst.subframe = src.subframe; \ + dst.slot = src.slot; \ -#define RGSCH_TIMEINFO_SAME(x, y) (((x).sfn == (y).sfn) && ((x).subframe == (y).subframe)) +#define RGSCH_TIMEINFO_SAME(x, y) (((x).sfn == (y).sfn) && ((x).slot == (y).slot)) /* Added support for SPS*/ #ifdef LTEMAC_SPS @@ -526,7 +526,7 @@ do \ {*_ret = -1; }\ else if ((_x).sfn == (_y).sfn)\ {\ - if ((_x).subframe > (_y).subframe)\ + if ((_x).slot > (_y).slot)\ { *_ret = 1; }\ else\ {*_ret = -1; }\ @@ -536,8 +536,8 @@ do \ } #define RGSCH_INCR_SUB_FRAME(x,y) do { \ - if ((x.subframe += y) > (RGSCH_NUM_SUB_FRAMES_5G - 1)) {\ - x.sfn += (x.subframe/RGSCH_NUM_SUB_FRAMES_5G); x.subframe = (x.subframe%RGSCH_NUM_SUB_FRAMES_5G);\ + if ((x.slot += y) > (RGSCH_NUM_SUB_FRAMES_5G - 1)) {\ + x.sfn += (x.slot/RGSCH_NUM_SUB_FRAMES_5G); x.slot = (x.slot%RGSCH_NUM_SUB_FRAMES_5G);\ if (x.sfn >= RGSCH_MAX_SFN) \ { \ x.sfn %= RGSCH_MAX_SFN; \ @@ -631,7 +631,7 @@ do \ {\ if (NULLP != (_buf)) \ { \ - SPutMsg((_buf)); \ + ODU_PUT_MSG_BUF((_buf)); \ _buf = NULLP; \ } \ } @@ -661,7 +661,7 @@ do \ #define RGSCH_DROP_RGUDDATREQ_MBUF(_datReq)\ {\ - U32 idx1,idx2,idx;\ + uint32_t idx1,idx2,idx;\ if (_datReq != NULLP)\ {\ for (idx=0; idx < _datReq->numLch; idx++)\ @@ -692,7 +692,7 @@ do \ **********************************************************/ #define RGSCH_DROP_RGUCDATREQ_MBUF(_datReq)\ {\ - U32 idx1;\ + uint32_t idx1;\ if (_datReq != NULLP)\ {\ for (idx1 = 0; idx1 < RGU_MAX_PDUSET; idx1++)\ @@ -717,7 +717,7 @@ do \ (_tbInfo)->m = 0; \ (_tbInfo)->fdbkTime.sfn = (_timingInfo.sfn + \ _dlSf->dlFdbkInfo.sfnOffset) % RGSCH_MAX_SFN; \ - (_tbInfo)->fdbkTime.subframe = _dlSf->dlFdbkInfo.subframe; \ + (_tbInfo)->fdbkTime.slot = _dlSf->dlFdbkInfo.slot; \ (_tbInfo)->timingInfo = _timingInfo; \ } while(0) @@ -725,7 +725,7 @@ do \ do \ { \ _anInfo->sfn = (_tbInfo)->fdbkTime.sfn; \ - _anInfo->subframe = (_tbInfo)->fdbkTime.subframe; \ + _anInfo->slot = (_tbInfo)->fdbkTime.slot; \ _anInfo->latestMIdx = (_tbInfo)->m; \ } while(0) /* Support for iPhich=1 for TDD*/ @@ -775,7 +775,7 @@ do \ #define RGSCH_SF_ALLOC_SIZE 4 /* Defining new MACRO for DL subframes */ -#define RGSCH_NUM_DL_SUBFRAMES 20 +#define RGSCH_NUM_DL_slotS 20 /* Define for the block size for memory allocation */ #define RGSCH_BLKSZ 2048 @@ -816,7 +816,7 @@ do \ #define RGSCH_MAX(x, y) ((x) >= (y) ? (x) : (y)) #define RGSCH_CEIL(x, y) (((x) + (y)-1) / (y)) #define RGSCH_FLOOR(x, y) ((x) / (y)) -#define RGSCH_CEILING(x) (((x) - (U8)(x)) ? (U8)(x+1) : (U8)x) +#define RGSCH_CEILING(x) (((x) - (uint8_t)(x)) ? (uint8_t)(x+1) : (uint8_t)x) #define RGSCH_DIV_ROUND(x, y) (((x) + (y)/2) / (y)) #define RGSCH_RARSP_WAIT_PERIOD 3 @@ -1255,7 +1255,7 @@ do\ /* To Get the Idx to pCqiSrsSrLst in RgSchCellCb*/ #define RG_SCH_GET_IDX_PCQISRSSR(_time, _indexId)\ {\ - (_indexId) = (_time.sfn)* RGSCH_NUM_SUB_FRAMES_5G + (_time.subframe); \ + (_indexId) = (_time.sfn)* RGSCH_NUM_SUB_FRAMES_5G + (_time.slot); \ (_indexId) = (_indexId)%RG_SCH_PCQI_SRS_SR_TRINS_SIZE;\ } @@ -1312,15 +1312,15 @@ do\ #define RG_SCH_PARSE_MULTI_PMI(_bitLen, _totPmiBitLen, _psMode12,\ _acqiCb, _revArray,_sbOffst )\ {\ - U8 _loop =0;\ + uint8_t _loop =0;\ for(_loop =0; _loop<(_totPmiBitLen/_bitLen); _loop++)\ {\ - (_psMode12)->subbandArr[_loop].pmi = (U8)rgSCHUtlParse(_revArray,\ - _sbOffst,(U8)(_sbOffst+_bitLen), (U8)TFU_MAX_CQI_BYTES);\ + (_psMode12)->subbandArr[_loop].pmi = (uint8_t)rgSCHUtlParse(_revArray,\ + _sbOffst,(uint8_t)(_sbOffst+_bitLen), (uint8_t)TFU_MAX_CQI_BYTES);\ _sbOffst+=_bitLen;\ (_psMode12)->subbandArr[_loop].subBand.numRb = (_acqiCb).k;\ (_psMode12)->subbandArr[_loop].subBand.rbStart = \ - (U8) ((_acqiCb).k * (_loop));\ + (uint8_t) ((_acqiCb).k * (_loop));\ }\ } @@ -1469,37 +1469,37 @@ do{\ #define RG_SCH_HQP_TIME_ON_PCELL 32 /*!< Time in milliseconds to be allowed for transmission of TB on PCell*/ /* SR_RACH_STATS */ -EXTERN U32 rgNumPrachRecvd; /* Num of Rach Req received including dedicated preambles */ -EXTERN U32 rgNumRarSched; /* Num of RARs sent */ -EXTERN U32 rgNumBI; /* Num of BackOff Ind sent */ -EXTERN U32 rgNumMsg3CrcPassed; /* Num of CRC success for Msg3 */ -EXTERN U32 rgNumMsg3CrcFailed ; /* Num of CRC fail for Msg 3 */ -EXTERN U32 rgNumMsg3FailMaxRetx ; /* Num of Msg3 fail after Max Retx attempts */ -EXTERN U32 rgNumMsg4Ack ; /* Num of Acks for Msg4 Tx */ -EXTERN U32 rgNumMsg4Nack ; +uint32_t rgNumPrachRecvd; /* Num of Rach Req received including dedicated preambles */ +uint32_t rgNumRarSched; /* Num of RARs sent */ +uint32_t rgNumBI; /* Num of BackOff Ind sent */ +uint32_t rgNumMsg3CrcPassed; /* Num of CRC success for Msg3 */ +uint32_t rgNumMsg3CrcFailed ; /* Num of CRC fail for Msg 3 */ +uint32_t rgNumMsg3FailMaxRetx ; /* Num of Msg3 fail after Max Retx attempts */ +uint32_t rgNumMsg4Ack ; /* Num of Acks for Msg4 Tx */ +uint32_t rgNumMsg4Nack ; /* Num of Nacks for Msg4 Tx */ -EXTERN U32 rgNumMsg4FailMaxRetx ; /* Num of Msg4 Tx failed after Max Retx attempts */ -EXTERN U32 rgNumSrRecvd; /* Num of Sched Req received */ -EXTERN U32 rgNumSrGrant; /* Num of Sched Req Grants sent */ -EXTERN U32 rgNumMsg3CrntiCE; /* Num of Msg 3 CRNTI CE received */ -EXTERN U32 rgNumDedPream ; /* Num of Dedicated Preambles recvd */ -EXTERN U32 rgNumMsg3CCCHSdu; /* Num of Msg 3 CCCH Sdus recvd */ -EXTERN U32 rgNumCCCHSduCrntiNotFound ; /*UE Ctx not found for CCCH SDU Msg 3 */ -EXTERN U32 rgNumCrntiCeCrntiNotFound ; /*UE Ctx not found for CRNTI CE Msg 3 */ -EXTERN U32 rgNumMsg4WithCCCHSdu ; /* Num of Msg4 with CCCH Sdu */ -EXTERN U32 rgNumMsg4WoCCCHSdu ; /* Num of Msg4 without CCCH Sdu */ -EXTERN U32 rgNumMsg4Dtx ; /* Num of DTX received for Msg 4 */ -EXTERN U32 rgNumMsg3AckSent ; /* Num of PHICH Ack sent for Msg 3 */ -EXTERN U32 rgNumMsg3NackSent ; /* Num of PHICH Nack sent for Msg 3 */ -EXTERN U32 rgNumMsg4PdcchWithCrnti ; /* Num of PDCCH for CRNTI based contention resolution */ -EXTERN U32 rgNumRarFailDuetoRntiExhaustion ; /* Num of RACH Failures due to RNTI pool exhaution */ -EXTERN U32 rgNumTAModified ; /* Num of times TA received is different from prev value */ -EXTERN U32 rgNumTASent ; /* Num of TA Command sent */ -EXTERN U32 rgNumMsg4ToBeTx ; /* Num of times MSG4 that should be sent */ -EXTERN U32 rgNumMsg4Txed ; /* Num of MSG4 actually sent *//* ysNumMsg4ToBeTx -ysNumMsg4Txed == Failed MSG4 TX */ -EXTERN U32 rgNumMsg3DtxRcvd; /* CRC Fail with SINR < 0 */ - -EXTERN U32 rgNumDedPreamUECtxtFound; +uint32_t rgNumMsg4FailMaxRetx ; /* Num of Msg4 Tx failed after Max Retx attempts */ +uint32_t rgNumSrRecvd; /* Num of Sched Req received */ +uint32_t rgNumSrGrant; /* Num of Sched Req Grants sent */ +uint32_t rgNumMsg3CrntiCE; /* Num of Msg 3 CRNTI CE received */ +uint32_t rgNumDedPream ; /* Num of Dedicated Preambles recvd */ +uint32_t rgNumMsg3CCCHSdu; /* Num of Msg 3 CCCH Sdus recvd */ +uint32_t rgNumCCCHSduCrntiNotFound ; /*UE Ctx not found for CCCH SDU Msg 3 */ +uint32_t rgNumCrntiCeCrntiNotFound ; /*UE Ctx not found for CRNTI CE Msg 3 */ +uint32_t rgNumMsg4WithCCCHSdu ; /* Num of Msg4 with CCCH Sdu */ +uint32_t rgNumMsg4WoCCCHSdu ; /* Num of Msg4 without CCCH Sdu */ +uint32_t rgNumMsg4Dtx ; /* Num of DTX received for Msg 4 */ +uint32_t rgNumMsg3AckSent ; /* Num of PHICH Ack sent for Msg 3 */ +uint32_t rgNumMsg3NackSent ; /* Num of PHICH Nack sent for Msg 3 */ +uint32_t rgNumMsg4PdcchWithCrnti ; /* Num of PDCCH for CRNTI based contention resolution */ +uint32_t rgNumRarFailDuetoRntiExhaustion ; /* Num of RACH Failures due to RNTI pool exhaution */ +uint32_t rgNumTAModified ; /* Num of times TA received is different from prev value */ +uint32_t rgNumTASent ; /* Num of TA Command sent */ +uint32_t rgNumMsg4ToBeTx ; /* Num of times MSG4 that should be sent */ +uint32_t rgNumMsg4Txed ; /* Num of MSG4 actually sent *//* ysNumMsg4ToBeTx -ysNumMsg4Txed == Failed MSG4 TX */ +uint32_t rgNumMsg3DtxRcvd; /* CRC Fail with SINR < 0 */ + +uint32_t rgNumDedPreamUECtxtFound; #endif /* __RGSCH__ */ /**********************************************************************