Building mib PDU and SSB changes at scheduler 67/3167/4
authorBalaji Shankaran <balaji.shankaran@radisys.com>
Mon, 6 Apr 2020 09:28:23 +0000 (14:58 +0530)
committerBalaji Shankaran <balaji.shankaran@radisys.com>
Tue, 7 Apr 2020 14:57:33 +0000 (20:27 +0530)
Change-Id: Ia87dc52946e4278dc1f1e8751519eafe75963a2f
Signed-off-by: Balaji Shankaran <balaji.shankaran@radisys.com>
68 files changed:
src/5gnrmac/lwr_mac.h
src/5gnrmac/lwr_mac_handle_phy.c [new file with mode: 0644]
src/5gnrmac/mac_slot_ind.c [new file with mode: 0644]
src/5gnrmac/rg.h
src/5gnrmac/rg.x
src/5gnrmac/rg_dhm.c
src/5gnrmac/rg_ex_ms.c
src/5gnrmac/rg_l2m.c
src/5gnrmac/rg_lim.c
src/5gnrmac/rg_lmm.c
src/5gnrmac/rg_mux.c
src/5gnrmac/rg_ram.c
src/5gnrmac/rg_rom.c
src/5gnrmac/rg_tom.c
src/5gnrrlc/kw_dl.x
src/5gnrrlc/kw_lmm.c
src/5gnrrlc/kw_tmm_dl.c
src/5gnrsch/rg_sch.c
src/5gnrsch/rg_sch.h
src/5gnrsch/rg_sch.x
src/5gnrsch/rg_sch_cfg.c
src/5gnrsch/rg_sch_cmn.c
src/5gnrsch/rg_sch_cmn.h
src/5gnrsch/rg_sch_dbm.c
src/5gnrsch/rg_sch_dhm.c
src/5gnrsch/rg_sch_drx.c
src/5gnrsch/rg_sch_ex_ms.c
src/5gnrsch/rg_sch_gom.c
src/5gnrsch/rg_sch_inf.x
src/5gnrsch/rg_sch_l2m.c
src/5gnrsch/rg_sch_lmm.c
src/5gnrsch/rg_sch_mga.c
src/5gnrsch/rg_sch_pwr.c
src/5gnrsch/rg_sch_ram.c
src/5gnrsch/rg_sch_sc1.c
src/5gnrsch/rg_sch_scell.c
src/5gnrsch/rg_sch_tom.c
src/5gnrsch/rg_sch_uhm.c
src/5gnrsch/rg_sch_utl.c
src/5gnrsch/sch.c [new file with mode: 0644]
src/5gnrsch/sch.h [new file with mode: 0644]
src/5gnrsch/sch_common.c [new file with mode: 0644]
src/5gnrsch/sch_slot_ind.c [new file with mode: 0644]
src/cm/cm_bdy5.c
src/cm/cm_lte.c
src/cm/cm_lte.x
src/cm/du_app_mac_inf.c
src/cm/du_app_mac_inf.h
src/cm/lrg.x
src/cm/mac_sch_interface.c [new file with mode: 0644]
src/cm/mac_sch_interface.h [new file with mode: 0644]
src/cm/rgr.c
src/cm/rgr.h
src/cm/rgr.x
src/cm/tfu.c
src/cm/tfu.h
src/cm/tfu.x
src/codec_utils/SYSINFO/BCCH-BCH-Message.c [new file with mode: 0644]
src/codec_utils/SYSINFO/BCCH-BCH-Message.h [new file with mode: 0644]
src/codec_utils/SYSINFO/BCCH-BCH-MessageType.c [new file with mode: 0644]
src/codec_utils/SYSINFO/BCCH-BCH-MessageType.h [new file with mode: 0644]
src/codec_utils/common/asn_constant.h [new file with mode: 0644]
src/du_app/du_cell_mgr.c
src/du_app/du_cfg.c
src/du_app/du_cfg.h
src/du_app/du_msg_hdl.c
src/du_app/du_sys_info_hdl.c
src/du_app/du_sys_info_hdl.h

index c579194..d153bcc 100644 (file)
@@ -44,8 +44,10 @@ typedef enum
 /* Events in Lower Mac */
 typedef enum{
   PARAM_REQ,
 /* Events in Lower Mac */
 typedef enum{
   PARAM_REQ,
-  CONFIG_REQ = 2,
-  START_REQ = 4,
+  PARAM_RSP,
+  CONFIG_REQ,
+  CONFIG_RSP,
+  START_REQ,
   STOP_REQ,
   MAX_EVENT
 }EventState;
   STOP_REQ,
   MAX_EVENT
 }EventState;
diff --git a/src/5gnrmac/lwr_mac_handle_phy.c b/src/5gnrmac/lwr_mac_handle_phy.c
new file mode 100644 (file)
index 0000000..39d5c7b
--- /dev/null
@@ -0,0 +1,134 @@
+
+/* header include files (.h) */
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general */
+#include "ssi.h"           /* system services */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "cm_mblk.h"        /* Common LTE Defines */
+#include "tfu.h"           /* RGU Interface defines */
+//#include "rg.h"
+#include "fapi.h"
+
+/* header/extern include files (.x) */
+#include "gen.x"           /* general */
+#include "ssi.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "cm_mblk.x"        /* Common LTE Defines */
+#include "tfu.x"           /* RGU Interface includes */
+//#include "rg.x"
+
+/* function pointers for packing macCellCfg Request */
+typedef S16 (*packSlotIndMsg) ARGS((
+   Pst           *pst,
+   fapi_slot_ind_t *slotInd
+));
+
+S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
+S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
+S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd);
+
+packSlotIndMsg packSlotIndMt[] =
+{
+   packLcSlotInd, /* packing for loosely coupled */
+   fapiMacSlotInd, /* packing for tightly coupled */
+   packLwlcSlotInd, /* packing for light weight loosly coupled */
+};
+
+S16 packLcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
+{
+   Buffer *mBuf = NULLP;
+   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) 
+   {
+      RETVALUE(RFAILED);
+   }
+
+   /* pack SFN and slot value */
+   CMCHKPK(SPkU16,slotInd->sfn, mBuf);
+   CMCHKPK(SPkU16,slotInd->slot, mBuf);
+
+   RETVALUE(SPstTsk(pst,mBuf));
+}
+
+S16 packTcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
+{
+   return ROK;
+}
+
+S16 packLwlcSlotInd (Pst *pst, fapi_slot_ind_t *slotInd)
+{
+   return ROK;
+}
+
+void handleSlotInd(fapi_slot_ind_t *fapiSlotInd)
+{
+   /* fill Pst structure to send to lwr_mac to MAC */
+   Pst pst;
+   SlotIndInfo slotInd;
+
+   pst.srcProcId = 0;
+   pst.dstProcId = 0;
+   pst.srcEnt = ENTTF;
+   pst.dstEnt = ENTRG;
+   pst.srcInst = 0;
+   pst.dstInst = 0;
+   pst.event = EVENT_SLOT_IND_TO_MAC;
+   pst.region = 0;
+   pst.pool =  0;
+   pst.selector = MAC_SELECTOR_TC;
+
+   slotInd.sfn = fapiSlotInd->sfn;
+   slotInd.slot = fapiSlotInd->slot;
+
+   return (*packSlotIndMt[pst.selector])(&pst, &slotInd);
+}
+
+void handlePhyMessages(U8 *msg)
+{
+   /* extract the header */
+   fapi_msg_t *header;
+   header = (fapi_msg_t *)msg;
+
+   switch(header->message_type_id)
+   {
+      case FAPI_SLOT_INDICATION:
+      {
+         fapi_slot_ind_t *slotInd;
+         slotInd  = (fapi_slot_ind_t *)msg;
+         handleSlotInd(slotInd);
+         break;
+      }
+      case FAPI_ERROR_INDICATION:
+      {
+         break;
+      }
+      case FAPI_RX_DATA_INDICATION:
+      {
+         break;
+      }  
+      case FAPI_CRC_INDICATION:
+      {
+         break;
+      }  
+      case FAPI_UCI_INDICATION:
+      {
+         break;
+      }  
+      case FAPI_SRS_INDICATION:
+      {
+         break;
+      }  
+      case FAPI_RACH_INDICATION:
+      {
+         break;
+      }  
+   }
+}
diff --git a/src/5gnrmac/mac_slot_ind.c b/src/5gnrmac/mac_slot_ind.c
new file mode 100644 (file)
index 0000000..51b07f4
--- /dev/null
@@ -0,0 +1,54 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+ *******************************************************************************/
+/* header include files (.h) */
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general */
+#include "ssi.h"           /* system services */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_mblk.h"       /* common memory link list library */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "tfu.h"           /* RGU Interface includes */
+#include "lrg.h"
+#include "gen.x"           /* general */
+#include "ssi.x"           /* system services */
+#include "cm5.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_mblk.x"       /* common memory link list library */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "tfu.x"           /* RGU Interface includes */
+#include "lrg.x"
+#include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
+
+int MacProcDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc)
+{
+
+   return ROK;
+}
+
+/**********************************************************************
+  End of file
+ **********************************************************************/
+
index d416563..571bd05 100755 (executable)
@@ -270,14 +270,14 @@ U32 macHeader[2];
 #define RG_ULCCCH_ISCFGD(cell) ((cell)->ulCcchId != RG_INVALID_LC_ID)
 /* After merging from 2.1 to 2.2 */
 #define RG_CALC_SF_DIFF(_time1, _time2)\
 #define RG_ULCCCH_ISCFGD(cell) ((cell)->ulCcchId != RG_INVALID_LC_ID)
 /* After merging from 2.1 to 2.2 */
 #define RG_CALC_SF_DIFF(_time1, _time2)\
-   (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.subframe) < (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe)?\
-     ((_time1.sfn+RG_MAX_SFN)*RG_NUM_SUB_FRAMES_5G+_time1.subframe) -\
-       (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe) : \
-     (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.subframe) - (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe)
+   (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.slot) < (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot)?\
+     ((_time1.sfn+RG_MAX_SFN)*RG_NUM_SUB_FRAMES_5G+_time1.slot) -\
+       (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot) : \
+     (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.slot) - (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot)
 /*LTE_L2_MEAS_PHASE2*/
 #define RG_CALC_SFN_SF_DIFF(_time1,_sfnCycle, _time2)\
 /*LTE_L2_MEAS_PHASE2*/
 #define RG_CALC_SFN_SF_DIFF(_time1,_sfnCycle, _time2)\
-(((_time1.sfn+RG_MAX_SFN * _sfnCycle)*RG_NUM_SUB_FRAMES_5G) + _time1.subframe -\
-(_time2.sfn*RG_NUM_SUB_FRAMES_5G + _time2.subframe))
+(((_time1.sfn+RG_MAX_SFN * _sfnCycle)*RG_NUM_SUB_FRAMES_5G) + _time1.slot -\
+(_time2.sfn*RG_NUM_SUB_FRAMES_5G + _time2.slot))
 
 #define RG_EXT_LCID(_lcId, _byte) {\
       (_lcId) = (_byte) & RG_LCID_MASK; \
 
 #define RG_EXT_LCID(_lcId, _byte) {\
       (_lcId) = (_byte) & RG_LCID_MASK; \
@@ -331,26 +331,21 @@ U32 macHeader[2];
 }
 
 #define RGADDTOCRNTTIME(crntTime, toFill, incr)          \
 }
 
 #define RGADDTOCRNTTIME(crntTime, toFill, incr)          \
-   if ((crntTime.subframe + incr) > (RG_NUM_SUB_FRAMES_5G - 1))   \
+   if ((crntTime.slot + incr) > (RG_NUM_SUB_FRAMES_5G - 1))   \
       toFill.sfn = (crntTime.sfn + 1);      \
    else                                                  \
       toFill.sfn = crntTime.sfn;                              \
       toFill.sfn = (crntTime.sfn + 1);      \
    else                                                  \
       toFill.sfn = crntTime.sfn;                              \
-   toFill.subframe = (crntTime.subframe + incr) % RG_NUM_SUB_FRAMES_5G; \
+   toFill.slot = (crntTime.slot + incr) % RG_NUM_SUB_FRAMES_5G; \
    if (toFill.sfn >= RG_MAX_SFN) \
    { \
    if (toFill.sfn >= RG_MAX_SFN) \
    { \
-      toFill.hSfn = (crntTime.hSfn + 1)%RG_MAX_SFN; \
       toFill.sfn%=RG_MAX_SFN; \
    } \
       toFill.sfn%=RG_MAX_SFN; \
    } \
-   else \
-   { \
-      toFill.hSfn = crntTime.hSfn; \
-   }
 
 #define RGSUBFRMCRNTTIME(crntTime, toFill, dcr)    \
 {                                                  \
    if (crntTime.sfn == 0)                          \
 {                                                  \
 
 #define RGSUBFRMCRNTTIME(crntTime, toFill, dcr)    \
 {                                                  \
    if (crntTime.sfn == 0)                          \
 {                                                  \
-   if ((crntTime.subframe - (dcr)) < 0)              \
+   if ((crntTime.slot - (dcr)) < 0)              \
    {                                               \
       toFill.sfn = RG_MAX_SFN - 1;                 \
    }                                               \
    {                                               \
       toFill.sfn = RG_MAX_SFN - 1;                 \
    }                                               \
@@ -361,21 +356,20 @@ U32 macHeader[2];
 }                                                  \
 else                                               \
 {                                                  \
 }                                                  \
 else                                               \
 {                                                  \
-   if ((crntTime.subframe - (dcr)) < 0)              \
+   if ((crntTime.slot - (dcr)) < 0)              \
    {                                               \
    toFill.sfn = crntTime.sfn - 1;                  \
    }                                               \
    else                                            \
    toFill.sfn = crntTime.sfn;                      \
 }                                                  \
    {                                               \
    toFill.sfn = crntTime.sfn - 1;                  \
    }                                               \
    else                                            \
    toFill.sfn = crntTime.sfn;                      \
 }                                                  \
-toFill.subframe = (RG_NUM_SUB_FRAMES_5G + crntTime.subframe - (dcr)) % (RG_NUM_SUB_FRAMES_5G);                                   \
+toFill.slot = (RG_NUM_SUB_FRAMES_5G + crntTime.slot - (dcr)) % (RG_NUM_SUB_FRAMES_5G);                                   \
 }
 
 #define RGCPYTIMEINFO(src, dst)  \
 }
 
 #define RGCPYTIMEINFO(src, dst)  \
-   dst.hSfn        = src.hSfn;     \
-   dst.sfn        = src.sfn;     \
-   dst.subframe   = src.subframe;
-#define RG_TIMEINFO_SAME(x, y) ((x.sfn == y.sfn) && (x.subframe == y.subframe))
+   dst.sfn    = src.sfn;     \
+   dst.slot   = src.slot;
+#define RG_TIMEINFO_SAME(x, y) ((x.sfn == y.sfn) && (x.slot == y.slot))
 
 
 #define rgPBuf(_inst)  rgCb[_inst].rgInit.prntBuf
 
 
 #define rgPBuf(_inst)  rgCb[_inst].rgInit.prntBuf
@@ -627,15 +621,15 @@ toFill.subframe = (RG_NUM_SUB_FRAMES_5G + crntTime.subframe - (dcr)) % (RG_NUM_S
 #endif
 
 #define RG_CALC_SF_DIFF(_time1, _time2)\
 #endif
 
 #define RG_CALC_SF_DIFF(_time1, _time2)\
-      (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.subframe) < (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe)?\
-     ((_time1.sfn+RG_MAX_SFN)*RG_NUM_SUB_FRAMES_5G+_time1.subframe) -\
-       (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe) : \
-     (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.subframe) - (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.subframe)
+      (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.slot) < (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot)?\
+     ((_time1.sfn+RG_MAX_SFN)*RG_NUM_SUB_FRAMES_5G+_time1.slot) -\
+       (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot) : \
+     (_time1.sfn*RG_NUM_SUB_FRAMES_5G+_time1.slot) - (_time2.sfn*RG_NUM_SUB_FRAMES_5G+_time2.slot)
 
 #define RG_TTI_CYCLE_INVLD                0xFFFFFFFF     
 #define RG_CALC_TTI_CNT(_cellCb, _ttiCnt)\
      _ttiCnt = (RG_NUM_SUB_FRAMES_5G * (_cellCb->crntTime.sfn + (_cellCb->ttiCycle * 1024)) )+\
 
 #define RG_TTI_CYCLE_INVLD                0xFFFFFFFF     
 #define RG_CALC_TTI_CNT(_cellCb, _ttiCnt)\
      _ttiCnt = (RG_NUM_SUB_FRAMES_5G * (_cellCb->crntTime.sfn + (_cellCb->ttiCycle * 1024)) )+\
-               _cellCb->crntTime.subframe;
+               _cellCb->crntTime.slot;
 #endif /* LTE_L2_MEAS */
 
 /* Tuned according to TDD Cfg Mode2 and 2UE/TTI.
 #endif /* LTE_L2_MEAS */
 
 /* Tuned according to TDD Cfg Mode2 and 2UE/TTI.
index 268ff06..0e2d065 100755 (executable)
@@ -736,9 +736,9 @@ EXTERN S16 rgTOMDatInd ARGS((
          Inst          inst,
          TfuDatIndInfo *datInd));
 
          Inst          inst,
          TfuDatIndInfo *datInd));
 
-EXTERN S16 rgTOMTtiInd ARGS((
+EXTERN S16 macProcessSlotInd ARGS((
          Inst          inst,
          Inst          inst,
-         TfuTtiIndInfo *ttiInd));
+         SlotIndInfo slotInd));
 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
 
 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
 EXTERN Void rgTOMRlsSf ARGS((Inst inst,RgDlSf *dlSf));
 
 EXTERN S16 rgSchMacSfAllocReq ARGS((Pst *pst, RgInfSfAlloc *sfInfo));
index 1d5d66d..e387cb8 100755 (executable)
@@ -554,15 +554,15 @@ RgErrInfo       *err;
                 "macCell(sfn sf): (%d %d) tbTimingInfo(sfn sf): (%d %d)\n"
                 "dlSf %p dlSf->tbs.count %d hqp %p tb %p\n",
                              hqP->tbInfo[i].pdcch.rnti,
                 "macCell(sfn sf): (%d %d) tbTimingInfo(sfn sf): (%d %d)\n"
                 "dlSf %p dlSf->tbs.count %d hqp %p tb %p\n",
                              hqP->tbInfo[i].pdcch.rnti,
-                             dlSf->schdTime.sfn, dlSf->schdTime.subframe,
-                             cellCb->crntTime.sfn, cellCb->crntTime.subframe,
+                             dlSf->schdTime.sfn, dlSf->schdTime.slot,
+                             cellCb->crntTime.sfn, cellCb->crntTime.slot,
                              hqP->tbInfo[i].timingInfo.sfn, 
                              hqP->tbInfo[i].timingInfo.sfn, 
-                             hqP->tbInfo[i].timingInfo.subframe,
+                             hqP->tbInfo[i].timingInfo.slot,
                              (Void *)dlSf, dlSf->tbs.count,
                              (Void *)hqP,
                              (Void *)hqP->tbInfo[i].tb);*/
       /* Mukesh :: in case of rpepetiton this is not rerd*/
                              (Void *)dlSf, dlSf->tbs.count,
                              (Void *)hqP,
                              (Void *)hqP->tbInfo[i].tb);*/
       /* Mukesh :: in case of rpepetiton this is not rerd*/
-      if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf)
+      if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf)
       {
          /* Check if data from RLC had been received and got muxed. */
 #ifndef L2_OPTMZ
       {
          /* Check if data from RLC had been received and got muxed. */
 #ifndef L2_OPTMZ
@@ -583,7 +583,7 @@ RgErrInfo       *err;
                /* Data not received but ta needs to be sent. */
                /* MUX TA and send it */
                bldPdu.datReq    =  NULLP;
                /* Data not received but ta needs to be sent. */
                /* MUX TA and send it */
                bldPdu.datReq    =  NULLP;
-               bldPdu.reqType   =  EVTTFUTTIIND;
+               bldPdu.reqType   =  EVENT_SLOT_IND_TO_MAC;
                bldPdu.schdTbSz  =  hqP->tbInfo[i].tbSz;
                bldPdu.ta        =  hqP->tbInfo[i].schdTa;
 #ifdef LTE_ADV
                bldPdu.schdTbSz  =  hqP->tbInfo[i].tbSz;
                bldPdu.ta        =  hqP->tbInfo[i].schdTa;
 #ifdef LTE_ADV
@@ -596,7 +596,7 @@ RgErrInfo       *err;
                   RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
                   RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                   procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
                   RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
                   RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                   procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
-                  hqP->tbInfo[i].timingInfo.subframe, hqP->procId, 
+                  hqP->tbInfo[i].timingInfo.slot, hqP->procId, 
                   hqP->tbInfo[i].pdcch.rnti);
 
                   RETVALUE(RFAILED);
                   hqP->tbInfo[i].pdcch.rnti);
 
                   RETVALUE(RFAILED);
@@ -607,7 +607,7 @@ RgErrInfo       *err;
 #ifdef LTEMAC_RGU_PAD
                /* Data not received from RLC. Padding at MAC */
                bldPdu.datReq    =  NULLP;
 #ifdef LTEMAC_RGU_PAD
                /* Data not received from RLC. Padding at MAC */
                bldPdu.datReq    =  NULLP;
-               bldPdu.reqType   =  EVTTFUTTIIND;
+               bldPdu.reqType   =  EVENT_SLOT_IND_TO_MAC;
                bldPdu.schdTbSz  =  hqP->tbInfo[i].tbSz;
                bldPdu.ta        =  hqP->tbInfo[i].schdTa;
 #ifdef LTE_ADV
                bldPdu.schdTbSz  =  hqP->tbInfo[i].tbSz;
                bldPdu.ta        =  hqP->tbInfo[i].schdTa;
 #ifdef LTE_ADV
@@ -621,7 +621,7 @@ RgErrInfo       *err;
                   RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
                   RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                   procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
                   RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
                   RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                   procId %d ueId %d", hqP->tbInfo[i].timingInfo.sfn,
-                  hqP->tbInfo[i].timingInfo.subframe, hqP->procId, 
+                  hqP->tbInfo[i].timingInfo.slot, hqP->procId, 
                   hqP->tbInfo[i].pdcch.rnti);
                   
                   RETVALUE(RFAILED);
                   hqP->tbInfo[i].pdcch.rnti);
                   
                   RETVALUE(RFAILED);
@@ -669,13 +669,13 @@ RgErrInfo       *err;
    /* MS_WORKAROUND for ccpu00122894 */
    for(i=0;i< RG_MAX_TB_PER_UE;i++)
    {
    /* MS_WORKAROUND for ccpu00122894 */
    for(i=0;i< RG_MAX_TB_PER_UE;i++)
    {
-      if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf)
+      if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf)
       {
       {
-         cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk));
-         hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node = NULLP;
+         cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk));
+         hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node = NULLP;
          
         
          
         
-        hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf = NULLP;
+        hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf = NULLP;
       }
    }
    cmLListAdd2Tail(&datInfo->pdus, &(datReq->lnk));
       }
    }
    cmLListAdd2Tail(&datInfo->pdus, &(datReq->lnk));
@@ -761,7 +761,7 @@ RgErrInfo      *err;
       {
           continue;
       }
       {
           continue;
       }
-      if (hqProc->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node == NULLP)
+      if (hqProc->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node == NULLP)
       {
          /* release corresponding TBs from SF tbs List */
          for(j=0;j<datReq->nmbOfTbs;j++)
       {
          /* release corresponding TBs from SF tbs List */
          for(j=0;j<datReq->nmbOfTbs;j++)
@@ -809,7 +809,7 @@ RgErrInfo      *err;
          RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
          RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                procId %d ueId %d", hqProc->tbInfo[i].timingInfo.sfn,
          RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst);
          RLOG4(L_ERROR, "MUXing failed for:  time: %d/%d\
                procId %d ueId %d", hqProc->tbInfo[i].timingInfo.sfn,
-               hqProc->tbInfo[i].timingInfo.subframe, hqProc->procId, 
+               hqProc->tbInfo[i].timingInfo.slot, hqProc->procId, 
                hqProc->tbInfo[i].pdcch.rnti);
 
          /* release corresponding TBs from SF tbs List */
                hqProc->tbInfo[i].pdcch.rnti);
 
          /* release corresponding TBs from SF tbs List */
@@ -900,7 +900,7 @@ RgErrInfo      *err;
       RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst); 
       RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
                procId %d ueId %d", hqProc->tbInfo[0].timingInfo.sfn,
       RLOG1(L_ERROR, "MUXing failed for:  MacInst %d", inst); 
       RLOG4(L_ERROR, "MUXing failed for: time: %d/%d\
                procId %d ueId %d", hqProc->tbInfo[0].timingInfo.sfn,
-            hqProc->tbInfo[0].timingInfo.subframe, hqProc->procId, 
+            hqProc->tbInfo[0].timingInfo.slot, hqProc->procId, 
             hqProc->tbInfo[0].pdcch.rnti);
 
       RG_FREE_MSG(datReq->pdu);
             hqProc->tbInfo[0].pdcch.rnti);
 
       RG_FREE_MSG(datReq->pdu);
@@ -954,7 +954,7 @@ RgErrInfo       *err;
    U8              ueIdx;
    U8              lcIdx;
    U8              tbIndex=0,idx1;
    U8              ueIdx;
    U8              lcIdx;
    U8              tbIndex=0,idx1;
-   RgDlSf          *dlSf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   RgDlSf          *dlSf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
    Inst            inst = cell->macInst - RG_INST_START;
 //   Bool            isDStaReqrd = FALSE;
    RgRguDedStaInd  *dStaInd[rgCb[inst].numRguSaps] ;
    Inst            inst = cell->macInst - RG_INST_START;
 //   Bool            isDStaReqrd = FALSE;
    RgRguDedStaInd  *dStaInd[rgCb[inst].numRguSaps] ;
@@ -1042,9 +1042,9 @@ RgErrInfo       *err;
 #endif
 
          hqP->numOfTBs =  allocInfo->nmbOfTBs;
 #endif
 
          hqP->numOfTBs =  allocInfo->nmbOfTBs;
-         hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node = (PTR)hqP;
-         hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sf = dlSf;
-         cmLListAdd2Tail(&dlSf->tbs,&(hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk));
+         hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node = (PTR)hqP;
+         hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sf = dlSf;
+         cmLListAdd2Tail(&dlSf->tbs,&(hqP->tbInfo[idx].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk));
          /* Changes as part of performance testing*/
          /*   hqP->numOfTBs++;*/
          hqP->tbInfo[idx].doa = allocInfo->doa;
          /* Changes as part of performance testing*/
          /*   hqP->numOfTBs++;*/
          hqP->tbInfo[idx].doa = allocInfo->doa;
@@ -1152,7 +1152,7 @@ RgErrInfo       *err;
             cStaInd->rnti      = allocInfo->rnti;
             cStaInd->lcId      = cell->dlCcchId;
             cStaInd->transId   = (timingInfo.sfn << 16) | 
             cStaInd->rnti      = allocInfo->rnti;
             cStaInd->lcId      = cell->dlCcchId;
             cStaInd->transId   = (timingInfo.sfn << 16) | 
-                                 (timingInfo.subframe << 8) | idx1;
+                                 (timingInfo.slot << 8) | idx1;
                /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
             dlSf->remDatReqCnt++;
                /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
             dlSf->remDatReqCnt++;
@@ -1245,10 +1245,10 @@ RgErrInfo       *err;
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].rnti    = allocInfo->rnti;
          /*
             dStaInd->transId = (hqP->timingInfo.sfn << 16) | 
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].rnti    = allocInfo->rnti;
          /*
             dStaInd->transId = (hqP->timingInfo.sfn << 16) | 
-            (hqP->timingInfo.subframe << 8) | hqP->procId;
+            (hqP->timingInfo.slot << 8) | hqP->procId;
           */
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].transId = (timingInfo.sfn << 16) | 
           */
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].transId = (timingInfo.sfn << 16) | 
-            (timingInfo.subframe << 8) | idx1;
+            (timingInfo.slot << 8) | idx1;
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].nmbOfTbs = hqP->numOfTBs;
 #ifdef LTE_ADV
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].fillCtrlPdu = allocInfo->fillCtrlPdu;
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].nmbOfTbs = hqP->numOfTBs;
 #ifdef LTE_ADV
          dStaInd[rguDlSpId]->staInd[dStaInd[rguDlSpId]->nmbOfUeGrantPerTti].fillCtrlPdu = allocInfo->fillCtrlPdu;
@@ -1352,10 +1352,10 @@ RgTfuDatReqPduInfo *datReq;
    for(i=0;i<RG_MAX_TB_PER_UE;i++)
    {
 #ifndef L2_OPTMZ
    for(i=0;i<RG_MAX_TB_PER_UE;i++)
    {
 #ifndef L2_OPTMZ
-      if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf) &&
+      if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf) &&
           (hqP->tbInfo[i].tb != NULLP))
 #else
           (hqP->tbInfo[i].tb != NULLP))
 #else
-      if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf) &&
+      if ((hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf) &&
            RgUtlIsTbMuxed(&(hqP->tbInfo[i].tb)))
 #endif
       {
            RgUtlIsTbMuxed(&(hqP->tbInfo[i].tb)))
 #endif
       {
@@ -1406,10 +1406,10 @@ RgTfuDatReqPduInfo *datReq;
                if(dbgBufLen == 0)
                {              
                   RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
                if(dbgBufLen == 0)
                {              
                   RLOG_ARG4(L_ERROR,DBG_CELLID,cellCb->cellId,
-                                         "RNTI:%d SFN:%d subframe:%d tbIdx:%d Sdu Length 0 ",
+                                         "RNTI:%d SFN:%d slot:%d tbIdx:%d Sdu Length 0 ",
                              datReq->rnti,
                                      hqP->tbInfo[i].timingInfo.sfn,
                              datReq->rnti,
                                      hqP->tbInfo[i].timingInfo.sfn,
-                                         hqP->tbInfo[i].timingInfo.subframe,i);
+                                         hqP->tbInfo[i].timingInfo.slot,i);
                   RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,
                              "taPres [%d] numOfTbs [%d] format[%d]",
                              datReq->isTApres, 
                   RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,
                              "taPres [%d] numOfTbs [%d] format[%d]",
                              datReq->isTApres, 
@@ -1634,7 +1634,7 @@ U32 gSaveVal;
  *     Function : RgSchMacRlsHqReq
  *     
  *     This function shall be invoked whenever scheduler is done with the
  *     Function : RgSchMacRlsHqReq
  *     
  *     This function shall be invoked whenever scheduler is done with the
- *     allocations of random access responses for a subframe.
+ *     allocations of random access responses for a slot.
  *     This shall invoke RAM to create ueCbs for all the rapIds allocated and 
  *     shall invoke MUX to create RAR PDUs for raRntis allocated.
  *     
  *     This shall invoke RAM to create ueCbs for all the rapIds allocated and 
  *     shall invoke MUX to create RAR PDUs for raRntis allocated.
  *     
index abb3014..915d8bb 100755 (executable)
@@ -116,9 +116,6 @@ Buffer  *mBuf;                      /* message buffer       */
          /* Process a config. request */
          cmUnpkLrgSchCfgReq(MacSchGenCfgReq, pst, mBuf);
          break;
          /* Process a config. request */
          cmUnpkLrgSchCfgReq(MacSchGenCfgReq, pst, mBuf);
          break;
-      case EVTMACSCHCFGREQ: 
-         cmUnpkRgrCfgReq(MacSchCfgReq, pst, mBuf);
-         break;
       case EVTLRGCNTRLREQ:
          /* Process a control request */
          cmUnpkLrgCntrlReq(RgMiLrgCntrlReq, pst, mBuf);
       case EVTLRGCNTRLREQ:
          /* Process a control request */
          cmUnpkLrgCntrlReq(RgMiLrgCntrlReq, pst, mBuf);
@@ -284,8 +281,8 @@ Buffer  *mBuf;                      /* message buffer       */
       case EVTTFUDATIND:
          cmUnpkTfuDatInd(RgLiTfuDatInd, pst, mBuf);
          break;
       case EVTTFUDATIND:
          cmUnpkTfuDatInd(RgLiTfuDatInd, pst, mBuf);
          break;
-      case EVTTFUTTIIND:
-         cmUnpkTfuTtiInd(RgLiTfuTtiInd, pst, mBuf);
+      case EVENT_SLOT_IND_TO_MAC:
+         cmUnpackSlotInd(fapiMacSlotInd, pst, mBuf);
          break;
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
       case EVTTFUNONRTIND:
          break;
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
       case EVTTFUNONRTIND:
index a393f08..eb316a5 100755 (executable)
@@ -622,7 +622,7 @@ RgCellCb  *cell;
       node = node->next;
       crntTime = cell->crntTime;
 
       node = node->next;
       crntTime = cell->crntTime;
 
-      if(cell->crntTime.sfn == 0 && (cell->crntTime.subframe % RG_NUM_SUB_FRAMES) == 0)
+      if(cell->crntTime.sfn == 0 && (cell->crntTime.slot % RG_NUM_SUB_FRAMES) == 0)
       {
          measCb->sfnCycle++;
       }
       {
          measCb->sfnCycle++;
       }
index b728ac6..4c177b1 100755 (executable)
@@ -54,7 +54,7 @@ static int RLOG_MODULE_ID=4096;
 #include "rg_sch_inf.h"           /* layer management defines for LTE-MAC */
 #include "rg_env.h"        /* customisable defines and macros for MAC */
 #include "rg.h"            /* defines and macros for MAC */
 #include "rg_sch_inf.h"           /* layer management defines for LTE-MAC */
 #include "rg_env.h"        /* customisable defines and macros for MAC */
 #include "rg.h"            /* defines and macros for MAC */
-
+#include "du_log.h"
 
 /* header/extern include files (.x) */
 #include "gen.x"           /* general layer typedefs */
 
 /* header/extern include files (.x) */
 #include "gen.x"           /* general layer typedefs */
@@ -75,6 +75,7 @@ static int RLOG_MODULE_ID=4096;
 #include "du_app_mac_inf.h"
 #include "rg.x"            /* typedefs for MAC */
 
 #include "du_app_mac_inf.h"
 #include "rg.x"            /* typedefs for MAC */
 
+#include "mac_sch_interface.h"
 /* local defines */
 
 /* local typedefs */
 /* local defines */
 
 /* local typedefs */
@@ -83,6 +84,17 @@ static int RLOG_MODULE_ID=4096;
 PRIVATE S16  rgLIMValidateSap ARGS((Inst inst,SuId suId));
 PRIVATE Void rgLIMUtlFreeDatIndEvnt ARGS((TfuDatIndInfo *datInd,
                                           Bool error));
 PRIVATE S16  rgLIMValidateSap ARGS((Inst inst,SuId suId));
 PRIVATE Void rgLIMUtlFreeDatIndEvnt ARGS((TfuDatIndInfo *datInd,
                                           Bool error));
+
+/* function pointers for packing slot ind from mac to sch */
+//S16 packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
+
+MacSchSlotIndFunc macSchSlotIndOpts[] =
+{
+   packMacSchSlotInd,  
+   macSchSlotInd,                                             
+   packMacSchSlotInd
+}; 
+
 #ifdef RG_UNUSED
 PRIVATE Void rgLIMUtlFreeDatReqEvnt ARGS((TfuDatReqInfo *datReq,
                                           Bool error));
 #ifdef RG_UNUSED
 PRIVATE Void rgLIMUtlFreeDatReqEvnt ARGS((TfuDatReqInfo *datReq,
                                           Bool error));
@@ -593,59 +605,87 @@ TfuDelDatReqInfo *delDatReq;
  *
  * @details
  *
  *
  * @details
  *
- *     Function : RgLiTfuTtiInd 
+ *     Function : sendSlotIndMacToSch
+ * 
+ *      This API is invoked by MAC to send slot ind to scheduler.
+ *           
+ *  @param[in]  SlotIndInfo    *slotInd
+ *  @return  S16
+ *      -# ROK 
+ *      -# RFAILED 
+ **/
+int sendSlotIndMacToSch(SlotIndInfo *slotInd)
+{
+   int ret = ROK;
+   /* fill Pst structure to send to lwr_mac to MAC */
+   Pst pst;
+   pst.srcProcId = 0;
+   pst.dstProcId = 0;
+   pst.srcEnt = ENTRG;
+   pst.dstEnt = ENTRG;
+   pst.srcInst = 0;
+   pst.dstInst = 1;
+   pst.event = EVENT_SLOT_IND_TO_SCH;
+   pst.region = 0;
+   pst.pool =  0;
+   pst.selector = MAC_SELECTOR_TC;
+
+   return(*macSchSlotIndOpts[pst.selector])(&pst,slotInd);
+}
+
+/**
+ * @brief Transmission time interval indication from PHY.
+ *
+ * @details
+ *
+ *     Function : fapiMacSlotInd 
  *      
  *      This API is invoked by PHY to indicate TTI indication to MAC for a cell.
  *           
  *  @param[in]  Pst            *pst
  *  @param[in]  SuId           suId 
  *      
  *      This API is invoked by PHY to indicate TTI indication to MAC for a cell.
  *           
  *  @param[in]  Pst            *pst
  *  @param[in]  SuId           suId 
- *  @param[in]  TfuTtiIndInfo  *ttiInd
+ *  @param[in]  SlotIndInfo    *slotInd
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  **/
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  **/
-#ifdef ANSI
-PUBLIC S16 RgLiTfuTtiInd 
+PUBLIC S16 fapiMacSlotInd 
 (
 Pst                 *pst, 
 (
 Pst                 *pst, 
-SuId                suId, 
-TfuTtiIndInfo       *ttiInd
+SlotIndInfo         *slotInd
 )
 )
-#else
-PUBLIC S16 RgLiTfuTtiInd(pst, suId, ttiInd)
-Pst                 *pst; 
-SuId                suId; 
-TfuTtiIndInfo       *ttiInd;
-#endif
 {
    S16              ret;
    VOLATILE U32     startTime=0;
    Inst             inst;
 
 {
    S16              ret;
    VOLATILE U32     startTime=0;
    Inst             inst;
 
-   TRC3(RgLiTfuTtiInd);
-
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
    /*starting Task*/
    SStartTask(&startTime, PID_MAC_TTI_IND);
 
    RG_IS_INST_VALID(pst->dstInst);
    inst = pst->dstInst - RG_INST_START;
    /*starting Task*/
    SStartTask(&startTime, PID_MAC_TTI_IND);
 
-#ifdef NO_ERRCLS
-   if ((ret = rgLIMValidateSap (pst->dstInst - RG_INST_START,suId)) != ROK)
+   /* send slot indication to scheduler */
+   ret = sendSlotIndMacToSch(slotInd);
+   if(ret != ROK)
    {
    {
-      RLOG_ARG0(L_ERROR,DBG_CELLID,ttiInd->cells[0].cellId,"SAP Validation failed");
+      DU_LOG("\nsending of slot ind msg from MAC to SCH failed");
       RETVALUE(ret);
    }
       RETVALUE(ret);
    }
-#endif
 
    /* Now call the TOM (Tfu ownership module) primitive to process further */
 
    /* Now call the TOM (Tfu ownership module) primitive to process further */
-   ret = rgTOMTtiInd(inst,ttiInd);
+   ret = macProcessSlotInd(inst,*slotInd);
+   if(ret != ROK)
+   {
+      DU_LOG("\nmacProcessSlotInd failed");
+      RETVALUE(ret);
+   }
 
 
    /*stoping Task*/
    SStopTask(startTime, PID_MAC_TTI_IND);
 
    RETVALUE(ret);
 
 
    /*stoping Task*/
    SStopTask(startTime, PID_MAC_TTI_IND);
 
    RETVALUE(ret);
-}  /* RgLiTfuTtiInd */
+}  /* fapiMacSlotInd */
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
  /**
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
  /**
index 7c72755..5c64f03 100755 (executable)
@@ -77,6 +77,7 @@ static int RLOG_MODULE_ID=4096;
 #include "lrg.x"           /* LRG Interface includes */
 #include "rgr.x"           /* LRG Interface includes */
 #include "du_app_mac_inf.h"
 #include "lrg.x"           /* LRG Interface includes */
 #include "rgr.x"           /* LRG Interface includes */
 #include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
 #include "rg.x"            /* MAC includes */
 #ifdef SS_DIAG
 #include "ss_diag.h"        /* Common log file */
 #include "rg.x"            /* MAC includes */
 #ifdef SS_DIAG
 #include "ss_diag.h"        /* Common log file */
@@ -139,6 +140,14 @@ packMacCellCfgConfirm packMacCellCfmOpts[] =
    duHandleMacCellCfgCfm,      /* packing for tightly coupled */
    packMacCellCfgCfm,    /* packing for light weight loosly coupled */
 };
    duHandleMacCellCfgCfm,      /* packing for tightly coupled */
    packMacCellCfgCfm,    /* packing for light weight loosly coupled */
 };
+
+SchCellCfgFunc SchCellCfgOpts[] = 
+{
+   packSchCellCfg,   /* packing for loosely coupled */
+       SchHdlCellCfgReq, /* packing for tightly coupled */
+   packSchCellCfg    /* packing for light weight loosly coupled */
+};
+
 \f
 /**
  * @brief Task Initiation callback function. 
 \f
 /**
  * @brief Task Initiation callback function. 
@@ -961,6 +970,7 @@ RgCfg *cfg;            /* Configuaration information */
    /* Initialize the timer control point */
    cmMemset((U8 *)&rgCb[inst].tmrTqCp, 0, sizeof(CmTqCp));
    rgCb[inst].tmrTqCp.tmrLen = RG_TQ_SIZE;
    /* Initialize the timer control point */
    cmMemset((U8 *)&rgCb[inst].tmrTqCp, 0, sizeof(CmTqCp));
    rgCb[inst].tmrTqCp.tmrLen = RG_TQ_SIZE;
+#if 0
    /* Timer Registration request to SSI */
    if (SRegTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst,
             (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr) != ROK)
    /* Timer Registration request to SSI */
    if (SRegTmrMt(rgCb[inst].rgInit.ent, rgCb[inst].rgInit.inst,
             (S16)rgCb[inst].genCfg.tmrRes, rgActvTmr) != ROK)
@@ -975,6 +985,7 @@ RgCfg *cfg;            /* Configuaration information */
 
       RETVALUE(LCM_REASON_MEM_NOAVAIL);
    }
 
       RETVALUE(LCM_REASON_MEM_NOAVAIL);
    }
+#endif
    /* Set Config done in TskInit */
    rgCb[inst].rgInit.cfgDone = TRUE;
 
    /* Set Config done in TskInit */
    rgCb[inst].rgInit.cfgDone = TRUE;
 
@@ -2016,50 +2027,15 @@ RgMngmt  *cfm;    /* config confirm structure  */
 #endif    
 {
    printf("\nSending Scheduler config confirm to DU APP");
 #endif    
 {
    printf("\nSending Scheduler config confirm to DU APP");
+       pst->dstEnt = ENTDUAPP;
+       pst->dstInst = 0;
+       pst->srcInst = 0;
+       pst->selector = MAC_SCH_LC_SELECTOR; 
    RgMiLrgSchCfgCfm(pst, cfm);
    
    RETVALUE(ROK);
 }
 
    RgMiLrgSchCfgCfm(pst, cfm);
    
    RETVALUE(ROK);
 }
 
-/**
- * @brief Layer Manager Configuration request handler. 
- *
- * @details
- *
- *     Function : MacSchCfgReq 
- *     
- *     This function handles the gNB and cell configuration
- *     request received from DU APP.
- *     This API unapcks and forwards the config towards SCH
- *     
- *  @param[in]  Pst           *pst
- *  @param[in]  RgrCfgTransId transId
- *  @param[in]  RgrCfgReqInfo *cfgReqInfo
- *  @return  S16
- *      -# ROK
- **/
-#ifdef ANSI
-PUBLIC S16 MacSchCfgReq 
-(
- Pst           *pst,
- RgrCfgTransId transId,
- RgrCfgReqInfo *cfgReqInfo
-)
-#else
-PUBLIC S16 MacSchCfgReq(pst, transId, cfgReqInfo)
- Pst           *pst; 
- RgrCfgTransId transId;
- RgrCfgReqInfo *cfgReqInfo;
-#endif    
-{
-   printf("\nReceived Scheduler config at MAC");
-   pst->dstInst = DEFAULT_CELLS + 1;
-   HandleSchCfgReq(pst, transId, cfgReqInfo);
-
-   RETVALUE(ROK);
-} /* end of MacSchCfgReq*/
-
 \f
 /***********************************************************
  *
 \f
 /***********************************************************
  *
@@ -2088,19 +2064,16 @@ Pst           *cfmPst
    cfmPst->srcInst   = rgCb[inst].rgInit.inst;
    cfmPst->srcProcId = rgCb[inst].rgInit.procId;
 
    cfmPst->srcInst   = rgCb[inst].rgInit.inst;
    cfmPst->srcProcId = rgCb[inst].rgInit.procId;
 
-   cfmPst->srcEnt    = reqPst->dstEnt;
-   cfmPst->dstEnt    = reqPst->srcEnt;
-   cfmPst->srcInst   = reqPst->dstInst;
-   cfmPst->dstInst   = reqPst->srcInst;
-   cfmPst->srcProcId = reqPst->dstProcId;
-   cfmPst->dstProcId = reqPst->srcProcId;
+   cfmPst->dstEnt    = ENTDUAPP;
+   cfmPst->dstInst   = 0;
+   cfmPst->dstProcId = cfmPst->srcProcId;
 
    cfmPst->selector  = LRG_SEL_LC;
    cfmPst->prior     = reqPst->prior;
    cfmPst->route     = reqPst->route;
    cfmPst->region    = reqPst->region;
    cfmPst->pool      = reqPst->pool;
 
    cfmPst->selector  = LRG_SEL_LC;
    cfmPst->prior     = reqPst->prior;
    cfmPst->route     = reqPst->route;
    cfmPst->region    = reqPst->region;
    cfmPst->pool      = reqPst->pool;
-   cfmPst->event = EVENT_MAC_CELL_CONFIG_CFM;
+   cfmPst->event     = EVENT_MAC_CELL_CONFIG_CFM;
 
    RETVOID;
 }
 
    RETVOID;
 }
@@ -2121,19 +2094,18 @@ Pst           *cfmPst
  *  @return  S16
  *      -# ROK
  **/
  *  @return  S16
  *      -# ROK
  **/
-S16 MacHdlCellCfgReq
+int MacHdlCellCfgReq
 (
  Pst           *pst,
  MacCellCfg    *macCellCfg
 )
 {
 (
  Pst           *pst,
  MacCellCfg    *macCellCfg
 )
 {
-   U16 ret = ROK;
-   MacCellCfgCfm macCellCfgCfm;
+   Pst cfmPst;
+   int ret = ROK;
    RgCellCb      *cellCb;
    RgCellCb      *cellCb;
-   Pst cnfPst;
    Inst inst = pst->dstInst;
 
    Inst inst = pst->dstInst;
 
-   cellCb = rgCb[inst].cell;
+   cmMemset((U8 *)&cfmPst, 0, sizeof(Pst));
    MAC_ALLOC(cellCb,sizeof(RgCellCb));
 
    if(cellCb == NULLP)
    MAC_ALLOC(cellCb,sizeof(RgCellCb));
 
    if(cellCb == NULLP)
@@ -2143,16 +2115,112 @@ S16 MacHdlCellCfgReq
    }
 
    memcpy(&cellCb->macCellCfg,macCellCfg,sizeof(MacCellCfg));
    }
 
    memcpy(&cellCb->macCellCfg,macCellCfg,sizeof(MacCellCfg));
-
-   macCellCfgFillCfmPst(pst,&cnfPst);
-
-   macCellCfgCfm.transId = macCellCfg->transId;
-
-   ret = (*packMacCellCfmOpts[cnfPst.selector])(&cnfPst,&macCellCfgCfm);
+   rgCb[inst].cell = cellCb;
+
+   /* Send cell cfg to scheduler */
+   ret = MacSchCellCfgReq(pst, macCellCfg);
+       if(ret != ROK)
+       {
+               MacCellCfgCfm macCellCfgCfm;
+               macCellCfgCfm.rsp = RSP_NOK;
+               macCellCfgCfm.transId = macCellCfg->transId;
+               macCellCfgFillCfmPst(pst,&cfmPst);
+               ret = (*packMacCellCfmOpts[cfmPst.selector])(&cfmPst,&macCellCfgCfm);
+       }
    return ret;
 } /* end of MacHdlCellCfgReq */
 
    return ret;
 } /* end of MacHdlCellCfgReq */
 
-\f
+/**
+ * @brief Layer Manager Configuration request handler. 
+ *
+ * @details
+ *
+ *     Function : MacSchCellCfgReq 
+ *     
+ *     This function sends cell configuration to SCH
+ *     
+ *  @param[in]  Pst           *pst
+ *  @param[in]  MacCellCfg    *macCellCfg 
+ *  @return  S16
+ *      -# ROK
+ **/
+int MacSchCellCfgReq
+(
+ Pst           *pst,
+ MacCellCfg    *macCellCfg
+)
+{
+   SchCellCfg schCellCfg;
+       Pst        cfgPst;
+       int ret;
+
+   cmMemset((U8 *)&cfgPst, 0, sizeof(Pst));
+       schCellCfg.cellId = macCellCfg->cellId;
+       schCellCfg.phyCellId = macCellCfg->phyCellId;
+       schCellCfg.bandwidth = macCellCfg->dlCarrCfg.bw;
+       schCellCfg.dupMode = macCellCfg->dupType;
+       schCellCfg.ssbPbchPwr = macCellCfg->ssbCfg.ssbPbchPwr;
+       schCellCfg.scsCommon = macCellCfg->ssbCfg.scsCmn;
+       schCellCfg.ssbOffsetPointA = macCellCfg->ssbCfg.ssbOffsetPointA;
+       schCellCfg.ssbPeriod = macCellCfg->ssbCfg.ssbPeriod;
+       schCellCfg.ssbSubcOffset = macCellCfg->ssbCfg.ssbScOffset;
+       for(uint8_t idx=0; idx<SSB_MASK_SIZE; idx++)
+       {
+      schCellCfg.nSSBMask[idx] = macCellCfg->ssbCfg.ssbMask[idx]; 
+       }
+   cfgPst.srcProcId = pst->dstProcId;
+       cfgPst.dstProcId = pst->srcProcId;
+       cfgPst.srcEnt    = ENTRG;
+       cfgPst.srcInst   = 0;
+       cfgPst.dstEnt    = ENTRG;
+       cfgPst.dstInst   = 1;
+       cfgPst.selector  = MAC_SCH_TC_SELECTOR;
+       cfgPst.event     = EVENT_SCH_CELL_CFG;
+
+       ret = (*SchCellCfgOpts[cfgPst.selector])(&cfgPst, &schCellCfg);
+       return ret;
+} /* end of MacSchCellCfgReq */
+
+/**
+ * @brief Layer Manager Configuration response handler. 
+ *
+ * @details
+ *
+ *     Function : MacProcSchCellCfgCfm
+ *     
+ *     This function processes cell configuration to SCH
+ *     
+ *  @param[in]  Pst           *pst
+ *  @param[in]  SchCellCfgCfm *schCellCfgCfm
+ *  @return  int
+ *      -# ROK
+ **/
+int MacProcSchCellCfgCfm 
+(
+ Pst           *pst,
+ SchCellCfgCfm *schCellCfgCfm
+)
+{
+   Pst cfmPst;
+   int ret;
+   RgCellCb      *cellCb;
+   MacCellCfgCfm macCellCfgCfm;
+
+   cmMemset((U8 *)&cfmPst, 0, sizeof(Pst));
+       cellCb = rgCb[pst->dstInst].cell;
+       macCellCfgCfm.transId = cellCb->macCellCfg.transId;
+       if(schCellCfgCfm->rsp == RSP_OK)
+       {
+      macCellCfgCfm.rsp = RSP_OK;
+       }
+       else
+       {
+               macCellCfgCfm.rsp = RSP_NOK;
+       }
+       macCellCfgFillCfmPst(pst,&cfmPst);
+       ret = (*packMacCellCfmOpts[cfmPst.selector])(&cfmPst,&macCellCfgCfm);
+       
+}
 /**********************************************************************
  
          End of file
 /**********************************************************************
  
          End of file
index e1605ab..fce85ce 100755 (executable)
@@ -632,7 +632,7 @@ RgErrInfo      *err;
          }
          break;
 
          }
          break;
 
-      case EVTTFUTTIIND:
+      case EVENT_SLOT_IND_TO_MAC:
          break;
       default:
          break;
          break;
       default:
          break;
@@ -931,7 +931,7 @@ RgErrInfo           *err;
          }
          break;
 
          }
          break;
 
-      case EVTTFUTTIIND:
+      case EVENT_SLOT_IND_TO_MAC:
          break;
       default:
          break;
          break;
       default:
          break;
index e3a53c7..970907b 100755 (executable)
@@ -292,7 +292,7 @@ RgErrInfo           *err;
       RETVALUE(RFAILED);
    }
 
       RETVALUE(RFAILED);
    }
 
-   idx = (timingInfo.subframe % RG_NUM_SUB_FRAMES);
+   idx = (timingInfo.slot % RG_NUM_SUB_FRAMES);
    dlSf = &cell->subFrms[idx];
 
    /* Create RAR PDUs for all the allocated RA-RNTIs */
    dlSf = &cell->subFrms[idx];
 
    /* Create RAR PDUs for all the allocated RA-RNTIs */
index f015788..6e78ce5 100755 (executable)
@@ -183,15 +183,15 @@ RgRguDedDatReq *datReq;
    for(idx = 0; idx < datReq->nmbOfUeGrantPerTti; idx++)
    {
 
    for(idx = 0; idx < datReq->nmbOfUeGrantPerTti; idx++)
    {
 
-      timingInfo.subframe = (U8)((datReq->datReq[idx].transId >> 8) & 0XFF);
+      timingInfo.slot = (U8)((datReq->datReq[idx].transId >> 8) & 0XFF);
       timingInfo.sfn = (U16)((datReq->datReq[idx].transId >> 16) & 0xFFFF);
       timingInfo.sfn = (U16)((datReq->datReq[idx].transId >> 16) & 0xFFFF);
-      sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+      sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
       if( (sf->txDone == TRUE) ||
             (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
       {
 #if (ERRCLASS & ERRCLS_DEBUG)
 
       if( (sf->txDone == TRUE) ||
             (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
       {
 #if (ERRCLASS & ERRCLS_DEBUG)
-         /* Transmission is already done for this subframe. This is a delayed
+         /* Transmission is already done for this slot. This is a delayed
           * datReq. So discard */
          rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
          rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
           * datReq. So discard */
          rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
          rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
@@ -400,7 +400,7 @@ RgRguCmnDatReq *datReq;
       /*Get the timing Info*/
       /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       /*Get the timing Info*/
       /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
-      timingInfo.subframe = (U8)((datReq->transId >> 8) & 0XFF);
+      timingInfo.slot = (U8)((datReq->transId >> 8) & 0XFF);
       timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF);
 #endif
    } 
       timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF);
 #endif
    } 
@@ -411,7 +411,7 @@ RgRguCmnDatReq *datReq;
       /*Get the timing Info*/
       /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       /*Get the timing Info*/
       /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
-      timingInfo.subframe = (U8)(datReq->transId & 0XFF);
+      timingInfo.slot = (U8)(datReq->transId & 0XFF);
       timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF);
 #endif
    }
       timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF);
 #endif
    }
@@ -429,8 +429,8 @@ RgRguCmnDatReq *datReq;
 
    /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
 
    /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
-   RG_ARRAY_BOUND_CHECK(0, cell->subFrms, (timingInfo.subframe % RG_NUM_SUB_FRAMES));
-   sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   RG_ARRAY_BOUND_CHECK(0, cell->subFrms, (timingInfo.slot % RG_NUM_SUB_FRAMES));
+   sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
    ret = rgROMUpdDlSfRemDataCnt(cell, sf);
    /*Added check for RFAILED as above function can return RFAILED*/
 
    ret = rgROMUpdDlSfRemDataCnt(cell, sf);
    /*Added check for RFAILED as above function can return RFAILED*/
@@ -500,15 +500,15 @@ RgErrInfo      *err;
       }
    }
 
       }
    }
 
-   timingInfo.subframe = (U8)((datReq->transId >> 8) & 0XFF);
+   timingInfo.slot = (U8)((datReq->transId >> 8) & 0XFF);
    timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF);
    timingInfo.sfn = (U16)((datReq->transId >> 16) & 0xFFFF);
-   sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
    if( (sf->txDone == TRUE) ||
        (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
    {
 #if (ERRCLASS & ERRCLS_DEBUG)
 
    if( (sf->txDone == TRUE) ||
        (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
    {
 #if (ERRCLASS & ERRCLS_DEBUG)
-      /* Transmission is already done for this subframe. This is a delayed
+      /* Transmission is already done for this slot. This is a delayed
        * datReq. So discard */
       rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
       rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
        * datReq. So discard */
       rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
       rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
@@ -588,15 +588,15 @@ RgErrInfo      *err;
    TRC2(rgROMHndlBcchPcchDatReq);
 
 
    TRC2(rgROMHndlBcchPcchDatReq);
 
 
-   timingInfo.subframe = (U8)(datReq->transId & 0XFF);
+   timingInfo.slot = (U8)(datReq->transId & 0XFF);
    timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF);
    timingInfo.sfn = (U16)((datReq->transId >> 8) & 0xFFFF);
-   sf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   sf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
    if( (sf->txDone == TRUE) ||
        (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
    {
 #if (ERRCLASS & ERRCLS_DEBUG)
 
    if( (sf->txDone == TRUE) ||
        (!RG_TIMEINFO_SAME(sf->schdTime,timingInfo)))
    {
 #if (ERRCLASS & ERRCLS_DEBUG)
-      /* Transmission is already done for this subframe. This is a delayed
+      /* Transmission is already done for this slot. This is a delayed
        * datReq. So discard */
       rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
       rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
        * datReq. So discard */
       rgFillDgnParams(inst,&dgn, LRG_USTA_DGNVAL_MEM);
       rgLMMStaInd(inst,LCM_CATEGORY_PROTOCOL, LCM_EVENT_UI_INV_EVT,
@@ -610,7 +610,7 @@ RgErrInfo      *err;
    bcch = rgDBMGetBcchOnDlsch(cell,datReq->lcId);
    if (bcch )
    {
    bcch = rgDBMGetBcchOnDlsch(cell,datReq->lcId);
    if (bcch )
    {
-      /* Store BCCH-DLSCH data received in Scheduled subframe */
+      /* Store BCCH-DLSCH data received in Scheduled slot */
       sf->bcch.tb = datReq->pdu;
 
       SCpyMsgMsg(datReq->pdu, RG_GET_MEM_REGION(rgCb[inst]),
       sf->bcch.tb = datReq->pdu;
 
       SCpyMsgMsg(datReq->pdu, RG_GET_MEM_REGION(rgCb[inst]),
@@ -622,7 +622,7 @@ RgErrInfo      *err;
    bch = rgDBMGetBcchOnBch(cell);
    if ((bch) && (bch->lcId == datReq->lcId))
    {
    bch = rgDBMGetBcchOnBch(cell);
    if ((bch) && (bch->lcId == datReq->lcId))
    {
-      /* Store BCH data received in Scheduled subframe */
+      /* Store BCH data received in Scheduled slot */
       sf->bch.tb = datReq->pdu;
       RETVALUE(ROK);
    }
       sf->bch.tb = datReq->pdu;
       RETVALUE(ROK);
    }
@@ -631,7 +631,7 @@ RgErrInfo      *err;
    pcch = rgDBMGetPcch(cell);
    if ((pcch) && (pcch->lcId == datReq->lcId))
    {
    pcch = rgDBMGetPcch(cell);
    if ((pcch) && (pcch->lcId == datReq->lcId))
    {
-      /* Store PCCH-DLSCH data received in Scheduled subframe */
+      /* Store PCCH-DLSCH data received in Scheduled slot */
       sf->pcch.tb = datReq->pdu;
       RETVALUE(ROK);
    }
       sf->pcch.tb = datReq->pdu;
       RETVALUE(ROK);
    }
@@ -966,7 +966,7 @@ RgErrInfo      *err;
 
       nextBchSfn = (cell->crntTime.sfn + 4 - (cell->crntTime.sfn%4)) % RG_MAX_SFN;
       if ((staRsp->u.timeToTx.sfn != nextBchSfn) ||
 
       nextBchSfn = (cell->crntTime.sfn + 4 - (cell->crntTime.sfn%4)) % RG_MAX_SFN;
       if ((staRsp->u.timeToTx.sfn != nextBchSfn) ||
-         ((staRsp->u.timeToTx.sfn == cell->crntTime.sfn) && (cell->crntTime.subframe >= 7)))
+         ((staRsp->u.timeToTx.sfn == cell->crntTime.sfn) && (cell->crntTime.slot >= 7)))
       {
         RETVALUE(ROK);
       }
       {
         RETVALUE(ROK);
       }
@@ -1053,7 +1053,7 @@ RgDlSf         *dlSf;
       if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err))
       {
          RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,
       if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err))
       {
          RLOG_ARG0(L_ERROR,DBG_CELLID,cellCb->cellId,
-               "Unable to process downlink subframe for cell");
+               "Unable to process downlink slot for cell");
          err.errType = RGERR_ROM_DEDDATREQ;
       }
 
          err.errType = RGERR_ROM_DEDDATREQ;
       }
 
index d002191..dd3b1e0 100755 (executable)
@@ -97,7 +97,7 @@ RgUeCb            *prevUeCb,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
-U8                subframe
+U16               slot
 ));
 
 PRIVATE S16 rgTOMProcCCCHSduInDatInd ARGS((
 ));
 
 PRIVATE S16 rgTOMProcCCCHSduInDatInd ARGS((
@@ -106,7 +106,7 @@ RgUeCb            *prevUeCb,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
-U8                subframe
+U16               slot
 ));
 
 PUBLIC S16 rgHndlFlowCntrl
 ));
 
 PUBLIC S16 rgHndlFlowCntrl
@@ -445,9 +445,9 @@ PUBLIC S16 rgTOMUtlProcDlSf (dlSf, cellCb, err)
       RGADDTOCRNTTIME(dlSf->schdTime, datInfo->timingInfo, TFU_DLDATA_DLDELTA);
 #endif
       datInfo->cellId = cellCb->cellId;
       RGADDTOCRNTTIME(dlSf->schdTime, datInfo->timingInfo, TFU_DLDATA_DLDELTA);
 #endif
       datInfo->cellId = cellCb->cellId;
-      if((0 == (datInfo->timingInfo.sfn % 30)) && (0 == datInfo->timingInfo.subframe))
+      if((0 == (datInfo->timingInfo.sfn % 30)) && (0 == datInfo->timingInfo.slot))
       {
       {
-        //printf("5GTF_CHECK rgTOMUtlProcDlSf dat (%d : %d)\n", datInfo->timingInfo.sfn, datInfo->timingInfo.subframe);
+        //printf("5GTF_CHECK rgTOMUtlProcDlSf dat (%d : %d)\n", datInfo->timingInfo.sfn, datInfo->timingInfo.slot);
       }
 #ifdef TFU_ALLOC_EVENT_NO_INIT
       datInfo->bchDat.pres = 0;
       }
 #ifdef TFU_ALLOC_EVENT_NO_INIT
       datInfo->bchDat.pres = 0;
@@ -500,12 +500,12 @@ U32  rgMacGT;
  *
  * @details
  *
  *
  * @details
  *
- *     Function: rgTOMTtiInd
+ *     Function: macProcessSlotInd
  *
  *
- *     Handler for processing TTI indication recieved from PHY
+ *     Handler for processing slot indication recieved from PHY
  *     for a cell.
  *
  *     for a cell.
  *
- *     Invoked by: RgLiTfuTtiInd
+ *     Invoked by: macProcessSlotInd
  *
  *     Processing Steps:
  *     - Get cell and update the cell's current time with the timing value given
  *
  *     Processing Steps:
  *     - Get cell and update the cell's current time with the timing value given
@@ -529,7 +529,7 @@ U32  rgMacGT;
  *     - Invoke COM's TTI handler rgCOMTtiHndlr
  *           
  *  @param[in]  Inst        inst
  *     - Invoke COM's TTI handler rgCOMTtiHndlr
  *           
  *  @param[in]  Inst        inst
- *  @param[in] TfuTtiIndInfo *ttiInd
+ *  @param[in] SlotIndInfo slotInd
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
  *  @return  S16
  *      -# ROK 
  *      -# RFAILED 
@@ -537,17 +537,11 @@ U32  rgMacGT;
 #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF))
 pthread_t gMacTId = 0;
 #endif
 #if (defined (MAC_FREE_RING_BUF) || defined (RLC_FREE_RING_BUF))
 pthread_t gMacTId = 0;
 #endif
-#ifdef ANSI
-PUBLIC S16 rgTOMTtiInd
+PUBLIC S16 macProcessSlotInd
 (
 Inst          inst,
 (
 Inst          inst,
-TfuTtiIndInfo *ttiInfo
+SlotIndInfo slotInd
 )
 )
-#else
-PUBLIC S16 rgTOMTtiInd(inst, ttiInfo)
-Inst               inst;
-TfuTtiIndInfo      *ttiInfo;
-#endif
 {
    RgCellCb             *cellCb;
    RgErrInfo            err;
 {
    RgCellCb             *cellCb;
    RgErrInfo            err;
@@ -557,35 +551,30 @@ TfuTtiIndInfo      *ttiInfo;
    RgDlSf               *prevDlSf;
    CmLteTimingInfo       prevTmInfo;  
 #endif
    RgDlSf               *prevDlSf;
    CmLteTimingInfo       prevTmInfo;  
 #endif
-   TfuTtiCellInfo       *ttiInd = &ttiInfo->cells[0];
+   //SlotIndInfo *slotInd = &ttiInfo->cells[0];
 
 
-   TRC2(rgTOMTtiInd);
+   TRC2(macProcessSlotInd);
 
 #ifdef MAC_FREE_RING_BUF
    gMacTId = pthread_self();
 #endif
 
 #ifdef MAC_FREE_RING_BUF
    gMacTId = pthread_self();
 #endif
+
    cellCb = rgCb[inst].cell;
    cellCb = rgCb[inst].cell;
-   if ((cellCb == NULLP)
-      ||(cellCb->cellId != ttiInd->cellId))
+   if (cellCb == NULLP)
    {
    {
-      
-      RLOG_ARG0(L_ERROR,DBG_CELLID,ttiInd->cellId, 
-               "Unable to get the cellCb for cell");
       err.errType = RGERR_TOM_TTIIND;
       err.errCause = RGERR_TOM_INV_CELL_ID;
       RETVALUE(RFAILED);
    }
       err.errType = RGERR_TOM_TTIIND;
       err.errCause = RGERR_TOM_INV_CELL_ID;
       RETVALUE(RFAILED);
    }
-   RGCPYTIMEINFO(ttiInd->timingInfo, cellCb->crntTime);
-   if((0 == (ttiInd->timingInfo.sfn % 30)) && (0 == ttiInd->timingInfo.sfn))
-   {
-      //printf("5GTF_CHECK rgTOMTtiInd (%d : %d)\n", ttiInd->timingInfo.sfn, ttiInd->timingInfo.subframe);
-   }
-   rgMacGT = (ttiInd->timingInfo.sfn * RG_NUM_SUB_FRAMES_5G) + ttiInd->timingInfo.subframe;
+
+   RGCPYTIMEINFO(slotInd, cellCb->crntTime);
+
+   rgMacGT = (slotInd.sfn * RG_NUM_SUB_FRAMES_5G) + slotInd.slot;
 #ifdef LTE_L2_MEAS
    rgL2Meas(cellCb);
    /*Included to track the number of 10240 cycles completed */
 
 #ifdef LTE_L2_MEAS
    rgL2Meas(cellCb);
    /*Included to track the number of 10240 cycles completed */
 
-  if((cellCb->crntTime.sfn == 0) && (cellCb->crntTime.subframe==0))
+  if((cellCb->crntTime.sfn == 0) && (cellCb->crntTime.slot==0))
   {
      cellCb->ttiCycle += 1;
   }
   {
      cellCb->ttiCycle += 1;
   }
@@ -597,8 +586,8 @@ TfuTtiIndInfo      *ttiInfo;
      and thus we would not have transmitted previous DL SF yet.*/
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
      and thus we would not have transmitted previous DL SF yet.*/
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
-   RGSUBFRMCRNTTIME(ttiInd->timingInfo, prevTmInfo, 1);
-   prevDlSf = &cellCb->subFrms[(prevTmInfo.subframe % RG_NUM_SUB_FRAMES)];
+   RGSUBFRMCRNTTIME(slotInd, prevTmInfo, 1);
+   prevDlSf = &cellCb->subFrms[(prevTmInfo.slot % RG_NUM_SUB_FRAMES)];
    if(FALSE == prevDlSf->txDone)
    {
       if (ROK != rgTOMUtlProcDlSf (prevDlSf, cellCb, &err))
    if(FALSE == prevDlSf->txDone)
    {
       if (ROK != rgTOMUtlProcDlSf (prevDlSf, cellCb, &err))
@@ -622,10 +611,10 @@ TfuTtiIndInfo      *ttiInfo;
       }
    }
 #endif
       }
    }
 #endif
-   dlSf = &cellCb->subFrms[(ttiInd->timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   dlSf = &cellCb->subFrms[(slotInd.slot % RG_NUM_SUB_FRAMES)];
 
    if((dlSf->txDone == TRUE) ||
 
    if((dlSf->txDone == TRUE) ||
-      (!RG_TIMEINFO_SAME(ttiInd->timingInfo,dlSf->schdTime)))
+      (!RG_TIMEINFO_SAME(slotInd,dlSf->schdTime)))
    {
    /* MS_WORKAROUND */
 #ifndef LTEMAC_DLUE_TMGOPTMZ
    {
    /* MS_WORKAROUND */
 #ifndef LTEMAC_DLUE_TMGOPTMZ
@@ -637,7 +626,7 @@ TfuTtiIndInfo      *ttiInfo;
          RGADDTOCRNTTIME(cellCb->crntTime, timingInfo, TFU_DELTA);
 #endif
      /* Fill Data Request from MAC for BCH  */
          RGADDTOCRNTTIME(cellCb->crntTime, timingInfo, TFU_DELTA);
 #endif
      /* Fill Data Request from MAC for BCH  */
-     if ((timingInfo.sfn % 4 == 0) && (timingInfo.subframe == 0))
+     if ((timingInfo.sfn % 4 == 0) && (timingInfo.slot == 0))
      {
          if (ROK != rgAllocEventMem(inst,(Ptr *)&datInfo, 
                             sizeof(TfuDatReqInfo)))
      {
          if (ROK != rgAllocEventMem(inst,(Ptr *)&datInfo, 
                             sizeof(TfuDatReqInfo)))
@@ -688,17 +677,17 @@ TfuTtiIndInfo      *ttiInfo;
 #endif
 
 #ifdef XEON_SPECIFIC_CHANGES
 #endif
 
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((ttiInd->timingInfo.subframe % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_BR_PRC);
+   CM_MEAS_TIME((slotInd.slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_BR_PRC);
 #endif
 
    if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err))
    {
 #endif
 
    if (ROK != rgTOMUtlProcDlSf (dlSf, cellCb, &err))
    {
-      RLOG_ARG0(L_ERROR,DBG_CELLID,ttiInd->cellId,
-                     "Unable to process downlink subframe for cell");
+      //RLOG_ARG0(L_ERROR,DBG_CELLID,slotInd->cellId,
+      //             "Unable to process downlink subframe for cell");
       err.errType = RGERR_TOM_TTIIND;
    }
 #ifdef XEON_SPECIFIC_CHANGES
       err.errType = RGERR_TOM_TTIIND;
    }
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((ttiInd->timingInfo.subframe % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_AFTER_PRC);
+   CM_MEAS_TIME((slotInd->slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_DL_AFTER_PRC);
 #endif
 
    /* Mark this frame as sent */
 #endif
 
    /* Mark this frame as sent */
@@ -710,7 +699,7 @@ TfuTtiIndInfo      *ttiInfo;
    rgDHMFreeTbBufs(inst);
 #endif 
    RETVALUE(ROK);
    rgDHMFreeTbBufs(inst);
 #endif 
    RETVALUE(ROK);
-}  /* rgTOMTtiInd */
+}  /* macProcessSlotInd */
 
 /** @brief This function allocates the RgMacPdu that will be populated by DEMUX
  * with the SubHeaders list and the values of the Control elements.
 
 /** @brief This function allocates the RgMacPdu that will be populated by DEMUX
  * with the SubHeaders list and the values of the Control elements.
@@ -962,7 +951,7 @@ PRIVATE S16 rgTomUtlPrepareL2MUlThrpInfo(cellCb,ueCb,dDatInd)
    }
 
    RETVALUE(ROK);
    }
 
    RETVALUE(ROK);
-}  /* rgTOMTtiInd */
+}
 
 #endif
 
 
 #endif
 
@@ -1006,18 +995,18 @@ PRIVATE S16 rgTOMUtlProcMsg
  Bool          isSpsRnti,
  Bool          *spsToBeActvtd,
  U16           *sduSize,
  Bool          isSpsRnti,
  Bool          *spsToBeActvtd,
  U16           *sduSize,
- U8            subframe,
+ U16           slot,
  U32           *lcgBytes
  )
 #else
  U32           *lcgBytes
  )
 #else
-PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,spsToBeActvtd,sduSize, subframe, lcgBytes)
+PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,spsToBeActvtd,sduSize, slot, lcgBytes)
    RgCellCb      *cellCb; 
    RgUeCb        *ueCb;
    RgMacPdu      *pdu;
    Bool          isSpsRnti;
    Bool          *spsToBeActvtd;
    U16           *sduSize;
    RgCellCb      *cellCb; 
    RgUeCb        *ueCb;
    RgMacPdu      *pdu;
    Bool          isSpsRnti;
    Bool          *spsToBeActvtd;
    U16           *sduSize;
-   U8            subframe;
+   U16           slot;
    U32           *lcgBytes;
 #endif   
 #else /* LTEMAC_SPS */
    U32           *lcgBytes;
 #endif   
 #else /* LTEMAC_SPS */
@@ -1027,15 +1016,15 @@ PRIVATE S16 rgTOMUtlProcMsg
  RgCellCb      *cellCb, 
  RgUeCb        *ueCb,
  RgMacPdu      *pdu,
  RgCellCb      *cellCb, 
  RgUeCb        *ueCb,
  RgMacPdu      *pdu,
- U8            subframe,
+ U16           slot,
  U32           *lcgBytes
  )
 #else
  U32           *lcgBytes
  )
 #else
-PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, subframe, lcgBytes)
+PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, slot, lcgBytes)
    RgCellCb      *cellCb; 
    RgUeCb        *ueCb;
    RgMacPdu      *pdu;
    RgCellCb      *cellCb; 
    RgUeCb        *ueCb;
    RgMacPdu      *pdu;
-   U8            subframe;
+   U16           slot;
    U32           *lcgByes;
 #endif  
 #endif
    U32           *lcgByes;
 #endif  
 #endif
@@ -1088,7 +1077,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, subframe, lcgBytes)
    TRC2(rgTOMUtlProcMsg)
 
 #ifndef LTE_L2_MEAS      
    TRC2(rgTOMUtlProcMsg)
 
 #ifndef LTE_L2_MEAS      
-      UNUSED(subframe);
+      UNUSED(slot);
 #endif
 
    if(pdu->sduLst.first)
 #endif
 
    if(pdu->sduLst.first)
@@ -1118,7 +1107,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, subframe, lcgBytes)
                         &cpySz);
          }
 #ifdef XEON_SPECIFIC_CHANGES
                         &cpySz);
          }
 #ifdef XEON_SPECIFIC_CHANGES
-         CM_LOG_DEBUG(CM_LOG_ID_MAC, "CCCH SDU of size(%d) received for UE(%d) CRES[0x%x 0x%x 0x%x 0x%x 0x%x 0x%x] Time[%d %d]\n",  ((S16)ccchSz), ueCb->ueId,ueCb->contResId.resId[0], ueCb->contResId.resId[1], ueCb->contResId.resId[2], ueCb->contResId.resId[3], ueCb->contResId.resId[4], ueCb->contResId.resId[5], cellCb->crntTime.sfn,  cellCb->crntTime.subframe);
+         CM_LOG_DEBUG(CM_LOG_ID_MAC, "CCCH SDU of size(%d) received for UE(%d) CRES[0x%x 0x%x 0x%x 0x%x 0x%x 0x%x] Time[%d %d]\n",  ((S16)ccchSz), ueCb->ueId,ueCb->contResId.resId[0], ueCb->contResId.resId[1], ueCb->contResId.resId[2], ueCb->contResId.resId[3], ueCb->contResId.resId[4], ueCb->contResId.resId[5], cellCb->crntTime.sfn,  cellCb->crntTime.slot);
 #endif
          sdu->mBuf = NULLP;
          rgUIMSndCmnDatInd(inst,cellCb->rguUlSap,cDatInd);
 #endif
          sdu->mBuf = NULLP;
          rgUIMSndCmnDatInd(inst,cellCb->rguUlSap,cDatInd);
@@ -1144,7 +1133,7 @@ PRIVATE S16 rgTOMUtlProcMsg(cellCb, ueCb, pdu, subframe, lcgBytes)
       dDatInd->numLch   = 0;
    }
 #ifdef LTE_L2_MEAS
       dDatInd->numLch   = 0;
    }
 #ifdef LTE_L2_MEAS
-   ulSf = &cellCb->ulSf[(subframe % RG_NUM_SUB_FRAMES)];
+   ulSf = &cellCb->ulSf[(slot % RG_NUM_SUB_FRAMES)];
    if(ulSf->ueUlAllocInfo != NULLP)
    {
      for(idx1 = 0; idx1 < ulSf->numUe; idx1++)
    if(ulSf->ueUlAllocInfo != NULLP)
    {
      for(idx1 = 0; idx1 < ulSf->numUe; idx1++)
@@ -1511,7 +1500,7 @@ Inst             inst;
    CmLList           *node;
    TfuDatInfo        *datInfo;
    RgLowSapCb        *tfuSap;
    CmLList           *node;
    TfuDatInfo        *datInfo;
    RgLowSapCb        *tfuSap;
-   U8                subframe;
+   U16               slot;
 #ifdef LTEMAC_SPS
    Bool              isSpsRnti=FALSE;
    Pst               schPst1;  
 #ifdef LTEMAC_SPS
    Bool              isSpsRnti=FALSE;
    Pst               schPst1;  
@@ -1566,7 +1555,7 @@ Inst             inst;
    cmLListInit(&sfInfo->ueLst);
    sfInfo->cellId = datInd->cellId;
    sfInfo->timingInfo = datInd->timingInfo;
    cmLListInit(&sfInfo->ueLst);
    sfInfo->cellId = datInd->cellId;
    sfInfo->timingInfo = datInd->timingInfo;
-   subframe = datInd->timingInfo.subframe;
+   slot = datInd->timingInfo.slot;
 
    node =  datInd->datIndLst.first;
    for (;node; node=node->next)
 
    node =  datInd->datIndLst.first;
    for (;node; node=node->next)
@@ -1622,7 +1611,7 @@ Inst             inst;
       if (ceInfo.bitMask & RG_CCCH_SDU_PRSNT)
       {
         ret = rgTOMProcCCCHSduInDatInd(pdu, prevUeCb, \
       if (ceInfo.bitMask & RG_CCCH_SDU_PRSNT)
       {
         ret = rgTOMProcCCCHSduInDatInd(pdu, prevUeCb, \
-                cellCb, datInfo, &ceInfo, subframe);
+                cellCb, datInfo, &ceInfo, slot);
         if (ret == RFAILED)
         {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
         if (ret == RFAILED)
         {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
@@ -1635,7 +1624,7 @@ Inst             inst;
       else if (ceInfo.bitMask & RG_CRNTI_CE_PRSNT)
       {
         ret = rgTOMProcCrntiCEInDatInd(pdu, prevUeCb, \
       else if (ceInfo.bitMask & RG_CRNTI_CE_PRSNT)
       {
         ret = rgTOMProcCrntiCEInDatInd(pdu, prevUeCb, \
-                cellCb, datInfo, &ceInfo, subframe);
+                cellCb, datInfo, &ceInfo, slot);
         if (ret == RFAILED)
         {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
         if (ret == RFAILED)
         {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
@@ -1697,9 +1686,9 @@ Inst             inst;
      rgTOML2MCompileActiveLCs (cellCb, ueCb, pdu, &ceInfo);
 #endif
 #ifdef LTEMAC_SPS
      rgTOML2MCompileActiveLCs (cellCb, ueCb, pdu, &ceInfo);
 #endif
 #ifdef LTEMAC_SPS
-         if ((ret = rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,&spsToBeActvtd,&sduSize, subframe, (U32 *)&lcgBytes)) != ROK)
+         if ((ret = rgTOMUtlProcMsg(cellCb, ueCb, pdu, isSpsRnti,&spsToBeActvtd,&sduSize, slot, (U32 *)&lcgBytes)) != ROK)
 #else
 #else
-         if ((ret = rgTOMUtlProcMsg (cellCb, ueCb, pdu, subframe, (U32 *)&lcgBytes)) != ROK)
+         if ((ret = rgTOMUtlProcMsg (cellCb, ueCb, pdu, slot, (U32 *)&lcgBytes)) != ROK)
 #endif /* LTEMAC_SPS */
          {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
 #endif /* LTEMAC_SPS */
          {
             rgTOMUtlFreePduEvnt (pdu, TRUE);
@@ -1728,12 +1717,12 @@ Inst             inst;
    }
    /* Free the allocated memory for ueUlAllocInfo here */
 #ifdef LTE_L2_MEAS
    }
    /* Free the allocated memory for ueUlAllocInfo here */
 #ifdef LTE_L2_MEAS
-   if(cellCb->ulSf[(subframe % RG_NUM_SUB_FRAMES)].ueUlAllocInfo != NULLP)
+   if(cellCb->ulSf[(slot % RG_NUM_SUB_FRAMES)].ueUlAllocInfo != NULLP)
    {
       /*ccpu00117052 - MOD - Passing double for proper NULLP
                              assignment */
    {
       /*ccpu00117052 - MOD - Passing double for proper NULLP
                              assignment */
-      rgFreeSBuf(inst,(Data **)&(cellCb->ulSf[(subframe % RG_NUM_SUB_FRAMES)].ueUlAllocInfo), 
-      ((cellCb->ulSf[(subframe % RG_NUM_SUB_FRAMES)].numUe) * sizeof(RgUeUlAlloc)));
+      rgFreeSBuf(inst,(Data **)&(cellCb->ulSf[(slot % RG_NUM_SUB_FRAMES)].ueUlAllocInfo), 
+      ((cellCb->ulSf[(slot % RG_NUM_SUB_FRAMES)].numUe) * sizeof(RgUeUlAlloc)));
    }
 #endif
    /* RRM_RBC_X */
    }
 #endif
    /* RRM_RBC_X */
@@ -1811,7 +1800,7 @@ RgErrInfo           *err;
 
    TRC2(rgHndlCmnChnl)
 
 
    TRC2(rgHndlCmnChnl)
 
-   dlSf = &cell->subFrms[(timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   dlSf = &cell->subFrms[(timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
    if(cmnLcInfo->bitMask & RGINF_BCH_INFO)
    {
 
    if(cmnLcInfo->bitMask & RGINF_BCH_INFO)
    {
@@ -1835,7 +1824,7 @@ RgErrInfo           *err;
       staInd->cellId = cell->cellId;
       staInd->rnti   = RG_INVALID_RNTI;
       staInd->lcId   = cmnLcInfo->bchInfo.lcId;
       staInd->cellId = cell->cellId;
       staInd->rnti   = RG_INVALID_RNTI;
       staInd->lcId   = cmnLcInfo->bchInfo.lcId;
-      staInd->transId = (timingInfo.sfn << 8) | (timingInfo.subframe);
+      staInd->transId = (timingInfo.sfn << 8) | (timingInfo.slot);
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       dlSf->remDatReqCnt++;
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       dlSf->remDatReqCnt++;
@@ -1879,7 +1868,7 @@ RgErrInfo           *err;
       staInd->cellId = cell->cellId;
       staInd->rnti   = RG_INVALID_RNTI;
       staInd->lcId   = cmnLcInfo->pcchInfo.lcId;
       staInd->cellId = cell->cellId;
       staInd->rnti   = RG_INVALID_RNTI;
       staInd->lcId   = cmnLcInfo->pcchInfo.lcId;
-      staInd->transId = (timingInfo.sfn << 8) | (timingInfo.subframe);
+      staInd->transId = (timingInfo.sfn << 8) | (timingInfo.slot);
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       dlSf->remDatReqCnt++;
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
       dlSf->remDatReqCnt++;
@@ -1921,7 +1910,7 @@ RgErrInfo           *err;
          staInd->cellId = cell->cellId;
          staInd->rnti   = RG_INVALID_RNTI;
          staInd->lcId   = cmnLcInfo->bcchInfo.lcId;
          staInd->cellId = cell->cellId;
          staInd->rnti   = RG_INVALID_RNTI;
          staInd->lcId   = cmnLcInfo->bcchInfo.lcId;
-         staInd->transId = (timingInfo.sfn << 8) | (timingInfo.subframe);
+         staInd->transId = (timingInfo.sfn << 8) | (timingInfo.slot);
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
          dlSf->remDatReqCnt++;
 /* ADD Changes for Downlink UE Timing Optimization */
 #ifdef LTEMAC_DLUE_TMGOPTMZ
          dlSf->remDatReqCnt++;
@@ -2038,7 +2027,7 @@ RgInfUlUeInfo       *ueInfo;
 
    TRC2(rgHndlUlUeInfo)
    
 
    TRC2(rgHndlUlUeInfo)
    
-   ulSf = &cell->ulSf[(timingInfo.subframe % RGSCH_NUM_SUB_FRAMES)];
+   ulSf = &cell->ulSf[(timingInfo.slot % RGSCH_NUM_SUB_FRAMES)];
 
    /* rg003.301-MOD- Corrected the purifier memory leak */
    if (ulSf->numUe != ueInfo->numUes)
 
    /* rg003.301-MOD- Corrected the purifier memory leak */
    if (ulSf->numUe != ueInfo->numUes)
@@ -2050,22 +2039,22 @@ RgInfUlUeInfo       *ueInfo;
       }
    }
 #ifdef XEON_SPECIFIC_CHANGES
       }
    }
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((cell->crntTime.subframe % RGSCH_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MEAS_FREE);
-   CM_ADD_INFO((cell->crntTime.subframe % RGSCH_NUM_SUB_FRAMES),  CM_DBG_MEAS_FREE, ulSf->numUe);
+   CM_MEAS_TIME((cell->crntTime.slot % RGSCH_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MEAS_FREE);
+   CM_ADD_INFO((cell->crntTime.slot % RGSCH_NUM_SUB_FRAMES),  CM_DBG_MEAS_FREE, ulSf->numUe);
 #endif
    ulSf->numUe         = ueInfo->numUes;
    if((ulSf->ueUlAllocInfo == NULLP) && (ueInfo->numUes > 0))
    {
        /* Allocate memory for ulAllocInfo */
 #endif
    ulSf->numUe         = ueInfo->numUes;
    if((ulSf->ueUlAllocInfo == NULLP) && (ueInfo->numUes > 0))
    {
        /* Allocate memory for ulAllocInfo */
-       if((ret = rgAllocSBuf(inst,(Data**)&(cell->ulSf[(timingInfo.subframe % RGSCH_NUM_SUB_FRAMES)].
+       if((ret = rgAllocSBuf(inst,(Data**)&(cell->ulSf[(timingInfo.slot % RGSCH_NUM_SUB_FRAMES)].
                  ueUlAllocInfo), ueInfo->numUes *  sizeof(RgUeUlAlloc))) != ROK)
        {
           RETVALUE(ret);
        }
    }
 #ifdef XEON_SPECIFIC_CHANGES
                  ueUlAllocInfo), ueInfo->numUes *  sizeof(RgUeUlAlloc))) != ROK)
        {
           RETVALUE(ret);
        }
    }
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((cell->crntTime.subframe % RGSCH_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MEAS_ALLOC);
-   CM_ADD_INFO((cell->crntTime.subframe % RGSCH_NUM_SUB_FRAMES), CM_DBG_MEAS_ALLOC, ueInfo->numUes);
+   CM_MEAS_TIME((cell->crntTime.slot % RGSCH_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MEAS_ALLOC);
+   CM_ADD_INFO((cell->crntTime.slot % RGSCH_NUM_SUB_FRAMES), CM_DBG_MEAS_ALLOC, ueInfo->numUes);
 #endif
    if (ulSf->ueUlAllocInfo != NULLP)
    {
 #endif
    if (ulSf->ueUlAllocInfo != NULLP)
    {
@@ -2162,13 +2151,13 @@ RgDlSf              *dlSf;
           {
                     for(i=0;i< RG_MAX_TB_PER_UE;i++)
                     {
           {
                     for(i=0;i< RG_MAX_TB_PER_UE;i++)
                     {
-                                   if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf == dlSf)
+                                   if (hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf == dlSf)
                                    {
                                    {
-                                            cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk));
-                                            hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sfLnk.node = NULLP;
+                                            cmLListDelFrm(&dlSf->tbs, &(hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk));
+                                            hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sfLnk.node = NULLP;
                     printf("\n rgTOMRlsSf:: hqP %p \n", (Void *)hqP);
                                    }
                     printf("\n rgTOMRlsSf:: hqP %p \n", (Void *)hqP);
                                    }
-                                   hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.subframe % 2].sf = NULLP;
+                                   hqP->tbInfo[i].sfLnkInfo[dlSf->schdTime.slot % 2].sf = NULLP;
                           }
                        }
         }
                           }
                        }
         }
@@ -2302,7 +2291,7 @@ RgInfSfAlloc        *sfInfo;
       RETVALUE(RFAILED);
    }
 
       RETVALUE(RFAILED);
    }
 
-   dlSf = &cell->subFrms[(sfInfo->timingInfo.subframe % RG_NUM_SUB_FRAMES)];
+   dlSf = &cell->subFrms[(sfInfo->timingInfo.slot % RG_NUM_SUB_FRAMES)];
 
    rgTOMRlsSf(inst,dlSf);
    dlSf->schdTime = sfInfo->timingInfo;
 
    rgTOMRlsSf(inst,dlSf);
    dlSf->schdTime = sfInfo->timingInfo;
@@ -2325,11 +2314,11 @@ RgInfSfAlloc        *sfInfo;
 
 #ifdef LTE_ADV
 #ifdef XEON_SPECIFIC_CHANGES
 
 #ifdef LTE_ADV
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((cell->crntTime.subframe % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_B4_UE_SCHD);
+   CM_MEAS_TIME((cell->crntTime.slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_B4_UE_SCHD);
 #endif
    rgHndlSchdUe(cell, sfInfo->timingInfo, &sfInfo->ueInfo, &err);
 #ifdef XEON_SPECIFIC_CHANGES
 #endif
    rgHndlSchdUe(cell, sfInfo->timingInfo, &sfInfo->ueInfo, &err);
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((cell->crntTime.subframe % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_UE_SCHD);
+   CM_MEAS_TIME((cell->crntTime.slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_UE_SCHD);
 #endif
    rgLaaChkAndReqTbs(dlSf,cell, inst);
 
 #endif
    rgLaaChkAndReqTbs(dlSf,cell, inst);
 
@@ -2345,7 +2334,7 @@ RgInfSfAlloc        *sfInfo;
    }
 #endif
 #ifdef XEON_SPECIFIC_CHANGES
    }
 #endif
 #ifdef XEON_SPECIFIC_CHANGES
-   CM_MEAS_TIME((cell->crntTime.subframe % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_MEAS);
+   CM_MEAS_TIME((cell->crntTime.slot % RG_NUM_SUB_FRAMES), CM_DBG_MAC_TTI_IND, CM_DBG_MAC_MEAS);
 #endif
    /* Fix[ccpu00126310]: Tracks Data Requests from RLC for both loosely and tight coupled 
       RLC-MAC */
 #endif
    /* Fix[ccpu00126310]: Tracks Data Requests from RLC for both loosely and tight coupled 
       RLC-MAC */
@@ -2421,16 +2410,16 @@ RgUeCb            *prevUeCb,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
-U8                subframe
+U16               slot
 )
 #else
 )
 #else
-PRIVATE S16 rgTOMProcCrntiCEInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, subframe)
+PRIVATE S16 rgTOMProcCrntiCEInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, slot)
 RgMacPdu          *pdu;
 RgUeCb            *prevUeCb;
 RgCellCb          *cellCb;
 TfuDatInfo        *datInfo;
 RgInfCeInfo       *ceInfo;
 RgMacPdu          *pdu;
 RgUeCb            *prevUeCb;
 RgCellCb          *cellCb;
 TfuDatInfo        *datInfo;
 RgInfCeInfo       *ceInfo;
-U8                subframe;
+U16               slot;
 #endif
 {
    RgUeCb *ueCb = NULLP;
 #endif
 {
    RgUeCb *ueCb = NULLP;
@@ -2445,7 +2434,7 @@ U8                subframe;
    TRC2(rgTOMProcCrntiCEInDatInd)
 
 #ifndef LTE_L2_MEAS      
    TRC2(rgTOMProcCrntiCEInDatInd)
 
 #ifndef LTE_L2_MEAS      
-      UNUSED(subframe);
+      UNUSED(slot);
 #endif
 
    ueCb = rgDBMGetUeCbFromRachLst (cellCb, datInfo->rnti);
 #endif
 
    ueCb = rgDBMGetUeCbFromRachLst (cellCb, datInfo->rnti);
@@ -2471,9 +2460,9 @@ U8                subframe;
    rgRAMFreeUeCb(inst,ueCb);
    ueCb = prevUeCb;
 #ifdef LTEMAC_SPS
    rgRAMFreeUeCb(inst,ueCb);
    ueCb = prevUeCb;
 #ifdef LTEMAC_SPS
-   if ((rgTOMUtlProcMsg(cellCb, ueCb, pdu, FALSE,&spsToBeActvtd,&sduSize, subframe, NULLP)) != ROK)
+   if ((rgTOMUtlProcMsg(cellCb, ueCb, pdu, FALSE,&spsToBeActvtd,&sduSize, slot, NULLP)) != ROK)
 #else
 #else
-   if ((rgTOMUtlProcMsg (cellCb, ueCb, pdu, subframe, NULLP)) != ROK)
+   if ((rgTOMUtlProcMsg (cellCb, ueCb, pdu, slot, NULLP)) != ROK)
 #endif /* LTEMAC_SPS */
    {
        RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
 #endif /* LTEMAC_SPS */
    {
        RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,
@@ -2523,16 +2512,16 @@ RgUeCb            *prevUeCb,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
 RgCellCb          *cellCb,
 TfuDatInfo        *datInfo,
 RgInfCeInfo       *ceInfo,
-U8                subframe 
+U16               slot 
 )
 #else
 )
 #else
-PRIVATE S16 rgTOMProcCCCHSduInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, subframe)
+PRIVATE S16 rgTOMProcCCCHSduInDatInd( pdu, prevUeCb, cellCb, datInfo, ceInfo, slot)
 RgMacPdu          *pdu;
 RgUeCb            *prevUeCb;
 RgCellCb          *cellCb;
 TfuDatInfo        *datInfo;
 RgInfCeInfo       *ceInfo;
 RgMacPdu          *pdu;
 RgUeCb            *prevUeCb;
 RgCellCb          *cellCb;
 TfuDatInfo        *datInfo;
 RgInfCeInfo       *ceInfo;
-U8                subframe;
+U16               slot;
 #endif
 {
    RgUeCb *ueCb = NULLP;
 #endif
 {
    RgUeCb *ueCb = NULLP;
@@ -2547,7 +2536,7 @@ U8                subframe;
    TRC2(rgTOMProcCCCHSduInDatInd)
 
 #ifndef LTE_L2_MEAS      
    TRC2(rgTOMProcCCCHSduInDatInd)
 
 #ifndef LTE_L2_MEAS      
-      UNUSED(subframe);
+      UNUSED(slot);
 #endif
 
    if (ceInfo->bitMask & RG_CRNTI_CE_PRSNT)
 #endif
 
    if (ceInfo->bitMask & RG_CRNTI_CE_PRSNT)
@@ -2584,9 +2573,9 @@ U8                subframe;
     RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
              "CCCH SDU received through tmpCrnti(%d)",datInfo->rnti);
 #ifdef LTEMAC_SPS
     RLOG_ARG1(L_DEBUG,DBG_CELLID,cellCb->cellId,
              "CCCH SDU received through tmpCrnti(%d)",datInfo->rnti);
 #ifdef LTEMAC_SPS
-   if ((rgTOMUtlProcMsg(cellCb, ueCb, pdu, FALSE,&spsToBeActvtd,&sduSize, subframe, NULLP)) != ROK)
+   if ((rgTOMUtlProcMsg(cellCb, ueCb, pdu, FALSE,&spsToBeActvtd,&sduSize, slot, NULLP)) != ROK)
 #else
 #else
-   if ((rgTOMUtlProcMsg (cellCb, ueCb, pdu, subframe, NULLP)) != ROK)
+   if ((rgTOMUtlProcMsg (cellCb, ueCb, pdu, slot, NULLP)) != ROK)
 #endif /* LTEMAC_SPS */
    {
        RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI:%d Processing for MSG3 failed", 
 #endif /* LTEMAC_SPS */
    {
        RLOG_ARG1(L_ERROR,DBG_CELLID,cellCb->cellId,"RNTI:%d Processing for MSG3 failed", 
index 3ecec5c..913ac35 100755 (executable)
@@ -98,7 +98,7 @@ typedef struct kwSdu
       struct   _t 
       {
          U16         sfn;        /*!< Sub frame number for BCCH/PCCH */
       struct   _t 
       {
          U16         sfn;        /*!< Sub frame number for BCCH/PCCH */
-         U8          subframe;   /*!< Subframe number */
+         U16         slot;   /*!< Subframe number */
          CmLteRnti   rnti;       /*!< RNTI for CCCH */
 #ifdef EMTC_ENABLE
          U8          emtcDiReason; /*!< DI reason */
          CmLteRnti   rnti;       /*!< RNTI for CCCH */
 #ifdef EMTC_ENABLE
          U8          emtcDiReason; /*!< DI reason */
index c0a8f79..a530dff 100755 (executable)
@@ -280,6 +280,7 @@ KwGenCfg   *cfg;
          RLOG0(L_FATAL,"RLC DL Initialization failed");   
          RETVALUE(LCM_REASON_MEM_NOAVAIL);
       }
          RLOG0(L_FATAL,"RLC DL Initialization failed");   
          RETVALUE(LCM_REASON_MEM_NOAVAIL);
       }
+#if 0
       /* Register the timer */
 /*Pradeep: changing the SRegTmrMt() to SRegTmr()*/
       if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
       /* Register the timer */
 /*Pradeep: changing the SRegTmrMt() to SRegTmr()*/
       if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
@@ -292,7 +293,7 @@ KwGenCfg   *cfg;
 
          RETVALUE(LCM_REASON_REGTMR_FAIL);
       }
 
          RETVALUE(LCM_REASON_REGTMR_FAIL);
       }
-
+#endif
       /* initializations for background processing of freeing memory */
       kwUtlInitToBeFreed(gCb, &(gCb->u.dlCb->toBeFreed));
       kwUtlInitializeSelfPst(gCb);
       /* initializations for background processing of freeing memory */
       kwUtlInitToBeFreed(gCb, &(gCb->u.dlCb->toBeFreed));
       kwUtlInitializeSelfPst(gCb);
@@ -383,7 +384,7 @@ KwGenCfg   *cfg;
       }
 
       /* Register the timer */
       }
 
       /* Register the timer */
-
+#if 0
       if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
               kwActvTmr) != ROK)
       {
       if(SRegTmrMt(gCb->init.ent, gCb->init.inst, (U16)cfg->timeRes,
               kwActvTmr) != ROK)
       {
@@ -394,6 +395,7 @@ KwGenCfg   *cfg;
 
          RETVALUE(LCM_REASON_REGTMR_FAIL);
       }
 
          RETVALUE(LCM_REASON_REGTMR_FAIL);
       }
+#endif
 #ifdef LTE_L2_MEAS
       kwUtlL2MeasUlInit(gCb);
 #endif
 #ifdef LTE_L2_MEAS
       kwUtlL2MeasUlInit(gCb);
 #endif
index e8d5df5..e144db0 100755 (executable)
@@ -148,7 +148,7 @@ Buffer          *mBuf;
         rbCb->lch.lChType == CM_LTE_LCH_PCCH )
    {
       sdu->mode.tm.sfn = datReqInfo->tm.tmg.sfn;
         rbCb->lch.lChType == CM_LTE_LCH_PCCH )
    {
       sdu->mode.tm.sfn = datReqInfo->tm.tmg.sfn;
-      sdu->mode.tm.subframe = datReqInfo->tm.tmg.subframe;
+      sdu->mode.tm.slot = datReqInfo->tm.tmg.slot;
 #ifdef EMTC_ENABLE
      if(rbCb->lch.lChType == CM_LTE_LCH_PCCH)
      {
 #ifdef EMTC_ENABLE
      if(rbCb->lch.lChType == CM_LTE_LCH_PCCH)
      {
@@ -216,35 +216,35 @@ RguCStaIndInfo   *staInd;
    CM_LLIST_FIRST_NODE(&(rbCb->m.tm.sduQ), 
                        node);
 
    CM_LLIST_FIRST_NODE(&(rbCb->m.tm.sduQ), 
                        node);
 
-   /* (Sfn,subframe) at which the message should be transmitted is 
-    * validated with alloted (sfn,subframe)in the MAC layer */
+   /* (Sfn,slot) at which the message should be transmitted is 
+    * validated with alloted (sfn,slot)in the MAC layer */
    while (node != NULLP)
    {
       sdu = (KwSdu *)(node->node);
       if ( rbCb->lch.lChType == CM_LTE_LCH_BCCH ||
             rbCb->lch.lChType == CM_LTE_LCH_PCCH )
       {
    while (node != NULLP)
    {
       sdu = (KwSdu *)(node->node);
       if ( rbCb->lch.lChType == CM_LTE_LCH_BCCH ||
             rbCb->lch.lChType == CM_LTE_LCH_PCCH )
       {
-         U16 sfn, subframe;
+         U16 sfn, slot;
          /* MS_FIX: syed sfn is of 10 bytes rather than 8 */
 #ifdef EMTC_ENABLE
          /* MS_FIX: syed sfn is of 10 bytes rather than 8 */
 #ifdef EMTC_ENABLE
-         /* As part of CATM feature cross subframe scheduling is implemented , so there is some delta(currently 2)
+         /* As part of CATM feature cross slot scheduling is implemented , so there is some delta(currently 2)
             between MPDCCH and PDSCH,RLC expects cell crntTime of transmission of control dlsf, so one extra 
             between MPDCCH and PDSCH,RLC expects cell crntTime of transmission of control dlsf, so one extra 
-            information is provided in staInd, so that sfn,subframe should calculate from paging Timing information 
+            information is provided in staInd, so that sfn,slot should calculate from paging Timing information 
             in case of EMTC paging, instead of transId */
          if(staInd->isEmtcPaging)
          {
             sfn      = staInd->pagingTimingInfo.sfn;
             in case of EMTC paging, instead of transId */
          if(staInd->isEmtcPaging)
          {
             sfn      = staInd->pagingTimingInfo.sfn;
-            subframe = staInd->pagingTimingInfo.subframe;
+            slot = staInd->pagingTimingInfo.slot;
          }
          else
 #endif
          {
             sfn = (staInd->transId >> 8) & 0x3FF;
          }
          else
 #endif
          {
             sfn = (staInd->transId >> 8) & 0x3FF;
-            subframe = staInd->transId & 0xFF;
+            slot = staInd->transId & 0xFF;
          }
 
          /* Table
          }
 
          /* Table
-          * tm.subframe - current subframe 
+          * tm.slot - current slot 
           * 0,sfn        7,sfn-1
           * 4,sfn        1,sfn
           * 5,sfn        2,sfn
           * 0,sfn        7,sfn-1
           * 4,sfn        1,sfn
           * 5,sfn        2,sfn
@@ -254,13 +254,13 @@ RguCStaIndInfo   *staInd;
           * Take care of SFN wraparound. TODO: It is better for RLC
           * not to be aware of SCH DELTAs. So we should look for 
           * sending actual transmission time to RLC. */
           * Take care of SFN wraparound. TODO: It is better for RLC
           * not to be aware of SCH DELTAs. So we should look for 
           * sending actual transmission time to RLC. */
-         if ((subframe + TFU_DELTA) >= 10)
+         if ((slot + TFU_DELTA) >= 10)
          {
             sfn = (sfn + 1)%1024;
          }
 
          if ((sdu->mode.tm.sfn != sfn) ||
          {
             sfn = (sfn + 1)%1024;
          }
 
          if ((sdu->mode.tm.sfn != sfn) ||
-               (sdu->mode.tm.subframe != ((subframe+TFU_DELTA)%10)))
+               (sdu->mode.tm.slot != ((slot+TFU_DELTA)%10)))
          {
             node = node->next;
             RLOG_ARG4(L_DEBUG,DBG_RBID,rbCb->rlcId.rbId,
          {
             node = node->next;
             RLOG_ARG4(L_DEBUG,DBG_RBID,rbCb->rlcId.rbId,
@@ -270,9 +270,9 @@ RguCStaIndInfo   *staInd;
                   rbCb->rlcId.ueId,
                   rbCb->rlcId.cellId);   
             RLOG_ARG4(L_DEBUG,DBG_RBID,rbCb->rlcId.rbId,
                   rbCb->rlcId.ueId,
                   rbCb->rlcId.cellId);   
             RLOG_ARG4(L_DEBUG,DBG_RBID,rbCb->rlcId.rbId,
-                  "sfn %d subframe %d  UEID:%d CELLID:%d",
+                  "sfn %d slot %d  UEID:%d CELLID:%d",
                   sfn, 
                   sfn, 
-                  subframe,
+                  slot,
                   rbCb->rlcId.ueId,
                   rbCb->rlcId.cellId);   
             cmLListDelFrm(&(rbCb->m.tm.sduQ), &sdu->lstEnt);
                   rbCb->rlcId.ueId,
                   rbCb->rlcId.cellId);   
             cmLListDelFrm(&(rbCb->m.tm.sduQ), &sdu->lstEnt);
@@ -389,7 +389,7 @@ RguCStaIndInfo   *staInd;
 #endif /* ERRCLASS & ERRCLS_ADD_RES */
 
    dlData->timeToTx.sfn = sdu->mode.tm.sfn;
 #endif /* ERRCLASS & ERRCLS_ADD_RES */
 
    dlData->timeToTx.sfn = sdu->mode.tm.sfn;
-   dlData->timeToTx.subframe = sdu->mode.tm.subframe;
+   dlData->timeToTx.slot = sdu->mode.tm.slot;
    dlData->cellId = rbCb->rlcId.cellId;
    dlData->rnti = sdu->mode.tm.rnti;
    dlData->nmbPdu = 1;
    dlData->cellId = rbCb->rlcId.cellId;
    dlData->rnti = sdu->mode.tm.rnti;
    dlData->nmbPdu = 1;
index 5cf8f46..4bbdc11 100755 (executable)
@@ -97,99 +97,6 @@ RgrWarningSiCfgReqInfo *warningSiCfgReqInfo
 #endif
 /* local defines */
 /************** LRG Interface ****************/
 #endif
 /* local defines */
 /************** LRG Interface ****************/
-/**
- * @brief Layer Manager Configuration request handler. 
- *
- * @details
- *
- *     Function : HandleSchGenCfgReq
- *     
- *     This function handles the configuration
- *     request received at scheduler instance from the Layer Manager.
- *     -# Based on the cfg->hdr.elmId.elmnt value it invokes one of the
- *        functions rgHdlGenCfg() or rgHdlSapCfg().
- *     -# Invokes RgMiLrgSchCfgCfm() to send back the confirmation to the LM.
- *     
- *  @param[in]  Pst *pst, the post structure     
- *  @param[in]  RgMngmt *cfg, the configuration parameter's structure
- *  @return  S16
- *      -# ROK
- **/
-#ifdef ANSI
-PUBLIC S16 HandleSchGenCfgReq
-(
-Pst      *pst,    /* post structure  */
-RgMngmt  *cfg     /* config structure  */
-)
-#else
-PUBLIC S16 HandleSchGenCfgReq(pst, cfg)
-Pst      *pst;    /* post structure  */
-RgMngmt  *cfg;    /* config structure  */
-#endif    
-{
-   U16       ret = LCM_PRIM_OK;
-   U16       reason = LCM_REASON_NOT_APPL;
-   RgMngmt   cfm;
-   Pst       cfmPst;
-#ifdef DEBUGP
-   Inst      inst = (pst->dstInst  - SCH_INST_START);
-#endif
-
-   TRC3(HandleSchGenCfgReq)
-   
-
-   if(pst->dstInst < SCH_INST_START)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Invalid inst ID");
-      RLOG_ARG2(L_DEBUG,DBG_INSTID,inst, "HandleSchGenCfgReq(): "
-                        "pst->dstInst=%d SCH_INST_START=%d", pst->dstInst,SCH_INST_START); 
-      RETVALUE(ROK);
-   }
-   printf("\nReceived scheduler gen config");
-   /* Fill the post structure for sending the confirmation */
-   SchFillCfmPst(pst, &cfmPst, cfg);
-
-   /* Initialize the cfg cfm structure 
-   if (SGetSBuf(cfmPst.region, cfmPst.pool, (Data **)&cfm, sizeof(RgMngmt))
-      != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "Memory Unavailable for Confirmation");
-      RETVALUE(ROK);
-   } */
-   cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
-
-#ifdef LMINT3
-   cfm.hdr.transId =
-      cfg->hdr.transId;
-#endif
-
-   cfm.hdr.elmId.elmnt = cfg->hdr.elmId.elmnt;
-   switch(cfg->hdr.elmId.elmnt)
-   {
-      case STSCHINST:
-         reason = SchInstCfg(&cfg->t.cfg,pst->dstInst );
-         break;
-      default:
-         ret = LCM_PRIM_NOK;
-         reason = LCM_REASON_INVALID_ELMNT;
-         RLOG_ARG1(L_ERROR,DBG_INSTID,inst, "Invalid Elmnt=%d", cfg->hdr.elmId.elmnt);
-         break;
-   }
-
-   if (reason != LCM_REASON_NOT_APPL)
-   {
-      ret = LCM_PRIM_NOK;
-   }
-
-   cfm.cfm.status = ret;
-   cfm.cfm.reason = reason;
-
-   SchSendCfgCfm(&cfmPst, &cfm);
-   /*   SPutSBuf(pst->region, pst->pool, (Data *)cfg, sizeof(RgMngmt)); */
-   
-   RETVALUE(ROK);
-}/*-- HandleSchGenCfgReq --*/
-
 \f
 /**
  * @brief Layer Manager Control request handler. 
 \f
 /**
  * @brief Layer Manager Control request handler. 
@@ -733,103 +640,6 @@ PUBLIC S16 RgUiRgrUbndReq(pst, spId, reason)
    RETVALUE(ROK);
 }  /* RgUiRgrUbndReq */
 
    RETVALUE(ROK);
 }  /* RgUiRgrUbndReq */
 
-/**
- * @brief API for configuration request from RRM towards MAC. 
- *
- * @details
- *
- *     Function: HandleSchCfgReq 
- *     
- *     This API is invoked by RRM towards MAC to configure MAC. 
- *     These API validates the Pst, spId, suId and transfers the config request 
- *     specific information to corresponding ownership module (GOM) API.
- *
- *           
- *  @param[in]  Pst           *pst
- *  @param[in]  RgrCfgTransId transId
- *  @param[in]  RgrCfgReqInfo *cfgReqInfo
- *  @return  S16
- *      -# ROK 
- *      -# RFAILED 
- **/
-#ifdef ANSI
-PUBLIC S16 HandleSchCfgReq
-(
- Pst           *pst, 
- RgrCfgTransId transId,
- RgrCfgReqInfo *cfgReqInfo
- )
-#else
-PUBLIC S16 HandleSchCfgReq(pst, transId, cfgReqInfo)
-   Pst           *pst; 
-   RgrCfgTransId transId;
-   RgrCfgReqInfo *cfgReqInfo;
-#endif
-{
-
-   SpId      spId = 0;
-   S16       ret       = ROK;
-   U8        cfmStatus = 0x00ff;
-   U8        prntTrans[RGR_CFG_TRANSID_SIZE+1];
-   Inst      instId = pst->dstInst-SCH_INST_START;
-
-   TRC3(HandleSchCfgReq);
-
-   cmMemcpy((U8 *)prntTrans, (U8 *)transId.trans, RGR_CFG_TRANSID_SIZE);
-   prntTrans[RGR_CFG_TRANSID_SIZE] = '\0';
-
-
-   if (cfgReqInfo == NULLP)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Input Message Buffer is NULL");
-      schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus);
-      RETVALUE(RFAILED);
-   }
-#if 0
-   if (spId < rgSchCb[instId].numSaps)
-   {
-      switch(rgSchCb[instId].rgrSap[spId].sapSta.sapState)
-      {
-         case LRG_BND: /* SAP is already bound */
-            RLOG0(L_DEBUG,"SAP is already bound");
-            break;
-         default: /* Should never reach here */
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-            RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG005, 
-                  (ErrVal)rgSchCb[instId].rgrSap[spId].sapSta.sapState,
-                  "Invalid SAP State: HandleSchCfgReq failed\n");
-#endif
-            SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
-                  (Size)sizeof(*cfgReqInfo));
-            schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus); 
-            RETVALUE(RFAILED);
-      }
-   }
-   else
-   {
-#if (ERRCLASS & ERRCLS_ADD_RES)      
-      RGSCHLOGERROR(instId, ERRCLS_INT_PAR, ERG006,
-            (ErrVal)rgSchCb[instId].rgrSap[spId].sapCfg.spId,
-            "Invalid SAP Id:HandleSchCfgReq failed\n");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo,
-            (Size)sizeof(*cfgReqInfo));
-      schSendCfgCfm(pst->region, pst->pool, transId, cfmStatus); 
-      RETVALUE(RFAILED);
-   }
-#endif
-   /* Handle configuration */
-   ret = rgSCHGomHndlCfg(pst, &rgSchCb[instId], 
-         transId, cfgReqInfo);
-   if (ret != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,instId,"Configuration Request Handling Failed");
-      RETVALUE(RFAILED);
-   }
-
-   RETVALUE(ROK);
-}  /* HandleSchCfgReq */
-
 #ifdef RGR_SI_SCH
 /**
  * @brief API for SI configuration request from RRM towards MAC. 
 #ifdef RGR_SI_SCH
 /**
  * @brief API for SI configuration request from RRM towards MAC. 
@@ -2729,60 +2539,6 @@ TfuTimingAdvIndInfo  *timingAdvInd;
    RETVALUE(ret);
 }  /* RgLiTfuTimingAdvInd */
 
    RETVALUE(ret);
 }  /* RgLiTfuTimingAdvInd */
 
-
-/**
- * @brief Transmission time interval indication from PHY.
- *
- * @details
- *
- *     Function : RgLiTfuSchTtiInd 
- *      
- *      This API is invoked by PHY to indicate TTI indication to Scheduler for
- *      a cell.
- *           
- *  @param[in]  Pst            *pst
- *  @param[in]  SuId           suId 
- *  @param[in]  TfuTtiIndInfo  *ttiInd
- *  @return  S16
- *      -# ROK 
- *      -# RFAILED 
- **/
-#ifdef ANSI
-PUBLIC S16 RgLiTfuSchTtiInd 
-(
-Pst                 *pst, 
-SuId                suId, 
-TfuTtiIndInfo       *ttiInd
-)
-#else
-PUBLIC S16 RgLiTfuSchTtiInd(pst, suId, ttiInd)
-Pst                 *pst; 
-SuId                suId; 
-TfuTtiIndInfo       *ttiInd;
-#endif
-{
-   S16   ret = ROK;
-   Inst  inst = pst->dstInst-SCH_INST_START;
-
-   TRC3(RgLiTfuSchTtiInd);
-
-   
-   /* Removing the validation with every TTI - for optimization */
-#ifndef NO_ERRCLS 
-   if ((ret = rgSCHUtlValidateTfuSap (inst, suId)) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst,"SAP Validation failed");
-      RETVALUE(ret);
-   }
-#endif
-   /* Moved check for cell outside ERRCLS*/
-
-   /* Now call the TOM (Tfu ownership module) primitive to process further */
-   rgSCHTomTtiInd(ttiInd, inst);
-
-   RETVALUE(ret);
-}  /* RgLiTfuSchTtiInd */
-
 /************* RGM  Interface ****************/
 /**
  * @brief API for bind request from RRM towards MAC. 
 /************* RGM  Interface ****************/
 /**
  * @brief API for bind request from RRM towards MAC. 
index ede35a8..a8c143d 100755 (executable)
@@ -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)          \
 (_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 + \
       toFill.sfn = (crntTime.sfn + \
-            (crntTime.subframe + (incr)) / RGSCH_NUM_SUB_FRAMES); \
+            (crntTime.slot + (incr)) / RGSCH_NUM_SUB_FRAMES); \
    else                                                  \
       toFill.sfn = crntTime.sfn;                              \
    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; \
    if (toFill.sfn >= RGSCH_MAX_SFN) \
    { \
       toFill.hSfn = (crntTime.hSfn + 1) % RGSCH_MAX_SFN; \
@@ -459,28 +459,28 @@ do \
 
 #else
 
 
 #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)\
 #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)\
 
 /*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)          \
 
 #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 + \
       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;                              \
    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; \
    if (toFill.sfn >= RGSCH_MAX_SFN) \
    { \
       toFill.sfn = toFill.sfn % RGSCH_MAX_SFN; \
@@ -490,7 +490,7 @@ do \
 do \
 {                                                  \
    S32  _subframe;\
 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) \
    { \
    _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; \
    } \
    _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 
 } 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;     \
 
 #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
 
 /* Added support for SPS*/
 #ifdef LTEMAC_SPS
@@ -526,7 +526,7 @@ do \
    {*_ret = -1; }\
    else if ((_x).sfn == (_y).sfn)\
    {\
    {*_ret = -1; }\
    else if ((_x).sfn == (_y).sfn)\
    {\
-      if ((_x).subframe > (_y).subframe)\
+      if ((_x).slot > (_y).slot)\
       { *_ret = 1; }\
       else\
       {*_ret = -1; }\
       { *_ret = 1; }\
       else\
       {*_ret = -1; }\
@@ -536,8 +536,8 @@ do \
 }
 
 #define RGSCH_INCR_SUB_FRAME(x,y) 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; \
       if (x.sfn  >= RGSCH_MAX_SFN) \
       { \
          x.sfn %= RGSCH_MAX_SFN; \
@@ -717,7 +717,7 @@ do \
    (_tbInfo)->m = 0;   \
    (_tbInfo)->fdbkTime.sfn = (_timingInfo.sfn + \
          _dlSf->dlFdbkInfo.sfnOffset) % RGSCH_MAX_SFN; \
    (_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) 
 
    (_tbInfo)->timingInfo = _timingInfo; \
 } while(0) 
 
@@ -725,7 +725,7 @@ do \
 do \
 {  \
    _anInfo->sfn = (_tbInfo)->fdbkTime.sfn; \
 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*/
    _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_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
 
 /* Define for the block size for memory allocation */
 #define RGSCH_BLKSZ                       2048
 
@@ -1255,7 +1255,7 @@ do\
 /* To Get the Idx to pCqiSrsSrLst in RgSchCellCb*/
 #define RG_SCH_GET_IDX_PCQISRSSR(_time, _indexId)\
 {\
 /* 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;\
 } 
 
    (_indexId) = (_indexId)%RG_SCH_PCQI_SRS_SR_TRINS_SIZE;\
 } 
 
index c1c8388..e5fd6c4 100755 (executable)
@@ -46,6 +46,7 @@
 #include "rg_sch_emtc.x"
 #endif
 
 #include "rg_sch_emtc.x"
 #endif
 
+
 typedef struct rgSchHistNode
 {
    U32 line;
 typedef struct rgSchHistNode
 {
    U32 line;
@@ -2839,9 +2840,9 @@ UE */
 #else
 #ifdef RG_5GTF 
    /* 5GTF TODO : Hard setting number of CCs to 3 */
 #else
 #ifdef RG_5GTF 
    /* 5GTF TODO : Hard setting number of CCs to 3 */
-   RgSchDlHqInfo dlSfHqInfo[MAX_5GTF_CELL][RGSCH_NUM_DL_SUBFRAMES];
+   RgSchDlHqInfo dlSfHqInfo[MAX_5GTF_CELL][RGSCH_NUM_DL_slotS];
 #else
 #else
-   RgSchDlHqInfo dlSfHqInfo[RGSCH_NUM_DL_SUBFRAMES];
+   RgSchDlHqInfo dlSfHqInfo[RGSCH_NUM_DL_slotS];
 #endif
 #endif  
    /* Moved from rgSchCmnDlUe to Here, as this shouldn't be present per cell*/
 #endif
 #endif  
    /* Moved from rgSchCmnDlUe to Here, as this shouldn't be present per cell*/
@@ -3757,7 +3758,7 @@ struct rgSchCellCb
    CmLListCp         n1ResUsedLst[RGSCH_NUM_SUB_FRAMES]; /*!< For storing the used
                                             N1 resources for scell in case of F1B CS */
 #else
    CmLListCp         n1ResUsedLst[RGSCH_NUM_SUB_FRAMES]; /*!< For storing the used
                                             N1 resources for scell in case of F1B CS */
 #else
-   RgSchDlSf          *subFrms[RGSCH_NUM_DL_SUBFRAMES];
+   RgSchDlSf          *subFrms[RGSCH_NUM_DL_slotS];
    U16             nCce;
 #endif
    RgSchDynCfiCb         dynCfiCb;        /*!< Dynamic CFI control block */  
    U16             nCce;
 #endif
    RgSchDynCfiCb         dynCfiCb;        /*!< Dynamic CFI control block */  
@@ -4306,10 +4307,6 @@ EXTERN S16 rgSCHTomCrcInd ARGS((
          RgSchCellCb       *cell,
          TfuCrcIndInfo *crcInd));
 
          RgSchCellCb       *cell,
          TfuCrcIndInfo *crcInd));
 
-EXTERN Void rgSCHTomTtiInd ARGS((
-         TfuTtiIndInfo *ttiInd,
-         Inst inst));
-
 EXTERN S16 rgSCHTomHarqAckInd ARGS((
          RgSchCellCb       *cell,
          TfuHqIndInfo      *harqAckInd));
 EXTERN S16 rgSCHTomHarqAckInd ARGS((
          RgSchCellCb       *cell,
          TfuHqIndInfo      *harqAckInd));
index 4e3dfdb..640d74a 100755 (executable)
@@ -3206,7 +3206,7 @@ RgSchErrInfo *errInfo;
      /*ccpu00117778- Initialize Transmission Indices upon UE CB creation */
 #ifdef LA
    ue->lastRprdAckNackTime.sfn = cell->crntTime.sfn;
      /*ccpu00117778- Initialize Transmission Indices upon UE CB creation */
 #ifdef LA
    ue->lastRprdAckNackTime.sfn = cell->crntTime.sfn;
-   ue->lastRprdAckNackTime.subframe = cell->crntTime.subframe;
+   ue->lastRprdAckNackTime.subframe = cell->crntTime.slot;
    ue->ueIdle = FALSE; 
 #endif
 
    ue->ueIdle = FALSE; 
 #endif
 
@@ -3337,7 +3337,7 @@ RgSchErrInfo *errInfo;
            (Data **)&ue->dl.dlSfHqInfo, sizeof(RgSchDlHqInfo) * (ue->dl.numHqDlSfInfo));
 
 #else
            (Data **)&ue->dl.dlSfHqInfo, sizeof(RgSchDlHqInfo) * (ue->dl.numHqDlSfInfo));
 
 #else
-     ue->dl.numHqDlSfInfo = RGSCH_NUM_DL_SUBFRAMES;
+     ue->dl.numHqDlSfInfo = RGSCH_NUM_DL_slotS;
 #endif
 #ifndef RG_5GTF 
      for (idx =0;idx < ue->dl.numHqDlSfInfo; idx++)
 #endif
 #ifndef RG_5GTF 
      for (idx =0;idx < ue->dl.numHqDlSfInfo; idx++)
@@ -3771,7 +3771,7 @@ RgSchErrInfo  *errInfo;
          /* dsfr_pal_fixes ** 21-March-2013 ** SKS */
          if (cellRecfg->rgrLteAdvCfg.sfrCfg.status == RGR_ENABLE)
          {
          /* dsfr_pal_fixes ** 21-March-2013 ** SKS */
          if (cellRecfg->rgrLteAdvCfg.sfrCfg.status == RGR_ENABLE)
          {
-            for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+            for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
             {
                /*initialise the pools of CC and CE*/
                if(rgSchSFRTotalPoolInit(cell, cell->subFrms[i]))
             {
                /*initialise the pools of CC and CE*/
                if(rgSchSFRTotalPoolInit(cell, cell->subFrms[i]))
@@ -3782,7 +3782,7 @@ RgSchErrInfo  *errInfo;
          }
          else
          {
          }
          else
          {
-            for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+            for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
             {
                /*initialise the pools of CC and CE*/
                rgSchSFRTotalPoolFree(&cell->subFrms[i]->sfrTotalPoolInfo, cell);
             {
                /*initialise the pools of CC and CE*/
                rgSchSFRTotalPoolFree(&cell->subFrms[i]->sfrTotalPoolInfo, cell);
@@ -3791,7 +3791,7 @@ RgSchErrInfo  *errInfo;
             if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE)
             {
                /* releasing rntp info val from each subframe */ 
             if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE)
             {
                /* releasing rntp info val from each subframe */ 
-               for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+               for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
                {
                   rgSchDSFRRntpInfoFree(&cell->subFrms[i]->rntpInfo, cell, cell->bwCfg.dlTotalBw);
                }
                {
                   rgSchDSFRRntpInfoFree(&cell->subFrms[i]->rntpInfo, cell, cell->bwCfg.dlTotalBw);
                }
@@ -3810,7 +3810,7 @@ RgSchErrInfo  *errInfo;
             cellRecfg->rgrLteAdvCfg.dsfrCfg;
          if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE)
          {
             cellRecfg->rgrLteAdvCfg.dsfrCfg;
          if (cell->lteAdvCb.dsfrCfg.status == RGR_ENABLE)
          {
-            for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+            for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
             {
                /*initialise the pools of CC and CE*/
                if(rgSchDSFRRntpInfoInit(&cell->subFrms[i]->rntpInfo,cell,cell->bwCfg.dlTotalBw))
             {
                /*initialise the pools of CC and CE*/
                if(rgSchDSFRRntpInfoInit(&cell->subFrms[i]->rntpInfo,cell,cell->bwCfg.dlTotalBw))
@@ -3837,7 +3837,7 @@ RgSchErrInfo  *errInfo;
          else
          {
             /* releasing rntp info val from each subframe */ 
          else
          {
             /* releasing rntp info val from each subframe */ 
-            for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+            for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
             {
                rgSchDSFRRntpInfoFree(&cell->subFrms[i]->rntpInfo, cell, cell->bwCfg.dlTotalBw);
             }
             {
                rgSchDSFRRntpInfoFree(&cell->subFrms[i]->rntpInfo, cell, cell->bwCfg.dlTotalBw);
             }
@@ -8339,7 +8339,7 @@ PUBLIC S16 rgSCHCfgPCqiUeCfg(cellCb, ueCb, cqiCfg, ueCat)
    TRC3(rgSCHCfgPCqiUeCfg);
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)+
    TRC3(rgSCHCfgPCqiUeCfg);
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)+
-                  (cellCb->crntTime.subframe);
+                  (cellCb->crntTime.slot);
    cqiCb = RG_SCH_GET_UE_CELL_CQI_CB(ueCb,cellCb);
    cqiCb->servCellInfo = ueCb->cellInfo[0];
    /* Periodic CQI is setup  */
    cqiCb = RG_SCH_GET_UE_CELL_CQI_CB(ueCb,cellCb);
    cqiCb->servCellInfo = ueCb->cellInfo[0];
    /* Periodic CQI is setup  */
@@ -8384,7 +8384,7 @@ PUBLIC S16 rgSCHCfgPCqiUeCfg(cellCb, ueCb, cqiCfg, ueCat)
       cqiCb->nCqiTrIdx = cqiCb->nCqiTrIdx % (RGSCH_MAX_SFN * RGSCH_NUM_SUB_FRAMES_5G);
 
       timingInfo.sfn =  cqiCb->nCqiTrIdx/RGSCH_NUM_SUB_FRAMES_5G;
       cqiCb->nCqiTrIdx = cqiCb->nCqiTrIdx % (RGSCH_MAX_SFN * RGSCH_NUM_SUB_FRAMES_5G);
 
       timingInfo.sfn =  cqiCb->nCqiTrIdx/RGSCH_NUM_SUB_FRAMES_5G;
-      timingInfo.subframe =  cqiCb->nCqiTrIdx % RGSCH_NUM_SUB_FRAMES_5G;
+      timingInfo.slot =  cqiCb->nCqiTrIdx % RGSCH_NUM_SUB_FRAMES_5G;
 
       cqiCb->nCqiTrIdx = cqiCb->nCqiTrIdx
            %RG_SCH_PCQI_SRS_SR_TRINS_SIZE;
 
       cqiCb->nCqiTrIdx = cqiCb->nCqiTrIdx
            %RG_SCH_PCQI_SRS_SR_TRINS_SIZE;
@@ -8515,7 +8515,7 @@ PUBLIC S16 rgSCHCfgRiUeCfg(cellCb, ueCb, cqiCfg, ueCat)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
-      +(cellCb->crntTime.subframe);
+      +(cellCb->crntTime.slot);
    cqiCb = RG_SCH_GET_UE_CELL_CQI_CB(ueCb,cellCb);
    /* 1. Rank Indicator is enabled  */
    if(cqiCfg->cqiSetup.riEna)
    cqiCb = RG_SCH_GET_UE_CELL_CQI_CB(ueCb,cellCb);
    /* 1. Rank Indicator is enabled  */
    if(cqiCfg->cqiSetup.riEna)
@@ -8695,7 +8695,7 @@ PUBLIC S16 rgSCHCfgSrsUeCfg(cellCb, ueCb, srsCfg)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
-      +(cellCb->crntTime.subframe);
+      +(cellCb->crntTime.slot);
 
    if(RGR_SCH_SRS_SETUP == srsCfg->type) 
    {
 
    if(RGR_SCH_SRS_SETUP == srsCfg->type) 
    {
@@ -8844,7 +8844,7 @@ PUBLIC S16 rgSCHCfgSrUeCfg(cellCb, ueCb, srCfg)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
 
 
    crntTime = (cellCb->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
-      +(cellCb->crntTime.subframe);
+      +(cellCb->crntTime.slot);
    if(srCfg->type == RGR_SCH_SR_SETUP) 
    {
       /*  1. Copy the Received Cfg parameters to local cb  */
    if(srCfg->type == RGR_SCH_SR_SETUP) 
    {
       /*  1. Copy the Received Cfg parameters to local cb  */
index 75fa54a..0c055d5 100755 (executable)
@@ -3504,13 +3504,13 @@ CmLteTimingInfo   end;
    if (end.sfn > start.sfn)
    {
       if (frm.sfn > start.sfn
    if (end.sfn > start.sfn)
    {
       if (frm.sfn > start.sfn
-            || (frm.sfn == start.sfn && frm.subframe >= start.subframe))
+            || (frm.sfn == start.sfn && frm.slot >= start.slot))
       {
          if (frm.sfn < end.sfn
 #ifdef EMTC_ENABLE
       {
          if (frm.sfn < end.sfn
 #ifdef EMTC_ENABLE
-               || (frm.sfn == end.sfn && frm.subframe <= end.subframe))
+               || (frm.sfn == end.sfn && frm.slot <= end.slot))
 #else
 #else
-               || (frm.sfn == end.sfn && frm.subframe <= start.subframe))
+               || (frm.sfn == end.sfn && frm.slot <= start.slot))
 #endif
          {
             inWin = TRUE;
 #endif
          {
             inWin = TRUE;
@@ -3521,14 +3521,14 @@ CmLteTimingInfo   end;
    else if (end.sfn < start.sfn)
    {
       if (frm.sfn > start.sfn
    else if (end.sfn < start.sfn)
    {
       if (frm.sfn > start.sfn
-            || (frm.sfn == start.sfn && frm.subframe >= start.subframe))
+            || (frm.sfn == start.sfn && frm.slot >= start.slot))
       {
          inWin = TRUE;
       }
       else
       {
          if (frm.sfn < end.sfn
       {
          inWin = TRUE;
       }
       else
       {
          if (frm.sfn < end.sfn
-               || (frm.sfn == end.sfn && frm.subframe <= end.subframe))
+               || (frm.sfn == end.sfn && frm.slot <= end.slot))
          {
             inWin = TRUE;
          }
          {
             inWin = TRUE;
          }
@@ -3537,8 +3537,8 @@ CmLteTimingInfo   end;
    else  /* start.sfn == end.sfn */
    {
       if (frm.sfn == start.sfn
    else  /* start.sfn == end.sfn */
    {
       if (frm.sfn == start.sfn
-            && (frm.subframe >= start.subframe
-               && frm.subframe <= end.subframe))
+            && (frm.slot >= start.slot
+               && frm.slot <= end.slot))
       {
          inWin = TRUE;
       }
       {
          inWin = TRUE;
       }
@@ -4501,7 +4501,7 @@ RgSchCmnDlRbAllocInfo      *allocInfo;
    RGSCHDECRFRMCRNTTIME(frm, winStartFrm, winGap);
 
        //5G_TODO TIMING update. Need to check
    RGSCHDECRFRMCRNTTIME(frm, winStartFrm, winGap);
 
        //5G_TODO TIMING update. Need to check
-   winStartIdx = (winStartFrm.sfn & 1) * RGSCH_MAX_RA_RNTI+ winStartFrm.subframe;
+   winStartIdx = (winStartFrm.sfn & 1) * RGSCH_MAX_RA_RNTI+ winStartFrm.slot;
 
    for(i = 0; ((i < cell->rachCfg.raWinSize) && (noRaRnti < RG_SCH_CMN_MAX_CMN_PDCCH)); i++)
    {
 
    for(i = 0; ((i < cell->rachCfg.raWinSize) && (noRaRnti < RG_SCH_CMN_MAX_CMN_PDCCH)); i++)
    {
@@ -6117,7 +6117,7 @@ RgSchDlHqProcCb            *hqP;
          addedForScell,
          addedForScell1,
          cell->crntTime.sfn,
          addedForScell,
          addedForScell1,
          cell->crntTime.sfn,
-         cell->crntTime.subframe);
+         cell->crntTime.slot);
          */
       }
 #endif
          */
       }
 #endif
@@ -6163,7 +6163,7 @@ RgSchDlHqProcCb            *hqP;
          /*
          printf ("add DL TPT is %lu  sfn:sf %d:%d \n", hqP->hqE->ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(hqP->hqE->cell)].dlTpt ,
          cell->crntTime.sfn,
          /*
          printf ("add DL TPT is %lu  sfn:sf %d:%d \n", hqP->hqE->ue->tenbStats->stats.nonPersistent.sch[RG_SCH_CELLINDEX(hqP->hqE->cell)].dlTpt ,
          cell->crntTime.sfn,
-         cell->crntTime.subframe);
+         cell->crntTime.slot);
          */
       }
 #endif
          */
       }
 #endif
@@ -6974,10 +6974,10 @@ RgSchCellCb *cell;
 
    TRC2(rgSCHCmnUpdVars);
 
 
    TRC2(rgSCHCmnUpdVars);
 
-   idx = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe);
+   idx = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot);
    cellUl->idx     = ((idx) % (RG_SCH_CMN_UL_NUM_SF));
 #ifdef UL_ADPT_DBG     
    cellUl->idx     = ((idx) % (RG_SCH_CMN_UL_NUM_SF));
 #ifdef UL_ADPT_DBG     
-   printf("idx %d cellUl->idx  %d RGSCH_NUM_SUB_FRAMES_5G %d  time(%d %d) \n",idx,cellUl->idx ,RGSCH_NUM_SUB_FRAMES_5G,cell->crntTime.sfn,cell->crntTime.subframe);
+   printf("idx %d cellUl->idx  %d RGSCH_NUM_SUB_FRAMES_5G %d  time(%d %d) \n",idx,cellUl->idx ,RGSCH_NUM_SUB_FRAMES_5G,cell->crntTime.sfn,cell->crntTime.slot);
 #endif    
    /* Need to scheduler for after SCHED_DELTA */
    /* UL allocation has been advanced by 1 subframe
 #endif    
    /* Need to scheduler for after SCHED_DELTA */
    /* UL allocation has been advanced by 1 subframe
@@ -7163,7 +7163,7 @@ RgSchCellCb *cell;
    U32           numUlSf;
   
 #ifndef LTE_TDD
    U32           numUlSf;
   
 #ifndef LTE_TDD
-   numUlSf  = (timeInfo->sfn * RGSCH_NUM_SUB_FRAMES_5G + timeInfo->subframe);
+   numUlSf  = (timeInfo->sfn * RGSCH_NUM_SUB_FRAMES_5G + timeInfo->slot);
    procId   = numUlSf % RGSCH_NUM_UL_HQ_PROC;
 #else
    U8            ulDlCfgIdx = cell->ulDlCfgIdx;
    procId   = numUlSf % RGSCH_NUM_UL_HQ_PROC;
 #else
    U8            ulDlCfgIdx = cell->ulDlCfgIdx;
@@ -7192,7 +7192,7 @@ RgSchCellCb *cell;
    /* Calculate the total number of UL sf */
    /*  -1 is done since uplink sf are counted from 0 */
    numUlSf = numUlSfInSfn *  (timeInfo->sfn + (sfnCycle*1024)) +
    /* Calculate the total number of UL sf */
    /*  -1 is done since uplink sf are counted from 0 */
    numUlSf = numUlSfInSfn *  (timeInfo->sfn + (sfnCycle*1024)) +
-                  rgSchTddNumUlSubfrmTbl[ulDlCfgIdx][timeInfo->subframe] - 1;
+                  rgSchTddNumUlSubfrmTbl[ulDlCfgIdx][timeInfo->slot] - 1;
 
    procId = numUlSf % numUlHarq;   
 #endif
 
    procId = numUlSf % numUlHarq;   
 #endif
@@ -8510,7 +8510,7 @@ U32                *waitPer;
    TRC2(rgSCHCmnGetRefreshPer);     
 
    refreshPer = RG_SCH_CMN_REFRESH_TIME * RG_SCH_CMN_REFRESH_TIMERES;
    TRC2(rgSCHCmnGetRefreshPer);     
 
    refreshPer = RG_SCH_CMN_REFRESH_TIME * RG_SCH_CMN_REFRESH_TIMERES;
-   crntSubFrm = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe;
+   crntSubFrm = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot;
    /* Fix: syed align multiple UEs to refresh at same time */
    *waitPer = refreshPer - (crntSubFrm % refreshPer);
    *waitPer = RGSCH_CEIL(*waitPer, RG_SCH_CMN_REFRESH_TIMERES);
    /* Fix: syed align multiple UEs to refresh at same time */
    *waitPer = refreshPer - (crntSubFrm % refreshPer);
    *waitPer = RGSCH_CEIL(*waitPer, RG_SCH_CMN_REFRESH_TIMERES);
@@ -8866,7 +8866,7 @@ RgrUeCfg    *cfg;
    ue->ue5gtfCb.cqiRiPer = 100;
    /* 5gtf TODO: CQIs to start from (10,0)*/
    ue->ue5gtfCb.nxtCqiRiOccn.sfn = 10;
    ue->ue5gtfCb.cqiRiPer = 100;
    /* 5gtf TODO: CQIs to start from (10,0)*/
    ue->ue5gtfCb.nxtCqiRiOccn.sfn = 10;
-   ue->ue5gtfCb.nxtCqiRiOccn.subframe = 0;
+   ue->ue5gtfCb.nxtCqiRiOccn.slot = 0;
    ue->ue5gtfCb.rank = 1;
 
    printf("\nschd cfg at mac,%u,%u,%u,%u,%u\n",ue->ue5gtfCb.grpId,ue->ue5gtfCb.BeamId,ue->ue5gtfCb.numCC,
    ue->ue5gtfCb.rank = 1;
 
    printf("\nschd cfg at mac,%u,%u,%u,%u,%u\n",ue->ue5gtfCb.grpId,ue->ue5gtfCb.BeamId,ue->ue5gtfCb.numCC,
@@ -11130,10 +11130,10 @@ U8            *bwAvailRef;
    {
 #ifndef ALIGN_64BIT
           printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%ld:%d:%d:%d:%d:%d]\n",
    {
 #ifndef ALIGN_64BIT
           printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%ld:%d:%d:%d:%d:%d]\n",
-        cell->crntTime.sfn, cell->crntTime.subframe, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
+        cell->crntTime.sfn, cell->crntTime.slot, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
 #else
           printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%d:%d:%d:%d:%d:%d]\n",
 #else
           printf("CA_DBG:: puschRbStart:n1Rb:mixedRb:n1PerRb:totalCce:n1Max:n1RbPart:n2Rb::[%d:%d] [%d:%d:%d:%d:%d:%d:%d:%d]\n",
-        cell->crntTime.sfn, cell->crntTime.subframe, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
+        cell->crntTime.sfn, cell->crntTime.slot, puschRbStart, n1Rb, mixedRb,n1PerRb, totalCce, n1Max, n1RbPart, n2Rb);
 #endif
    }
 
 #endif
    }
 
@@ -13148,7 +13148,7 @@ RgSchCmnDlRbAllocInfo *allocInfo;
             raCb->msg3AllocTime = cell->crntTime;
             RGSCH_INCR_SUB_FRAME(raCb->msg3AllocTime, RG_SCH_CMN_MIN_MSG3_RECP_INTRVL);
 #else
             raCb->msg3AllocTime = cell->crntTime;
             RGSCH_INCR_SUB_FRAME(raCb->msg3AllocTime, RG_SCH_CMN_MIN_MSG3_RECP_INTRVL);
 #else
-            msg3SchdIdx = (cell->crntTime.subframe+RG_SCH_CMN_DL_DELTA) % 
+            msg3SchdIdx = (cell->crntTime.slot+RG_SCH_CMN_DL_DELTA) % 
                                  RGSCH_NUM_SUB_FRAMES;
             /*[ccpu00134666]-MOD-Modify the check to schedule the RAR in
               special subframe */                       
                                  RGSCH_NUM_SUB_FRAMES;
             /*[ccpu00134666]-MOD-Modify the check to schedule the RAR in
               special subframe */                       
@@ -13158,7 +13158,7 @@ RgSchCmnDlRbAllocInfo *allocInfo;
                RGSCHCMNADDTOCRNTTIME(cell->crntTime,raCb->msg3AllocTime,
                                        RG_SCH_CMN_DL_DELTA)
                msg3Subfrm = rgSchTddMsg3SubfrmTbl[ulDlCfgIdx][
                RGSCHCMNADDTOCRNTTIME(cell->crntTime,raCb->msg3AllocTime,
                                        RG_SCH_CMN_DL_DELTA)
                msg3Subfrm = rgSchTddMsg3SubfrmTbl[ulDlCfgIdx][
-                                       raCb->msg3AllocTime.subframe];
+                                       raCb->msg3AllocTime.slot];
                RGSCHCMNADDTOCRNTTIME(raCb->msg3AllocTime, raCb->msg3AllocTime, 
                                  msg3Subfrm);
             }
                RGSCHCMNADDTOCRNTTIME(raCb->msg3AllocTime, raCb->msg3AllocTime, 
                                  msg3Subfrm);
             }
@@ -13225,7 +13225,7 @@ RgSchCmnDlRbAllocInfo *allocInfo;
             "RNTI:%d Scheduled RAR @ (%u,%u) ",
             raRspAlloc->rnti, 
             cell->crntTime.sfn,
             "RNTI:%d Scheduled RAR @ (%u,%u) ",
             raRspAlloc->rnti, 
             cell->crntTime.sfn,
-            cell->crntTime.subframe);
+            cell->crntTime.slot);
    }
    RETVOID;
 }
    }
    RETVOID;
 }
@@ -14989,7 +14989,7 @@ RgSchCellCb *cell;
      to available scope for optimization */
    TRC2(rgSCHCmnTmrProc);
 
      to available scope for optimization */
    TRC2(rgSCHCmnTmrProc);
 
-   if ((cell->crntTime.subframe % RGSCH_NUM_SUB_FRAMES_5G) == 0)
+   if ((cell->crntTime.slot % RGSCH_NUM_SUB_FRAMES_5G) == 0)
    {
       /* Reset the counters periodically */
       if ((cell->crntTime.sfn % RG_SCH_CMN_CSG_REFRESH_TIME) == 0)
    {
       /* Reset the counters periodically */
       if ((cell->crntTime.sfn % RG_SCH_CMN_CSG_REFRESH_TIME) == 0)
@@ -15070,7 +15070,7 @@ U8              delta;
 #ifdef LTE_TDD
       dlIdx = rgSCHUtlGetDlSfIdx(cell, &pdsch);
 #else
 #ifdef LTE_TDD
       dlIdx = rgSCHUtlGetDlSfIdx(cell, &pdsch);
 #else
-      dlIdx = (((pdsch.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (pdsch.subframe % RGSCH_NUM_SUB_FRAMES));
+      dlIdx = (((pdsch.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (pdsch.slot % RGSCH_NUM_SUB_FRAMES));
       RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
 #endif  
       /* If current downlink subframe index is same as pdcch SF index,
       RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
 #endif  
       /* If current downlink subframe index is same as pdcch SF index,
@@ -15190,7 +15190,7 @@ U8              dlIdx;
       rgSchTddPdcchSfIncTbl[cell->ulDlCfgIdx][sfNum]) % cell->numDlSubfrms;
 #else
    cell->dynCfiCb.pdcchSfIdx = (dlIdx + RG_SCH_CFI_APPLY_DELTA) % \
       rgSchTddPdcchSfIncTbl[cell->ulDlCfgIdx][sfNum]) % cell->numDlSubfrms;
 #else
    cell->dynCfiCb.pdcchSfIdx = (dlIdx + RG_SCH_CFI_APPLY_DELTA) % \
-        RGSCH_NUM_DL_SUBFRAMES;
+        RGSCH_NUM_DL_slotS;
 #endif
 }
 
 #endif
 }
 
@@ -15247,7 +15247,7 @@ U8              delta;
 #else
    /* Changing the idexing
       so that proper subframe is selected */
 #else
    /* Changing the idexing
       so that proper subframe is selected */
-   dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.subframe % RGSCH_NUM_SUB_FRAMES));
+   dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.slot % RGSCH_NUM_SUB_FRAMES));
    RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
    dlSf = cell->subFrms[dlIdx];
 #endif 
    RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
    dlSf = cell->subFrms[dlIdx];
 #endif 
@@ -17057,7 +17057,7 @@ PUBLIC Void rgSCHCmnSrsInd(cell, ue, srsRpt, timingInfo)
     U32 recReqTime; /*Received Time in TTI*/
     TRC2(rgSCHCmnSrsInd);
 
     U32 recReqTime; /*Received Time in TTI*/
     TRC2(rgSCHCmnSrsInd);
 
-    recReqTime = (timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) + timingInfo.subframe;
+    recReqTime = (timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) + timingInfo.slot;
     ue->srsCb.selectedAnt = (recReqTime/ue->srsCb.peri)%2;
     if(srsRpt->wideCqiPres)
     {
     ue->srsCb.selectedAnt = (recReqTime/ue->srsCb.peri)%2;
     if(srsRpt->wideCqiPres)
     {
@@ -20016,7 +20016,7 @@ RgSchCellCb *cell;
    /* ccpu00132654-ADD- Initializing all the indices in every subframe*/ 
    rgSCHCmnInitVars(cell);
 
    /* ccpu00132654-ADD- Initializing all the indices in every subframe*/ 
    rgSCHCmnInitVars(cell);
 
-   idx = (cell->crntTime.subframe + TFU_ULCNTRL_DLDELTA) % RGSCH_NUM_SUB_FRAMES;
+   idx = (cell->crntTime.slot + TFU_ULCNTRL_DLDELTA) % RGSCH_NUM_SUB_FRAMES;
    /* Calculate the UL scheduling subframe idx based on the 
       Pusch k table */
    if(rgSchTddPuschTxKTbl[ulDlCfgIdx][idx] != 0)
    /* Calculate the UL scheduling subframe idx based on the 
       Pusch k table */
    if(rgSchTddPuschTxKTbl[ulDlCfgIdx][idx] != 0)
@@ -20064,13 +20064,13 @@ RgSchCellCb *cell;
       }
    }
 
       }
    }
 
-   idx = (cell->crntTime.subframe + TFU_RECPREQ_DLDELTA) % RGSCH_NUM_SUB_FRAMES;
+   idx = (cell->crntTime.slot + TFU_RECPREQ_DLDELTA) % RGSCH_NUM_SUB_FRAMES;
    if (rgSchTddUlDlSubfrmTbl[ulDlCfgIdx][idx] == RG_SCH_TDD_UL_SUBFRAME)
    {
       RGSCHCMNADDTOCRNTTIME(cell->crntTime, timeInfo, TFU_RECPREQ_DLDELTA)
       cellUl->rcpReqIdx   = rgSCHCmnGetUlSfIdx(&timeInfo, cell);
    }
    if (rgSchTddUlDlSubfrmTbl[ulDlCfgIdx][idx] == RG_SCH_TDD_UL_SUBFRAME)
    {
       RGSCHCMNADDTOCRNTTIME(cell->crntTime, timeInfo, TFU_RECPREQ_DLDELTA)
       cellUl->rcpReqIdx   = rgSCHCmnGetUlSfIdx(&timeInfo, cell);
    }
-   idx = (cell->crntTime.subframe+RG_SCH_CMN_DL_DELTA) % RGSCH_NUM_SUB_FRAMES;
+   idx = (cell->crntTime.slot+RG_SCH_CMN_DL_DELTA) % RGSCH_NUM_SUB_FRAMES;
    
    /*[ccpu00134666]-MOD-Modify the check to schedule the RAR in
      special subframe */                       
    
    /*[ccpu00134666]-MOD-Modify the check to schedule the RAR in
      special subframe */                       
@@ -20383,7 +20383,7 @@ RgSchCellCb   *cell;
    {
       while (cellSch->rachCfg.prachMskIndx < cell->rachCfg.raOccasion.size)
       {
    {
       while (cellSch->rachCfg.prachMskIndx < cell->rachCfg.raOccasion.size)
       {
-         if (cell->crntTime.subframe <\
+         if (cell->crntTime.slot <\
                cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx])
          {
             break;
                cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx])
          {
             break;
@@ -20404,12 +20404,12 @@ RgSchCellCb   *cell;
          }
          cellSch->rachCfg.prachMskIndx = 0;
       }
          }
          cellSch->rachCfg.prachMskIndx = 0;
       }
-      cellSch->rachCfg.applFrm.subframe = \
+      cellSch->rachCfg.applFrm.slot = \
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
    }
    else
    {
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
    }
    else
    {
-      cellSch->rachCfg.applFrm.subframe = \
+      cellSch->rachCfg.applFrm.slot = \
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
    }
 
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
    }
 
@@ -20469,7 +20469,7 @@ RgSchCellCb  *cell;
          cellSch->rachCfg.applFrm.sfn = (cellSch->rachCfg.applFrm.sfn+2) % \
                                         RGSCH_MAX_SFN;
       }
          cellSch->rachCfg.applFrm.sfn = (cellSch->rachCfg.applFrm.sfn+2) % \
                                         RGSCH_MAX_SFN;
       }
-      cellSch->rachCfg.applFrm.subframe = cell->rachCfg.raOccasion.\
+      cellSch->rachCfg.applFrm.slot = cell->rachCfg.raOccasion.\
                                           subFrameNum[0];
    }
    else /* applFrm.sfn is still valid */
                                           subFrameNum[0];
    }
    else /* applFrm.sfn is still valid */
@@ -20477,7 +20477,7 @@ RgSchCellCb  *cell;
       cellSch->rachCfg.prachMskIndx += 1;
       if ( cellSch->rachCfg.prachMskIndx < RGR_MAX_SUBFRAME_NUM )
       {
       cellSch->rachCfg.prachMskIndx += 1;
       if ( cellSch->rachCfg.prachMskIndx < RGR_MAX_SUBFRAME_NUM )
       {
-         cellSch->rachCfg.applFrm.subframe = \
+         cellSch->rachCfg.applFrm.slot = \
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
       }
    }
                                           cell->rachCfg.raOccasion.subFrameNum[cellSch->rachCfg.prachMskIndx];
       }
    }
@@ -21911,7 +21911,7 @@ RgSchUlSf      *sf;
    {
       nxtAlloc = rgSCHUtlUlAllocNxt(sf, alloc);
 #ifdef UL_ADPT_DBG      
    {
       nxtAlloc = rgSCHUtlUlAllocNxt(sf, alloc);
 #ifdef UL_ADPT_DBG      
-      printf("rgSCHCmnUlRmvCmpltdAllocs:time(%d %d) alloc->hqProc->remTx %d hqProcId(%d) \n",cell->crntTime.sfn,cell->crntTime.subframe,alloc->hqProc->remTx, alloc->grnt.hqProcId);
+      printf("rgSCHCmnUlRmvCmpltdAllocs:time(%d %d) alloc->hqProc->remTx %d hqProcId(%d) \n",cell->crntTime.sfn,cell->crntTime.slot,alloc->hqProc->remTx, alloc->grnt.hqProcId);
 #endif
       alloc->hqProc->rcvdCrcInd = TRUE;
       if ((alloc->hqProc->rcvdCrcInd) || (alloc->hqProc->remTx == 0))
 #endif
       alloc->hqProc->rcvdCrcInd = TRUE;
       if ((alloc->hqProc->rcvdCrcInd) || (alloc->hqProc->remTx == 0))
@@ -30872,7 +30872,7 @@ RgSchCellCb             *cell;
     * from application. No need to wait for next modification period.
     */
    if((pdSchTmInfo.sfn % RGSCH_SIB1_RPT_PERIODICITY == 0)
     * from application. No need to wait for next modification period.
     */
    if((pdSchTmInfo.sfn % RGSCH_SIB1_RPT_PERIODICITY == 0)
-         && (RGSCH_SIB1_TX_SF_NUM == (pdSchTmInfo.subframe % RGSCH_NUM_SUB_FRAMES)))
+         && (RGSCH_SIB1_TX_SF_NUM == (pdSchTmInfo.slot % RGSCH_NUM_SUB_FRAMES)))
    {   
       /*Check whether SIB1 with PWS has been updated*/
       if(cell->siCb.siBitMask & RGSCH_SI_SIB1_PWS_UPD)
    {   
       /*Check whether SIB1 with PWS has been updated*/
       if(cell->siCb.siBitMask & RGSCH_SI_SIB1_PWS_UPD)
@@ -30893,9 +30893,9 @@ RgSchCellCb             *cell;
      period. If current SFN,SF No doesn't marks the start of next
      modification period, then return. */
    if(!((pdSchTmInfo.sfn % cell->siCfg.modPrd == 0)
      period. If current SFN,SF No doesn't marks the start of next
      modification period, then return. */
    if(!((pdSchTmInfo.sfn % cell->siCfg.modPrd == 0)
-            && (0 == pdSchTmInfo.subframe)))
+            && (0 == pdSchTmInfo.slot)))
    /*if(!((((pdSchTmInfo.hSfn * 1024) + pdSchTmInfo.sfn) % cell->siCfg.modPrd == 0)
    /*if(!((((pdSchTmInfo.hSfn * 1024) + pdSchTmInfo.sfn) % cell->siCfg.modPrd == 0)
-            && (0 == pdSchTmInfo.subframe)))*/
+            && (0 == pdSchTmInfo.slot)))*/
    {
       RETVOID;
    }
    {
       RETVOID;
    }
@@ -31042,7 +31042,7 @@ RgSchCellCb             *cell;
    if(cell->siCb.inWindow)
    {
       if ((crntTmInfo.sfn % cell->siCfg.minPeriodicity) == 0 && 
    if(cell->siCb.inWindow)
    {
       if ((crntTmInfo.sfn % cell->siCfg.minPeriodicity) == 0 && 
-          crntTmInfo.subframe == 0)
+          crntTmInfo.slot == 0)
       {
          /* Reinit inWindow at the beginning of every SI window */
          cell->siCb.inWindow = siWinSize - 1;
       {
          /* Reinit inWindow at the beginning of every SI window */
          cell->siCb.inWindow = siWinSize - 1;
@@ -31065,13 +31065,13 @@ RgSchCellCb             *cell;
       cell->siCb.inWindow = siWinSize - 1;
    }
 
       cell->siCb.inWindow = siWinSize - 1;
    }
 
-   x = rgSCHCmnGetSiSetId(crntTmInfo.sfn, crntTmInfo.subframe
+   x = rgSCHCmnGetSiSetId(crntTmInfo.sfn, crntTmInfo.slot
                                   cell->siCfg.minPeriodicity); 
 
    /* Window Id within a SI set. This window Id directly maps to a
     * unique SI Id */
    windowId = (((crntTmInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) + 
                                   cell->siCfg.minPeriodicity); 
 
    /* Window Id within a SI set. This window Id directly maps to a
     * unique SI Id */
    windowId = (((crntTmInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) + 
-            crntTmInfo.subframe) - (x * (cell->siCfg.minPeriodicity * 10))) 
+            crntTmInfo.slot) - (x * (cell->siCfg.minPeriodicity * 10))) 
                                                                / siWinSize;
 
    if(windowId >= RGR_MAX_NUM_SI)
                                                                / siWinSize;
 
    if(windowId >= RGR_MAX_NUM_SI)
@@ -31094,7 +31094,7 @@ RgSchCellCb             *cell;
          cell->siCb.siCtx.warningSiFlag = cell->siCb.siArray[windowId].
                                                            isWarningSi;
          cell->siCb.siCtx.timeToTx.sfn = crntTmInfo.sfn;
          cell->siCb.siCtx.warningSiFlag = cell->siCb.siArray[windowId].
                                                            isWarningSi;
          cell->siCb.siCtx.timeToTx.sfn = crntTmInfo.sfn;
-         cell->siCb.siCtx.timeToTx.subframe = crntTmInfo.subframe;
+         cell->siCb.siCtx.timeToTx.slot = crntTmInfo.slot;
 
          RG_SCH_ADD_TO_CRNT_TIME(cell->siCb.siCtx.timeToTx,
                cell->siCb.siCtx.maxTimeToTx, (siWinSize - 1))
 
          RG_SCH_ADD_TO_CRNT_TIME(cell->siCb.siCtx.timeToTx,
                cell->siCb.siCtx.maxTimeToTx, (siWinSize - 1))
@@ -31179,7 +31179,7 @@ RgInfSfAlloc            *subfrmAlloc;
    {
 #endif
    if((crntTimInfo.sfn % RGSCH_MIB_PERIODICITY == 0)
    {
 #endif
    if((crntTimInfo.sfn % RGSCH_MIB_PERIODICITY == 0)
-         && (RGSCH_MIB_TX_SF_NUM == crntTimInfo.subframe))
+         && (RGSCH_MIB_TX_SF_NUM == crntTimInfo.slot))
    {
       MsgLen  mibLen = 0;
       U8      sfnOctet, mibOct2 = 0;
    {
       MsgLen  mibLen = 0;
       U8      sfnOctet, mibOct2 = 0;
@@ -31242,7 +31242,7 @@ RgInfSfAlloc            *subfrmAlloc;
      is not required here since the below check takes care
      of SFNs applicable for this one too.*/
    if((crntTimInfo.sfn % RGSCH_SIB1_RPT_PERIODICITY == 0)
      is not required here since the below check takes care
      of SFNs applicable for this one too.*/
    if((crntTimInfo.sfn % RGSCH_SIB1_RPT_PERIODICITY == 0)
-         && (RGSCH_SIB1_TX_SF_NUM == crntTimInfo.subframe))
+         && (RGSCH_SIB1_TX_SF_NUM == crntTimInfo.slot))
    {
       /*If SIB1 has not been yet setup by Application, return*/
       if(NULLP == (cell->siCb.crntSiInfo.sib1Info.sib1))
    {
       /*If SIB1 has not been yet setup by Application, return*/
       if(NULLP == (cell->siCb.crntSiInfo.sib1Info.sib1))
@@ -31306,7 +31306,7 @@ RgInfSfAlloc            *subfrmAlloc;
          {
             /* Determine next scheduling subframe is ABS or not */
             if(RG_SCH_ABS_ENABLED_ABS_SF == (RgSchAbsSfEnum)(cell->lteAdvCb.absCfg.absPattern
          {
             /* Determine next scheduling subframe is ABS or not */
             if(RG_SCH_ABS_ENABLED_ABS_SF == (RgSchAbsSfEnum)(cell->lteAdvCb.absCfg.absPattern
-                  [((crntTimInfo.sfn*RGSCH_NUM_SUB_FRAMES) + crntTimInfo.subframe) % RGR_ABS_PATTERN_LEN]))
+                  [((crntTimInfo.sfn*RGSCH_NUM_SUB_FRAMES) + crntTimInfo.slot) % RGR_ABS_PATTERN_LEN]))
             {
                /* Skip the SI scheduling to next tti */
                RETVOID;
             {
                /* Skip the SI scheduling to next tti */
                RETVOID;
@@ -31867,7 +31867,7 @@ RgSchCellCb        *cell;
    if(RGR_ENABLE == cell->lteAdvCb.absCfg.status)
    {
       cell->lteAdvCb.absPatternDlIdx = 
    if(RGR_ENABLE == cell->lteAdvCb.absCfg.status)
    {
       cell->lteAdvCb.absPatternDlIdx = 
-         ((frm.sfn*RGSCH_NUM_SUB_FRAMES_5G) + frm.subframe) % RGR_ABS_PATTERN_LEN;
+         ((frm.sfn*RGSCH_NUM_SUB_FRAMES_5G) + frm.slot) % RGR_ABS_PATTERN_LEN;
       cell->lteAdvCb.absDlSfInfo = (RgSchAbsSfEnum)(cell->lteAdvCb.absCfg.absPattern[
             cell->lteAdvCb.absPatternDlIdx]);
 
       cell->lteAdvCb.absDlSfInfo = (RgSchAbsSfEnum)(cell->lteAdvCb.absCfg.absPattern[
             cell->lteAdvCb.absPatternDlIdx]);
 
@@ -32435,7 +32435,7 @@ PUBLIC Void rgSCHCmnDlSch (cell)
             /*
                      printf("ul5gtfsidDlAlreadyMarkUl: %d, [sfn:sf] [%04d:%02d]\n", 
                     ul5gtfsidDlAlreadyMarkUl, cellSch->dl.time.sfn, 
             /*
                      printf("ul5gtfsidDlAlreadyMarkUl: %d, [sfn:sf] [%04d:%02d]\n", 
                     ul5gtfsidDlAlreadyMarkUl, cellSch->dl.time.sfn, 
-                    cellSch->dl.time.subframe);
+                    cellSch->dl.time.slot);
             */
          }
                   RETVOID;
             */
          }
                   RETVOID;
index af87706..e868191 100755 (executable)
@@ -113,7 +113,7 @@ extern "C" {
  ((RgSchCmnCell *)(_ue->cell->sc.sch))->ul.schdHqProcIdx])->alloc) &&\
 ((&RG_SCH_CMN_GET_UL_UE(_ue, _ue->cell)->hqEnt.hqProcCb[\
  ((RgSchCmnCell *)(_ue->cell->sc.sch))->ul.schdHqProcIdx])->alloc->rnti == _ue->spsRnti) ? TRUE:FALSE)) || \
  ((RgSchCmnCell *)(_ue->cell->sc.sch))->ul.schdHqProcIdx])->alloc) &&\
 ((&RG_SCH_CMN_GET_UL_UE(_ue, _ue->cell)->hqEnt.hqProcCb[\
  ((RgSchCmnCell *)(_ue->cell->sc.sch))->ul.schdHqProcIdx])->alloc->rnti == _ue->spsRnti) ? TRUE:FALSE)) || \
-  (_ue->ul.relPdcchSchdTime.sfn == _cell->crntTime.sfn && _ue->ul.relPdcchSchdTime.subframe == _cell->crntTime.subframe))
+  (_ue->ul.relPdcchSchdTime.sfn == _cell->crntTime.sfn && _ue->ul.relPdcchSchdTime.slot == _cell->crntTime.slot))
 #endif /* LTEMAC_SPS */
 
 /* RRM_SP1_START */
 #endif /* LTEMAC_SPS */
 
 /* RRM_SP1_START */
@@ -425,11 +425,10 @@ extern "C" {
 #define RGSCHCMNADDTOCRNTTIME(crntTime, toFill, incr) \
 {\
    U32 absoluteTime;\
 #define RGSCHCMNADDTOCRNTTIME(crntTime, toFill, incr) \
 {\
    U32 absoluteTime;\
-   absoluteTime = crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + crntTime.subframe;\
+   absoluteTime = crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + crntTime.slot;\
    absoluteTime += incr;\
    toFill.sfn = (absoluteTime /RGSCH_NUM_SUB_FRAMES_5G)% 1024;\
    absoluteTime += incr;\
    toFill.sfn = (absoluteTime /RGSCH_NUM_SUB_FRAMES_5G)% 1024;\
-   toFill.subframe = absoluteTime % RGSCH_NUM_SUB_FRAMES_5G;\
-   toFill.hSfn = 0;\
+   toFill.slot = absoluteTime % RGSCH_NUM_SUB_FRAMES_5G;\
 }
 
 #define RG_SCH_CMN_PWR_USE_CFG_MAX_PWR    (-128)
 }
 
 #define RG_SCH_CMN_PWR_USE_CFG_MAX_PWR    (-128)
@@ -541,7 +540,7 @@ extern "C" {
 #define RG_SCH_CMN_SPS_DL_IS_SPS_TX_HQP(hqP) (((RgSchCmnDlHqProc *)((hqP)->sch))->isSpsActv)
 #define RG_SCH_CMN_IS_UE_SPS_SCHDLD(_ue, _cell,  _schdTime)\
    ((((_ue)->cellInfo[(_ue->cellIdToCellIdxMap[RG_SCH_CELLINDEX(_cell)])])->dlAllocCb.spsSchdTime.sfn == _schdTime.sfn) &&\
 #define RG_SCH_CMN_SPS_DL_IS_SPS_TX_HQP(hqP) (((RgSchCmnDlHqProc *)((hqP)->sch))->isSpsActv)
 #define RG_SCH_CMN_IS_UE_SPS_SCHDLD(_ue, _cell,  _schdTime)\
    ((((_ue)->cellInfo[(_ue->cellIdToCellIdxMap[RG_SCH_CELLINDEX(_cell)])])->dlAllocCb.spsSchdTime.sfn == _schdTime.sfn) &&\
-    (((_ue)->cellInfo[(_ue->cellIdToCellIdxMap[RG_SCH_CELLINDEX(_cell)])])->dlAllocCb.spsSchdTime.subframe == _schdTime.subframe))
+    (((_ue)->cellInfo[(_ue->cellIdToCellIdxMap[RG_SCH_CELLINDEX(_cell)])])->dlAllocCb.spsSchdTime.slot == _schdTime.slot))
 
 #define RG_SCH_CMN_DL_COUNT_ONES(_bitMask, _size, _numOnes)\
 {\
 
 #define RG_SCH_CMN_DL_COUNT_ONES(_bitMask, _size, _numOnes)\
 {\
index 156638d..b12ac8c 100755 (executable)
@@ -1621,7 +1621,7 @@ CmLteTimingInfo   key;
    while(tmpNode)
    {
       if((((RgSchCfgElem *)tmpNode->node)->actvTime.sfn == key.sfn) &&
    while(tmpNode)
    {
       if((((RgSchCfgElem *)tmpNode->node)->actvTime.sfn == key.sfn) &&
-            (((RgSchCfgElem *)tmpNode->node)->actvTime.subframe == key.subframe))
+            (((RgSchCfgElem *)tmpNode->node)->actvTime.slot == key.slot))
       {
          RETVALUE((RgSchCfgElem *)(tmpNode->node));
       }
       {
          RETVALUE((RgSchCfgElem *)(tmpNode->node));
       }
index f6c8c59..16def81 100755 (executable)
@@ -1203,7 +1203,7 @@ CmLteTimingInfo         timingInfo;
       RETVALUE(NULLP);
    }
 
       RETVALUE(NULLP);
    }
 
-   idx = ((timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G + timingInfo.subframe)/
+   idx = ((timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G + timingInfo.slot)/
          ue->dl.dlSpsCfg.dlSpsPrdctyEnum) % ue->dl.dlSpsCfg.numSpsHqProc;
 
 
          ue->dl.dlSpsCfg.dlSpsPrdctyEnum) % ue->dl.dlSpsCfg.numSpsHqProc;
 
 
@@ -1445,7 +1445,7 @@ RgSchCellCb             *cell;
           RETVALUE(ROK);
       }
    }
           RETVALUE(ROK);
       }
    }
-   ascIdx = rgSchTddDlAscSetIdxKTbl[cell->ulDlCfgIdx][timeInfo.subframe];
+   ascIdx = rgSchTddDlAscSetIdxKTbl[cell->ulDlCfgIdx][timeInfo.slot];
    noFdbks = ascIdx.numFdbkSubfrms;
 
    for(idx=0; idx<noFdbks; idx++)
    noFdbks = ascIdx.numFdbkSubfrms;
 
    for(idx=0; idx<noFdbks; idx++)
@@ -2019,7 +2019,7 @@ PRIVATE Void rgSchGetHqFdbkPosForM234(ue,hqP,isAck,fdbk,tbIdx,anInfo,M,timeInfo)
          statsCnt = statsCnt % 10000;
          dlHqStats[statsCnt].cellId = hqP->hqE->cell->cellId;
          dlHqStats[statsCnt].sfn = hqP->tbInfo[tbIdx].timingInfo.sfn; 
          statsCnt = statsCnt % 10000;
          dlHqStats[statsCnt].cellId = hqP->hqE->cell->cellId;
          dlHqStats[statsCnt].sfn = hqP->tbInfo[tbIdx].timingInfo.sfn; 
-         dlHqStats[statsCnt].sf = hqP->tbInfo[tbIdx].timingInfo.subframe
+         dlHqStats[statsCnt].sf = hqP->tbInfo[tbIdx].timingInfo.slot
          dlHqStats[statsCnt].ack = *isAck;
          dlHqStats[statsCnt].fdbkIdx = fdbkIdx;
          dlHqStats[statsCnt].ue = hqP->hqE->ue->ueId;;
          dlHqStats[statsCnt].ack = *isAck;
          dlHqStats[statsCnt].fdbkIdx = fdbkIdx;
          dlHqStats[statsCnt].ue = hqP->hqE->ue->ueId;;
@@ -2177,7 +2177,7 @@ RgSchErrInfo            *err;
    }
    
 #if ((defined LTEMAC_SPS_AN_MUX) || (defined LTE_ADV))
    }
    
 #if ((defined LTEMAC_SPS_AN_MUX) || (defined LTE_ADV))
-   ascIdx = rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][timeInfo.subframe];
+   ascIdx = rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][timeInfo.slot];
    noFdbks = ascIdx.numFdbkSubfrms;
 #endif
 #ifdef LTEMAC_SPS_AN_MUX
    noFdbks = ascIdx.numFdbkSubfrms;
 #endif
 #ifdef LTEMAC_SPS_AN_MUX
@@ -2647,7 +2647,7 @@ RgSchErrInfo            *err;
          ulDlCfgIdx  = cellCb->ulDlCfgIdx;
 
          maxFdbks = rgSchTddDlAscSetIdxKTbl[ulDlCfgIdx]
          ulDlCfgIdx  = cellCb->ulDlCfgIdx;
 
          maxFdbks = rgSchTddDlAscSetIdxKTbl[ulDlCfgIdx]
-            [timeInfo.subframe].
+            [timeInfo.slot].
             numFdbkSubfrms;
 
          for(itr=0; itr< maxFdbks; itr++)
             numFdbkSubfrms;
 
          for(itr=0; itr< maxFdbks; itr++)
@@ -2659,12 +2659,12 @@ RgSchErrInfo            *err;
             if(ue->uciFrmtTyp == RG_SCH_UCI_FORMAT1B_CS)
             {/* Using the sorted K table */
                RGSCHDECRFRMCRNTTIME (timeInfo, txTime, 
             if(ue->uciFrmtTyp == RG_SCH_UCI_FORMAT1B_CS)
             {/* Using the sorted K table */
                RGSCHDECRFRMCRNTTIME (timeInfo, txTime, 
-                     rgSchTddDlHqPucchResCalTbl[ulDlCfgIdx][timeInfo.subframe].subfrmNum[itr]);
+                     rgSchTddDlHqPucchResCalTbl[ulDlCfgIdx][timeInfo.slot].subfrmNum[itr]);
             }else
 #endif
             {
                RGSCHDECRFRMCRNTTIME (timeInfo, txTime, 
             }else
 #endif
             {
                RGSCHDECRFRMCRNTTIME (timeInfo, txTime, 
-                     rgSchTddDlAscSetIdxKTbl[ulDlCfgIdx][timeInfo.subframe].subfrmNum[itr]);
+                     rgSchTddDlAscSetIdxKTbl[ulDlCfgIdx][timeInfo.slot].subfrmNum[itr]);
             }
 
             if (RGSCH_TIMEINFO_SAME (txTime, ue->relPdcchTxTime))
             }
 
             if (RGSCH_TIMEINFO_SAME (txTime, ue->relPdcchTxTime))
@@ -2719,8 +2719,8 @@ RgSchErrInfo            *err;
          {
          RGSCH_NULL_CHECK(cellCb->instIdx, ue);
          RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,"CRNTI:%d"
          {
          RGSCH_NULL_CHECK(cellCb->instIdx, ue);
          RLOG_ARG3(L_ERROR,DBG_CELLID,cellCb->cellId,"CRNTI:%d"
-         " NO HARQ proc available for feedback:timeInfo:snf %d,subframe %d",
-         ue->ueId,timeInfo.sfn, timeInfo.subframe);
+         " NO HARQ proc available for feedback:timeInfo:snf %d,slot %d",
+         ue->ueId,timeInfo.sfn, timeInfo.slot);
          err->errType   = RGSCHERR_DHM_FDBK_IND;
          err->errCause  = RGSCHERR_DHM_FDBK_IND_INVALID_CB;
          RETVALUE(RFAILED);
          err->errType   = RGSCHERR_DHM_FDBK_IND;
          err->errCause  = RGSCHERR_DHM_FDBK_IND_INVALID_CB;
          RETVALUE(RFAILED);
@@ -3529,8 +3529,8 @@ RgSchErrInfo            *err;
             {
                RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId, 
                   "CRNTI:%d NO HARQ proc available for feedback: TimingInfo: "
             {
                RLOG_ARG3(L_ERROR,DBG_CELLID,cell->cellId, 
                   "CRNTI:%d NO HARQ proc available for feedback: TimingInfo: "
-                  "sfn %d subframe %d", ue->ueId, timingInfo.sfn,
-                  timingInfo.subframe);
+                  "sfn %d slot %d", ue->ueId, timingInfo.sfn,
+                  timingInfo.slot);
                RETVALUE(RFAILED);
             }
 
                RETVALUE(RFAILED);
             }
 
@@ -4108,7 +4108,7 @@ CmLteTimingInfo      uciTimingInfo;
    TRC2(rgSCHDhmTddRlsSubFrm)
 
    ascIdx = 
    TRC2(rgSCHDhmTddRlsSubFrm)
 
    ascIdx = 
-      rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][uciTimingInfo.subframe];
+      rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][uciTimingInfo.slot];
    noFdbks = ascIdx.numFdbkSubfrms;
    for(i=0; i < noFdbks; i++)
    {
    noFdbks = ascIdx.numFdbkSubfrms;
    for(i=0; i < noFdbks; i++)
    {
@@ -4176,7 +4176,7 @@ CmLteTimingInfo      uciTimingInfo;
    TRC2(rgSCHDhmRlsDlsfHqProc)
 
    ascIdx = 
    TRC2(rgSCHDhmRlsDlsfHqProc)
 
    ascIdx = 
-      rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][uciTimingInfo.subframe];
+      rgSchTddDlAscSetIdxKTbl[cellCb->ulDlCfgIdx][uciTimingInfo.slot];
    noFdbks = ascIdx.numFdbkSubfrms;
    for(i=0; i < noFdbks; i++)
    {
    noFdbks = ascIdx.numFdbkSubfrms;
    for(i=0; i < noFdbks; i++)
    {
@@ -4277,9 +4277,9 @@ CmLteTimingInfo      uciTimingInfo;
                      if(anInfo == NULLP)
                      {
                         RGSCHDBGERR(cellCb->instIdx, (rgSchPBuf(cellCb->instIdx), 
                      if(anInfo == NULLP)
                      {
                         RGSCHDBGERR(cellCb->instIdx, (rgSchPBuf(cellCb->instIdx), 
-                                 "Ack/Nack Info is NULL, Processing %dth feedback subframe for DTX" 
+                                 "Ack/Nack Info is NULL, Processing %dth feedback slot for DTX" 
                                  "received on SFN [%d] and SF [%d]\n",i, uciTimingInfo.sfn, 
                                  "received on SFN [%d] and SF [%d]\n",i, uciTimingInfo.sfn, 
-                                 uciTimingInfo.subframe));
+                                 uciTimingInfo.slot));
                      }
                      else  if (tbCb->fbkRepCntr == 0)
                      {
                      }
                      else  if (tbCb->fbkRepCntr == 0)
                      {
index 3b40582..5b44497 100755 (executable)
@@ -294,10 +294,10 @@ RgUeUlHqCb   *hqE
  *         - Processing is divided into respective timer handling. 
  *         - Calculate the DL and UL indices as follows 
  *         @code
  *         - Processing is divided into respective timer handling. 
  *         - Calculate the DL and UL indices as follows 
  *         @code
- *             dlIndex = (cell->crntTime.sfn * 10 + cell->crntTime.subframe +
+ *             dlIndex = (cell->crntTime.sfn * 10 + cell->crntTime.slot +
  *                   RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
  *
  *                   RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
  *
- *             ulIndex = (cell->crntTime.sfn * 10 + cell->crntTime.subframe +
+ *             ulIndex = (cell->crntTime.sfn * 10 + cell->crntTime.slot +
  *                   RG_SCH_DRX_UL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
  *         @endcode
  *         - Call rgSCHDrxTtiHdlOnDur to handle onDurationTimer handling
  *                   RG_SCH_DRX_UL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
  *         @endcode
  *         - Call rgSCHDrxTtiHdlOnDur to handle onDurationTimer handling
@@ -335,10 +335,10 @@ RgSchCellCb  *cell;
    TRC2(rgSCHDrxTtiInd );
 
 
    TRC2(rgSCHDrxTtiInd );
 
 
-   dlIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe +
+   dlIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot +
          RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
 
          RG_SCH_DRX_DL_DELTA) % RG_SCH_MAX_DRXQ_SIZE;
 
-   ulIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe +
+   ulIndex = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot +
          RG_SCH_DRX_UL_DELTA) % RG_SCH_MAX_DRXQ_SIZE; 
 
 #ifdef LTEMAC_R9
          RG_SCH_DRX_UL_DELTA) % RG_SCH_MAX_DRXQ_SIZE; 
 
 #ifdef LTEMAC_R9
@@ -886,7 +886,7 @@ U8            direction;
    {
 #ifndef LTE_TDD
       curTimeInSf = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
    {
 #ifndef LTE_TDD
       curTimeInSf = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-         (cell->crntTime.subframe) +RG_SCH_DRX_UL_DELTA;
+         (cell->crntTime.slot) +RG_SCH_DRX_UL_DELTA;
 #endif
 
 #ifdef LTE_TDD
 #endif
 
 #ifdef LTE_TDD
@@ -897,7 +897,7 @@ U8            direction;
    {
 #ifndef LTE_TDD
       curTimeInSf = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
    {
 #ifndef LTE_TDD
       curTimeInSf = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-         (cell->crntTime.subframe) + RG_SCH_DRX_DL_DELTA; 
+         (cell->crntTime.slot) + RG_SCH_DRX_DL_DELTA; 
 #endif
 
 #ifdef LTE_TDD
 #endif
 
 #ifdef LTE_TDD
@@ -1089,7 +1089,7 @@ U8                      tbCnt;
     * so that UE is scheduled for retransmission in the next subframe*/
    /* ccpu00134196-[Add]-DRX retx timer changes */
    harqRTTExpIndx = ((hqP->tbInfo[tbCnt].timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
     * so that UE is scheduled for retransmission in the next subframe*/
    /* ccpu00134196-[Add]-DRX retx timer changes */
    harqRTTExpIndx = ((hqP->tbInfo[tbCnt].timingInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-         hqP->tbInfo[tbCnt].timingInfo.subframe + RG_SCH_MIN_HARQ_RTT)
+         hqP->tbInfo[tbCnt].timingInfo.slot + RG_SCH_MIN_HARQ_RTT)
       % RG_SCH_MAX_DRXQ_SIZE;
 
    fdbkDelta = RGSCH_CALC_SF_DIFF(cell->crntTime,  hqP->tbInfo[tbCnt].timingInfo);
       % RG_SCH_MAX_DRXQ_SIZE;
 
    fdbkDelta = RGSCH_CALC_SF_DIFF(cell->crntTime,  hqP->tbInfo[tbCnt].timingInfo);
@@ -1276,9 +1276,9 @@ PUBLIC S16 rgSCHDrxUeCfg (cell, ue, ueCfg)
    rgSCHDrxGetNxtOnDur (cell, ueDrxCb, &nxtOnDur,RG_SCH_NO_DELTA);
 
 
    rgSCHDrxGetNxtOnDur (cell, ueDrxCb, &nxtOnDur,RG_SCH_NO_DELTA);
 
 
-   nxtOnDurTime = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur.subframe);
+   nxtOnDurTime = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur.slot);
    curTime      = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
    curTime      = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-                     cell->crntTime.subframe);
+                     cell->crntTime.slot);
 
    onDurIndx         = nxtOnDurTime % RG_SCH_MAX_DRXQ_SIZE;
    
 
    onDurIndx         = nxtOnDurTime % RG_SCH_MAX_DRXQ_SIZE;
    
@@ -1388,7 +1388,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
       cycleLen = drxCb->shortDrxCycle;
    }
 
       cycleLen = drxCb->shortDrxCycle;
    }
 
-   curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) + cell->crntTime.subframe); 
+   curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) + cell->crntTime.slot); 
 
    curTime  += delta;  /*TODO: see if we need to take care of wrap arounds */
 
 
    curTime  += delta;  /*TODO: see if we need to take care of wrap arounds */
 
@@ -1396,8 +1396,8 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
    {
       /* offset is the nextOnDur */
       nxtOnDur->sfn = drxCb->drxStartOffset / RGSCH_NUM_SUB_FRAMES_5G;
    {
       /* offset is the nextOnDur */
       nxtOnDur->sfn = drxCb->drxStartOffset / RGSCH_NUM_SUB_FRAMES_5G;
-      nxtOnDur->subframe = (U8)(drxCb->drxStartOffset % RGSCH_NUM_SUB_FRAMES_5G);
-      nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->subframe); 
+      nxtOnDur->slot = (U8)(drxCb->drxStartOffset % RGSCH_NUM_SUB_FRAMES_5G);
+      nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot); 
    }
    else
    {
    }
    else
    {
@@ -1410,8 +1410,8 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
          /* Perfect match pick up the current time */
          /*nxtOnDur should be set to equal to currentTime + DELTA */
          nxtOnDur->sfn      = (U16)curTime / RGSCH_NUM_SUB_FRAMES_5G;
          /* Perfect match pick up the current time */
          /*nxtOnDur should be set to equal to currentTime + DELTA */
          nxtOnDur->sfn      = (U16)curTime / RGSCH_NUM_SUB_FRAMES_5G;
-         nxtOnDur->subframe = (U16)curTime % RGSCH_NUM_SUB_FRAMES_5G;
-         nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->subframe); 
+         nxtOnDur->slot = (U16)curTime % RGSCH_NUM_SUB_FRAMES_5G;
+         nxtDist = ((nxtOnDur->sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur->slot); 
 
       }
       else
 
       }
       else
@@ -1419,7 +1419,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
          nxtDist            = drxCb->drxStartOffset + (numOfCycles + 1) * 
                               cycleLen;
          nxtOnDur->sfn      = (U16)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
          nxtDist            = drxCb->drxStartOffset + (numOfCycles + 1) * 
                               cycleLen;
          nxtOnDur->sfn      = (U16)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
-         nxtOnDur->subframe = (U16)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
+         nxtOnDur->slot = (U16)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
 
       }
    }
 
       }
    }
@@ -1430,7 +1430,7 @@ PRIVATE S16 rgSCHDrxGetNxtOnDur (cell, drxCb, nxtOnDur, delta)
    {
       nxtDist = nxtDist + cycleLen;
       nxtOnDur->sfn      = (U16)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
    {
       nxtDist = nxtDist + cycleLen;
       nxtOnDur->sfn      = (U16)nxtDist / RGSCH_NUM_SUB_FRAMES_5G;
-      nxtOnDur->subframe = (U16)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
+      nxtOnDur->slot = (U16)nxtDist % RGSCH_NUM_SUB_FRAMES_5G;
    }
    RETVALUE(ROK);
 } /* end of rgSCHDrxGetNxtOnDur */ 
    }
    RETVALUE(ROK);
 } /* end of rgSCHDrxGetNxtOnDur */ 
@@ -1667,9 +1667,9 @@ PUBLIC S16 rgSCHDrxUeReCfg (cell, ue, ueReCfg)
       }
 
 
       }
 
 
-      nxtOnDurTime = (nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur.subframe;
+      nxtOnDurTime = (nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + nxtOnDur.slot;
       curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
       curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-                   cell->crntTime.subframe);
+                   cell->crntTime.slot);
 
       /* If Onduration timer of old configuration is already running then waiting till it expires */
       if((ueDrxCb->onDurExpIndx != DRX_INVALID) && (ueDrxCb->onDurExpDistance != DRX_TMR_EXPRD))
 
       /* If Onduration timer of old configuration is already running then waiting till it expires */
       if((ueDrxCb->onDurExpIndx != DRX_INVALID) && (ueDrxCb->onDurExpDistance != DRX_TMR_EXPRD))
@@ -2232,10 +2232,10 @@ Bool              calcFrmOffst;
       rgSCHDrxGetNxtOnDur(cell,drxUe,&nxtOnDur,(U8)idx);
       
       nxtOnDurInSf = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + 
       rgSCHDrxGetNxtOnDur(cell,drxUe,&nxtOnDur,(U8)idx);
       
       nxtOnDurInSf = ((nxtOnDur.sfn * RGSCH_NUM_SUB_FRAMES_5G) + 
-                         nxtOnDur.subframe);
+                         nxtOnDur.slot);
       
       curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
       
       curTime = ((cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +
-            cell->crntTime.subframe);
+            cell->crntTime.slot);
 
       nxtOnDurIndex   = nxtOnDurInSf % RG_SCH_MAX_DRXQ_SIZE;
       drxUe->distance = (nxtOnDurInSf-curTime) / RG_SCH_MAX_DRXQ_SIZE;
 
       nxtOnDurIndex   = nxtOnDurInSf % RG_SCH_MAX_DRXQ_SIZE;
       drxUe->distance = (nxtOnDurInSf-curTime) / RG_SCH_MAX_DRXQ_SIZE;
@@ -2339,14 +2339,14 @@ PRIVATE S16 rgSCHDrxGetNxtTmrExpry (cell,curTime,duration,tmrExpryIdx)
 
    tddCfgMode        = cell->ulDlCfgIdx;
    crntTime.sfn      = curTime / RGSCH_NUM_SUB_FRAMES_5G;
 
    tddCfgMode        = cell->ulDlCfgIdx;
    crntTime.sfn      = curTime / RGSCH_NUM_SUB_FRAMES_5G;
-   crntTime.subframe = curTime % RGSCH_NUM_SUB_FRAMES_5G; 
+   crntTime.slot = curTime % RGSCH_NUM_SUB_FRAMES_5G; 
 
 
 
    /* First calculate the number of DL subframes till next SFN */
 
    dlSfTillNxtSFN = rgSchDrxDLSfTillNxtSFN[isDwPtsCnted][tddCfgMode]
 
 
 
    /* First calculate the number of DL subframes till next SFN */
 
    dlSfTillNxtSFN = rgSchDrxDLSfTillNxtSFN[isDwPtsCnted][tddCfgMode]
-      [(crntTime.subframe % RGSCH_NUM_SUB_FRAMES)];
+      [(crntTime.slot % RGSCH_NUM_SUB_FRAMES)];
 
 
    if ( dlSfTillNxtSFN >= duration )
 
 
    if ( dlSfTillNxtSFN >= duration )
@@ -2476,7 +2476,7 @@ PRIVATE Void rgSCHDrxCalcNxtTmrExpry (cell,ue,delta,tmrLen,distance,idx)
    TRC2(rgSCHDrxCalcNxtTmrExpry)
    
    curTimeInSf = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G +
    TRC2(rgSCHDrxCalcNxtTmrExpry)
    
    curTimeInSf = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G +
-                   cell->crntTime.subframe;
+                   cell->crntTime.slot;
 
    /* add delta to curTime */
    curTimeInSf += delta;
 
    /* add delta to curTime */
    curTimeInSf += delta;
@@ -2779,7 +2779,7 @@ U16           dlIndex;
    drxCell     = (cell->drxCb);
    
    delInUlScan = drxCell->delInUlScan;
    drxCell     = (cell->drxCb);
    
    delInUlScan = drxCell->delInUlScan;
-   //printf("CELL  Timer  [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.subframe);
+   //printf("CELL  Timer  [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
    
    node = drxCell->drxQ[dlIndex].onDurationQ.first;
 
    
    node = drxCell->drxQ[dlIndex].onDurationQ.first;
 
@@ -2843,11 +2843,11 @@ U16           dlIndex;
 
       cmLListAdd2Tail(&(drxCell->drxQ[expiryIndex].onDurationExpQ),
             &(drxUe->onDurationExpEnt));
 
       cmLListAdd2Tail(&(drxCell->drxQ[expiryIndex].onDurationExpQ),
             &(drxUe->onDurationExpEnt));
-      //printf("DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.subframe);
+      //printf("DRXOnDuration Timer Started at [SFN : %d],[SF : %d]\n",cell->crntTime.sfn,cell->crntTime.slot);
       drxUe->onDurationExpEnt.node = (PTR)ue;
       drxUe->onDurExpIndx          = expiryIndex;
 
       drxUe->onDurationExpEnt.node = (PTR)ue;
       drxUe->onDurExpIndx          = expiryIndex;
 
-      //printf("DRxOnDuration will Expire = [%d]\n",(cell->crntTime.sfn*10+cell->crntTime.subframe+drxUe->onDurTmrLen));
+      //printf("DRxOnDuration will Expire = [%d]\n",(cell->crntTime.sfn*10+cell->crntTime.slot+drxUe->onDurTmrLen));
 
       if ( delInUlScan == FALSE )
       {
 
       if ( delInUlScan == FALSE )
       {
index b8b68dd..e6015b4 100755 (executable)
@@ -209,9 +209,6 @@ Buffer  *mBuf;                      /* message buffer       */
             case EVTTFUTIMINGADVIND:
                cmUnpkTfuTimingAdvInd(RgLiTfuTimingAdvInd, pst, mBuf);
                break;
             case EVTTFUTIMINGADVIND:
                cmUnpkTfuTimingAdvInd(RgLiTfuTimingAdvInd, pst, mBuf);
                break;
-            case EVTTFUSCHTTIIND:
-               cmUnpkTfuSchTtiInd(RgLiTfuSchTtiInd, pst, mBuf);
-               break;
             case EVTTFUPUCCHDELPWR:
                cmUnpkTfuPucchDeltaPwr(RgLiTfuPucchDeltaPwrInd, pst, mBuf);
                break;
             case EVTTFUPUCCHDELPWR:
                cmUnpkTfuPucchDeltaPwr(RgLiTfuPucchDeltaPwrInd, pst, mBuf);
                break;
@@ -263,6 +260,9 @@ Buffer  *mBuf;                      /* message buffer       */
                break;
 #endif
 #endif            
                break;
 #endif
 #endif            
+            case EVENT_SLOT_IND_TO_SCH:
+               cmUnpackMacSchSlotInd(macSchSlotInd, pst, mBuf);
+               break;
             default:
                RGSCH_FREE_MSG(mBuf);
                break;
             default:
                RGSCH_FREE_MSG(mBuf);
                break;
index ad26f49..127eeba 100755 (executable)
@@ -442,12 +442,12 @@ RgrCfgReqInfo *rgrCfgReq;
 
       /* Check if the activation time is valid */
       if (actvTime.sfn >= RGSCH_MAX_SFN 
 
       /* Check if the activation time is valid */
       if (actvTime.sfn >= RGSCH_MAX_SFN 
-            || actvTime.subframe >= RGSCH_NUM_SUB_FRAMES_5G)
+            || actvTime.slot >= RGSCH_NUM_SUB_FRAMES_5G)
       {
          RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId, "Invalid activation time for RGR "
       {
          RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId, "Invalid activation time for RGR "
-           "config request: activation sfn %d activation subframe %d current "
-           "sfn %d current subframe %d", actvTime.sfn, actvTime.subframe
-           cell->crntTime.sfn, cell->crntTime.subframe);
+           "config request: activation sfn %d activation slot %d current "
+           "sfn %d current slot %d", actvTime.sfn, actvTime.slot
+           cell->crntTime.sfn, cell->crntTime.slot);
          /* ccpu00117052 - MOD - Passing double pointer
          for proper NULLP assignment*/
          rgSCHUtlFreeSBuf(inst, (Data **)&rgrCfgElem, sizeof(*rgrCfgElem));
          /* ccpu00117052 - MOD - Passing double pointer
          for proper NULLP assignment*/
          rgSCHUtlFreeSBuf(inst, (Data **)&rgrCfgElem, sizeof(*rgrCfgElem));
@@ -459,9 +459,9 @@ RgrCfgReqInfo *rgrCfgReq;
       if (sfDiff > (RGR_ACTV_WIN_SIZE * RGSCH_NUM_SUB_FRAMES_5G))
       {
          RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId,"Invalid activation time for RGR"
       if (sfDiff > (RGR_ACTV_WIN_SIZE * RGSCH_NUM_SUB_FRAMES_5G))
       {
          RLOG_ARG4(L_ERROR,DBG_CELLID,cell->cellId,"Invalid activation time for RGR"
-              " config request: activation sfn %d activation subframe %d "
-              "current sfn %d current subframe %d", actvTime.sfn,
-              actvTime.subframe, cell->crntTime.sfn, cell->crntTime.subframe);
+              " config request: activation sfn %d activation slot %d "
+              "current sfn %d current slot %d", actvTime.sfn,
+              actvTime.slot, cell->crntTime.sfn, cell->crntTime.slot);
          /* ccpu00117052 - MOD - Passing double pointer
          for proper NULLP assignment*/
          rgSCHUtlFreeSBuf(inst, (Data **)&rgrCfgElem, sizeof(*rgrCfgElem));
          /* ccpu00117052 - MOD - Passing double pointer
          for proper NULLP assignment*/
          rgSCHUtlFreeSBuf(inst, (Data **)&rgrCfgElem, sizeof(*rgrCfgElem));
@@ -1849,7 +1849,7 @@ PUBLIC S16 rgSCHGomHndlLoadInf(reg, pool, instCb, spId, transId, loadInfReq)
    }
    /* Update the RNTP info rcvd in the respective cell centre pool so that Phigh can be
       sent for the UEs scheduled in that particular RB range*/
    }
    /* Update the RNTP info rcvd in the respective cell centre pool so that Phigh can be
       sent for the UEs scheduled in that particular RB range*/
-   for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+   for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
    {
       if((rgSchUpdtRNTPInfo(cell, cell->subFrms[i], loadInfReq) != ROK))
       {
    {
       if((rgSchUpdtRNTPInfo(cell, cell->subFrms[i], loadInfReq) != ROK))
       {
index 51f26a2..a7d8deb 100755 (executable)
@@ -1438,8 +1438,6 @@ EXTERN S16 RgSchMacSpsLcDereg ARGS((Pst *pst, CmLteCellId cellId, CmLteRnti
 EXTERN S16 RgMacSchSpsRel ARGS((Pst *pst, RgInfSpsRelInfo* relInfo));
 #endif
 EXTERN S16 RgMacSchUeDel ARGS((Pst* pst, RgInfUeDelInd*  ueDelInd));
 EXTERN S16 RgMacSchSpsRel ARGS((Pst *pst, RgInfSpsRelInfo* relInfo));
 #endif
 EXTERN S16 RgMacSchUeDel ARGS((Pst* pst, RgInfUeDelInd*  ueDelInd));
-EXTERN S16 schActvInit ARGS((Ent entity, Inst inst, Region
-       region, Reason reason));
 #ifdef __cplusplus
 }
 #endif
 #ifdef __cplusplus
 }
 #endif
index 6e632dc..09badc3 100755 (executable)
@@ -514,7 +514,7 @@ RgSchCellCb       *cell;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
    sf = rgSCHUtlSubFrmGet(cell, frm);
 #ifdef LTE_TDD
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
    sf = rgSCHUtlSubFrmGet(cell, frm);
 #ifdef LTE_TDD
-   idx = (cell->crntTime.subframe + RG_SCH_CMN_DL_DELTA) % 
+   idx = (cell->crntTime.slot + RG_SCH_CMN_DL_DELTA) % 
                   RGSCH_NUM_SUB_FRAMES;
    if(RG_SCH_CMN_CHK_DL_DATA_ALLOWED(cell, idx)) 
    {
                   RGSCH_NUM_SUB_FRAMES;
    if(RG_SCH_CMN_CHK_DL_DATA_ALLOWED(cell, idx)) 
    {
@@ -762,7 +762,7 @@ U8 isCalrCrcInd
    {
       measCb = (RgSchL2MeasCb *)node->node;
       node = node->next;
    {
       measCb = (RgSchL2MeasCb *)node->node;
       node = node->next;
-      if(cell->crntTime.sfn == 1023 && cell->crntTime.subframe == 9)  
+      if(cell->crntTime.sfn == 1023 && cell->crntTime.slot == 9)  
       {
          /*calculates diff between crnt time and start time*/
          meas = RGSCH_CALC_SFN_SF_DIFF(cell->crntTime, 
       {
          /*calculates diff between crnt time and start time*/
          meas = RGSCH_CALC_SFN_SF_DIFF(cell->crntTime, 
@@ -784,7 +784,7 @@ U8 isCalrCrcInd
          numDlSf = (meas / RGSCH_NUM_SUB_FRAMES) * rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
          numUlSf = (meas / RGSCH_NUM_SUB_FRAMES) * rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
 
          numDlSf = (meas / RGSCH_NUM_SUB_FRAMES) * rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
          numUlSf = (meas / RGSCH_NUM_SUB_FRAMES) * rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
 
-         sfIdx = (measCb->startTime.subframe + 1) % RGSCH_NUM_SUB_FRAMES;
+         sfIdx = (measCb->startTime.slot + 1) % RGSCH_NUM_SUB_FRAMES;
 
          while(rem)
          {
 
          while(rem)
          {
index b94a6f5..34e10d0 100755 (executable)
@@ -117,76 +117,6 @@ PUBLIC void printSchCellInfo(void)
    }
 }
 
    }
 }
 
-\f
-/**
- * @brief Task Initiation callback function. 
- *
- * @details
- *
- *     Function : schActvInit
- *     
- *     This function is supplied as one of parameters during MAC's 
- *     task registration. SSI will invoke this function once, after
- *     it creates and attaches this TAPA Task to a system task.
- *     
- *  @param[in]  Ent Entity, the entity ID of this task.     
- *  @param[in]  Inst Inst, the instance ID of this task.
- *  @param[in]  Region Region, the region ID registered for memory 
- *              usage of this task.
- *  @param[in]  Reason Reason.
- *  @return  S16
- *      -# ROK
- **/
-#ifdef ANSI
-PUBLIC S16 schActvInit
-(
-Ent    entity,            /* entity */
-Inst   instId,             /* instance */
-Region region,         /* region */
-Reason reason          /* reason */
-)
-#else
-PUBLIC S16 schActvInit(entity, instId, region, reason)
-Ent    entity;            /* entity */
-Inst   instId;             /* instance */
-Region region;         /* region */
-Reason reason;         /* reason */
-#endif
-{
-   Inst inst = (instId  - SCH_INST_START);
-
-   TRC2(schActvInit);
-
-   /* Initialize the MAC TskInit structure to zero */
-   cmMemset ((U8 *)&rgSchCb[inst], 0, sizeof(RgSchCb));
-
-   /* Initialize the MAC TskInit with received values */
-   rgSchCb[inst].rgSchInit.ent = entity;
-   rgSchCb[inst].rgSchInit.inst = inst;
-   rgSchCb[inst].rgSchInit.region = region;
-   rgSchCb[inst].rgSchInit.pool = 0;
-   rgSchCb[inst].rgSchInit.reason = reason;
-   rgSchCb[inst].rgSchInit.cfgDone = FALSE;
-   rgSchCb[inst].rgSchInit.acnt = FALSE;
-   rgSchCb[inst].rgSchInit.usta = FALSE;
-   rgSchCb[inst].rgSchInit.trc = FALSE;
-#ifdef DEBUGP
-#ifdef RG_DEBUG
-   /*  disabling debugs by default */
-   /* rgSchCb[inst].rgSchInit.dbgMask = 0xffffffff; */
-#endif
-#endif /* DEBUGP */
-   rgSchCb[inst].rgSchInit.procId = SFndProcId();
-
-   rgSchCb[inst].rgrSap = NULLP;
-   rgSchCb[inst].tfuSap = NULLP;
-   rgSchCb[inst].rgmSap = NULLP;
-   rgSCHCmnInit();
-
-   RETVALUE(ROK);
-} /* schActvInit */
-\f
-\f
 /**
  * @brief SAP Configuration Handler. 
  *
 /**
  * @brief SAP Configuration Handler. 
  *
@@ -346,166 +276,6 @@ Elmnt sapType;            /* SAP Type */
    }
    RETVALUE(ret);
 }
    }
    RETVALUE(ret);
 }
-
-\f
-/**
- * @brief Scheduler instance Configuration Handler. 
- *
- * @details
- *
- *     Function : SchInstCfg
- *     
- *     This function in called by HandleSchGenCfgReq(). It handles the
- *     general and SAP configurations of the scheduler instance. It initializes
- *     the hash lists of rgSchCb. Returns
- *     reason for success/failure of this function.
- *     
- *  @param[in]  RgCfg *cfg, the Configuaration information 
- *  @return  U16
- *      -# LCM_REASON_NOT_APPL 
- *      -# LCM_REASON_INVALID_MSGTYPE
- *      -# LCM_REASON_MEM_NOAVAIL
- **/
-#ifdef ANSI
-PUBLIC U16 SchInstCfg
-(
-RgCfg *cfg,            /* Configuaration information */
-Inst  dInst
-)
-#else
-PUBLIC U16 SchInstCfg(cfg,dInst)
-RgCfg *cfg;            /* Configuaration information */
-Inst  dInst;
-#endif
-{
-   U16    ret = LCM_REASON_NOT_APPL;
-   Inst   inst = (dInst - SCH_INST_START);
-
-   TRC2(SchInstCfg)
-
-   printf("\nEntered SchInstCfg()");
-   /* Check if Instance Configuration is done already */
-   if (rgSchCb[inst].rgSchInit.cfgDone == TRUE)
-   {
-      RETVALUE(LCM_REASON_INVALID_MSGTYPE);
-   }
-   if ((cfg->s.schInstCfg.genCfg.lmPst.selector != LRG_SEL_TC) &&
-       (cfg->s.schInstCfg.genCfg.lmPst.selector != LRG_SEL_LC))
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): unsupported "
-                 "Selector value for lmPst.");
-      RETVALUE(LCM_REASON_INVALID_PAR_VAL);
-   }
-   /* Update the Pst structure for LM interface */
-   cmMemcpy((U8 *)&rgSchCb[inst].rgSchInit.lmPst,
-            (U8 *)&cfg->s.schInstCfg.genCfg.lmPst,
-             sizeof(Pst));
-   
-   rgSchCb[inst].rgSchInit.inst = inst;
-   rgSchCb[inst].rgSchInit.lmPst.srcProcId = rgSchCb[inst].rgSchInit.procId;
-   rgSchCb[inst].rgSchInit.lmPst.srcEnt = rgSchCb[inst].rgSchInit.ent;
-   rgSchCb[inst].rgSchInit.lmPst.srcInst = rgSchCb[inst].rgSchInit.inst +
-   SCH_INST_START;
-   rgSchCb[inst].rgSchInit.lmPst.event = EVTNONE;
-
-   rgSchCb[inst].rgSchInit.region = cfg->s.schInstCfg.genCfg.mem.region;
-   rgSchCb[inst].rgSchInit.pool = cfg->s.schInstCfg.genCfg.mem.pool;
-   rgSchCb[inst].genCfg.tmrRes = cfg->s.schInstCfg.genCfg.tmrRes;
-#ifdef LTE_ADV
-   rgSchCb[inst].genCfg.forceCntrlSrbBoOnPCel =  cfg->s.schInstCfg.genCfg.forceCntrlSrbBoOnPCel;
-   rgSchCb[inst].genCfg.isSCellActDeactAlgoEnable =  cfg->s.schInstCfg.genCfg.isSCellActDeactAlgoEnable;
-#endif
-   rgSchCb[inst].genCfg.startCellId    = cfg->s.schInstCfg.genCfg.startCellId;
-
-/* Not adding any SAPs towards SCH now */
-#if 0
-   /* allocate RGR saps */
-   if (SGetSBuf(rgSchCb[inst].rgSchInit.region,
-                rgSchCb[inst].rgSchInit.pool,
-                (Data **)&rgSchCb[inst].rgrSap,
-                (sizeof(RgSchUpSapCb) * cfg->s.schInstCfg.numSaps)) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for "
-                   "RGR saps failed");
-      RETVALUE(RFAILED);
-   }
-   /* allocate RGM saps */
-   if (SGetSBuf(rgSchCb[inst].rgSchInit.region,
-                rgSchCb[inst].rgSchInit.pool,
-                (Data **)&rgSchCb[inst].rgmSap,
-                (sizeof(RgSchUpSapCb) * cfg->s.schInstCfg.numSaps)) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for "
-                   "RGM saps failed");
-      RETVALUE(RFAILED);
-   }
-
-
-   /* allocate TFU saps */
-   if (SGetSBuf(rgSchCb[inst].rgSchInit.region,
-                rgSchCb[inst].rgSchInit.pool,
-                (Data **)&rgSchCb[inst].tfuSap,
-                (sizeof(RgSchLowSapCb) * cfg->s.schInstCfg.numSaps)) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for TFU "
-                 "saps failed");
-      RETVALUE(RFAILED);
-   }
-
-   /* allocate for bndCfmResponses */
-   if (SGetSBuf(rgSchCb[inst].rgSchInit.region,
-                rgSchCb[inst].rgSchInit.pool,
-                (Data **)&rgSchCb[inst].genCfg.bndCfmResp,
-                (sizeof(RgSchLmResponse) * cfg->s.schInstCfg.numSaps)) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg: SGetSBuf for bind"
-           " confirm responses failed");
-      RETVALUE(RFAILED);
-   }
-#ifdef LTE_ADV
-   rgSCHLaaInitEnbCb(&rgSchCb[inst]);
-#endif
-   rgSchCb[inst].numSaps = cfg->s.schInstCfg.numSaps;
-   for (idx = 0; idx < cfg->s.schInstCfg.numSaps; idx++)
-   {
-      /* Initialize SAP State and configure SAP */
-      rgSchCb[inst].rgrSap[idx].sapSta.sapState = LRG_NOT_CFG;
-      rgSchCb[inst].rgrSap[idx].cell = NULLP;
-      rgSCHLmmSapCfg(dInst, cfg, idx, STRGRSAP);
-
-      rgSchCb[inst].rgmSap[idx].sapSta.sapState = LRG_NOT_CFG;
-      rgSchCb[inst].rgmSap[idx].cell = NULLP;
-      rgSCHLmmSapCfg(dInst, cfg, idx, STRGMSAP);
-
-      rgSchCb[inst].tfuSap[idx].sapSta.sapState = LRG_NOT_CFG;
-      rgSchCb[inst].tfuSap[idx].cell = NULLP;
-      rgSCHLmmSapCfg(dInst, cfg, idx, STTFUSAP);
-      rgSchCb[inst].tfuSap[idx].numBndRetries = 0;
-   }
-#endif
-   /* Initialzie the timer queue */   
-   cmMemset((U8 *)&rgSchCb[inst].tmrTq, 0, sizeof(CmTqType)*RGSCH_TQ_SIZE);
-   /* Initialize the timer control point */
-   cmMemset((U8 *)&rgSchCb[inst].tmrTqCp, 0, sizeof(CmTqCp));
-   rgSchCb[inst].tmrTqCp.tmrLen = RGSCH_TQ_SIZE;
-
-   /* SS_MT_TMR needs to be enabled as schActvTmr needs instance information */
-   /* Timer Registration request to SSI */
-   if (SRegTmrMt(rgSchCb[inst].rgSchInit.ent, dInst,
-      (S16)rgSchCb[inst].genCfg.tmrRes, schActvTmr) != ROK)
-   {
-      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): Failed to "
-             "register timer.");
-      RETVALUE(LCM_REASON_MEM_NOAVAIL);
-   }   
-                    
-   /* Set Config done in TskInit */
-   rgSchCb[inst].rgSchInit.cfgDone = TRUE;
-   printf("\nScheduler gen config done");
-   
-   RETVALUE(ret);
-}
-
 \f
 /***********************************************************
  *
 \f
 /***********************************************************
  *
@@ -1026,16 +796,14 @@ RgMngmt       *cfm;
 
    inst = (reqPst->dstInst - SCH_INST_START);
 
 
    inst = (reqPst->dstInst - SCH_INST_START);
 
-   cfmPst->srcEnt    = rgSchCb[inst].rgSchInit.ent;
-   cfmPst->srcInst   = (Inst) 0;
+   cfmPst->srcEnt    = ENTRG;
+   cfmPst->srcInst   = (Inst) 1;
    cfmPst->srcProcId = rgSchCb[inst].rgSchInit.procId;
    cfmPst->srcProcId = rgSchCb[inst].rgSchInit.procId;
-   cfmPst->dstEnt    = reqPst->srcEnt;
+   cfmPst->dstEnt    = ENTRG;
    cfmPst->dstInst   = (Inst) 0;
    cfmPst->dstProcId = reqPst->srcProcId;
 
    cfmPst->selector  = cfm->hdr.response.selector;
    cfmPst->dstInst   = (Inst) 0;
    cfmPst->dstProcId = reqPst->srcProcId;
 
    cfmPst->selector  = cfm->hdr.response.selector;
-   cfmPst->prior     = cfm->hdr.response.prior;
-   cfmPst->route     = cfm->hdr.response.route;
    cfmPst->region    = cfm->hdr.response.mem.region;
    cfmPst->pool      = cfm->hdr.response.mem.pool;
 
    cfmPst->region    = cfm->hdr.response.mem.region;
    cfmPst->pool      = cfm->hdr.response.mem.pool;
 
index 33dcf2d..8667b8a 100755 (executable)
@@ -657,10 +657,10 @@ RgSchCellCb *cell;
    /* 40ms offset */
    /* Introduced timing delta for DL control in FDD */
 #ifdef LTE_TDD
    /* 40ms offset */
    /* Introduced timing delta for DL control in FDD */
 #ifdef LTE_TDD
-   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + TFU_DELTA) % 
+   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + TFU_DELTA) % 
       RG_MEAS_GAPPRD_40;
 #else
       RG_MEAS_GAPPRD_40;
 #else
-   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + TFU_DLCNTRL_DLDELTA) % 
+   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + TFU_DLCNTRL_DLDELTA) % 
       RG_MEAS_GAPPRD_40;
 #endif
    queue = &(cell->measGapCb.gapPrd40Q[offset]);
       RG_MEAS_GAPPRD_40;
 #endif
    queue = &(cell->measGapCb.gapPrd40Q[offset]);
@@ -668,10 +668,10 @@ RgSchCellCb *cell;
    /* 80ms offset */
    /* Introduced timing delta for DL control in FDD */
 #ifdef LTE_TDD
    /* 80ms offset */
    /* Introduced timing delta for DL control in FDD */
 #ifdef LTE_TDD
-   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + TFU_DELTA) % 
+   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + TFU_DELTA) % 
       RG_MEAS_GAPPRD_80;
 #else
       RG_MEAS_GAPPRD_80;
 #else
-   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + TFU_DLCNTRL_DLDELTA) % 
+   offset = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + TFU_DLCNTRL_DLDELTA) % 
       RG_MEAS_GAPPRD_80;
 #endif
    queue = &(cell->measGapCb.gapPrd80Q[offset]);
       RG_MEAS_GAPPRD_80;
 #endif
    queue = &(cell->measGapCb.gapPrd80Q[offset]);
@@ -679,7 +679,7 @@ RgSchCellCb *cell;
 
    /* for ACK NACK repetition starts at offset - however at MAC we are 
     * concerned with subframe - TFU_DELTA */
 
    /* for ACK NACK repetition starts at offset - however at MAC we are 
     * concerned with subframe - TFU_DELTA */
-   /* offset = ((cell->crntTime.sfn * 10) + cell->crntTime.subframe) % 
+   /* offset = ((cell->crntTime.sfn * 10) + cell->crntTime.slot) % 
     * RG_MAX_NUM_DLSF; */
    /* We wish to get the subframe whose HARQ Reception request would go out in
     * this subframe. HARQ_RTT - TFU_DELTA
     * RG_MAX_NUM_DLSF; */
    /* We wish to get the subframe whose HARQ Reception request would go out in
     * this subframe. HARQ_RTT - TFU_DELTA
@@ -868,7 +868,7 @@ CmLListCp   *dlInactvUeLst;
 
    TRC2(rgSCHMeasGapANRepGetDlInactvUe);
 
 
    TRC2(rgSCHMeasGapANRepGetDlInactvUe);
 
-   schedTime = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + RG_DL_DELTA; 
+   schedTime = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + RG_DL_DELTA; 
 
 #ifdef LTE_TDD
    RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, ackNakTime, RG_DL_DELTA);
 
 #ifdef LTE_TDD
    RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, ackNakTime, RG_DL_DELTA);
@@ -931,7 +931,7 @@ CmLListCp   *dlInactvUeLst;
 
    /* Calc offset for ACK NACK repetition */
    /*offset = (cell->crntTime.sfn * 10 + 
 
    /* Calc offset for ACK NACK repetition */
    /*offset = (cell->crntTime.sfn * 10 + 
-     cell->crntTime.subframe + RG_DL_DELTA + RG_SCH_CMN_HARQ_INTERVAL - 1) 
+     cell->crntTime.slot + RG_DL_DELTA + RG_SCH_CMN_HARQ_INTERVAL - 1) 
      % RG_MAX_NUM_DLSF;*/
    /* The ackNakRepQ resides in each dlSf corresponding to the repStart */
    /* Must pick up the subframe that was scheduled in the last TTI */
      % RG_MAX_NUM_DLSF;*/
    /* The ackNakRepQ resides in each dlSf corresponding to the repStart */
    /* Must pick up the subframe that was scheduled in the last TTI */
@@ -1078,7 +1078,7 @@ CmLListCp   *ulInactvUeLst;
    TRC2(rgSCHMeasGapANRepGetUlInactvUe);
 
    /*ccpu00139481- Meas Gap should be monitored in UL with TFU_ULCNTRL_DLDELTA*/
    TRC2(rgSCHMeasGapANRepGetUlInactvUe);
 
    /*ccpu00139481- Meas Gap should be monitored in UL with TFU_ULCNTRL_DLDELTA*/
-   schedTime = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.subframe + \
+   schedTime = cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G + cell->crntTime.slot + \
                TFU_ULCNTRL_DLDELTA;
 #ifndef LTE_TDD
    pdcchToPuschGap = RGSCH_PDCCH_PUSCH_DELTA;
                TFU_ULCNTRL_DLDELTA;
 #ifndef LTE_TDD
    pdcchToPuschGap = RGSCH_PDCCH_PUSCH_DELTA;
@@ -1136,7 +1136,7 @@ CmLListCp   *ulInactvUeLst;
    }
    /* Calc offset for ACK NACK repetition */
    /*offset = (cell->crntTime.sfn * 10 + 
    }
    /* Calc offset for ACK NACK repetition */
    /*offset = (cell->crntTime.sfn * 10 + 
-     cell->crntTime.subframe + RG_UL_SCHED_DELTA + 
+     cell->crntTime.slot + RG_UL_SCHED_DELTA + 
      RG_SCH_CMN_HARQ_INTERVAL ) % RG_MAX_NUM_DLSF;*/
 
    /* Must get the DLSF that is scheduled at TFU_DELTA Away */
      RG_SCH_CMN_HARQ_INTERVAL ) % RG_MAX_NUM_DLSF;*/
 
    /* Must get the DLSF that is scheduled at TFU_DELTA Away */
index 497f750..a7d4ba9 100755 (executable)
@@ -1880,8 +1880,8 @@ RgSchDlSf            *sf;
     * 10 subframes, which would have otherwise caused
     * the check to succeed for a possibly older process.
     */
     * 10 subframes, which would have otherwise caused
     * the check to succeed for a possibly older process.
     */
-   if ((proc->tbInfo[0].timingInfo.subframe == sf->sfNum) ||
-       (proc->tbInfo[1].timingInfo.subframe == sf->sfNum))
+   if ((proc->tbInfo[0].timingInfo.slot == sf->sfNum) ||
+       (proc->tbInfo[1].timingInfo.slot == sf->sfNum))
    {
       /*
        * Later, if a proc can be scheduled without having an
    {
       /*
        * Later, if a proc can be scheduled without having an
index ad27fe0..fcfcce2 100755 (executable)
@@ -1134,7 +1134,7 @@ RgSchCellCb  *cell;
    winGap = (rgRaPrmblToRaFrmTbl[cell->rachCfg.preambleFormat]-1)+ 
       (cell->rachCfg.raWinSize -1 ) + RGSCH_RARSP_WAIT_PERIOD;   
  
    winGap = (rgRaPrmblToRaFrmTbl[cell->rachCfg.preambleFormat]-1)+ 
       (cell->rachCfg.raWinSize -1 ) + RGSCH_RARSP_WAIT_PERIOD;   
  
-   raIdx = (((crntSfn & 1) * RGSCH_MAX_RA_RNTI+ cell->crntTime.subframe 
+   raIdx = (((crntSfn & 1) * RGSCH_MAX_RA_RNTI+ cell->crntTime.slot 
             + RG_SCH_CMN_DL_DELTA - winGap)+ RGSCH_RAREQ_ARRAY_SIZE ) 
            % RGSCH_RAREQ_ARRAY_SIZE;
 
             + RG_SCH_CMN_DL_DELTA - winGap)+ RGSCH_RAREQ_ARRAY_SIZE ) 
            % RGSCH_RAREQ_ARRAY_SIZE;
 
@@ -1154,10 +1154,10 @@ RgSchCellCb  *cell;
    /* Fixes for RACH handling: Added deletion of queued RaReq */
    frm   = cell->crntTime;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
    /* Fixes for RACH handling: Added deletion of queued RaReq */
    frm   = cell->crntTime;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
-   if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe] !=
+   if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot] !=
                      RG_SCH_TDD_UL_SUBFRAME)
    {
                      RG_SCH_TDD_UL_SUBFRAME)
    {
-      raIdx = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe]-1;
+      raIdx = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot]-1;
       rgSCHRamDelRaReq(cell, cell->crntTime, raIdx);
    }
 #endif
       rgSCHRamDelRaReq(cell, cell->crntTime, raIdx);
    }
 #endif
@@ -1166,7 +1166,7 @@ RgSchCellCb  *cell;
    /* ccpu00132536:MOD- racb timeout will be verified in each SFN such that 
     * the RACB whose processing is not completed in RG_MAX_RA_PRC_FRM
     * will be deleted*/
    /* ccpu00132536:MOD- racb timeout will be verified in each SFN such that 
     * the RACB whose processing is not completed in RG_MAX_RA_PRC_FRM
     * will be deleted*/
-   if (cell->crntTime.subframe == 0)
+   if (cell->crntTime.slot == 0)
    {
       maxCnt = cell->raInfo.raCbLst.count;
       for (idx = 0; idx < maxCnt; idx++)
    {
       maxCnt = cell->raInfo.raCbLst.count;
       for (idx = 0; idx < maxCnt; idx++)
index 49997af..d2e56d8 100755 (executable)
@@ -632,7 +632,7 @@ RgSchCmnDlRbAllocInfo      *allocInfo;
          ue = hqP->hqE->ue;
 
 #ifndef LTE_TDD
          ue = hqP->hqE->ue;
 
 #ifndef LTE_TDD
-         if((0 == schdTime.subframe) || (5 == schdTime.subframe))
+         if((0 == schdTime.slot) || (5 == schdTime.slot))
          {
             Bool reTxAllw;
             rgSCHCmnChkRetxAllowDtx(cell, ue, hqP, &reTxAllw);
          {
             Bool reTxAllw;
             rgSCHCmnChkRetxAllowDtx(cell, ue, hqP, &reTxAllw);
index ffa51ba..db18f1a 100755 (executable)
@@ -371,7 +371,7 @@ RgSchUeCellInfo  *sCellInfo
 #ifdef TFU_UPGRADE
    /* Start receiving CQI for this SCell for this UE */
    crntTime = (ueCb->cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)+
 #ifdef TFU_UPGRADE
    /* Start receiving CQI for this SCell for this UE */
    crntTime = (ueCb->cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)+
-                  (ueCb->cell->crntTime.subframe);
+                  (ueCb->cell->crntTime.slot);
 
    cqiCb = &sCellInfo->cqiCb;
    cqiCfg = &cqiCb->cqiCfg;
 
    cqiCb = &sCellInfo->cqiCb;
    cqiCfg = &cqiCb->cqiCfg;
@@ -389,7 +389,7 @@ RgSchUeCellInfo  *sCellInfo
       }
 
       timingInfo.sfn =  cqiCb->nCqiTrIdx/RGSCH_NUM_SUB_FRAMES_5G;
       }
 
       timingInfo.sfn =  cqiCb->nCqiTrIdx/RGSCH_NUM_SUB_FRAMES_5G;
-      timingInfo.subframe =  cqiCb->nCqiTrIdx%RGSCH_NUM_SUB_FRAMES_5G;
+      timingInfo.slot =  cqiCb->nCqiTrIdx%RGSCH_NUM_SUB_FRAMES_5G;
       if(cqiCb->cqiCfg.cqiSetup.cqiRepType == RGR_UE_PCQI_SB_REP)
       {
          rgSCHTomUtlPcqiSbCalcBpIdx(timingInfo,ueCb,cqiCb); 
       if(cqiCb->cqiCfg.cqiSetup.cqiRepType == RGR_UE_PCQI_SB_REP)
       {
          rgSCHTomUtlPcqiSbCalcBpIdx(timingInfo,ueCb,cqiCb); 
index 6a076ed..7ab88af 100755 (executable)
@@ -263,6 +263,9 @@ PUBLIC S16 rgSCHTomUtlFillDatSrsRecpReq ARGS(
  Bool              hqPres
  ));
 
  Bool              hqPres
  ));
 
+PUBLIC void schFillCrntTime(
+   SlotIndInfo slotInd,
+   Inst        schInst);
 
 #ifdef CA_DBG
 EXTERN U32 delayedApiCnt;
 
 #ifdef CA_DBG
 EXTERN U32 delayedApiCnt;
@@ -1579,7 +1582,7 @@ PRIVATE S16 rgSCHTomUtlMovePriNxtOccasion(cell, ue, riCb)
 
    TRC2(rgSCHTomUtlMovePriNxtOccasion);
    crntTime = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
 
    TRC2(rgSCHTomUtlMovePriNxtOccasion);
    crntTime = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
-      +(cell->crntTime.subframe);
+      +(cell->crntTime.slot);
 #ifdef XEON_SPECIFIC_CHANGES
    RGSCHCPYTIMEINFO(cell->crntTime, ue->riRecpTime);
 #endif
 #ifdef XEON_SPECIFIC_CHANGES
    RGSCHCPYTIMEINFO(cell->crntTime, ue->riRecpTime);
 #endif
@@ -1755,7 +1758,7 @@ PRIVATE S16 rgSCHTomUtlMoveSrsNxtOccasion(cell, ue)
 
    TRC2(rgSCHTomUtlMoveSrsNxtOccasion);
    crntTime = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
 
    TRC2(rgSCHTomUtlMoveSrsNxtOccasion);
    crntTime = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G)
-      +(cell->crntTime.subframe);
+      +(cell->crntTime.slot);
 
    /* Compute Next Transmission Instance */ 
    tempIdx = ue->srsCb.peri + ue->srsCb.nSrsTrIdx;
 
    /* Compute Next Transmission Instance */ 
    tempIdx = ue->srsCb.peri + ue->srsCb.nSrsTrIdx;
@@ -1881,7 +1884,7 @@ PUBLIC S16 rgSCHTomRawCqiInd(cell, rawCqiInd)
       if (rawCqiInfo->numBits >= 5)
          printf("cellId [%d] crnti [%d] numBits [%d]  uciPayload [0x%08x] sfn/sf [%d:%d]\n", 
                 cell->cellId, rawCqiInfo->crnti, rawCqiInfo->numBits, rawCqiInfo->uciPayload, 
       if (rawCqiInfo->numBits >= 5)
          printf("cellId [%d] crnti [%d] numBits [%d]  uciPayload [0x%08x] sfn/sf [%d:%d]\n", 
                 cell->cellId, rawCqiInfo->crnti, rawCqiInfo->numBits, rawCqiInfo->uciPayload, 
-                rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.subframe);
+                rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.slot);
       */
       if (rawCqiInfo->numBits == 1)
       {
       */
       if (rawCqiInfo->numBits == 1)
       {
@@ -1939,7 +1942,7 @@ PUBLIC S16 rgSCHTomRawCqiInd(cell, rawCqiInd)
          }
          /*
          printf("rawCqiInfo->numBits [%d]  uciPayload [0x%08x] sfn/sf [%d:%d]\n", rawCqiInfo->numBits,
          }
          /*
          printf("rawCqiInfo->numBits [%d]  uciPayload [0x%08x] sfn/sf [%d:%d]\n", rawCqiInfo->numBits,
-                rawCqiInfo->uciPayload, rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.subframe);
+                rawCqiInfo->uciPayload, rawCqiInd->timingInfo.sfn, rawCqiInd->timingInfo.slot);
          */
       }
       else if (rawCqiInfo->numBits == 5)
          */
       }
       else if (rawCqiInfo->numBits == 5)
@@ -1972,7 +1975,7 @@ PUBLIC S16 rgSCHTomRawCqiInd(cell, rawCqiInd)
       }
       else if (rawCqiInfo->numBits == 6)
       {
       }
       else if (rawCqiInfo->numBits == 6)
       {
-         RgInfRlsHqInfo  *rlsHqBufs = &(cell->rlsHqArr[cell->crntHqIdx]);
+         rlsHqBufs = &(cell->rlsHqArr[cell->crntHqIdx]);
          TfuHqFdbk fdbk = TFU_HQFDB_NACK;
          /* Process both HARQ and CQI-RI Ind*/
          ri = (rawCqiInfo->uciPayload >> 26) & 0x1;
          TfuHqFdbk fdbk = TFU_HQFDB_NACK;
          /* Process both HARQ and CQI-RI Ind*/
          ri = (rawCqiInfo->uciPayload >> 26) & 0x1;
@@ -2275,7 +2278,7 @@ TfuCrcIndInfo *crcInd;
          /*Removed the WA to drop 2nd CRC*/
          RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Recieved CRC "
             "twice per TTI @(%u,%u)", cell->crntTime.sfn,
          /*Removed the WA to drop 2nd CRC*/
          RLOG_ARG2(L_ERROR,DBG_CELLID,cell->cellId,"Recieved CRC "
             "twice per TTI @(%u,%u)", cell->crntTime.sfn,
-            cell->crntTime.subframe);
+            cell->crntTime.slot);
       }
       lastCrc = crntCrc;
    }
       }
       lastCrc = crntCrc;
    }
@@ -2329,7 +2332,7 @@ TfuCrcIndInfo *crcInd;
 #ifdef LTE_TDD
             /*ccpu00128820 - MOD - Msg3 alloc double delete issue*/
             hqProc = &(raCb->msg3HqProc);
 #ifdef LTE_TDD
             /*ccpu00128820 - MOD - Msg3 alloc double delete issue*/
             hqProc = &(raCb->msg3HqProc);
-            RGSCH_UPD_PHICH(cell->ulDlCfgIdx, crcInd->timingInfo.subframe,
+            RGSCH_UPD_PHICH(cell->ulDlCfgIdx, crcInd->timingInfo.slot,
                     hqProc);
 #endif
             raCb = NULLP;
                     hqProc);
 #endif
             raCb = NULLP;
@@ -2533,7 +2536,7 @@ TfuTimingAdvIndInfo *timingAdvInd;
  *
  *     Function: rgSCHTomTtiInd
  *
  *
  *     Function: rgSCHTomTtiInd
  *
- *     Handler for processing TTI indication recieved from PHY
+ *     Handler for processing slot indication recieved from MAC
  *     for a cell. This is split into the below Steps. 
  *     
  *     1: Complete the Uplink and Common Channel Scheduling for each Cell
  *     for a cell. This is split into the below Steps. 
  *     
  *     1: Complete the Uplink and Common Channel Scheduling for each Cell
@@ -2542,19 +2545,19 @@ TfuTimingAdvIndInfo *timingAdvInd;
  *     4: Fill the Tfu structures for DL and UL Config requests  
  *     5: Handle the RGR Config messages per Cell
  *
  *     4: Fill the Tfu structures for DL and UL Config requests  
  *     5: Handle the RGR Config messages per Cell
  *
- *  @param[in] TfuTtiIndInfo *ttiInd
+ *  @param[in] SlotIndInfo    *slotInd
  *  @param[in] Inst           schInst
  *  @return  Void
  **/
 #ifdef ANSI
 PUBLIC Void rgSCHTomTtiInd
 (
  *  @param[in] Inst           schInst
  *  @return  Void
  **/
 #ifdef ANSI
 PUBLIC Void rgSCHTomTtiInd
 (
-TfuTtiIndInfo      *ttiInd,
+SlotIndInfo        *slotInd,
 Inst               schInst
 )
 #else
 Inst               schInst
 )
 #else
-PUBLIC Void rgSCHTomTtiInd(ttiInd, schInst)
-TfuTtiIndInfo      *ttiInd;
+PUBLIC Void rgSCHTomTtiInd(slotInd, schInst)
+SlotIndInfo        *slotInd;
 Inst               schInst;
 #endif
 {
 Inst               schInst;
 #endif
 {
@@ -2572,7 +2575,9 @@ Inst               schInst;
    glblTtiCnt++;
 #endif
 
    glblTtiCnt++;
 #endif
 
-   rgSchTomFillCellTtiInfo(ttiInd, schInst, &nCell, &cell[0]);
+   //rgSchTomFillCellTtiInfo(slotInd, schInst, &nCell, &cell[0]);
+
+   schFillCrntTime(*slotInd,schInst);
    for (i = 0; i < nCell; i++)
    {
       /* Perform UL and DL Common Channel scheduling */
    for (i = 0; i < nCell; i++)
    {
       /* Perform UL and DL Common Channel scheduling */
@@ -2975,7 +2980,7 @@ RgSchErrInfo       *err;
 
    /*ccpu00130768  */ 
    if(cell->srsCfg.isSrsCfgPres && 
 
    /*ccpu00130768  */ 
    if(cell->srsCfg.isSrsCfgPres && 
-      rgSchTddCellSpSrsSubfrmTbl[cell->srsCfg.srsSubFrameCfg][recpReqInfo->timingInfo.subframe])
+      rgSchTddCellSpSrsSubfrmTbl[cell->srsCfg.srsSubFrameCfg][recpReqInfo->timingInfo.slot])
    {
       recpReqInfo->srsPres = TRUE;
    }
    {
       recpReqInfo->srsPres = TRUE;
    }
@@ -3054,7 +3059,7 @@ RgSchErrInfo         *err;
       cntrlInfo->dlTiming = cell->dlDciTime;
       cntrlInfo->cellId   = cell->cellId;
       cntrlInfo->ulTiming = cell->hiDci0Time;
       cntrlInfo->dlTiming = cell->dlDciTime;
       cntrlInfo->cellId   = cell->cellId;
       cntrlInfo->ulTiming = cell->hiDci0Time;
-      if((0 == (cntrlInfo->dlTiming.sfn % 30)) && (0 == cntrlInfo->dlTiming.subframe))
+      if((0 == (cntrlInfo->dlTiming.sfn % 30)) && (0 == cntrlInfo->dlTiming.slot))
       {
         //printf("5GTF_CHECK rgSCHTomUtlProcDlSf Cntrl dl (%d : %d) ul (%d : %d)\n", cntrlInfo->dlTiming.sfn, cntrlInfo->dlTiming.subframe, cntrlInfo->ulTiming.sfn, cntrlInfo->ulTiming.subframe);
       }
       {
         //printf("5GTF_CHECK rgSCHTomUtlProcDlSf Cntrl dl (%d : %d) ul (%d : %d)\n", cntrlInfo->dlTiming.sfn, cntrlInfo->dlTiming.subframe, cntrlInfo->ulTiming.sfn, cntrlInfo->ulTiming.subframe);
       }
@@ -5212,9 +5217,9 @@ PRIVATE S16 rgSCHTomUtlFillDatRecpReq (recpReqInfo, cell, validIdx, err)
 
    TRC2(rgSCHTomUtlFillDatRecpReq);
 
 
    TRC2(rgSCHTomUtlFillDatRecpReq);
 
-   if((0 == (recpReqInfo->timingInfo.sfn % 30)) && (0 == recpReqInfo->timingInfo.subframe))
+   if((0 == (recpReqInfo->timingInfo.sfn % 30)) && (0 == recpReqInfo->timingInfo.slot))
    {
    {
-      //printf("5GTF_CHECK rgSCHTomUtlFillDatRecpReq (%d : %d)\n", recpReqInfo->timingInfo.sfn, recpReqInfo->timingInfo.subframe);
+      //printf("5GTF_CHECK rgSCHTomUtlFillDatRecpReq (%d : %d)\n", recpReqInfo->timingInfo.sfn, recpReqInfo->timingInfo.slot);
    }
    /* processing steps are 
     * - Run through the UL allocations going out in this subframe.
    }
    /* processing steps are 
     * - Run through the UL allocations going out in this subframe.
@@ -5252,7 +5257,7 @@ PRIVATE S16 rgSCHTomUtlFillDatRecpReq (recpReqInfo, cell, validIdx, err)
          {
             RGSCHDECRFRMCRNTTIME(cell->crntTime,dci0Time,(RGSCH_ULCTRL_RECP_DIST));
             
          {
             RGSCHDECRFRMCRNTTIME(cell->crntTime,dci0Time,(RGSCH_ULCTRL_RECP_DIST));
             
-            idx = (dci0Time.sfn * RGSCH_NUM_SUB_FRAMES_5G + dci0Time.subframe)%
+            idx = (dci0Time.sfn * RGSCH_NUM_SUB_FRAMES_5G + dci0Time.slot)%
                      RGSCH_ULCTRL_RECP_DIST; 
             UNUSED(idx);
             datRecpInfo->t.puschRecpReq.rcpInfo = TFU_PUSCH_DATA;
                      RGSCH_ULCTRL_RECP_DIST; 
             UNUSED(idx);
             datRecpInfo->t.puschRecpReq.rcpInfo = TFU_PUSCH_DATA;
@@ -5552,7 +5557,7 @@ PUBLIC S16 rgSCHTomUtlPcqiSbCalcBpIdx(crntTimInfo, ueCb, cqiCb)
    RgSchUePCqiCb   *cqiCb;
 #endif
 {
    RgSchUePCqiCb   *cqiCb;
 #endif
 {
-   U16 tti = (crntTimInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G + crntTimInfo.subframe);
+   U16 tti = (crntTimInfo.sfn * RGSCH_NUM_SUB_FRAMES_5G + crntTimInfo.slot);
    U16  prdNum = tti/cqiCb->cqiPeri;
 
    TRC2(rgSCHTomUtlPcqiSbCalcBpIdx);
    U16  prdNum = tti/cqiCb->cqiPeri;
 
    TRC2(rgSCHTomUtlPcqiSbCalcBpIdx);
@@ -8252,7 +8257,7 @@ RgSchCellCb          *cell;
    /* Added support for period = 0 to disable tick to RRM */
    if ((cell->rrmTtiIndPrd != 0) && 
          ((cell->crntTime.sfn % cell->rrmTtiIndPrd) == 0) && 
    /* Added support for period = 0 to disable tick to RRM */
    if ((cell->rrmTtiIndPrd != 0) && 
          ((cell->crntTime.sfn % cell->rrmTtiIndPrd) == 0) && 
-         (cell->crntTime.subframe == 0))
+         (cell->crntTime.slot == 0))
    {
       /* Allocate a TTI indication structure and send to RRM over RGR interface */
       if (rgSCHUtlAllocSBuf (cell->instIdx,
    {
       /* Allocate a TTI indication structure and send to RRM over RGR interface */
       if (rgSCHUtlAllocSBuf (cell->instIdx,
@@ -8264,7 +8269,7 @@ RgSchCellCb          *cell;
          RETVOID;
       }
       rgrTtiInd->cellId = cell->cellId;
          RETVOID;
       }
       rgrTtiInd->cellId = cell->cellId;
-      rgrTtiInd->hSfn = cell->crntTime.hSfn;
+      //rgrTtiInd->hSfn = cell->crntTime.hSfn;
       rgrTtiInd->sfn    = cell->crntTime.sfn;
 
       if (rgSCHUtlRgrTtiInd (cell, rgrTtiInd) != ROK)
       rgrTtiInd->sfn    = cell->crntTime.sfn;
 
       if (rgSCHUtlRgrTtiInd (cell, rgrTtiInd) != ROK)
@@ -8403,9 +8408,9 @@ RgSchCellCb        *cells[];
       {
          cell->stopDlSch = TRUE;
       }
       {
          cell->stopDlSch = TRUE;
       }
-      if((0 == (cellInfo->timingInfo.sfn % 30)) && (0 == cellInfo->timingInfo.subframe))
+      if((0 == (cellInfo->timingInfo.sfn % 30)) && (0 == cellInfo->timingInfo.slot))
       {
       {
-        //printf("5GTF_CHECK rgSCHTOMTtiInd (%d : %d)\n", cellInfo->timingInfo.sfn, cellInfo->timingInfo.subframe);
+        //printf("5GTF_CHECK rgSCHTOMTtiInd (%d : %d)\n", cellInfo->timingInfo.sfn, cellInfo->timingInfo.slot);
       }
 #ifndef EMTC_ENABLE 
       RGSCHCPYTIMEINFO(cellInfo->timingInfo, cell->crntTime);
       }
 #ifndef EMTC_ENABLE 
       RGSCHCPYTIMEINFO(cellInfo->timingInfo, cell->crntTime);
@@ -8448,13 +8453,13 @@ RgSchCellCb        *cells[];
       cell->totalTime++;
 #endif
 #ifdef LTE_TDD
       cell->totalTime++;
 #endif
 #ifdef LTE_TDD
-      U8 idx = (cell->crntTime.subframe + RG_SCH_CMN_DL_DELTA) %
+      U8 idx = (cell->crntTime.slot + RG_SCH_CMN_DL_DELTA) %
          RGSCH_NUM_SUB_FRAMES_5G;       
       
       cell->isDlDataAllwd = RG_SCH_CMN_CHK_DL_DATA_ALLOWED(cell, idx);
       
       /*ccpu00130639 -ADD - used in UL HARQ proc id calculation*/
          RGSCH_NUM_SUB_FRAMES_5G;       
       
       cell->isDlDataAllwd = RG_SCH_CMN_CHK_DL_DATA_ALLOWED(cell, idx);
       
       /*ccpu00130639 -ADD - used in UL HARQ proc id calculation*/
-      if((cell->crntTime.sfn == 0) && (cell->crntTime.subframe == 0))
+      if((cell->crntTime.sfn == 0) && (cell->crntTime.slot == 0))
       {
          /* sfn Cycle used for Tdd UL Harq Proc Determination. 
             This sfn Cycle will have values from 0 to numUl Harq-1. */
       {
          /* sfn Cycle used for Tdd UL Harq Proc Determination. 
             This sfn Cycle will have values from 0 to numUl Harq-1. */
@@ -8471,6 +8476,36 @@ RgSchCellCb        *cells[];
    } 
 }
 
    } 
 }
 
+void schFillCrntTime(
+   SlotIndInfo slotInd,
+   Inst        schInst)
+{
+   U8 cellCount = 0;
+   for(cellCount = 0; cellCount < CM_LTE_MAX_CELLS; cellCount++)
+   {
+      RgSchCellCb    *cell;
+      cell = rgSchCb[schInst].cells[cellCount];
+
+      RGSCHCPYTIMEINFO(slotInd, cell->crntTime);
+
+      RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, cell->hiDci0Time, 
+                           TFU_ULCNTRL_DLDELTA);
+      RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, cell->dlDciTime, 
+                           TFU_DLCNTRL_DLDELTA);
+      RG_SCH_ADD_TO_CRNT_TIME(cell->crntTime, cell->rcpReqTime, 
+                           TFU_RECPREQ_DLDELTA);
+      RGSCHDECRFRMCRNTTIME(cell->crntTime, cell->hqRlsTime, 
+                           TFU_HQFBKIND_ULDELTA); 
+      RGSCHDECRFRMCRNTTIME(cell->crntTime, cell->dlSfRlsTime, 
+                           RGSCH_RLS_SF_IDX);
+
+      RGSCH_INCR_SUB_FRAME(cell->crntTime, RG_SCH_CMN_DL_DELTA);
+
+      RgSchCmnCell *cellSch = RG_SCH_CMN_GET_CELL(cell);
+      cellSch->dl.time = cell->crntTime; 
+   }
+}
+
 /** @brief This function prepares the TTI for scheduling and 
  *         invokes the Common channel scheduler. Uplink scheduler
  *         is invoked first if UL Scheduling at CRC is not enabled   
 /** @brief This function prepares the TTI for scheduling and 
  *         invokes the Common channel scheduler. Uplink scheduler
  *         is invoked first if UL Scheduling at CRC is not enabled   
index fa58038..a23f1fb 100755 (executable)
@@ -172,7 +172,7 @@ U8                   cqi;
    if (hqProc == NULLP)
    {
       printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
    if (hqProc == NULLP)
    {
       printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
-                     ue->ueId, frm.sfn, frm.subframe);
+                     ue->ueId, frm.sfn, frm.slot);
       RETVOID;
    }
    hqProc->rcvdCrcInd = TRUE;
       RETVOID;
    }
    hqProc->rcvdCrcInd = TRUE;
@@ -347,7 +347,7 @@ U8                   cqi;
    if (hqProc == NULLP)
    {
       printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
    if (hqProc == NULLP)
    {
       printf("UE[%d] failed to find UL HqProc for [%d:%d]\n",
-                     ue->ueId, frm.sfn, frm.subframe);
+                     ue->ueId, frm.sfn, frm.slot);
       RETVOID;
    }
 #ifdef UL_LA
       RETVOID;
    }
 #ifdef UL_LA
@@ -550,7 +550,7 @@ RgSchCellCb      *cell;
 #endif
    hqProc->alloc = NULLP;
    hqProc->ulSfIdx = RGSCH_INVALID_INFO;
 #endif
    hqProc->alloc = NULLP;
    hqProc->ulSfIdx = RGSCH_INVALID_INFO;
-   /*ccpu00116293 - Correcting relation between UL subframe and DL subframe based on RG_UL_DELTA*/
+   /*ccpu00116293 - Correcting relation between UL slot and DL slot based on RG_UL_DELTA*/
    hqProc->isRetx  = FALSE;
    hqProc->remTx = 0; /*Reseting the remTx value to 0*/
 #ifdef EMTC_ENABLE
    hqProc->isRetx  = FALSE;
    hqProc->remTx = 0; /*Reseting the remTx value to 0*/
 #ifdef EMTC_ENABLE
@@ -1015,7 +1015,7 @@ RgSchUlHqProcCb       **hqP;
    cmLListAdd2Tail(&hqE->inUse, &tmpHqProc->lnk);
 
 #ifdef UL_ADPT_DBG 
    cmLListAdd2Tail(&hqE->inUse, &tmpHqProc->lnk);
 
 #ifdef UL_ADPT_DBG 
-         printf("rgSCHUhmGetAvlHqProc cellId %d  free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.subframe);
+         printf("rgSCHUhmGetAvlHqProc cellId %d  free %ld inUse %ld ue %d time (%d %d)\n",cell->cellId, hqE->free.count, hqE->inUse.count, ue->ueId,cellUl->schdTime.sfn,cellUl->schdTime.slot);
 #endif         
    tmpHqProc->schdTime = cellUl->schdTime;
 
 #endif         
    tmpHqProc->schdTime = cellUl->schdTime;
 
@@ -1067,10 +1067,10 @@ CmLteTimingInfo  frm;
    {
       proc = (RgSchUlHqProcCb *)(lnk->node);
       lnk = lnk->next;
    {
       proc = (RgSchUlHqProcCb *)(lnk->node);
       lnk = lnk->next;
-      //   printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.subframe,frm.sfn,frm.subframe ,proc->procId);
+      //   printf("compare rgSCHUhmGetUlProcByTime time (%d %d) CRC time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot,frm.sfn,frm.slot ,proc->procId);
       if (RGSCH_TIMEINFO_SAME(proc->schdTime, frm))
       {
       if (RGSCH_TIMEINFO_SAME(proc->schdTime, frm))
       {
-        // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.subframe, proc->procId);
+        // printf("Harq timing Matched rgSCHUhmGetUlProcByTime time (%d %d) proc->procId %d \n",proc->schdTime.sfn,proc->schdTime.slot, proc->procId);
          RETVALUE(proc);
       }
    }
          RETVALUE(proc);
       }
    }
index 2be7491..5f39b7a 100755 (executable)
@@ -659,8 +659,8 @@ RgSchPdcch                 *pdcch;
  *
  *     Function: rgSCHUtlPdcchInit
  *     Purpose:  This function initializes PDCCH information for
  *
  *     Function: rgSCHUtlPdcchInit
  *     Purpose:  This function initializes PDCCH information for
- *               a subframe. It removes the list of PDCCHs allocated
- *               in the prior use of this subframe structure.
+ *               a slot. It removes the list of PDCCHs allocated
+ *               in the prior use of this slot structure.
  *
  *     Invoked by: rgSCHUtlSubFrmPut
  *
  *
  *     Invoked by: rgSCHUtlSubFrmPut
  *
@@ -1048,7 +1048,7 @@ PRIVATE Void rgSchDSFRRntpInfoInit(rntpPtr, cell, bw)
 }
 
 /**
 }
 
 /**
- * @brief This function release RNTP pattern from subFrame and Cell 
+ * @brief This function release RNTP pattern from slot and Cell 
  * @details
  *
  *     Function:   rgSchDSFRRntpInfoFree 
  * @details
  *
  *     Function:   rgSchDSFRRntpInfoFree 
@@ -1137,7 +1137,7 @@ PRIVATE Void rgSchSFRResetPoolVariables(cell, pool)
  * @details
  *
  *     Function: rgSCHSFRUtlTotalPooReset
  * @details
  *
  *     Function: rgSCHSFRUtlTotalPooReset
- *     Purpose:  Update the dynamic variables in each pool as they will be modified in each subframe.
+ *     Purpose:  Update the dynamic variables in each pool as they will be modified in each slot.
  *                    Dont modify the static variables like startRB, endRB, BW
  *     Invoked by: rgSCHUtlSubFrmPut
  *
  *                    Dont modify the static variables like startRB, endRB, BW
  *     Invoked by: rgSCHUtlSubFrmPut
  *
@@ -1206,7 +1206,7 @@ PRIVATE Void rgSCHSFRUtlTotalPoolReset(cell, subFrm)
  *
  *     Function: rgSCHUtlAddPhich
  *     Purpose:  This function appends PHICH information for
  *
  *     Function: rgSCHUtlAddPhich
  *     Purpose:  This function appends PHICH information for
- *               a subframe.
+ *               a slot.
  *
  *     Invoked by: TOM
  *
  *
  *     Invoked by: TOM
  *
@@ -1292,8 +1292,8 @@ Bool                    isForMsg3;
  *
  *     Function: rgSCHUtlPhichReset
  *     Purpose:  This function initializes PHICH information for
  *
  *     Function: rgSCHUtlPhichReset
  *     Purpose:  This function initializes PHICH information for
- *               a subframe. It removes the list of PHICHs allocated
- *               in the prior use of this subframe structure.
+ *               a slot. It removes the list of PHICHs allocated
+ *               in the prior use of this slot structure.
  *
  *     Invoked by: rgSCHUtlSubFrmPut
  *
  *
  *     Invoked by: rgSCHUtlSubFrmPut
  *
@@ -1334,13 +1334,13 @@ RgSchDlSf                  *subFrm;
 
 \f
 /**
 
 \f
 /**
- * @brief This function returns subframe data structure for a cell
+ * @brief This function returns slot data structure for a cell
  *
  * @details
  *
  *     Function: rgSCHUtlSubFrmGet
  *
  * @details
  *
  *     Function: rgSCHUtlSubFrmGet
- *     Purpose:  This function resets the subframe data structure
- *               when the subframe is released
+ *     Purpose:  This function resets the slot data structure
+ *               when the slot is released
  *
  *     Invoked by: scheduler
  *
  *
  *     Invoked by: scheduler
  *
@@ -1371,8 +1371,8 @@ CmLteTimingInfo        frm;
    sf = cell->subFrms[dlIdx];
 #else
    /* Changing the idexing
    sf = cell->subFrms[dlIdx];
 #else
    /* Changing the idexing
-      so that proper subframe is selected */
-   dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.subframe % RGSCH_NUM_SUB_FRAMES));
+      so that proper slot is selected */
+   dlIdx = (((frm.sfn & 1) * RGSCH_NUM_SUB_FRAMES) + (frm.slot % RGSCH_NUM_SUB_FRAMES));
    RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
    sf = cell->subFrms[dlIdx];
 #endif
    RGSCH_ARRAY_BOUND_CHECK(cell->instIdx, cell->subFrms, dlIdx);
    sf = cell->subFrms[dlIdx];
 #endif
@@ -1384,13 +1384,13 @@ CmLteTimingInfo        frm;
 
 \f
 /**
 
 \f
 /**
- * @brief This function returns subframe data structure for a cell
+ * @brief This function returns slot data structure for a cell
  *
  * @details
  *
  *     Function: rgSCHUtlSubFrmPut
  *
  * @details
  *
  *     Function: rgSCHUtlSubFrmPut
- *     Purpose:  This function resets the subframe data structure
- *               when the subframe is released
+ *     Purpose:  This function resets the slot data structure
+ *               when the slot is released
  *
  *     Invoked by: scheduler
  *
  *
  *     Invoked by: scheduler
  *
@@ -2194,12 +2194,12 @@ TfuUeUlSchRecpInfo      *recpReq;
 
 #ifdef LTE_TDD
 /**
 
 #ifdef LTE_TDD
 /**
- * @brief This function initialises the PRACH subframe occasions
+ * @brief This function initialises the PRACH slot occasions
  *
  * @details
  *
  *     Function: rgSCHUtlUpdPrachOcc
  *
  * @details
  *
  *     Function: rgSCHUtlUpdPrachOcc
- *     Purpose:  This function updates the PRACH subframes based on
+ *     Purpose:  This function updates the PRACH slots based on
  *               RGR configuration.
  *
  *     Invoked by: Scheduler
  *               RGR configuration.
  *
  *     Invoked by: Scheduler
@@ -2244,12 +2244,12 @@ RgrTddPrachInfo   *cellCfg;
    for(idx = startIdx; idx < endIdx; idx++)
    {
       if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
    for(idx = startIdx; idx < endIdx; idx++)
    {
       if(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
-            == RG_SCH_TDD_UL_SUBFRAME)
+            == RG_SCH_TDD_UL_slot)
       {
          if(cellCfg->ulStartSfIdx == count)
          {
             size = cell->rachCfg.raOccasion.size;
       {
          if(cellCfg->ulStartSfIdx == count)
          {
             size = cell->rachCfg.raOccasion.size;
-            cell->rachCfg.raOccasion.subFrameNum[size] = idx;
+            cell->rachCfg.raOccasion.slotNum[size] = idx;
             cell->rachCfg.raOccasion.size++;
             break;
          }
             cell->rachCfg.raOccasion.size++;
             break;
          }
@@ -2305,7 +2305,7 @@ RgrCellCfg        *cellCfg;
 
    cell->rachCfg.raOccasion.size = 0;
 
 
    cell->rachCfg.raOccasion.size = 0;
 
-   /* Update subframe occasions */
+   /* Update slot occasions */
    for(idx = 0; idx < cellCfg->prachRscInfo.numRsc; idx++)
    {
       if(cellCfg->prachRscInfo.prachInfo[idx].freqIdx == 0)
    for(idx = 0; idx < cellCfg->prachRscInfo.numRsc; idx++)
    {
       if(cellCfg->prachRscInfo.prachInfo[idx].freqIdx == 0)
@@ -2322,7 +2322,7 @@ RgrCellCfg        *cellCfg;
                                                 RGR_TDD_SPL_UL_IDX)
          {
             subfrmIdx = cell->rachCfg.raOccasion.size;
                                                 RGR_TDD_SPL_UL_IDX)
          {
             subfrmIdx = cell->rachCfg.raOccasion.size;
-            cell->rachCfg.raOccasion.subFrameNum[subfrmIdx] = splFrm;
+            cell->rachCfg.raOccasion.slotNum[subfrmIdx] = splFrm;
             cell->rachCfg.raOccasion.size++;
          }
          else
             cell->rachCfg.raOccasion.size++;
          }
          else
@@ -2342,7 +2342,7 @@ RgrCellCfg        *cellCfg;
  *
  *     Function: rgSCHUtlRgrCellCfg
  *     Purpose:  This function initialises the cell with RGR configuration
  *
  *     Function: rgSCHUtlRgrCellCfg
  *     Purpose:  This function initialises the cell with RGR configuration
- *               and subframe related initialization.
+ *               and slot related initialization.
  *
  *     Invoked by: Scheduler
  *
  *
  *     Invoked by: Scheduler
  *
@@ -2372,8 +2372,8 @@ RgSchErrInfo      *errInfo;
    RgSchDlSf       *sf;
    CmLteTimingInfo frm;
    U8              ulDlCfgIdx = cellCfg->ulDlCfgIdx;
    RgSchDlSf       *sf;
    CmLteTimingInfo frm;
    U8              ulDlCfgIdx = cellCfg->ulDlCfgIdx;
-   U8              maxSubframes ;
-   U8              maxDlSubframes;
+   U8              maxslots ;
+   U8              maxDlslots;
    S16             ret = ROK;
    U16             bw;         /*!< Number of RBs in the cell */
    
    S16             ret = ROK;
    U16             bw;         /*!< Number of RBs in the cell */
    
@@ -2382,9 +2382,9 @@ RgSchErrInfo      *errInfo;
    cmMemset((U8 *)&frm,0,sizeof(CmLteTimingInfo));
 
    /* ccpu00132657-MOD- Determining DLSF array size independent of DELTAS */
    cmMemset((U8 *)&frm,0,sizeof(CmLteTimingInfo));
 
    /* ccpu00132657-MOD- Determining DLSF array size independent of DELTAS */
-   maxDlSubframes = rgSchTddNumDlSubfrmTbl[ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
-   maxSubframes = 2 * maxDlSubframes;
-   cell->numDlSubfrms = maxSubframes;
+   maxDlslots = rgSchTddNumDlSubfrmTbl[ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
+   maxslots = 2 * maxDlslots;
+   cell->numDlSubfrms = maxslots;
 /* ACC-TDD <ccpu00130639> */
    cell->tddHqSfnCycle = -1;
    cell->ulDlCfgIdx = ulDlCfgIdx;
 /* ACC-TDD <ccpu00130639> */
    cell->tddHqSfnCycle = -1;
    cell->ulDlCfgIdx = ulDlCfgIdx;
@@ -2417,17 +2417,17 @@ RgSchErrInfo      *errInfo;
    bw    = cell->bwCfg.dlTotalBw;
 
    rgSCHUtlAllocSBuf(cell->instIdx,
    bw    = cell->bwCfg.dlTotalBw;
 
    rgSCHUtlAllocSBuf(cell->instIdx,
-               (Data **)&cell->subFrms, sizeof(RgSchDlSf *) * maxSubframes);
+               (Data **)&cell->subFrms, sizeof(RgSchDlSf *) * maxslots);
    if (cell->subFrms == NULLP)
    {
       RETVALUE(RFAILED);
    }
 
    /* Create memory for each frame. */
    if (cell->subFrms == NULLP)
    {
       RETVALUE(RFAILED);
    }
 
    /* Create memory for each frame. */
-   for(i = 0; i < maxSubframes; i++)
+   for(i = 0; i < maxslots; i++)
    {
       while(rgSchTddUlDlSubfrmTbl[ulDlCfgIdx][sfNum] ==
    {
       while(rgSchTddUlDlSubfrmTbl[ulDlCfgIdx][sfNum] ==
-            RG_SCH_TDD_UL_SUBFRAME)
+            RG_SCH_TDD_UL_slot)
       {
          sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES;
       }
       {
          sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES;
       }
@@ -2465,7 +2465,7 @@ RgSchErrInfo      *errInfo;
       cell->subFrms[i] = sf;
       sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES;
    }
       cell->subFrms[i] = sf;
       sfNum = (sfNum+1) % RGSCH_NUM_SUB_FRAMES;
    }
-   if (i != maxSubframes)
+   if (i != maxslots)
    {
       for (; i > 0; i--)
       {
    {
       for (; i > 0; i--)
       {
@@ -2480,7 +2480,7 @@ RgSchErrInfo      *errInfo;
       /* ccpu00117052 - MOD - Passing double pointer
       for proper NULLP assignment*/
       rgSCHUtlFreeSBuf(cell->instIdx,
       /* ccpu00117052 - MOD - Passing double pointer
       for proper NULLP assignment*/
       rgSCHUtlFreeSBuf(cell->instIdx,
-            (Data **)(&(cell->subFrms)), sizeof(RgSchDlSf *) * maxSubframes);
+            (Data **)(&(cell->subFrms)), sizeof(RgSchDlSf *) * maxslots);
 
       RETVALUE(RFAILED);
    }
 
       RETVALUE(RFAILED);
    }
@@ -2499,15 +2499,15 @@ RgSchErrInfo      *errInfo;
       RETVALUE(ret);
    }
 
       RETVALUE(ret);
    }
 
-   /* Release the subframes and thereby perform the initialization */
-   for (i = 0; i < maxSubframes; i++)
+   /* Release the slots and thereby perform the initialization */
+   for (i = 0; i < maxslots; i++)
    {
    {
-     if((i > 0) && (i%maxDlSubframes == 0))
+     if((i > 0) && (i%maxDlslots == 0))
      {
       sfn++;
      }
      frm.sfn = sfn;
      {
       sfn++;
      }
      frm.sfn = sfn;
-     frm.subframe = cell->subFrms[i]->sfNum;
+     frm.slot = cell->subFrms[i]->sfNum;
      rgSCHUtlDlRlsSubFrm(cell, frm);
    }
 
      rgSCHUtlDlRlsSubFrm(cell, frm);
    }
 
@@ -2522,7 +2522,7 @@ RgSchErrInfo      *errInfo;
  * @details
  *
  *     Function: rgSCHUtlRgrCellCfg
  * @details
  *
  *     Function: rgSCHUtlRgrCellCfg
- *     Purpose:  This function creates the subframes needed for the
+ *     Purpose:  This function creates the slots needed for the
  *               cell. It then peforms init of the scheduler by calling
  *               scheduler specific cell init function.
  *
  *               cell. It then peforms init of the scheduler by calling
  *               scheduler specific cell init function.
  *
@@ -2582,8 +2582,8 @@ RgSchErrInfo      *errInfo;
    cell->noOfRbgs = RGSCH_CEIL(cell->bwCfg.dlTotalBw, cell->rbgSize);
    /* Create memory for each frame. */
    /* Changing loop limit from
    cell->noOfRbgs = RGSCH_CEIL(cell->bwCfg.dlTotalBw, cell->rbgSize);
    /* Create memory for each frame. */
    /* Changing loop limit from
-      RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_SUBFRAMES */
-   for(i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+      RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_slotS */
+   for(i = 0; i < RGSCH_NUM_DL_slotS; i++)
    {
       rgSCHUtlAllocSBuf(inst, (Data **)&sf, sizeof(RgSchDlSf));
       if (sf == NULLP)
    {
       rgSCHUtlAllocSBuf(inst, (Data **)&sf, sizeof(RgSchDlSf));
       if (sf == NULLP)
@@ -2643,8 +2643,8 @@ RgSchErrInfo      *errInfo;
    /* LTE_ADV_FLAG_REMOVED_END */
 
    /* Changing loop limit from
    /* LTE_ADV_FLAG_REMOVED_END */
 
    /* Changing loop limit from
-      RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_SUBFRAMES */
-   if (i != RGSCH_NUM_DL_SUBFRAMES)
+      RGSCH_NUM_SUB_FRAMES to RGSCH_NUM_DL_slotS */
+   if (i != RGSCH_NUM_DL_slotS)
    {
       for (; i > 0; i--)
       {
    {
       for (; i > 0; i--)
       {
@@ -2664,8 +2664,8 @@ RgSchErrInfo      *errInfo;
       cell->sc.apis = &rgSchCmnApis;
    }
 
       cell->sc.apis = &rgSchCmnApis;
    }
 
-   /* Release the subframes and thereby perform the initialization */
-   for (i = 0; i < RGSCH_NUM_DL_SUBFRAMES; i++)
+   /* Release the slots and thereby perform the initialization */
+   for (i = 0; i < RGSCH_NUM_DL_slotS; i++)
    {
       if (i >= RGSCH_NUM_SUB_FRAMES)
       {
    {
       if (i >= RGSCH_NUM_SUB_FRAMES)
       {
@@ -2674,7 +2674,7 @@ RgSchErrInfo      *errInfo;
           it to one */
          frm.sfn = 1;
       }
           it to one */
          frm.sfn = 1;
       }
-      frm.subframe = i % RGSCH_NUM_SUB_FRAMES;
+      frm.slot = i % RGSCH_NUM_SUB_FRAMES;
       rgSCHUtlDlRlsSubFrm(cell, frm);
    }
 
       rgSCHUtlDlRlsSubFrm(cell, frm);
    }
 
@@ -2750,7 +2750,7 @@ RgSchErrInfo      *err;
  *     Function: rgSCHUtlFreeCell
  *     Purpose:  This function updates the value of Y stored in the
  *               UE control block. It uses the previously computed
  *     Function: rgSCHUtlFreeCell
  *     Purpose:  This function updates the value of Y stored in the
  *               UE control block. It uses the previously computed
- *               value for computing for this subframe.
+ *               value for computing for this slot.
  *
  *     Invoked by: Scheduler
  *
  *
  *     Invoked by: Scheduler
  *
@@ -2775,7 +2775,7 @@ RgSchCellCb          *cell;
    RgSchPhichInfo   *phichInfo;
    RgSchPhich       *phich;
    Inst             inst = cell->instIdx;
    RgSchPhichInfo   *phichInfo;
    RgSchPhich       *phich;
    Inst             inst = cell->instIdx;
-   U8               maxSubframes;
+   U8               maxslots;
 #ifdef LTE_TDD
    RgSchRaReqInfo *raReqInfo;
    U8                idx;
 #ifdef LTE_TDD
    RgSchRaReqInfo *raReqInfo;
    U8                idx;
@@ -2783,17 +2783,17 @@ RgSchCellCb          *cell;
    TRC2(rgSCHUtlFreeCell);
 
 #ifdef LTE_TDD
    TRC2(rgSCHUtlFreeCell);
 
 #ifdef LTE_TDD
-   maxSubframes = cell->numDlSubfrms;
+   maxslots = cell->numDlSubfrms;
 #else
 #else
-   maxSubframes = RGSCH_NUM_DL_SUBFRAMES;
+   maxslots = RGSCH_NUM_DL_slotS;
 #endif
 
 
    /* Invoke the index for scheduler, cell deletion */
    cell->sc.apis->rgSCHFreeCell(cell);
 
 #endif
 
 
    /* Invoke the index for scheduler, cell deletion */
    cell->sc.apis->rgSCHFreeCell(cell);
 
-   /* Release the subframes allocated               */
-   for (i = 0; i < maxSubframes; i++)
+   /* Release the slots allocated               */
+   for (i = 0; i < maxslots; i++)
    {
 #ifdef LTE_ADV
       rgSCHLaaDeInitDlSfCb(cell, cell->subFrms[i]);
    {
 #ifdef LTE_ADV
       rgSCHLaaDeInitDlSfCb(cell, cell->subFrms[i]);
@@ -2834,11 +2834,11 @@ RgSchCellCb          *cell;
       rgSCHUtlFreeSBuf(inst, (Data **)(&(cell->subFrms[i])), sizeof(RgSchDlSf));
    }
 #ifdef LTE_TDD
       rgSCHUtlFreeSBuf(inst, (Data **)(&(cell->subFrms[i])), sizeof(RgSchDlSf));
    }
 #ifdef LTE_TDD
-   /* Release the subframe pointers */
+   /* Release the slot pointers */
    /* ccpu00117052 - MOD - Passing double pointer
    for proper NULLP assignment*/
    rgSCHUtlFreeSBuf(inst,
    /* ccpu00117052 - MOD - Passing double pointer
    for proper NULLP assignment*/
    rgSCHUtlFreeSBuf(inst,
-         (Data **) (&(cell->subFrms)), sizeof(RgSchDlSf *) * maxSubframes);
+         (Data **) (&(cell->subFrms)), sizeof(RgSchDlSf *) * maxslots);
 
    for(idx=0; idx < cell->raInfo.lstSize; idx++)
    {
 
    for(idx=0; idx < cell->raInfo.lstSize; idx++)
    {
@@ -3637,7 +3637,7 @@ RgSchDlHqProcCb            *hqP;
  * @details
  *
  *     Function: rgSCHUtlDlHqPTbAddToTx
  * @details
  *
  *     Function: rgSCHUtlDlHqPTbAddToTx
- *     Purpose:  This function a HarqProcess TB to the subframe
+ *     Purpose:  This function a HarqProcess TB to the slot
  *               list.
  *
  *     Invoked by: Scheduler
  *               list.
  *
  *     Invoked by: Scheduler
@@ -3730,7 +3730,7 @@ U8                         tbIdx;
  * @details
  *
  *     Function: rgSCHUtlDlHqPTbRmvFrmTx
  * @details
  *
  *     Function: rgSCHUtlDlHqPTbRmvFrmTx
- *     Purpose:  This function removes a HarqProcess TB to the subframe
+ *     Purpose:  This function removes a HarqProcess TB to the slot
  *               list.
  *
  *     Invoked by: Scheduler
  *               list.
  *
  *     Invoked by: Scheduler
@@ -4594,7 +4594,7 @@ RgSchUeCb            *ue;
  *
  *     Function: rgSCHUtlUlHqProcForUe
  *     Purpose:  This function returns the harq process for
  *
  *     Function: rgSCHUtlUlHqProcForUe
  *     Purpose:  This function returns the harq process for
- *               which data is expected in the current subframe.
+ *               which data is expected in the current slot.
  *               It does not validate if the HARQ process
  *               has an allocation.
  *
  *               It does not validate if the HARQ process
  *               has an allocation.
  *
@@ -4638,7 +4638,7 @@ RgSchUlHqProcCb     **procRef;
  *
  *     Function: rgSCHUtlFirstRcptnReq(cell)
  *     Purpose:  This function returns the first uplink allocation
  *
  *     Function: rgSCHUtlFirstRcptnReq(cell)
  *     Purpose:  This function returns the first uplink allocation
- *               (or NULLP if there is none) in the subframe
+ *               (or NULLP if there is none) in the slot
  *               in which is expected to prepare and send reception
  *               request to PHY.
  *
  *               in which is expected to prepare and send reception
  *               request to PHY.
  *
@@ -4669,7 +4669,7 @@ RgSchCellCb      *cell;
  *
  *     Function: rgSCHUtlNextRcptnReq(cell)
  *     Purpose:  This function returns the next uplink allocation
  *
  *     Function: rgSCHUtlNextRcptnReq(cell)
  *     Purpose:  This function returns the next uplink allocation
- *               (or NULLP if there is none) in the subframe
+ *               (or NULLP if there is none) in the slot
  *               in which is expected to prepare and send reception
  *               request to PHY.
  *
  *               in which is expected to prepare and send reception
  *               request to PHY.
  *
@@ -4702,7 +4702,7 @@ RgSchUlAlloc     *alloc;
  *
  *     Function: rgSCHUtlFirstHqFdbkAlloc
  *     Purpose:  This function returns the first uplink allocation
  *
  *     Function: rgSCHUtlFirstHqFdbkAlloc
  *     Purpose:  This function returns the first uplink allocation
- *               (or NULLP if there is none) in the subframe
+ *               (or NULLP if there is none) in the slot
  *               in which it is expected to prepare and send HARQ
  *               feedback to PHY.
  *
  *               in which it is expected to prepare and send HARQ
  *               feedback to PHY.
  *
@@ -4736,7 +4736,7 @@ U8               idx;
  *
  *     Function: rgSCHUtlNextHqFdbkAlloc(cell)
  *     Purpose:  This function returns the next uplink allocation
  *
  *     Function: rgSCHUtlNextHqFdbkAlloc(cell)
  *     Purpose:  This function returns the next uplink allocation
- *               (or NULLP if there is none) in the subframe
+ *               (or NULLP if there is none) in the slot
  *               for which HARQ feedback needs to be sent.
  *
  *     Invoked by: TOM
  *               for which HARQ feedback needs to be sent.
  *
  *     Invoked by: TOM
@@ -4861,7 +4861,7 @@ Reason  reason;
  *
  *     Func : rgSCHUtlResetSfAlloc
  *
  *
  *     Func : rgSCHUtlResetSfAlloc
  *
- *     Desc : Utility Function to Reset subframe allocation information.
+ *     Desc : Utility Function to Reset slot allocation information.
  *
  *
  *     Ret  : ROK
  *
  *
  *     Ret  : ROK
@@ -4908,7 +4908,7 @@ Bool         restAlloc;
  *
  *     Func : rgSCHUtlGetRlsHqAlloc
  *
  *
  *     Func : rgSCHUtlGetRlsHqAlloc
  *
- *     Desc : Utility Function to Allocate subframe allocation information.
+ *     Desc : Utility Function to Allocate slot allocation information.
  *
  *
  *     Ret  : ROK
  *
  *
  *     Ret  : ROK
@@ -4957,7 +4957,7 @@ RgSchCellCb *cell;
  *
  *     Func : rgSCHUtlPutRlsHqAlloc
  *
  *
  *     Func : rgSCHUtlPutRlsHqAlloc
  *
- *     Desc : Utility Function to deallocate subframe allocation information.
+ *     Desc : Utility Function to deallocate slot allocation information.
  *
  *
  *     Ret  : ROK
  *
  *
  *     Ret  : ROK
@@ -5005,7 +5005,7 @@ RgSchCellCb *cell;
  *
  *     Func : rgSCHUtlGetSfAlloc
  *
  *
  *     Func : rgSCHUtlGetSfAlloc
  *
- *     Desc : Utility Function to Allocate subframe allocation information.
+ *     Desc : Utility Function to Allocate slot allocation information.
  *
  *
  *     Ret  : ROK
  *
  *
  *     Ret  : ROK
@@ -5087,7 +5087,7 @@ RgSchCellCb *cell;
  *
  *     Func : rgSCHUtlPutSfAlloc
  *
  *
  *     Func : rgSCHUtlPutSfAlloc
  *
- *     Desc : Utility Function to deallocate subframe allocation information.
+ *     Desc : Utility Function to deallocate slot allocation information.
  *
  *
  *     Ret  : ROK
  *
  *
  *     Ret  : ROK
@@ -5889,7 +5889,7 @@ RgSchCellCb     *cell;
 
 /** @brief This function fills in the pdsch data related allocation Info
  *         from the pdcch DCI info.
 
 /** @brief This function fills in the pdsch data related allocation Info
  *         from the pdcch DCI info.
- * subframe
+ * slot
  *
  * @details
  *
  *
  * @details
  *
@@ -6076,7 +6076,7 @@ RgSchCellCb     *cell;
 
    CmLteTimingInfo        frm;
 
 
    CmLteTimingInfo        frm;
 
-   /* Get Downlink Subframe */
+   /* Get Downlink slot */
    frm   = cell->crntTime;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
    sf = rgSCHUtlSubFrmGet(cell, frm);
    frm   = cell->crntTime;
    RGSCH_INCR_SUB_FRAME(frm, RG_SCH_CMN_DL_DELTA);
    sf = rgSCHUtlSubFrmGet(cell, frm);
@@ -6944,7 +6944,7 @@ RgInfCmnBoRpt  *boUpdt;
    {
       /* Added for dropping paging Message*/     
          /*suman*/
    {
       /* Added for dropping paging Message*/     
          /*suman*/
-      if ((rgSCHChkBoUpdate(cell,boUpdt))== ROK)  /* Checking if received BO falls within the window of 5120 subframes*/
+      if ((rgSCHChkBoUpdate(cell,boUpdt))== ROK)  /* Checking if received BO falls within the window of 5120 slots*/
       {
          if (rgSCHUtlGetAllwdCchTbSz(boUpdt->bo*8, &nPrb, &mcs) 
                != (boUpdt->bo*8))
       {
          if (rgSCHUtlGetAllwdCchTbSz(boUpdt->bo*8, &nPrb, &mcs) 
                != (boUpdt->bo*8))
@@ -7863,7 +7863,7 @@ RgSchTddANInfo       *anFdInfo;
    TRC2(rgSCHUtlInitUeANFdbkInfo);
 
    anFdInfo->sfn = RGSCH_MAX_SFN+1; /* defensively setting invalid sfn */
    TRC2(rgSCHUtlInitUeANFdbkInfo);
 
    anFdInfo->sfn = RGSCH_MAX_SFN+1; /* defensively setting invalid sfn */
-   anFdInfo->subframe = 0;
+   anFdInfo->slot = 0;
    anFdInfo->ulDai = RG_SCH_INVALID_DAI_VAL;
    anFdInfo->dlDai = RG_SCH_INVALID_DAI_VAL;
    anFdInfo->latestMIdx = RG_SCH_INVALID_M_VAL;
    anFdInfo->ulDai = RG_SCH_INVALID_DAI_VAL;
    anFdInfo->dlDai = RG_SCH_INVALID_DAI_VAL;
    anFdInfo->latestMIdx = RG_SCH_INVALID_M_VAL;
@@ -7879,7 +7879,7 @@ RgSchTddANInfo       *anFdInfo;
  *     Function : rgSCHUtlGetUeANFdbkInfo
  *
  *   It gets the UE related ACK NACK information based on
  *     Function : rgSCHUtlGetUeANFdbkInfo
  *
  *   It gets the UE related ACK NACK information based on
- *   SFN and subframe number.
+ *   SFN and slot number.
  *
  *  @param[in]  RgSchUeCb        *ueCb
  *  @param[in]  CmLteTimingInfo  *time
  *
  *  @param[in]  RgSchUeCb        *ueCb
  *  @param[in]  CmLteTimingInfo  *time
@@ -7906,7 +7906,7 @@ U8                servCellIdx;
    for (idx = 0; idx < ueCb->cell->ackNackFdbkArrSize; ++idx)
    {
        if( (timeInfo->sfn == ueCb->cellInfo[servCellIdx]->anInfo[idx].sfn) &&
    for (idx = 0; idx < ueCb->cell->ackNackFdbkArrSize; ++idx)
    {
        if( (timeInfo->sfn == ueCb->cellInfo[servCellIdx]->anInfo[idx].sfn) &&
-               (timeInfo->subframe == ueCb->cellInfo[servCellIdx]->anInfo[idx].subframe))
+               (timeInfo->slot == ueCb->cellInfo[servCellIdx]->anInfo[idx].slot))
        {
             RETVALUE(&ueCb->cellInfo[servCellIdx]->anInfo[idx]);
        }
        {
             RETVALUE(&ueCb->cellInfo[servCellIdx]->anInfo[idx]);
        }
@@ -7916,12 +7916,12 @@ U8                servCellIdx;
 } /* rgSCHUtlGetUeANFdbkInfo */
 
 /**
 } /* rgSCHUtlGetUeANFdbkInfo */
 
 /**
- * @brief To get downlink subframe index
+ * @brief To get downlink slot index
  *
  * @details
  *
  *     Function: rgSCHUtlGetDlSfIdx
  *
  * @details
  *
  *     Function: rgSCHUtlGetDlSfIdx
- *     Purpose:  Gets downlink subframe index based on SFN and subframe no
+ *     Purpose:  Gets downlink slot index based on SFN and slot no
  *
  *  @param[in]  CmLteTimingInfo  *timeInfo
  *  @param[in]  RgSchCellCb         *cell
  *
  *  @param[in]  CmLteTimingInfo  *timeInfo
  *  @param[in]  RgSchCellCb         *cell
@@ -7946,19 +7946,19 @@ CmLteTimingInfo *timeInfo;
    idx = RGSCH_NUM_SUB_FRAMES - \
          rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
    idx = ((idx * timeInfo->sfn) + \
    idx = RGSCH_NUM_SUB_FRAMES - \
          rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1];
    idx = ((idx * timeInfo->sfn) + \
-         rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][timeInfo->subframe]) - 1;
+         rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][timeInfo->slot]) - 1;
    idx = idx % cell->numDlSubfrms;
 
    RETVALUE((U8)idx);
 }
 
 /**
    idx = idx % cell->numDlSubfrms;
 
    RETVALUE((U8)idx);
 }
 
 /**
- * @brief To get the next downlink subframe
+ * @brief To get the next downlink slot
  *
  * @details
  *
  *     Function: rgSCHUtlGetNxtDlSfInfo
  *
  * @details
  *
  *     Function: rgSCHUtlGetNxtDlSfInfo
- *     Purpose:  Gets next downlink subframe based on current DL subframe
+ *     Purpose:  Gets next downlink slot based on current DL slot
  *
  *  @param[in]  CmLteTimingInfo  curDlTime
  *  @param[in]  RgSchCellCb      *cell
  *
  *  @param[in]  CmLteTimingInfo  curDlTime
  *  @param[in]  RgSchCellCb      *cell
@@ -7986,7 +7986,7 @@ RgSchDlSf         **nxtDlsf;
 CmLteTimingInfo   *nxtDlTime;
 #endif
 {
 CmLteTimingInfo   *nxtDlTime;
 #endif
 {
-   U16  idx = curDlTime.subframe;
+   U16  idx = curDlTime.slot;
    U8   count = 0;
    TRC2(rgSCHUtlGetNxtDlSfInfo);
 
    U8   count = 0;
    TRC2(rgSCHUtlGetNxtDlSfInfo);
 
@@ -7997,10 +7997,10 @@ CmLteTimingInfo   *nxtDlTime;
          idx = (idx + 1) % RGSCH_NUM_SUB_FRAMES;
          count++;
       }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
          idx = (idx + 1) % RGSCH_NUM_SUB_FRAMES;
          count++;
       }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
-                                       != RG_SCH_TDD_DL_SUBFRAME);
+                                       != RG_SCH_TDD_DL_slot);
       RG_SCH_ADD_TO_CRNT_TIME(curDlTime, (*nxtDlTime), count);
       *nxtDlsf = rgSCHUtlSubFrmGet(cell, *nxtDlTime);
       RG_SCH_ADD_TO_CRNT_TIME(curDlTime, (*nxtDlTime), count);
       *nxtDlsf = rgSCHUtlSubFrmGet(cell, *nxtDlTime);
-      if(dlSf->dlFdbkInfo.subframe != (*nxtDlsf)->dlFdbkInfo.subframe)
+      if(dlSf->dlFdbkInfo.slot != (*nxtDlsf)->dlFdbkInfo.slot)
       {
          break;
       }
       {
          break;
       }
@@ -8009,12 +8009,12 @@ CmLteTimingInfo   *nxtDlTime;
 }
 
 /**
 }
 
 /**
- * @brief To get the previous downlink subframe
+ * @brief To get the previous downlink slot
  *
  * @details
  *
  *     Function: rgSCHUtlGetPrevDlSfInfo
  *
  * @details
  *
  *     Function: rgSCHUtlGetPrevDlSfInfo
- *     Purpose:  Gets previous downlink subframe based on current DL subframe
+ *     Purpose:  Gets previous downlink slot based on current DL slot
  *
  *  @param[in]  RgSchCellCb      *cell
  *  @param[in]  CmLteTimingInfo  curDlTime
  *
  *  @param[in]  RgSchCellCb      *cell
  *  @param[in]  CmLteTimingInfo  curDlTime
@@ -8039,7 +8039,7 @@ CmLteTimingInfo   *prevDlTime;
 U8                *numSubfrm;
 #endif
 {
 U8                *numSubfrm;
 #endif
 {
-   S16 idx = curDlTime.subframe;
+   S16 idx = curDlTime.slot;
    U8  count = 0;
    TRC2(rgSCHUtlGetPrevDlSfInfo);
 
    U8  count = 0;
    TRC2(rgSCHUtlGetPrevDlSfInfo);
 
@@ -8052,7 +8052,7 @@ U8                *numSubfrm;
       }
       count++;
    }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
       }
       count++;
    }while(rgSchTddUlDlSubfrmTbl[cell->ulDlCfgIdx][idx]
-         !=  RG_SCH_TDD_DL_SUBFRAME);
+         !=  RG_SCH_TDD_DL_slot);
    *numSubfrm = count;
    RGSCHDECRFRMCRNTTIME(curDlTime, (*prevDlTime), count);
    RETVOID;
    *numSubfrm = count;
    RGSCHDECRFRMCRNTTIME(curDlTime, (*prevDlTime), count);
    RETVOID;
@@ -8065,7 +8065,7 @@ U8                *numSubfrm;
  *
  *     Func : rgSCHUtlUlSfInit
  *
  *
  *     Func : rgSCHUtlUlSfInit
  *
- *     Desc : UL subframe init.
+ *     Desc : UL slot init.
  *
  *     Ret  : S16
  *
  *
  *     Ret  : S16
  *
@@ -8101,7 +8101,7 @@ U8           maxUePerSf;
 #ifdef LTE_TDD   
    if(cell->ulDlCfgIdx == 0)
    {
 #ifdef LTE_TDD   
    if(cell->ulDlCfgIdx == 0)
    {
-      /* Store the Uplink subframe number corresponding to the idx */
+      /* Store the Uplink slot number corresponding to the idx */
       sf->ulSfIdx = rgSchTddCfg0UlSfTbl[idx%6]; 
    }
 #endif   
       sf->ulSfIdx = rgSchTddCfg0UlSfTbl[idx%6]; 
    }
 #endif   
@@ -8172,7 +8172,7 @@ U8           maxUePerSf;
  *
  *     Func : rgSCHUtlUlSfDeinit
  *
  *
  *     Func : rgSCHUtlUlSfDeinit
  *
- *     Desc : Deinitialises a subframe
+ *     Desc : Deinitialises a slot
  *
  *     Ret  : Void
  *
  *
  *     Ret  : Void
  *
@@ -8544,7 +8544,7 @@ RgSchUlHole *hole;
  *
  *     Func : rgSCHUtlUlAllocFirst
  *
  *
  *     Func : rgSCHUtlUlAllocFirst
  *
- *     Desc : Get first alloc in subframe
+ *     Desc : Get first alloc in slot
  *
  *     Ret  : RgSchUlAlloc *
  *
  *
  *     Ret  : RgSchUlAlloc *
  *
@@ -10289,9 +10289,9 @@ CmLListCp       *ulInActvLst;
       {
          /*Stop the DRX retransmission timer as UE scheduled for retx. Here
           * we stop the timer and inactivate the UE for both UL and DL.
       {
          /*Stop the DRX retransmission timer as UE scheduled for retx. Here
           * we stop the timer and inactivate the UE for both UL and DL.
-          * This may result in loss of one subframe for UL but this trade
+          * This may result in loss of one slot for UL but this trade
           * off is taken to avoid the overhead of maintaining a list of UEs
           * off is taken to avoid the overhead of maintaining a list of UEs
-          * to be inactivated in the next subframe.*/
+          * to be inactivated in the next slot.*/
          drxHq = RG_SCH_DRX_GET_DL_HQ(dlHq);
          drxUe = RG_SCH_DRX_GET_UE(ueCb);
          if(drxHq->reTxIndx != DRX_INVALID)
          drxHq = RG_SCH_DRX_GET_DL_HQ(dlHq);
          drxUe = RG_SCH_DRX_GET_UE(ueCb);
          if(drxHq->reTxIndx != DRX_INVALID)
@@ -10808,7 +10808,7 @@ RgSchCellCb       *cell;
   
    if(cell->prbUsage.rprtPeriod >= RGSCH_NUM_SUB_FRAMES)
    {
   
    if(cell->prbUsage.rprtPeriod >= RGSCH_NUM_SUB_FRAMES)
    {
-      /* Get the total number of DL and UL subframes within the reporting period*/
+      /* Get the total number of DL and UL slots within the reporting period*/
       numDlSf = (cell->prbUsage.rprtPeriod * 
             rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1])
          / RGSCH_NUM_SUB_FRAMES;
       numDlSf = (cell->prbUsage.rprtPeriod * 
             rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][RGSCH_NUM_SUB_FRAMES-1])
          / RGSCH_NUM_SUB_FRAMES;
@@ -10818,9 +10818,9 @@ RgSchCellCb       *cell;
    }
    else
    {
    }
    else
    {
-      /* Get the total number of DL and UL subframes < 10 ms interval */
-      numDlSf = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe];
-      numUlSf = rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][frm.subframe];
+      /* Get the total number of DL and UL slots < 10 ms interval */
+      numDlSf = rgSchTddNumDlSubfrmTbl[cell->ulDlCfgIdx][frm.slot];
+      numUlSf = rgSchTddNumUlSubfrmTbl[cell->ulDlCfgIdx][frm.slot];
    }
 #else
      numDlSf = cell->prbUsage.rprtPeriod;
    }
 #else
      numDlSf = cell->prbUsage.rprtPeriod;
@@ -10974,10 +10974,10 @@ RgInfCmnBoRpt  *boUpdt;
    U32 distance = 0;
    TRC2(rgSCHChkBoUpdate);
 
    U32 distance = 0;
    TRC2(rgSCHChkBoUpdate);
 
-   crntTimeInSubFrms = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +  cell->crntTime.subframe +
+   crntTimeInSubFrms = (cell->crntTime.sfn * RGSCH_NUM_SUB_FRAMES_5G) +  cell->crntTime.slot +
           RG_SCH_CMN_DL_DELTA + 2;  /* As bo received will scheduled in next TTI
                                        so incrementing with +1 more */
           RG_SCH_CMN_DL_DELTA + 2;  /* As bo received will scheduled in next TTI
                                        so incrementing with +1 more */
-   boUpdTimeInSubFrms = (boUpdt->u.timeToTx.sfn * RGSCH_NUM_SUB_FRAMES_5G)+ boUpdt->u.timeToTx.subframe;
+   boUpdTimeInSubFrms = (boUpdt->u.timeToTx.sfn * RGSCH_NUM_SUB_FRAMES_5G)+ boUpdt->u.timeToTx.slot;
 
 
    distance = boUpdTimeInSubFrms > crntTimeInSubFrms ? \
 
 
    distance = boUpdTimeInSubFrms > crntTimeInSubFrms ? \
@@ -11039,7 +11039,7 @@ U8              hqFdbkIdx;
    {
      iPhich = 1;  
    }
    {
      iPhich = 1;  
    }
-   if(phichTime.subframe == 0 || phichTime.subframe == 5)
+   if(phichTime.slot == 0 || phichTime.slot == 5)
    {    
       if(iPhich == 0)
       {
    {    
       if(iPhich == 0)
       {
@@ -11050,15 +11050,15 @@ U8              hqFdbkIdx;
       {
          /* Retx will happen at n+7 */
          RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7);
       {
          /* Retx will happen at n+7 */
          RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7);
-         /* Fetch the corresponding  UL subframe Idx in UL sf array */ 
+         /* Fetch the corresponding  UL slot Idx in UL sf array */ 
          reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell);
       }   
    }
          reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell);
       }   
    }
-   else if(phichTime.subframe == 1 || phichTime.subframe == 6) 
+   else if(phichTime.slot == 1 || phichTime.slot == 6) 
    { 
       /* Retx will happen at n+7 */
       RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7);
    { 
       /* Retx will happen at n+7 */
       RGSCHCMNADDTOCRNTTIME(phichTime, phichTime, 7);
-      /* Fetch the corresponding  UL subframe Idx in UL sf array */ 
+      /* Fetch the corresponding  UL slot Idx in UL sf array */ 
       reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell);
    }
    RETVALUE(reTxIdx);
       reTxIdx = rgSCHCmnGetUlSfIdx(&phichTime, cell);
    }
    RETVALUE(reTxIdx);
@@ -12311,7 +12311,7 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns)
    RgSchCmnCell            *cellSch;
    U8                       maxUeNewDlTxPerTti;
    U8                       maxUeNewUlTxPerTti;
    RgSchCmnCell            *cellSch;
    U8                       maxUeNewDlTxPerTti;
    U8                       maxUeNewUlTxPerTti;
-   U8                       tmpSubFrame        = 0;
+   U8                       tmpslot        = 0;
 #ifdef CPU_OL_DBG_PRINTS 
    U8                       idx = 0;
 #endif
 #ifdef CPU_OL_DBG_PRINTS 
    U8                       idx = 0;
 #endif
@@ -12333,11 +12333,11 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns)
       /* Decrement till 90% of maxUeNewDlTxPerTti */
       if ( cpuInstr->dlNxtIndxDecNumUeTti < maxDlDecCnt )
       {
       /* Decrement till 90% of maxUeNewDlTxPerTti */
       if ( cpuInstr->dlNxtIndxDecNumUeTti < maxDlDecCnt )
       {
-         tmpSubFrame = (cpuInstr->dlNxtIndxDecNumUeTti) % 10;
+         tmpslot = (cpuInstr->dlNxtIndxDecNumUeTti) % 10;
          cpuInstr->dlNxtIndxDecNumUeTti++;
          cpuInstr->dlNxtIndxDecNumUeTti++;
-         if ( cpuInstr->maxUeNewTxPerTti[tmpSubFrame] > 1 )
+         if ( cpuInstr->maxUeNewTxPerTti[tmpslot] > 1 )
          {
          {
-            cpuInstr->maxUeNewTxPerTti[tmpSubFrame]--;
+            cpuInstr->maxUeNewTxPerTti[tmpslot]--;
          }
          else
          {
          }
          else
          {
@@ -12358,10 +12358,10 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns)
       if ( cpuInstr->dlNxtIndxDecNumUeTti >  0) 
       {
          cpuInstr->dlNxtIndxDecNumUeTti--;
       if ( cpuInstr->dlNxtIndxDecNumUeTti >  0) 
       {
          cpuInstr->dlNxtIndxDecNumUeTti--;
-         tmpSubFrame = (cpuInstr->dlNxtIndxDecNumUeTti) % 10;
-         if ( cpuInstr->maxUeNewTxPerTti[tmpSubFrame] < maxUeNewDlTxPerTti )
+         tmpslot = (cpuInstr->dlNxtIndxDecNumUeTti) % 10;
+         if ( cpuInstr->maxUeNewTxPerTti[tmpslot] < maxUeNewDlTxPerTti )
          {
          {
-            cpuInstr->maxUeNewTxPerTti[tmpSubFrame]++;
+            cpuInstr->maxUeNewTxPerTti[tmpslot]++;
          }
          else
          {
          }
          else
          {
@@ -12383,11 +12383,11 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns)
       /* Decrement till 90% of maxUeNewDlTxPerTti */
       if ( cpuInstr->ulNxtIndxDecNumUeTti < maxUlDecCnt )
       {
       /* Decrement till 90% of maxUeNewDlTxPerTti */
       if ( cpuInstr->ulNxtIndxDecNumUeTti < maxUlDecCnt )
       {
-         tmpSubFrame = (cpuInstr->ulNxtIndxDecNumUeTti) % 10;
+         tmpslot = (cpuInstr->ulNxtIndxDecNumUeTti) % 10;
          cpuInstr->ulNxtIndxDecNumUeTti++;
          cpuInstr->ulNxtIndxDecNumUeTti++;
-         if ( cpuInstr->maxUeNewRxPerTti[tmpSubFrame] > 1 )
+         if ( cpuInstr->maxUeNewRxPerTti[tmpslot] > 1 )
          {
          {
-            cpuInstr->maxUeNewRxPerTti[tmpSubFrame]--;
+            cpuInstr->maxUeNewRxPerTti[tmpslot]--;
          }
          else
          {
          }
          else
          {
@@ -12408,10 +12408,10 @@ PRIVATE S16 rgSCHUtlChkAndUpdNumUePerTtiCpuOvInstr(cell, crntCpuOvrLdIns)
       if ( cpuInstr->ulNxtIndxDecNumUeTti >  0) 
       {
          cpuInstr->ulNxtIndxDecNumUeTti--;
       if ( cpuInstr->ulNxtIndxDecNumUeTti >  0) 
       {
          cpuInstr->ulNxtIndxDecNumUeTti--;
-         tmpSubFrame = (cpuInstr->ulNxtIndxDecNumUeTti) % 10;
-         if ( cpuInstr->maxUeNewRxPerTti[tmpSubFrame] < maxUeNewUlTxPerTti )
+         tmpslot = (cpuInstr->ulNxtIndxDecNumUeTti) % 10;
+         if ( cpuInstr->maxUeNewRxPerTti[tmpslot] < maxUeNewUlTxPerTti )
          {
          {
-            cpuInstr->maxUeNewRxPerTti[tmpSubFrame]++;
+            cpuInstr->maxUeNewRxPerTti[tmpslot]++;
          }
          else
          {
          }
          else
          {
diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c
new file mode 100644 (file)
index 0000000..ce9bdb1
--- /dev/null
@@ -0,0 +1,418 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+*******************************************************************************/
+
+/************************************************************************
+     Name:     sch.c
+  
+     Type:     C source file
+  
+     Desc:     C source code for scheduler fucntions
+  
+     File:     sch.c
+  
+**********************************************************************/
+
+/** @file sch.c
+@brief This file implements the schedulers main access to MAC layer code.
+*/
+#include "stdbool.h"
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general layer */
+#include "ssi.h"           /* system service interface */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_mblk.h"       /* common memory link list library */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "lrg.h"
+#include "rgr.h"
+#include "tfu.h"
+#include "rg_sch_inf.h"
+#include "rg_sch.h"
+#include "gen.x"           /* general layer typedefs */
+#include "ssi.x"           /* system services typedefs */
+#include "cm5.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_mblk.x"       /* common memory link list library */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "tfu.x"           /* TFU types */
+#include "lrg.x"           /* layer management typedefs for MAC */
+#include "rgr.x"           /* layer management typedefs for MAC */
+#include "rg_sch_inf.x"         /* typedefs for Scheduler */
+#include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
+#include "sch.h"
+#include "du_log.h"
+
+extern SchCb schCb[SCH_MAX_INST];
+/* local defines */
+SchCellCfgCfmFunc SchCellCfgCfmOpts[] = 
+{
+       packSchCellCfgCfm,     /* LC */
+       MacProcSchCellCfgCfm,  /* TC */
+       packSchCellCfgCfm      /* LWLC */
+};
+
+/**
+ * @brief Task Initiation function. 
+ *
+ * @details
+ *
+ *     Function : schActvInit
+ *     
+ *     This function is supplied as one of parameters during MAC's 
+ *     task registration. MAC will invoke this function once, after
+ *     it creates and attaches this TAPA Task to a system task.
+ *     
+ *  @param[in]  Ent Entity, the entity ID of this task.     
+ *  @param[in]  Inst Inst, the instance ID of this task.
+ *  @param[in]  Region Region, the region ID registered for memory 
+ *              usage of this task.
+ *  @param[in]  Reason Reason.
+ *  @return  int
+ *      -# ROK
+ **/
+int schActvInit
+(
+Ent    entity,            /* entity */
+Inst   instId,             /* instance */
+Region region,         /* region */
+Reason reason          /* reason */
+)
+{
+   Inst inst = (instId  - SCH_INST_START);
+
+   /* Initialize the MAC TskInit structure to zero */
+   cmMemset ((uint8_t *)&schCb[inst], 0, sizeof(schCb));
+
+   /* Initialize the MAC TskInit with received values */
+   schCb[inst].schInit.ent = entity;
+   schCb[inst].schInit.inst = inst;
+   schCb[inst].schInit.region = region;
+   schCb[inst].schInit.pool = 0;
+   schCb[inst].schInit.reason = reason;
+   schCb[inst].schInit.cfgDone = FALSE;
+   schCb[inst].schInit.acnt = FALSE;
+   schCb[inst].schInit.usta = FALSE;
+   schCb[inst].schInit.trc = FALSE;
+   schCb[inst].schInit.procId = SFndProcId();
+
+   RETVALUE(ROK);
+} /* schActvInit */
+
+/**
+ * @brief Scheduler instance Configuration Handler. 
+ *
+ * @details
+ *
+ *     Function : SchInstCfg
+ *     
+ *     This function in called by HandleSchGenCfgReq(). It handles the
+ *     general configurations of the scheduler instance. Returns
+ *     reason for success/failure of this function.
+ *     
+ *  @param[in]  RgCfg *cfg, the Configuaration information 
+ *  @return  U16
+ *      -# LCM_REASON_NOT_APPL 
+ *      -# LCM_REASON_INVALID_MSGTYPE
+ *      -# LCM_REASON_MEM_NOAVAIL
+ **/
+PUBLIC U16 SchInstCfg
+(
+RgCfg *cfg,            /* Configuaration information */
+Inst  dInst
+)
+{
+   uint16_t ret = LCM_REASON_NOT_APPL;
+   Inst     inst = (dInst - SCH_INST_START);
+
+   printf("\nEntered SchInstCfg()");
+   /* Check if Instance Configuration is done already */
+   if (schCb[inst].schInit.cfgDone == TRUE)
+   {
+      RETVALUE(LCM_REASON_INVALID_MSGTYPE);
+   }
+   /* Update the Pst structure for LM interface */
+   cmMemcpy((U8 *)&schCb[inst].schInit.lmPst,
+            (U8 *)&cfg->s.schInstCfg.genCfg.lmPst,
+             sizeof(Pst));
+   
+   schCb[inst].schInit.inst = inst;
+   schCb[inst].schInit.lmPst.srcProcId = schCb[inst].schInit.procId;
+   schCb[inst].schInit.lmPst.srcEnt = schCb[inst].schInit.ent;
+   schCb[inst].schInit.lmPst.srcInst = schCb[inst].schInit.inst +
+   SCH_INST_START;
+   schCb[inst].schInit.lmPst.event = EVTNONE;
+
+   schCb[inst].schInit.region = cfg->s.schInstCfg.genCfg.mem.region;
+   schCb[inst].schInit.pool = cfg->s.schInstCfg.genCfg.mem.pool;
+   schCb[inst].genCfg.tmrRes = cfg->s.schInstCfg.genCfg.tmrRes;
+#ifdef LTE_ADV
+   schCb[inst].genCfg.forceCntrlSrbBoOnPCel =  cfg->s.schInstCfg.genCfg.forceCntrlSrbBoOnPCel;
+   schCb[inst].genCfg.isSCellActDeactAlgoEnable =  cfg->s.schInstCfg.genCfg.isSCellActDeactAlgoEnable;
+#endif
+   schCb[inst].genCfg.startCellId    = cfg->s.schInstCfg.genCfg.startCellId;
+#if 0
+   /* Initialzie the timer queue */   
+   cmMemset((U8 *)&schCb[inst].tmrTq, 0, sizeof(CmTqType)*RGSCH_TQ_SIZE);
+   /* Initialize the timer control point */
+   cmMemset((U8 *)&schCb[inst].tmrTqCp, 0, sizeof(CmTqCp));
+   schCb[inst].tmrTqCp.tmrLen = RGSCH_TQ_SIZE;
+
+   /* SS_MT_TMR needs to be enabled as schActvTmr needs instance information */
+   /* Timer Registration request to SSI */
+   if (SRegTmrMt(schCb[inst].schInit.ent, dInst,
+      (S16)schCb[inst].genCfg.tmrRes, schActvTmr) != ROK)
+   {
+      RLOG_ARG0(L_ERROR,DBG_INSTID,inst, "SchInstCfg(): Failed to "
+             "register timer.");
+      RETVALUE(LCM_REASON_MEM_NOAVAIL);
+   }   
+#endif               
+   /* Set Config done in TskInit */
+   schCb[inst].schInit.cfgDone = TRUE;
+   printf("\nScheduler gen config done");
+   
+   RETVALUE(ret);
+}
+
+/**
+ * @brief Layer Manager Configuration request handler. 
+ *
+ * @details
+ *
+ *     Function : HandleSchGenCfgReq
+ *     
+ *     This function handles the configuration
+ *     request received at scheduler instance from the Layer Manager.
+ *     -# Based on the cfg->hdr.elmId.elmnt value it invokes one of the
+ *        functions rgHdlGenCfg() or rgHdlSapCfg().
+ *     -# Invokes RgMiLrgSchCfgCfm() to send back the confirmation to the LM.
+ *     
+ *  @param[in]  Pst *pst, the post structure     
+ *  @param[in]  RgMngmt *cfg, the configuration parameter's structure
+ *  @return  S16
+ *      -# ROK
+ **/
+int HandleSchGenCfgReq
+(
+Pst      *pst,    /* post structure  */
+RgMngmt  *cfg     /* config structure  */
+)
+{
+   uint16_t       ret = LCM_PRIM_OK;
+   uint16_t       reason = LCM_REASON_NOT_APPL;
+   RgMngmt   cfm;
+   Pst       cfmPst;
+
+   if(pst->dstInst < SCH_INST_START)
+   {
+      DU_LOG("\nInvalid inst ID");
+      DU_LOG("\nHandleSchGenCfgReq(): "
+                "pst->dstInst=%d SCH_INST_START=%d", pst->dstInst,SCH_INST_START); 
+      RETVALUE(ROK);
+   }
+   printf("\nReceived scheduler gen config");
+   /* Fill the post structure for sending the confirmation */
+       memset(&cfmPst, 0 , sizeof(Pst));
+   SchFillCfmPst(pst, &cfmPst, cfg);
+
+   cmMemset((U8 *)&cfm, 0, sizeof(RgMngmt));
+
+#ifdef LMINT3
+   cfm.hdr.transId =
+      cfg->hdr.transId;
+#endif
+
+   cfm.hdr.elmId.elmnt = cfg->hdr.elmId.elmnt;
+   switch(cfg->hdr.elmId.elmnt)
+   {
+      case STSCHINST:
+         reason = SchInstCfg(&cfg->t.cfg,pst->dstInst );
+         break;
+      default:
+         ret = LCM_PRIM_NOK;
+         reason = LCM_REASON_INVALID_ELMNT;
+         DU_LOG("\nInvalid Elmnt=%d", cfg->hdr.elmId.elmnt);
+         break;
+   }
+
+   if (reason != LCM_REASON_NOT_APPL)
+   {
+      ret = LCM_PRIM_NOK;
+   }
+
+   cfm.cfm.status = ret;
+   cfm.cfm.reason = reason;
+
+   SchSendCfgCfm(&cfmPst, &cfm);
+   /*   SPutSBuf(pst->region, pst->pool, (Data *)cfg, sizeof(RgMngmt)); */
+   
+   RETVALUE(ROK);
+}/*-- HandleSchGenCfgReq --*/
+
+/**
+ * @brief slot indication from MAC to SCH.
+ *
+ * @details
+ *
+ *     Function : macSchSlotInd 
+ *      
+ *      This API is invoked by PHY to indicate slot indication to Scheduler for
+ *      a cell.
+ *           
+ *  @param[in]  Pst            *pst
+ *  @param[in]  SlotIndInfo    *slotInd
+ *  @return  S16
+ *      -# ROK 
+ *      -# RFAILED 
+ **/
+int macSchSlotInd 
+(
+Pst                 *pst, 
+SlotIndInfo         *slotInd
+)
+{
+   Inst  inst = pst->dstInst-SCH_INST_START;
+
+   /* Now call the TOM (Tfu ownership module) primitive to process further */
+   schProcessSlotInd(slotInd, inst);
+
+   RETVALUE(ROK);
+}  /* macSchSlotInd */
+
+/**
+ * @brief inti cellCb based on cellCfg
+ *
+ * @details
+ *
+ *     Function : InitSchCellCb 
+ *      
+ *      This API is invoked after receiving schCellCfg
+ *           
+ *  @param[in]  schCellCb *cell
+ *  @param[in]  SchCellCfg *schCellCfg
+ *  @return  int
+ *      -# ROK 
+ *      -# RFAILED 
+ **/
+int InitSchCellCb(Inst inst, SchCellCfg *schCellCfg)
+{
+   SchCellCb *cell;
+   SCH_ALLOC(cell, sizeof(SchCellCb));
+       if(!cell)
+       {
+      DU_LOG("\nMemory allocation failed in InitSchCellCb");
+               return RFAILED;
+       }
+
+       cell->cellId = schCellCfg->cellId; 
+       cell->instIdx = inst;
+       switch(schCellCfg->scsCommon)
+       {
+          case SCH_SCS_15KHZ:
+               {
+                       cell->numSlots = SCH_NUM_SLOTS;
+               }
+               break;
+               default:
+                  DU_LOG("\nSCS %d not supported", schCellCfg->scsCommon);
+       }
+  
+   for(uint8_t idx=0; idx<SCH_NUM_SLOTS; idx++)
+       {
+               SchDlAlloc *schDlAlloc;
+               SCH_ALLOC(schDlAlloc, sizeof(SchDlAlloc));
+               if(!schDlAlloc)
+               {
+                       DU_LOG("\nMemory allocation failed in InitSchCellCb");
+                       return RFAILED;
+               }
+
+               schDlAlloc->totalPrb = ((schCellCfg->bandwidth *
+                               1000)/(schCellCfg->scsCommon))/SCH_NUM_SC_PRB;
+               for(uint8_t itr=0; itr<MAX_SSB_IDX; itr++)
+               {
+                       schDlAlloc->assignedPrb[itr] = 0;
+               }
+               for(uint8_t itr=0; itr<MAX_SSB_IDX; itr++)
+               {
+                       memset(&schDlAlloc->ssbInfo[itr], 0, sizeof(SsbInfo));
+               }
+
+               cell->dlAlloc[idx] = schDlAlloc;
+       }
+       schCb[inst].cells[inst] = cell; //Sphoorthi TODO: check if this works
+
+   DU_LOG("\nCell init completed for cellId:%d", cell->cellId);
+
+   return ROK;   
+}
+
+/**
+ * @brief cell config from MAC to SCH.
+ *
+ * @details
+ *
+ *     Function : macSchCellCfgReq
+ *      
+ *      This API is invoked by MAC to send cell config to SCH
+ *           
+ *  @param[in]  Pst            *pst
+ *  @param[in]  SchCellCfg     *schCellCfg
+ *  @return  int
+ *      -# ROK 
+ *      -# RFAILED 
+ **/
+int SchHdlCellCfgReq
+(
+Pst                 *pst, 
+SchCellCfg          *schCellCfg
+)
+{
+   int ret = ROK;
+   SchCellCb *cellCb;
+       SchCellCfgCfm schCellCfgCfm;
+       Pst rspPst;
+       Inst inst = pst->dstInst-1; 
+
+       InitSchCellCb(inst, schCellCfg);
+       cellCb = schCb[inst].cells[inst];
+   cellCb->macInst = pst->srcInst;
+   memcpy(&cellCb->cellCfg, schCellCfg, sizeof(SchCellCfg));
+
+   memset(&rspPst, 0, sizeof(Pst));
+   SCH_FILL_RSP_PST(rspPst, inst);
+       rspPst.event = EVENT_SCH_CELL_CFG_CFM;
+       schCellCfgCfm.rsp = RSP_OK;
+  
+   ret = (*SchCellCfgCfmOpts[rspPst.selector])(&rspPst, &schCellCfgCfm);
+
+   return ret;
+
+}
+
+/**********************************************************************
+         End of file
+**********************************************************************/
diff --git a/src/5gnrsch/sch.h b/src/5gnrsch/sch.h
new file mode 100644 (file)
index 0000000..ae6b8f1
--- /dev/null
@@ -0,0 +1,130 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+*******************************************************************************/
+
+/* macros */
+#define SCH_INST_START 1
+#define SCH_MAX_CELLS 1
+#define SCH_MAX_INST 1
+#define SCH_NUM_SLOTS 10 /*forcing this to 10 */
+#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 15
+#define SCH_SYMBOL_PER_SLOT 14
+#define SCH_SSB_SYMB_DURATION 4
+#define SCH_SSB_PRB_DURATION 20
+#define SCH_MEM_REGION     4
+#define SCH_POOL           1
+
+/* allocate and zero out a static buffer */
+#define SCH_ALLOC(_datPtr, _size)                                \
+{                                                               \
+   S16 _ret;                                                    \
+   _ret = SGetSBuf(SCH_MEM_REGION, SCH_POOL,                  \
+                    (Data **)&_datPtr, _size);                  \
+   if(_ret == ROK)                                              \
+      cmMemset((U8*)_datPtr, 0, _size);                         \
+   else                                                         \
+      _datPtr = NULLP;                                          \
+}
+
+/* free a static buffer */
+#define SCH_FREE(_datPtr, _size)                                 \
+   if(_datPtr)                                                  \
+      SPutSBuf(SCH_MEM_REGION, SCH_POOL,                      \
+         (Data *)_datPtr, _size);
+
+
+#define SCH_FILL_RSP_PST(_rspPst, _inst)\
+{                                  \
+   _rspPst.srcProcId = SFndProcId(); \
+   _rspPst.dstProcId = SFndProcId();\
+   _rspPst.srcEnt    = ENTRG;\
+   _rspPst.dstEnt    = ENTRG;\
+   _rspPst.srcInst   = 1;\
+   _rspPst.dstInst   = 0;\
+       _rspPst.selector  = MAC_SELECTOR_TC;\
+}      
+
+/**
+  * @brief
+  * Structure holding LTE MAC's General Configuration information.
+  */
+typedef struct schGenCb
+{
+   uint8_t         tmrRes;           /*!< Timer resolution */
+   uint8_t         startCellId;      /*!< Starting Cell Id */
+#ifdef LTE_ADV
+   bool            forceCntrlSrbBoOnPCel; /*!< value 1 means force scheduling
+                                               of RLC control BO and SRB BO on
+                                               PCell. val 0 means don't force*/
+   bool            isSCellActDeactAlgoEnable; /*!< TRUE will enable activation/deactivation algo at Schd */
+#endif
+}SchGenCb;
+
+/**
+  * @brief
+  * scheduler allocationsfor DL per cell.
+  */
+typedef struct schDlAlloc
+{
+       uint16_t    totalPrb;  /*!< Number of RBs in the cell */
+       uint16_t    assignedPrb[SCH_SYMBOL_PER_SLOT]; /*!< Num RBs and corresponding symbols allocated */
+   bool        ssbPres;    /*!< Flag to determine if SSB is present in this slot */
+   uint8_t     ssbIdxSupported;  /*!< Max SSB index */
+       SsbInfo     ssbInfo[MAX_SSB_IDX]; /*!< SSB info */
+}SchDlAlloc;
+
+/**
+  * @brief
+  * Cell Control block per cell.
+  */
+typedef struct schCellCb
+{
+   uint16_t      cellId;           /*!< Cell ID */
+   Inst          instIdx;          /*!< Index of the scheduler instance */
+   Inst          macInst;          /*!< Index of the MAC instance */
+       uint8_t       numSlots;         /*!< Number of slots in current frame */
+   SlotIndInfo   slotInfo;         /*!< SFN, Slot info being processed*/
+   SchDlAlloc    *dlAlloc[SCH_NUM_SLOTS]; /*!< SCH resource allocations in DL */
+       SchCellCfg    cellCfg;                /*!< Cell ocnfiguration */
+}SchCellCb;
+
+/**
+  * @brief
+  * Control block for sch
+  */
+typedef struct schCb
+{
+   TskInit       schInit;              /*!< Task Init info */
+   SchGenCb      genCfg;                 /*!< General Config info */
+   SchCellCb     *cells[SCH_MAX_CELLS];  /* Array to store cellCb ptr */  
+}SchCb;
+
+/* Declaration for scheduler control blocks */
+SchCb schCb[SCH_MAX_INST];
+
+/* function declarations */
+int schCmnDlAlloc(SchCellCb *cell, DlBrdcstAlloc *dlBrdcstAlloc);
+int schProcessSlotInd(SlotIndInfo *slotInd, Inst inst);
+
+
+
+/**********************************************************************
+         End of file
+**********************************************************************/
diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c
new file mode 100644 (file)
index 0000000..5b32a5d
--- /dev/null
@@ -0,0 +1,160 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+ *******************************************************************************/
+
+/************************************************************************
+
+Name:     5G NR SCH layer
+
+Type:     C source file
+
+Desc:     C source code for Entry point fucntions
+
+File:     sch_common.c
+
+ **********************************************************************/
+
+/** @file sch_common.c
+  @brief This module performs common scheduling
+ */
+#include "stdbool.h"
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general layer */
+#include "ssi.h"           /* system service interface */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_mblk.h"       /* common memory link list library */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "tfu.h"
+#include "lrg.h"
+
+#include "gen.x"           /* general layer typedefs */
+#include "ssi.x"           /* system services typedefs */
+#include "cm5.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_mblk.x"       /* common memory link list library */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "tfu.x"
+#include "lrg.x"
+#include "du_log.h"
+#include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
+#include "sch.h"
+
+extern SchCb schCb[SCH_MAX_INST];
+
+/**
+ * @brief Time domain allocation for SSB
+ *
+ * @details
+ *
+ *     Function : ssbDlTdAlloc 
+ *     
+ *     This function handles common scheduling for DL
+ *     
+ *  @param[in]  schCellCb *cell, cell cb
+ *  @param[in]  DlBrdcstAlloc *dlBrdcstAlloc, DL brdcst allocation
+ *  @return  void
+ **/
+void ssbDlTdAlloc(uint8_t scs, uint8_t *ssbStartSymb)
+{
+   uint8_t n;
+       /* Determine value of "n" based on Section 4.1 of 3GPP TS 38.213 */
+       switch(scs)
+       {
+               case SCH_SCS_15KHZ:
+                       {
+                          uint8_t symbIdx=0;
+                          n = 2;/* n = 0, 1 for SCS = 15KHz */
+                               for(uint8_t idx=0; idx<n; idx++)
+                               {
+               /* start symbol determined using {2, 8} + 14n */
+                                       ssbStartSymb[symbIdx++] = 2 + SCH_SYMBOL_PER_SLOT*idx;
+                                       ssbStartSymb[symbIdx++] = 8 + SCH_SYMBOL_PER_SLOT*idx;
+                               }
+                       }
+                       break;
+               default:
+                       DU_LOG("\nSCS %d is currently not supported", scs);
+       }
+}
+/**
+ * @brief common resource allocation for SSB
+ *
+ * @details
+ *
+ *     Function : schCmnDlAlloc
+ *     
+ *     This function handles common scheduling for DL
+ *     
+ *  @param[in]  SchCellCb *cell, cell cb
+ *  @param[in]  DlBrdcstAlloc *dlBrdcstAlloc, DL brdcst allocation
+ *  @return  void
+ **/
+int schCmnDlAlloc(SchCellCb *cell, DlBrdcstAlloc *dlBrdcstAlloc)
+{
+       /* schedule SSB */
+       uint8_t scs, ssbStartPrb, ssbStartSymb, idx;
+       uint8_t ssbStartSymbArr[SCH_MAX_SSB_BEAM];
+       SchDlAlloc *dlAlloc;
+       SsbInfo ssbInfo;
+
+       dlAlloc = cell->dlAlloc[cell->slotInfo.slot];
+       if(dlBrdcstAlloc->ssbTrans)
+       {
+               scs = cell->cellCfg.scsCommon;
+               ssbStartPrb = \
+                  ((cell->cellCfg.ssbSubcOffset)-(cell->cellCfg.ssbOffsetPointA))/SCH_NUM_SC_PRB;
+
+               memset(ssbStartSymbArr, 0, SCH_MAX_SSB_BEAM);
+               ssbDlTdAlloc(scs, ssbStartSymbArr);
+               ssbStartSymb = ssbStartSymbArr[dlBrdcstAlloc->ssbIdxSupported-1]; /*since we are supporting only 1 ssb beam */
+               /* Assign interface structure */
+               for(idx=0; idx<dlBrdcstAlloc->ssbIdxSupported; idx++)
+               {
+                       ssbInfo.ssbIdx = idx;
+                       ssbInfo.fdAlloc.ssbStartPrbIdx = ssbStartPrb;
+                       ssbInfo.fdAlloc.ssbPrbDuration = SCH_SSB_PRB_DURATION;
+                       ssbInfo.tdAlloc.ssbStartSymbIdx = ssbStartSymb;
+                       ssbInfo.tdAlloc.ssbSymbolDuration = SCH_SSB_SYMB_DURATION;
+                       dlBrdcstAlloc->ssbInfo[idx] = ssbInfo;
+                       dlAlloc->ssbInfo[idx] = ssbInfo;
+
+               }
+
+               dlAlloc->ssbPres = true;
+               dlAlloc->ssbIdxSupported = dlBrdcstAlloc->ssbIdxSupported;
+               for(idx=ssbStartSymb; idx<ssbStartSymb+SCH_SSB_SYMB_DURATION; idx++)
+               {
+                       dlAlloc->assignedPrb[idx] = SCH_SSB_PRB_DURATION; 
+               }
+
+       }
+       return ROK;
+}
+
+
+/**********************************************************************
+  End of file
+ **********************************************************************/
+
diff --git a/src/5gnrsch/sch_slot_ind.c b/src/5gnrsch/sch_slot_ind.c
new file mode 100644 (file)
index 0000000..b382047
--- /dev/null
@@ -0,0 +1,164 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+ *******************************************************************************/
+
+/************************************************************************
+
+Name:     5G NR SCH layer
+
+Type:     C source file
+
+Desc:     C source code for Entry point fucntions for slot indications
+
+File:     sch_slot_ind.c
+
+ **********************************************************************/
+
+/** @file sch_slot_ind.c
+  @brief This module processes slot indications
+ */
+#include "stdbool.h"
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general layer */
+#include "ssi.h"           /* system service interface */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_mblk.h"       /* common memory link list library */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "tfu.h"
+#include "lrg.h"
+
+#include "gen.x"           /* general layer typedefs */
+#include "ssi.x"           /* system services typedefs */
+#include "cm5.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_mblk.x"       /* common memory link list library */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "tfu.x"
+#include "lrg.x"
+#include "du_log.h"
+#include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
+#include "sch.h"
+
+SchMacDlBrdcstAllocFunc schMacDlBrdcstAllocOpts[] =
+{
+       packSchMacDlBrdcstAlloc,
+       MacProcDlBrdcstAlloc,
+       packSchMacDlBrdcstAlloc
+};
+
+extern SchCb schCb[SCH_MAX_INST];
+
+
+/*******************************************************************
+ *
+ * @brief Handles sending DL broadcast alloc to MAC 
+ *
+ * @details
+ *
+ *    Function : sendDlBrdcstAllocToMac
+ *
+ *    Functionality:
+ *     Sends DL Broadcast Resource Allocation to MAC from SCH
+ *
+ * @params[in] 
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+int sendDlBrdcstAllocToMac(DlBrdcstAlloc *dlBrdcstAlloc, Inst inst)
+{
+       Pst pst;
+
+   memset(&pst, 0, sizeof(Pst));
+   SCH_FILL_RSP_PST(pst, inst);
+       pst.event = EVENT_DL_BRDCST_ALLOC;
+
+       return(*schMacDlBrdcstAllocOpts[pst.selector])(&pst, dlBrdcstAlloc);
+
+}
+/*******************************************************************
+ *
+ * @brief Handles slot indication at SCH 
+ *
+ * @details
+ *
+ *    Function : schProcessSlotInd
+ *
+ *    Functionality:
+ *     Handles TTI indication received from PHY
+ *
+ * @params[in] 
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+int schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
+{
+   int ret = ROK;
+       uint8_t ssb_rep;
+       DlBrdcstAlloc dlBrdcstAlloc;
+       dlBrdcstAlloc.ssbTrans = NO_SSB;
+       SchCellCb *cell;
+
+#ifdef LTE_L2_MEAS
+   glblTtiCnt++;
+#endif
+  
+       cell = schCb[schInst].cells[schInst];
+       ssb_rep = cell->cellCfg.ssbPeriod;
+       memcpy(&cell->slotInfo, slotInd, sizeof(SlotIndInfo));
+   memcpy(&dlBrdcstAlloc.slotIndInfo, slotInd, sizeof(SlotIndInfo));
+       dlBrdcstAlloc.cellId = cell->cellId;
+       dlBrdcstAlloc.ssbIdxSupported = 1;
+
+       /* Identify SSB ocassion*/
+       if ((slotInd->sfn % SCH_MIB_TRANS == 0))// && (slotInd.slot == 0))
+       {
+               dlBrdcstAlloc.ssbTrans = SSB_TRANSMISSION;
+       }
+       else if ((slotInd->sfn % ssb_rep == 0))// && (slotInd.slot == 0))
+       {
+               dlBrdcstAlloc.ssbTrans = SSB_REPEAT;
+       }
+       else
+       {
+         ;
+       }
+       schCmnDlAlloc(cell, &dlBrdcstAlloc);
+       //send msg to MAC
+   ret = sendDlBrdcstAllocToMac(&dlBrdcstAlloc, schInst);
+   if(ret != ROK)
+   {
+      DU_LOG("\nSending DL Broadcast allocation from SCH to MAC failed");
+      RETVALUE(ret);
+   }
+       return ret;
+}
+
+/**********************************************************************
+  End of file
+ **********************************************************************/
+
+
index 001673f..cab21f7 100644 (file)
@@ -213,6 +213,7 @@ PFV      func;           /* function */
  
    ++tqCp->nxtEnt;
    expire = tqCp->nxtEnt;
  
    ++tqCp->nxtEnt;
    expire = tqCp->nxtEnt;
+       tqCp->tmrLen = 1;
    entry = (U32) (expire % (U32)(tqCp->tmrLen));
   
    tqCp->tmp = (tqEnt = &tq[entry])->first;
    entry = (U32) (expire % (U32)(tqCp->tmrLen));
   
    tqCp->tmp = (tqEnt = &tq[entry])->first;
index ebb4dcc..d7d56fe 100755 (executable)
@@ -181,9 +181,9 @@ Buffer *mBuf;
 
    TRC3(cmPkLteTimingInfo);
 
 
    TRC3(cmPkLteTimingInfo);
 
-   CMCHKPK(SPkU8, param->subframe, mBuf);
+   CMCHKPK(SPkU16, param->slot, mBuf);
    CMCHKPK(SPkU16, param->sfn, mBuf);
    CMCHKPK(SPkU16, param->sfn, mBuf);
-   CMCHKPK(SPkU16, param->hSfn, mBuf);
+   //CMCHKPK(SPkU16, param->hSfn, mBuf);
    RETVALUE(ROK);
 }
 
    RETVALUE(ROK);
 }
 
@@ -219,9 +219,9 @@ Buffer *mBuf;
 
    TRC3(cmUnpkLteTimingInfo);
 
 
    TRC3(cmUnpkLteTimingInfo);
 
-   CMCHKUNPK(SUnpkU16, &param->hSfn, mBuf);
+   //CMCHKUNPK(SUnpkU16, &param->hSfn, mBuf);
    CMCHKUNPK(SUnpkU16, &param->sfn, mBuf);
    CMCHKUNPK(SUnpkU16, &param->sfn, mBuf);
-   CMCHKUNPK(SUnpkU8, &param->subframe, mBuf);
+   CMCHKUNPK(SUnpkU8, &param->slot, mBuf);
    RETVALUE(ROK);
 }
 
    RETVALUE(ROK);
 }
 
index 02ddd08..386da42 100755 (executable)
@@ -111,9 +111,11 @@ typedef struct cmLteRlcId
 /** @brief LTE Timing Info */
 typedef struct cmLteTimingInfo
 {
 /** @brief LTE Timing Info */
 typedef struct cmLteTimingInfo
 {
+#if 0
    U16 hSfn;                 /*!< Hyper System Frame Number */
    U16 hSfn;                 /*!< Hyper System Frame Number */
+#endif
    U16 sfn;                  /*!< System Frame Number */
    U16 sfn;                  /*!< System Frame Number */
-   U8  subframe;             /*!< Subframe number */
+   U16 slot;             /*!< Subframe number */
 } CmLteTimingInfo;
 
 /** @brief PDCP ID */
 } CmLteTimingInfo;
 
 /** @brief PDCP ID */
index 6a45251..ee8bb95 100644 (file)
@@ -146,6 +146,7 @@ U16 packMacCellCfgCfm(Pst *pst, MacCellCfgCfm *macCellCfgCfm)
       }
 
       /* pack the transaction ID in CNF structure */
       }
 
       /* pack the transaction ID in CNF structure */
+               CMCHKPK(SPkU8, macCellCfgCfm->rsp, mBuf);
       CMCHKPK(SPkU16, macCellCfgCfm->transId, mBuf);
 
       RETVALUE(SPstTsk(pst,mBuf));
       CMCHKPK(SPkU16, macCellCfgCfm->transId, mBuf);
 
       RETVALUE(SPstTsk(pst,mBuf));
@@ -186,6 +187,7 @@ U16 unpackMacCellCfgCfm(
    {
       /* unpack the transaction ID in CNF structure */
       CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
    {
       /* unpack the transaction ID in CNF structure */
       CMCHKUNPK(SUnpkU16, &(macCellCfgCfm.transId), mBuf);
+      CMCHKUNPK(SUnpkU8, &(macCellCfgCfm.rsp), mBuf);
 
       RETVALUE((*func)(&macCellCfgCfm));
    }
 
       RETVALUE((*func)(&macCellCfgCfm));
    }
index 51d0bee..08169a1 100644 (file)
@@ -191,6 +191,7 @@ typedef struct macCellCfg
 
 typedef struct macCellCfgCfm
 {
 
 typedef struct macCellCfgCfm
 {
+       uint8_t        rsp; 
    U16            transId;
 }MacCellCfgCfm;
 
    U16            transId;
 }MacCellCfgCfm;
 
@@ -216,7 +217,7 @@ typedef S16 (*DuMacCellCfgCfm)     ARGS((
 
 U16 packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
 
 
 U16 packMacCellCfg(Pst *pst, MacCellCfg *macCellCfg);
 
-EXTERN S16 MacHdlCellCfgReq
+EXTERN int MacHdlCellCfgReq
 (
  Pst           *pst,
  MacCellCfg    *macCellCfg
 (
  Pst           *pst,
  MacCellCfg    *macCellCfg
index b56bdb0..23323b7 100755 (executable)
@@ -528,7 +528,7 @@ typedef S16 (*LrgCfgReq)     ARGS((
         RgMngmt    *cfg                /* Management Structure */
      ));
 
         RgMngmt    *cfg                /* Management Structure */
      ));
 
-typedef S16 (*LrgSchCfgReq)     ARGS((
+typedef int (*LrgSchCfgReq)     ARGS((
         Pst        *pst,               /* Post Structure */
         RgMngmt    *cfg                /* Management Structure */
      ));
         Pst        *pst,               /* Post Structure */
         RgMngmt    *cfg                /* Management Structure */
      ));
@@ -677,7 +677,7 @@ EXTERN S16 RgMiLrgCfgCfm ARGS((Pst *pst, RgMngmt *cfm));
   * @param cfg pointer to RgMngmt
   * @return ROK/RFAILED
   */
   * @param cfg pointer to RgMngmt
   * @return ROK/RFAILED
   */
-EXTERN S16 HandleSchGenCfgReq ARGS((Pst *pst, RgMngmt *cfg));
+EXTERN int HandleSchGenCfgReq ARGS((Pst *pst, RgMngmt *cfg));
 
  /** @brief This primitive carries the Confirmation for a Configuration Request
   * sent from the layer manager to Scheduler.
 
  /** @brief This primitive carries the Confirmation for a Configuration Request
   * sent from the layer manager to Scheduler.
diff --git a/src/cm/mac_sch_interface.c b/src/cm/mac_sch_interface.c
new file mode 100644 (file)
index 0000000..a0a6147
--- /dev/null
@@ -0,0 +1,119 @@
+/* header include files (.h) */
+#include "envopt.h"        /* environment options */
+#include "envdep.h"        /* environment dependent */
+#include "envind.h"        /* environment independent */
+#include "gen.h"           /* general */
+#include "ssi.h"           /* system services */
+#include "cm_tkns.h"       /* Common Token Defines */
+#include "cm_llist.h"      /* Common Link List Defines */
+#include "cm_hash.h"       /* Common Hash List Defines */
+#include "cm_lte.h"        /* Common LTE Defines */
+#include "cm_mblk.h"        /* Common LTE Defines */
+#include "tfu.h"           /* RGU Interface defines */
+#include "lrg.h"
+//#include "fapi.h"
+
+/* header/extern include files (.x) */
+#include "gen.x"           /* general */
+#include "ssi.x"           /* system services */
+#include "cm_tkns.x"       /* Common Token Definitions */
+#include "cm_llist.x"      /* Common Link List Definitions */
+#include "cm_lib.x"        /* Common Library Definitions */
+#include "cm_hash.x"       /* Common Hash List Definitions */
+#include "cm_lte.x"        /* Common LTE Defines */
+#include "cm_mblk.x"        /* Common LTE Defines */
+#include "tfu.x"           /* RGU Interface includes */
+#include "lrg.x"
+
+#include "du_app_mac_inf.h"
+#include "mac_sch_interface.h"
+
+/**
+ * @brief function to send Slot ind message from MAC
+ *        to scheduler with loose coupling 
+ *
+ * @details
+ *
+ *     Function : packMacSchSlotInd
+ *     
+ *     
+ *  @param[in]  Pst *pst, the post structure     
+ *  @param[in]  *slotInd, the value of SFN and slot
+ *  @return  S16
+ *      -# ROK
+ **/
+int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd)
+{
+   Buffer *mBuf = NULLP;
+   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK)
+   {
+      RETVALUE(RFAILED);
+   }
+
+   /* pack SFN and slot value */
+   CMCHKPK(SPkU16,slotInd->sfn, mBuf);
+   CMCHKPK(SPkU16,slotInd->slot, mBuf);
+
+   RETVALUE(SPstTsk(pst,mBuf));
+}
+
+/**
+ * @brief function to pack DL Broadcast allocation message 
+ *        from MAC to SCH
+ *
+ * @details
+ *
+ *     Function : packSchMaccDlBrdcstAlloc 
+ *     
+ *     
+ *  @param[in]  Pst *pst, the post structure     
+ *  @param[in]  *dlBrdcstAlloc, dlBroadcastAlloc
+ *  @return  S16
+ *      -# ROK
+ **/
+int packSchMacDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc  *dlBrdcstAlloc)
+{
+       return ROK;
+}
+
+/**
+ * @brief function to pack cell cfg from MAC to SCH
+ *
+ * @details
+ *
+ *     Function : packSchCellCfg 
+ *     
+ *     
+ *  @param[in]  Pst *pst, the post structure     
+ *  @param[in]  *schCellCfg, SchCellCfg structure
+ *  @return  S16
+ *      -# ROK
+ **/
+int packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg)
+{
+       return ROK;
+}
+
+/**
+ * @brief function to pack cell cfg cfm from SCH to MAC
+ *
+ * @details
+ *
+ *     Function : packSchCellCfgCfm
+ *     
+ *     
+ *  @param[in]  Pst *pst, the post structure     
+ *  @param[in]  *schCellCfgCfm, SchCellCfgCfm structure
+ *  @return  S16
+ *      -# ROK
+ **/
+int packSchCellCfgCfm(Pst *pst, SchCellCfgCfm *schCellCfgCfm)
+{
+       return ROK;
+}
+
+
+/**********************************************************************
+  End of file
+ **********************************************************************/
+
diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h
new file mode 100644 (file)
index 0000000..8ee828c
--- /dev/null
@@ -0,0 +1,133 @@
+/*******************************************************************************
+################################################################################
+#   Copyright (c) [2017-2019] [Radisys]                                        #
+#                                                                              #
+#   Licensed under the Apache License, Version 2.0 (the "License");            #
+#   you may not use this file except in compliance with the License.           #
+#   You may obtain a copy of the License at                                    #
+#                                                                              #
+#       http://www.apache.org/licenses/LICENSE-2.0                             #
+#                                                                              #
+#   Unless required by applicable law or agreed to in writing, software        #
+#   distributed under the License is distributed on an "AS IS" BASIS,          #
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #
+#   See the License for the specific language governing permissions and        #
+#   limitations under the License.                                             #
+################################################################################
+*******************************************************************************/
+
+/* events */
+#define EVENT_SCH_CELL_CFG 1
+#define EVENT_SCH_CELL_CFG_CFM 2
+
+/* selector */
+#define MAC_SCH_LC_SELECTOR 0
+#define MAC_SCH_TC_SELECTOR 1
+#define MAC_SCH_LWLC_SELECTOR 2
+
+/*macros*/
+#define NO_SSB 0
+#define SSB_TRANSMISSION 1
+#define SSB_REPEAT 2
+#define MAX_SSB_IDX 1 /* forcing it as 1 for now. Right value is 64 */
+
+/*structures*/
+
+
+typedef enum
+{
+       RSP_OK,
+       RSP_NOK
+}schMacRsp;
+
+typedef struct schCellCfg
+{
+   U16         cellId;     /* Cell Id */
+   U16         phyCellId;  /* Physical cell id */
+       U8          bandwidth;  /* Supported B/W */
+   DuplexMode  dupMode;    /* Duplex type: TDD/FDD */
+   U32         ssbPbchPwr;       /* SSB block power */
+   U8          scsCommon;           /* subcarrier spacing for common [0-3]*/
+   U16         ssbOffsetPointA;  /* SSB sub carrier offset from point A */
+   SSBPeriod   ssbPeriod;        /* SSB Periodicity in msec */
+   U8          ssbSubcOffset;    /* Subcarrier Offset(Kssb) */
+   U32         nSSBMask[SSB_MASK_SIZE];      /* Bitmap for actually transmitted SSB. */
+}SchCellCfg;
+
+typedef struct schCellCfgCfm
+{
+   U16         cellId;     /* Cell Id */
+   schMacRsp   rsp;   
+}SchCellCfgCfm;
+
+typedef struct timeDomainAlloc
+{
+   uint16_t ssbStartSymbIdx;
+       uint16_t ssbSymbolDuration;
+}TimeDomainAlloc;
+
+typedef struct freqDomainAlloc
+{
+   uint16_t ssbStartPrbIdx;
+   uint16_t ssbPrbDuration;
+}FreqDomainAlloc;
+
+typedef struct ssbInfo
+{
+   uint8_t ssbIdx;          /* SSB Index */
+       TimeDomainAlloc tdAlloc; /* Time domain allocation */
+       FreqDomainAlloc fdAlloc; /* Freq domain allocation */
+}SsbInfo;
+
+/* Interface structure signifying DL broadcast allocation for SSB, SIB1 */
+typedef struct dlBrdcstAlloc
+{
+   uint16_t cellId;  /* Cell Id */
+       SlotIndInfo slotIndInfo; /* Slot Info: sfn, slot number */
+       /* Ssb transmission is determined as follows:
+        * 0 : No tranamission
+        * 1 : SSB Transmission
+        * 2 : SSB Repetition */
+       uint8_t ssbTrans;
+       uint8_t ssbIdxSupported;
+       SsbInfo ssbInfo[MAX_SSB_IDX];
+       /* Sib1 transmission is determined as follows:
+        * 0 : No tranamission
+        * 1 : SIB1 Transmission
+        * 2 : SIB1 Repetition */
+       U8 sib1Trans;
+}DlBrdcstAlloc;
+
+/* function pointers */
+
+typedef int (*SchMacDlBrdcstAllocFunc)     ARGS((                     
+   Pst            *pst,           /* Post Structure */                         
+   DlBrdcstAlloc  *dlBrdcstAlloc    /* slot ind Info */                      
+));
+
+typedef int (*SchCellCfgCfmFunc)    ARGS((
+   Pst            *pst,           /* Post Structure */                         
+   SchCellCfgCfm  *schCellCfgCfm  /* Cell Cfg Cfm */
+));
+
+typedef int (*SchCellCfgFunc)    ARGS((
+   Pst            *pst,           /* Post Structure */                         
+   SchCellCfg  *schCellCfg     /* Cell Cfg  */
+));
+/* function declarations */
+int packMacSchSlotInd(Pst *pst, SlotIndInfo *slotInd);
+int packSchMacDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc  *dlBrdcstAlloc);
+EXTERN int packSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
+EXTERN int packSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
+
+EXTERN int MacProcDlBrdcstAlloc(Pst *pst, DlBrdcstAlloc *dlBrdcstAlloc);
+EXTERN int MacProcSchCellCfg(Pst *pst, SchCellCfg  *schCellCfg);
+EXTERN int MacProcSchCellCfgCfm(Pst *pst, SchCellCfgCfm  *schCellCfgCfm);
+EXTERN int SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg);
+EXTERN int schActvInit(Ent entity, Inst instId, Region region, Reason reason);
+EXTERN S16 SchSendCfgCfm(Pst *pst, RgMngmt *cfm);
+
+/**********************************************************************
+  End of file
+ **********************************************************************/
+
index d1bc946..a425332 100755 (executable)
@@ -426,95 +426,6 @@ Buffer *mBuf;
 }
 
 \f
 }
 
 \f
-/***********************************************************
-*
-*     Func : cmPkRgrCfgReq
-*
-*
-*     Desc : Configuration Request from DU_APP to MAC for 
-*            configuring Cell/Ue/Lc
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkRgrCfgReq
-(
-Pst* pst,
-RgrCfgTransId transId,
-RgrCfgReqInfo * cfgReqInfo
-)
-#else
-PUBLIC S16 cmPkRgrCfgReq(pst, transId, cfgReqInfo)
-Pst* pst;
-RgrCfgTransId transId;
-RgrCfgReqInfo * cfgReqInfo;
-#endif
-{
-   Buffer *mBuf = NULLP;
-   TRC3(cmPkRgrCfgReq)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ERGR016, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo));
-      RETVALUE(RFAILED);
-   }
-   if (cmPkRgrCfgReqInfo(cfgReqInfo, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ERGR017, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo));
-      SPutMsg(mBuf);
-      RETVALUE(RFAILED);
-   }
-   if (cmPkRgrCfgTransId(&transId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ERGR018, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo));
-      SPutMsg(mBuf);
-      RETVALUE(RFAILED);
-   }
-#if 0
-   if (SPkS16(spId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ERGR019, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo));
-      SPutMsg(mBuf);
-      RETVALUE(RFAILED);
-   }
-#endif
-   if (SPutSBuf(pst->region, pst->pool, (Data *)cfgReqInfo, sizeof(RgrCfgReqInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ERGR020, (ErrVal)0, "Packing failed");
-#endif
-      SPutMsg(mBuf);
-      RETVALUE(RFAILED);
-   }
-
-   pst->event = (Event) EVTMACSCHCFGREQ;
-   RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
 /***********************************************************
 *
 *     Func : cmUnpkRgrCfgReq
 /***********************************************************
 *
 *     Func : cmUnpkRgrCfgReq
index 65ebf9a..8e7b268 100755 (executable)
 #define EVTRGRBNDREQ    1     /*!< Bind Request */
 #define EVTRGRBNDCFM    2     /*!< Bind Confirm */
 #define EVTRGRUBNDREQ   3     /*!< Unbind Request */
 #define EVTRGRBNDREQ    1     /*!< Bind Request */
 #define EVTRGRBNDCFM    2     /*!< Bind Confirm */
 #define EVTRGRUBNDREQ   3     /*!< Unbind Request */
-#define EVTMACSCHCFGREQ    4     /*!< Configuration Request */
 #define EVTMACSCHCFGCFM    5     /*!< Configuration Confirm */
 /* rgr_h_001.main_2: Added TTI indication from MAC to RGR user */
 /** @name RGR_RRM_TICK */
 #define EVTMACSCHCFGCFM    5     /*!< Configuration Confirm */
 /* rgr_h_001.main_2: Added TTI indication from MAC to RGR user */
 /** @name RGR_RRM_TICK */
index 2eba088..a3ca02d 100755 (executable)
@@ -2776,6 +2776,13 @@ typedef S16 (*RgrCfgReq) ARGS((
    Pst*                 pst,
    RgrCfgTransId        transId,
    RgrCfgReqInfo *      cfgReqInfo));
    Pst*                 pst,
    RgrCfgTransId        transId,
    RgrCfgReqInfo *      cfgReqInfo));
+
+EXTERN S16 cmPkRgrCfgCfm ARGS((
+   Pst*                 pst,
+   RgrCfgTransId        transId,
+   U8                   status
+));
+
 /** @brief Configuration confirm from MAC to RRM. 
  * 
  * @details This API confirms the RGR User about the status of the Configuration.
 /** @brief Configuration confirm from MAC to RRM. 
  * 
  * @details This API confirms the RGR User about the status of the Configuration.
@@ -3208,24 +3215,6 @@ EXTERN S16 RgUiRgrUbndReq ARGS((
    Reason               reason
 ));
 
    Reason               reason
 ));
 
-/** @brief Configuration request from RRM to MAC for configuring Cell/UE/LC.
- *
- * @details This API is invoked by RRM towards MAC to configure MAC. 
- *     These API validates the Pst, spId, suId and transfers the config request 
- *     specific information to corresponding ownership module (GOM) API. 
- *  
- *  @param[in] pst        Pointer to a post structure.
- *  @param[in] spId       SAP Id of the Service Provider.
- *  @param[in] transId    MAC to RRM Transaction Id.
- *  @param[in] cfgReqInfo Basic RGR configuration/reconfiguration info at RRM. 
- *  @return  ROK/RFAILED
- */
-EXTERN S16 HandleSchCfgReq ARGS((
-   Pst*                 pst,
-   RgrCfgTransId        transId,
-   RgrCfgReqInfo *      cfgReqInfo
-));
-
 /** @brief Configuration Confirm from MAC to RRM.  
  *
  * @details In this API crnti, preambleId, and
 /** @brief Configuration Confirm from MAC to RRM.  
  *
  * @details In this API crnti, preambleId, and
@@ -3772,12 +3761,6 @@ EXTERN S16 cmUnpkRgrCfgReq ARGS((
    Buffer               *mBuf
 ));
 
    Buffer               *mBuf
 ));
 
-EXTERN S16 cmPkRgrCfgCfm ARGS((
-   Pst*                 pst,
-   RgrCfgTransId        transId,
-   U8                   status
-));
-
 EXTERN S16 cmUnpkRgrCfgCfm ARGS((
    RgrCfgCfm            func,
    Pst*                 pst,
 EXTERN S16 cmUnpkRgrCfgCfm ARGS((
    RgrCfgCfm            func,
    Pst*                 pst,
@@ -4644,8 +4627,6 @@ RgrCellCntrlCmdCfg *param,
 Buffer *mBuf
 ));
 
 Buffer *mBuf
 ));
 
-EXTERN S16 MacSchCfgReq ARGS((Pst *pst, RgrCfgTransId transId, 
-       RgrCfgReqInfo *cfgReqInfo));
 #ifdef RLC_MAC_DAT_REQ_RBUF
 EXTERN S16 rgDlDatReqBatchProc ARGS((
 Void));
 #ifdef RLC_MAC_DAT_REQ_RBUF
 EXTERN S16 rgDlDatReqBatchProc ARGS((
 Void));
index d24f3fd..ad304ab 100755 (executable)
@@ -58,6 +58,9 @@
 #include "cm_mblk.x"        /* Common LTE Defines */
 #include "tfu.x"           /* RGU Interface includes */
 
 #include "cm_mblk.x"        /* Common LTE Defines */
 #include "tfu.x"           /* RGU Interface includes */
 
+#include "du_app_mac_inf.h"
+//#include "mac_sch_interface.h"
+
 #if (defined(LCTFU))
 
 \f
 #if (defined(LCTFU))
 
 \f
@@ -3387,14 +3390,14 @@ TfuTtiIndInfo * ttiInd;
       }
    }
 
       }
    }
 
-   pst->event = (Event) EVTTFUTTIIND;
+   pst->event = (Event) EVENT_SLOT_IND_TO_MAC;
    RETVALUE(SPstTsk(pst,mBuf));
 }
 
 \f
 /***********************************************************
 *
    RETVALUE(SPstTsk(pst,mBuf));
 }
 
 \f
 /***********************************************************
 *
-*     Func : cmUnpkTfuTtiInd
+*     Func : cmUnpackSlotInd
 *
 *
 *     Desc : This API is the TTI indication from PHY to MAC . 
 *
 *
 *     Desc : This API is the TTI indication from PHY to MAC . 
@@ -3413,24 +3416,17 @@ TfuTtiIndInfo * ttiInd;
 *     File  : 
 *
 **********************************************************/
 *     File  : 
 *
 **********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkTfuTtiInd
+PUBLIC S16 cmUnpackSlotInd
 (
 TfuTtiInd func,
 Pst *pst,
 Buffer *mBuf
 )
 (
 TfuTtiInd func,
 Pst *pst,
 Buffer *mBuf
 )
-#else
-PUBLIC S16 cmUnpkTfuTtiInd(func, pst, mBuf)
-TfuTtiInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
    SuId suId;
 {
    SuId suId;
-   TfuTtiIndInfo *ttiInd;
+   SlotIndInfo *slotInd;
    
    
-   TRC3(cmUnpkTfuTtiInd)
+   TRC3(cmUnpackSlotInd)
 
    if (SUnpkS16(&suId, mBuf) != ROK) {
       TFU_FREE_MSG(mBuf);
 
    if (SUnpkS16(&suId, mBuf) != ROK) {
       TFU_FREE_MSG(mBuf);
@@ -3442,7 +3438,7 @@ Buffer *mBuf;
       RETVALUE(RFAILED);
    }
    if (pst->selector != TFU_SEL_LWLC) {
       RETVALUE(RFAILED);
    }
    if (pst->selector != TFU_SEL_LWLC) {
-      if ((SGetSBuf(pst->region, pst->pool, (Data **)&ttiInd,             sizeof(TfuTtiIndInfo))) != ROK) {
+      if ((SGetSBuf(pst->region, pst->pool, (Data **)&slotInd, sizeof(SlotIndInfo))) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
@@ -3455,8 +3451,8 @@ Buffer *mBuf;
 
    if (pst->selector == TFU_SEL_LC) 
    {
 
    if (pst->selector == TFU_SEL_LC) 
    {
-      if (cmUnpkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
+      if (cmUnpackSlotIndInfo(slotInd, mBuf) != ROK) {
+         SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
          TFU_FREE_MSG(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
          TFU_FREE_MSG(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -3468,24 +3464,21 @@ Buffer *mBuf;
    }
    else if(pst->selector == TFU_SEL_LWLC)
    {
    }
    else if(pst->selector == TFU_SEL_LWLC)
    {
-      if (cmUnpkPtr((PTR *)&ttiInd, mBuf) != ROK)
+      if (cmUnpkPtr((PTR *)&slotInd, mBuf) != ROK)
       {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
 #endif
       {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
 #endif
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
+         SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
          TFU_FREE_MSG(mBuf);
          RETVALUE(RFAILED);
       }
    }
    TFU_FREE_MSG(mBuf);
          TFU_FREE_MSG(mBuf);
          RETVALUE(RFAILED);
       }
    }
    TFU_FREE_MSG(mBuf);
-   /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
-   (*func)(pst, suId, ttiInd);
-   SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
 
 
-   RETVALUE((*func)(pst, suId, ttiInd));
+   RETVALUE((*func)(pst, slotInd));
 }
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 }
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
@@ -3595,7 +3588,7 @@ Buffer *mBuf;
 
 /***********************************************************
 *
 
 /***********************************************************
 *
-*     Func : cmPkTfuSchTtiInd
+*     Func : cmUnpackMacSchSlotInd
 *
 *
 *     Desc : This API is the TTI indication from PHY to scheduler. 
 *
 *
 *     Desc : This API is the TTI indication from PHY to scheduler. 
@@ -3614,124 +3607,18 @@ Buffer *mBuf;
 *     File  : 
 *
 **********************************************************/
 *     File  : 
 *
 **********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmPkTfuSchTtiInd
+PUBLIC S16 cmUnpackMacSchSlotInd
 (
 (
-Pst * pst,
-SuId suId,
-TfuTtiIndInfo * ttiInd
-)
-#else
-PUBLIC S16 cmPkTfuSchTtiInd(pst, suId, ttiInd)
-Pst * pst;
-SuId suId;
-TfuTtiIndInfo * ttiInd;
-#endif
-{
-   Buffer *mBuf = NULLP;
-   TRC3(cmPkTfuSchTtiInd)
-
-   if (SGetMsg(pst->region, pst->pool, &mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ETFU112, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
-      RETVALUE(RFAILED);
-   }
-   if (pst->selector == TFU_SEL_LC) {
-      if (cmPkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ETFU113, (ErrVal)0, "Packing failed");
-#endif
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
-         TFU_FREE_MSG(mBuf);
-         RETVALUE(RFAILED);
-      }
-   }
-   else if(pst->selector == TFU_SEL_LWLC)
-   {
-      if (cmPkPtr((PTR)ttiInd, mBuf) != ROK)
-      {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-         SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-            __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-            (ErrVal)ETFUXXX, (ErrVal)0, "LWLC Packing failed");
-#endif
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
-         TFU_FREE_MSG(mBuf);
-         RETVALUE(RFAILED);
-      }
-   }
-
-   if (SPkS16(suId, mBuf) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ETFU114, (ErrVal)0, "Packing failed");
-#endif
-      SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
-      TFU_FREE_MSG(mBuf);
-      RETVALUE(RFAILED);
-   }
-   if (pst->selector != TFU_SEL_LWLC) {
-      if (SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo)) != ROK) {
-#if (ERRCLASS & ERRCLS_ADD_RES)
-      SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
-         __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
-         (ErrVal)ETFU115, (ErrVal)0, "Packing failed");
-#endif
-         TFU_FREE_MSG(mBuf);
-         RETVALUE(RFAILED);
-      }
-   }
-   pst->event = (Event) EVTTFUSCHTTIIND;
-   RETVALUE(SPstTsk(pst,mBuf));
-}
-
-\f
-/***********************************************************
-*
-*     Func : cmUnpkTfuSchTtiInd
-*
-*
-*     Desc : This API is the TTI indication from PHY to scheduler. 
- * @details This primitive provides the timing information (SFN and subframe)
- * which is currently running on the physical layer. 
- * @param pst Pointer to the post structure.
- * @param suId SAP ID of the service user.
- * @param ttiInd Pointer to the TfuTtiIndInfo.
- * @return ROK/RFAILED
-*
-*
-*     Ret  : S16
-*
-*     Notes:
-*
-*     File  : 
-*
-**********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkTfuSchTtiInd
-(
-TfuSchTtiInd func,
+MacSchSlotIndFunc func,
 Pst *pst,
 Buffer *mBuf
 )
 Pst *pst,
 Buffer *mBuf
 )
-#else
-PUBLIC S16 cmUnpkTfuSchTtiInd(func, pst, mBuf)
-TfuSchTtiInd func;
-Pst *pst;
-Buffer *mBuf;
-#endif
 {
 {
+#if 0
    SuId suId;
    SuId suId;
-   TfuTtiIndInfo *ttiInd;
+   SlotIndInfo *slotInd;
    
    
-   TRC3(cmUnpkTfuSchTtiInd)
+   TRC3(cmUnpackMacSchSlotInd)
 
    if (SUnpkS16(&suId, mBuf) != ROK) {
       TFU_FREE_MSG(mBuf);
 
    if (SUnpkS16(&suId, mBuf) != ROK) {
       TFU_FREE_MSG(mBuf);
@@ -3743,7 +3630,7 @@ Buffer *mBuf;
       RETVALUE(RFAILED);
    }
    if (pst->selector != TFU_SEL_LWLC) {
       RETVALUE(RFAILED);
    }
    if (pst->selector != TFU_SEL_LWLC) {
-      if ((SGetSBuf(pst->region, pst->pool, (Data **)&ttiInd,             sizeof(TfuTtiIndInfo))) != ROK) {
+      if ((SGetSBuf(pst->region, pst->pool, (Data **)&slotInd, sizeof(SlotIndInfo))) != ROK) {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
@@ -3756,8 +3643,8 @@ Buffer *mBuf;
 
    if (pst->selector == TFU_SEL_LC) 
    {
 
    if (pst->selector == TFU_SEL_LC) 
    {
-      if (cmUnpkTfuTtiIndInfo(ttiInd, mBuf) != ROK) {
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
+      if (cmUnpackSlotIndInfo(slotInd, mBuf) != ROK) {
+         SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
          TFU_FREE_MSG(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
          TFU_FREE_MSG(mBuf);
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
@@ -3769,24 +3656,25 @@ Buffer *mBuf;
    }
    else if(pst->selector == TFU_SEL_LWLC)
    {
    }
    else if(pst->selector == TFU_SEL_LWLC)
    {
-      if (cmUnpkPtr((PTR *)&ttiInd, mBuf) != ROK)
+      if (cmUnpkPtr((PTR *)&slotInd, mBuf) != ROK)
       {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
 #endif
       {
 #if (ERRCLASS & ERRCLS_ADD_RES)
          SLogError(pst->srcEnt, pst->srcInst, pst->srcProcId,
             __FILE__, __LINE__, (ErrCls)ERRCLS_ADD_RES,
             (ErrVal)ETFUXXX, (ErrVal)0, "LWLC un-Packing failed");
 #endif
-         SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
+         SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
          TFU_FREE_MSG(mBuf);
          RETVALUE(RFAILED);
       }
    }
    TFU_FREE_MSG(mBuf);
    /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
          TFU_FREE_MSG(mBuf);
          RETVALUE(RFAILED);
       }
    }
    TFU_FREE_MSG(mBuf);
    /* [ccpu00141698]-MOD- MAC/SCH does not free the TTI ind anymore */
-   (*func)(pst, suId, ttiInd);
-   SPutSBuf(pst->region, pst->pool, (Data *)ttiInd, sizeof(TfuTtiIndInfo));
+//   (*func)(pst, suId, slotInd);
+   (*func)(pst, slotInd);
+   SPutSBuf(pst->region, pst->pool, (Data *)slotInd, sizeof(SlotIndInfo));
    RETVALUE(ROK);
    RETVALUE(ROK);
+#endif
 }
 
 \f
 }
 
 \f
@@ -12103,10 +11991,10 @@ Buffer *mBuf;
 \f
 /***********************************************************
 *
 \f
 /***********************************************************
 *
-*     Func : cmUnpkTfuTtiIndInfo
+*     Func : cmUnpackSlotIndInfo
 *
 *
 *
 *
-*     Desc : This structure contains information that is passed as a part of the TTI
+*     Desc : This structure contains information that is passed as a part of the Slot
  * indication sent from PHY to MAC.
 *
 *
  * indication sent from PHY to MAC.
 *
 *
@@ -12117,28 +12005,15 @@ Buffer *mBuf;
 *     File  : 
 *
 **********************************************************/
 *     File  : 
 *
 **********************************************************/
-#ifdef ANSI
-PUBLIC S16 cmUnpkTfuTtiIndInfo
+PUBLIC S16 cmUnpackSlotIndInfo
 (
 (
-TfuTtiIndInfo *param,
+SlotIndInfo *param,
 Buffer *mBuf
 )
 Buffer *mBuf
 )
-#else
-PUBLIC S16 cmUnpkTfuTtiIndInfo(param, mBuf)
-TfuTtiIndInfo *param;
-Buffer *mBuf;
-#endif
 {
 {
+   CMCHKUNPK(SUnpkU16, &param->sfn, mBuf);
+   CMCHKUNPK(SUnpkU16, &param->slot, mBuf);
 
 
-   S32 i;
-   TRC3(cmUnpkTfuTtiIndInfo)
-
-   /* CA dev Start */
-   CMCHKUNPK(SUnpkU8, &param->numCells, mBuf);
-   for (i=0; i<(param->numCells); i++) {
-      CMCHKUNPK(cmUnpkTfuTtiCellInfo, &param->cells[i], mBuf);
-   }
-   /* CA dev End */
    RETVALUE(ROK);
 }
 
    RETVALUE(ROK);
 }
 
index 1ea29a5..a8106bc 100755 (executable)
 #define TFU_MAX_HARQ_FDBKS       TFU_MAX_TB /*For Rel8/Rel9 UE*/
 #endif/*LTE_ADV*/
 
 #define TFU_MAX_HARQ_FDBKS       TFU_MAX_TB /*For Rel8/Rel9 UE*/
 #endif/*LTE_ADV*/
 
+/* Selector */
+#define MAC_SELECTOR_LC   0
+#define MAC_SELECTOR_TC   1
+#define MAC_SELECTOR_LWLC 2
+
 /* Event corresponding to each primitive at this interface */
 #define EVTTFUBNDREQ            1     /*!< Bind Request */
 #define EVTTFUBNDCFM            2     /*!< Bind Confirm */
 /* Event corresponding to each primitive at this interface */
 #define EVTTFUBNDREQ            1     /*!< Bind Request */
 #define EVTTFUBNDCFM            2     /*!< Bind Confirm */
 #define EVTTFUCRCIND            14    /*!< CRC indication. */
 #define EVTTFUTIMINGADVIND      15    /*!< Timing advance indication.*/
 #define EVTTFUDATREQ            16    /*!< Data Request.*/
 #define EVTTFUCRCIND            14    /*!< CRC indication. */
 #define EVTTFUTIMINGADVIND      15    /*!< Timing advance indication.*/
 #define EVTTFUDATREQ            16    /*!< Data Request.*/
-#define EVTTFUTTIIND            17    /*!< TTI indication.*/
-#define EVTTFUSCHTTIIND         18    /*!< TTI indication for scheduler.*/
+#define EVENT_SLOT_IND_TO_MAC   17    /*!< TTI indication.*/
+#define EVENT_SLOT_IND_TO_SCH   18    /*!< TTI indication for scheduler.*/
 #define EVTTFUCNTRLREQ          19    /*!< Control Request.*/
 #define EVTTFUPUCCHDELPWR       20    /*!< PUCCH Delta power. */
 #define EVTTFUDOAIND            21    /*!< PUCCH Delta power. */
 #define EVTTFUCNTRLREQ          19    /*!< Control Request.*/
 #define EVTTFUPUCCHDELPWR       20    /*!< PUCCH Delta power. */
 #define EVTTFUDOAIND            21    /*!< PUCCH Delta power. */
 #define EVTTFUNONRTIND          24    /*!< Non-RT indication.*/
 #endif
 #define EVTTFUERRIND            25    /*!< TFU Error Indication */
 #define EVTTFUNONRTIND          24    /*!< Non-RT indication.*/
 #endif
 #define EVTTFUERRIND            25    /*!< TFU Error Indication */
+#define EVENT_DL_BRDCST_ALLOC   26    /*!< DL BROADCAST ALLOCATION */
 /** @} */
 
 /* selector(coupling) values */
 /** @} */
 
 /* selector(coupling) values */
index 69bf8e8..b2726cd 100755 (executable)
@@ -2503,6 +2503,11 @@ typedef struct tfuDelDatReqInfo
 } TfuDelDatReqInfo;
 #endif
 
 } TfuDelDatReqInfo;
 #endif
 
+typedef struct slotIndInfo
+{
+   U16 sfn;
+   U16 slot;
+}SlotIndInfo;
 
 typedef S16 (*TfuBndReq) ARGS((
    Pst*                 pst,
 
 typedef S16 (*TfuBndReq) ARGS((
    Pst*                 pst,
@@ -2615,8 +2620,7 @@ typedef S16 (*TfuTtiCell) ARGS((
 /* CA dev End */
 typedef S16 (*TfuTtiInd) ARGS((
    Pst *                pst,
 /* CA dev End */
 typedef S16 (*TfuTtiInd) ARGS((
    Pst *                pst,
-   SuId                 suId,
-   TfuTtiIndInfo *      ttiInd));
+   SlotIndInfo *      slotInd));
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 typedef S16 (*TfuNonRtInd) ARGS((
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 typedef S16 (*TfuNonRtInd) ARGS((
@@ -2626,8 +2630,8 @@ typedef S16 (*TfuNonRtInd) ARGS((
 
 typedef S16 (*TfuSchTtiInd) ARGS((
    Pst *                pst,
 
 typedef S16 (*TfuSchTtiInd) ARGS((
    Pst *                pst,
-   SuId                 suId,
-   TfuTtiIndInfo *      ttiInd));
+//   SuId                 suId,
+   SlotIndInfo*         slotInd));
 
 typedef S16 (*TfuPucchDeltaPwrInd) ARGS((
    Pst *                pst,
 
 typedef S16 (*TfuPucchDeltaPwrInd) ARGS((
    Pst *                pst,
@@ -3061,6 +3065,12 @@ EXTERN S16 RgLiTfuDatInd ARGS((
    TfuDatIndInfo *      datInd
 ));
 
    TfuDatIndInfo *      datInd
 ));
 
+EXTERN S16 fapiMacSlotInd 
+(
+Pst                 *pst, 
+SlotIndInfo         *slotInd
+);
+
 EXTERN S16 RgLiTfuCrcInd ARGS((
    Pst *                pst,
    SuId                 suId,
 EXTERN S16 RgLiTfuCrcInd ARGS((
    Pst *                pst,
    SuId                 suId,
@@ -3091,10 +3101,9 @@ EXTERN S16 RgLiTfuTtiInd ARGS((
    TfuTtiIndInfo *      ttiInd
 ));
 
    TfuTtiIndInfo *      ttiInd
 ));
 
-EXTERN S16 RgLiTfuSchTtiInd ARGS((
+EXTERN int macSchSlotInd ARGS((
    Pst *                pst,
    Pst *                pst,
-   SuId                 suId,
-   TfuTtiIndInfo *      ttiInd
+   SlotIndInfo *        slotInd
 ));
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 ));
 
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
@@ -3463,12 +3472,17 @@ EXTERN S16 cmPkTfuTtiInd ARGS((
 ));
 /** @brief This API is the TTI indication from PHY to MAC.
  */
 ));
 /** @brief This API is the TTI indication from PHY to MAC.
  */
-EXTERN S16 cmUnpkTfuTtiInd ARGS((
+EXTERN S16 cmUnpackSlotInd ARGS((
    TfuTtiInd            func,
    Pst *                pst,
    Buffer               *mBuf
 ));
 
    TfuTtiInd            func,
    Pst *                pst,
    Buffer               *mBuf
 ));
 
+typedef int (*MacSchSlotIndFunc)     ARGS((                     
+   Pst         *pst,        /* Post Structure */                         
+   SlotIndInfo *slotInd     /* slot ind Info */                      
+));
+
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 /** @brief This API is the non-rt indication from PHY to MAC.
   */
 #if defined(TENB_T2K3K_SPECIFIC_CHANGES) && defined(LTE_TDD)
 /** @brief This API is the non-rt indication from PHY to MAC.
   */
@@ -3495,8 +3509,8 @@ EXTERN S16 cmPkTfuSchTtiInd ARGS((
 ));
 /** @brief This API is the TTI indication from PHY to SCH.
  */
 ));
 /** @brief This API is the TTI indication from PHY to SCH.
  */
-EXTERN S16 cmUnpkTfuSchTtiInd ARGS((
-   TfuSchTtiInd         func,
+EXTERN S16 cmUnpackMacSchSlotInd ARGS((
+   MacSchSlotIndFunc    func,
    Pst *                pst,
    Buffer               *mBuf
 ));
    Pst *                pst,
    Buffer               *mBuf
 ));
@@ -4198,8 +4212,8 @@ EXTERN S16 cmPkTfuTtiIndInfo ARGS((
    TfuTtiIndInfo        *param,
    Buffer               *mBuf
 ));
    TfuTtiIndInfo        *param,
    Buffer               *mBuf
 ));
-EXTERN S16 cmUnpkTfuTtiIndInfo ARGS((
-   TfuTtiIndInfo        *param,
+EXTERN S16 cmUnpackSlotIndInfo ARGS((
+   SlotIndInfo          *param,
    Buffer               *mBuf
 ));
 EXTERN S16 cmPkTfuRaReqInfo ARGS((
    Buffer               *mBuf
 ));
 EXTERN S16 cmPkTfuRaReqInfo ARGS((
@@ -4474,7 +4488,6 @@ EXTERN S16 cmPkTfuDciFormat61aInfo ARGS((
 
 #endif
 
 
 #endif
 
-
 #endif
 
 /* LTE_UNLICENSED */
 #endif
 
 /* LTE_UNLICENSED */
diff --git a/src/codec_utils/SYSINFO/BCCH-BCH-Message.c b/src/codec_utils/SYSINFO/BCCH-BCH-Message.c
new file mode 100644 (file)
index 0000000..3bd07f1
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "NR-RRC-Definitions"
+ *     found in "../../mib_sib1.asn1"
+ *     `asn1c -D ./mib_sib_out/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
+ */
+
+#include "BCCH-BCH-Message.h"
+
+static asn_TYPE_member_t asn_MBR_BCCH_BCH_Message_1[] = {
+       { ATF_NOFLAGS, 0, offsetof(struct BCCH_BCH_Message, message),
+               (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+               +1,     /* EXPLICIT tag at current level */
+               &asn_DEF_BCCH_BCH_MessageType,
+               0,
+               { 0, 0, 0 },
+               0, 0, /* No default value */
+               "message"
+               },
+};
+static const ber_tlv_tag_t asn_DEF_BCCH_BCH_Message_tags_1[] = {
+       (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static const asn_TYPE_tag2member_t asn_MAP_BCCH_BCH_Message_tag2el_1[] = {
+    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 } /* message */
+};
+static asn_SEQUENCE_specifics_t asn_SPC_BCCH_BCH_Message_specs_1 = {
+       sizeof(struct BCCH_BCH_Message),
+       offsetof(struct BCCH_BCH_Message, _asn_ctx),
+       asn_MAP_BCCH_BCH_Message_tag2el_1,
+       1,      /* Count of tags in the map */
+       0, 0, 0,        /* Optional elements (not needed) */
+       -1,     /* First extension addition */
+};
+asn_TYPE_descriptor_t asn_DEF_BCCH_BCH_Message = {
+       "BCCH-BCH-Message",
+       "BCCH-BCH-Message",
+       &asn_OP_SEQUENCE,
+       asn_DEF_BCCH_BCH_Message_tags_1,
+       sizeof(asn_DEF_BCCH_BCH_Message_tags_1)
+               /sizeof(asn_DEF_BCCH_BCH_Message_tags_1[0]), /* 1 */
+       asn_DEF_BCCH_BCH_Message_tags_1,        /* Same as above */
+       sizeof(asn_DEF_BCCH_BCH_Message_tags_1)
+               /sizeof(asn_DEF_BCCH_BCH_Message_tags_1[0]), /* 1 */
+       { 0, 0, SEQUENCE_constraint },
+       asn_MBR_BCCH_BCH_Message_1,
+       1,      /* Elements count */
+       &asn_SPC_BCCH_BCH_Message_specs_1       /* Additional specs */
+};
+
diff --git a/src/codec_utils/SYSINFO/BCCH-BCH-Message.h b/src/codec_utils/SYSINFO/BCCH-BCH-Message.h
new file mode 100644 (file)
index 0000000..d8b3564
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "NR-RRC-Definitions"
+ *     found in "../../mib_sib1.asn1"
+ *     `asn1c -D ./mib_sib_out/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
+ */
+
+#ifndef        _BCCH_BCH_Message_H_
+#define        _BCCH_BCH_Message_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include "BCCH-BCH-MessageType.h"
+#include <constr_SEQUENCE.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* BCCH-BCH-Message */
+typedef struct BCCH_BCH_Message {
+       BCCH_BCH_MessageType_t   message;
+       
+       /* Context for parsing across buffer boundaries */
+       asn_struct_ctx_t _asn_ctx;
+} BCCH_BCH_Message_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_BCCH_BCH_Message;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BCCH_BCH_Message_H_ */
+#include <asn_internal.h>
diff --git a/src/codec_utils/SYSINFO/BCCH-BCH-MessageType.c b/src/codec_utils/SYSINFO/BCCH-BCH-MessageType.c
new file mode 100644 (file)
index 0000000..d609a0a
--- /dev/null
@@ -0,0 +1,94 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "NR-RRC-Definitions"
+ *     found in "../../mib_sib1.asn1"
+ *     `asn1c -D ./mib_sib_out/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
+ */
+
+#include "BCCH-BCH-MessageType.h"
+
+#include "MIB.h"
+static asn_oer_constraints_t asn_OER_type_BCCH_BCH_MessageType_constr_1 CC_NOTUSED = {
+       { 0, 0 },
+       -1};
+asn_per_constraints_t asn_PER_type_BCCH_BCH_MessageType_constr_1 CC_NOTUSED = {
+       { APC_CONSTRAINED,       1,  1,  0,  1 }        /* (0..1) */,
+       { APC_UNCONSTRAINED,    -1, -1,  0,  0 },
+       0, 0    /* No PER value map */
+};
+static const ber_tlv_tag_t asn_DEF_messageClassExtension_tags_3[] = {
+       (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+       (ASN_TAG_CLASS_UNIVERSAL | (16 << 2))
+};
+static asn_SEQUENCE_specifics_t asn_SPC_messageClassExtension_specs_3 = {
+       sizeof(struct BCCH_BCH_MessageType__messageClassExtension),
+       offsetof(struct BCCH_BCH_MessageType__messageClassExtension, _asn_ctx),
+       0,      /* No top level tags */
+       0,      /* No tags in the map */
+       0, 0, 0,        /* Optional elements (not needed) */
+       -1,     /* First extension addition */
+};
+static /* Use -fall-defs-global to expose */
+asn_TYPE_descriptor_t asn_DEF_messageClassExtension_3 = {
+       "messageClassExtension",
+       "messageClassExtension",
+       &asn_OP_SEQUENCE,
+       asn_DEF_messageClassExtension_tags_3,
+       sizeof(asn_DEF_messageClassExtension_tags_3)
+               /sizeof(asn_DEF_messageClassExtension_tags_3[0]) - 1, /* 1 */
+       asn_DEF_messageClassExtension_tags_3,   /* Same as above */
+       sizeof(asn_DEF_messageClassExtension_tags_3)
+               /sizeof(asn_DEF_messageClassExtension_tags_3[0]), /* 2 */
+       { 0, 0, SEQUENCE_constraint },
+       0, 0,   /* No members */
+       &asn_SPC_messageClassExtension_specs_3  /* Additional specs */
+};
+
+asn_TYPE_member_t asn_MBR_BCCH_BCH_MessageType_1[] = {
+       { ATF_POINTER, 0, offsetof(struct BCCH_BCH_MessageType, choice.mib),
+               (ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+               -1,     /* IMPLICIT tag at current level */
+               &asn_DEF_MIB,
+               0,
+               { 0, 0, 0 },
+               0, 0, /* No default value */
+               "mib"
+               },
+       { ATF_POINTER, 0, offsetof(struct BCCH_BCH_MessageType, choice.messageClassExtension),
+               (ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+               0,
+               &asn_DEF_messageClassExtension_3,
+               0,
+               { 0, 0, 0 },
+               0, 0, /* No default value */
+               "messageClassExtension"
+               },
+};
+static const asn_TYPE_tag2member_t asn_MAP_BCCH_BCH_MessageType_tag2el_1[] = {
+    { (ASN_TAG_CLASS_CONTEXT | (0 << 2)), 0, 0, 0 }, /* mib */
+    { (ASN_TAG_CLASS_CONTEXT | (1 << 2)), 1, 0, 0 } /* messageClassExtension */
+};
+asn_CHOICE_specifics_t asn_SPC_BCCH_BCH_MessageType_specs_1 = {
+       sizeof(struct BCCH_BCH_MessageType),
+       offsetof(struct BCCH_BCH_MessageType, _asn_ctx),
+       offsetof(struct BCCH_BCH_MessageType, present),
+       sizeof(((struct BCCH_BCH_MessageType *)0)->present),
+       asn_MAP_BCCH_BCH_MessageType_tag2el_1,
+       2,      /* Count of tags in the map */
+       0, 0,
+       -1      /* Extensions start */
+};
+asn_TYPE_descriptor_t asn_DEF_BCCH_BCH_MessageType = {
+       "BCCH-BCH-MessageType",
+       "BCCH-BCH-MessageType",
+       &asn_OP_CHOICE,
+       0,      /* No effective tags (pointer) */
+       0,      /* No effective tags (count) */
+       0,      /* No tags (pointer) */
+       0,      /* No tags (count) */
+       { &asn_OER_type_BCCH_BCH_MessageType_constr_1, &asn_PER_type_BCCH_BCH_MessageType_constr_1, CHOICE_constraint },
+       asn_MBR_BCCH_BCH_MessageType_1,
+       2,      /* Elements count */
+       &asn_SPC_BCCH_BCH_MessageType_specs_1   /* Additional specs */
+};
+
diff --git a/src/codec_utils/SYSINFO/BCCH-BCH-MessageType.h b/src/codec_utils/SYSINFO/BCCH-BCH-MessageType.h
new file mode 100644 (file)
index 0000000..656c94d
--- /dev/null
@@ -0,0 +1,59 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ * From ASN.1 module "NR-RRC-Definitions"
+ *     found in "../../mib_sib1.asn1"
+ *     `asn1c -D ./mib_sib_out/ -fcompound-names -fno-include-deps -findirect-choice -gen-PER -no-gen-example`
+ */
+
+#ifndef        _BCCH_BCH_MessageType_H_
+#define        _BCCH_BCH_MessageType_H_
+
+
+#include <asn_application.h>
+
+/* Including external dependencies */
+#include <constr_SEQUENCE.h>
+#include <constr_CHOICE.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Dependencies */
+typedef enum BCCH_BCH_MessageType_PR {
+       BCCH_BCH_MessageType_PR_NOTHING,        /* No components present */
+       BCCH_BCH_MessageType_PR_mib,
+       BCCH_BCH_MessageType_PR_messageClassExtension
+} BCCH_BCH_MessageType_PR;
+
+/* Forward declarations */
+struct MIB;
+
+/* BCCH-BCH-MessageType */
+typedef struct BCCH_BCH_MessageType {
+       BCCH_BCH_MessageType_PR present;
+       union BCCH_BCH_MessageType_u {
+               struct MIB      *mib;
+               struct BCCH_BCH_MessageType__messageClassExtension {
+                       
+                       /* Context for parsing across buffer boundaries */
+                       asn_struct_ctx_t _asn_ctx;
+               } *messageClassExtension;
+       } choice;
+       
+       /* Context for parsing across buffer boundaries */
+       asn_struct_ctx_t _asn_ctx;
+} BCCH_BCH_MessageType_t;
+
+/* Implementation */
+extern asn_TYPE_descriptor_t asn_DEF_BCCH_BCH_MessageType;
+extern asn_CHOICE_specifics_t asn_SPC_BCCH_BCH_MessageType_specs_1;
+extern asn_TYPE_member_t asn_MBR_BCCH_BCH_MessageType_1[2];
+extern asn_per_constraints_t asn_PER_type_BCCH_BCH_MessageType_constr_1;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _BCCH_BCH_MessageType_H_ */
+#include <asn_internal.h>
diff --git a/src/codec_utils/common/asn_constant.h b/src/codec_utils/common/asn_constant.h
new file mode 100644 (file)
index 0000000..a0247a0
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
+ */
+
+#ifndef _ASN_CONSTANT_H
+#define _ASN_CONSTANT_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define maxSIB (32)
+#define maxNrofPhysicalResourceBlocks (275)
+#define maxNrofPhysicalResourceBlocks_1 (274)
+#define maxNrofPhysicalResourceBlocksPlus1 (276)
+#define maxNR_NS_Pmax (8)
+#define maxNrofMultiBands (8)
+#define maxSCSs (5)
+#define maxPO_perPF (4)
+#define maxPLMN (12)
+#define maxSI_Message (32)
+#define maxCoReSetDuration (3)
+#define maxNrofSearchSpaces_1 (39)
+#define maxNrofControlResourceSets_1 (11)
+#define maxNrofTCI_StatesPDCCH (64)
+#define maxNrofDL_Allocations (16)
+#define maxNARFCN (3279165)
+#define maxNrofSlots (320)
+#define maxNrofSlots_1 (319)
+#define maxNrofSymbols_1 (13)
+#define maxNrofUL_Allocations (16)
+#define maxAccessCat_1 (63)
+#define maxBarringInfoSet (8)
+#define maxNrofTCI_States (128)
+#define maxNrofTCI_States_1 (127)
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _ASN_CONSTANT_H */
index 41b2c58..1af02ed 100644 (file)
@@ -21,9 +21,6 @@
 
 extern DuCfgParams duCfgParam;
 
 
 extern DuCfgParams duCfgParam;
 
-extern S16 cmPkRgrCfgReq(Pst* pst, RgrCfgTransId transId, \
-      RgrCfgReqInfo *cfgReqInfo);
-
 extern S16 duBuildAndSendMacCellCfg();
 
 /*******************************************************************
 extern S16 duBuildAndSendMacCellCfg();
 
 /*******************************************************************
@@ -90,7 +87,6 @@ S16 procCellsToBeActivated(Cells_to_be_Activated_List_t cellsToActivate)
          return RFAILED;
       }
    }
          return RFAILED;
       }
    }
-
    return ret;
 }
 
    return ret;
 }
 
@@ -175,95 +171,6 @@ S16 procF1SetupRsp(F1AP_PDU_t *f1apMsg)
    return ret;
 }
 
    return ret;
 }
 
-/******************************************************************
-*
-* @brief Send gNB cfg to scheduler via MAC
-*
-* @details
-*
-*    Function : duSendSchGnbCfg
-*
-*    Functionality: Send gNB cfg to scheduler via MAC
-*
-* @return ROK     - success
-*         RFAILED - failure
-*
-* ****************************************************************/
-S16 duSendSchGnbCfg()
-{
-
-   RgrCfgReqInfo  *cfgReq = NULLP;
-   MacSchedGnbCfg *cfg = NULLP;
-   U32 transId = 1;
-
-   DU_ALLOC(cfgReq, sizeof(RgrCfgReqInfo));
-   if( cfgReq == NULLP)
-   {
-      DU_LOG("\nDU_APP : Mem allocation failed in duSendSchGnbCfg");
-      return RFAILED;
-   }
-
-   cfgReq->action = SCH_CONFIG;
-   cfgReq->u.cfgInfo.cfgType = MAC_GNB_CFG;
-   cfg = &(cfgReq->u.cfgInfo.u.schedGnbCfg);
-   cfg->numTxAntPorts = duCfgParam.schedCfg.numTxAntPorts;
-   cfg->ulSchdType = duCfgParam.schedCfg.ulSchdType;
-   cfg->dlSchdType = duCfgParam.schedCfg.dlSchdType;
-   cfg->numCells = duCfgParam.schedCfg.numCells;
-   cfg->maxUlUePerTti = duCfgParam.schedCfg.maxUlUePerTti;
-   cfg->maxDlUePerTti = duCfgParam.schedCfg.maxDlUePerTti;
-
-   if(ROK != duSendSchGnbCfgToMac(cfgReq, transId))
-   {
-      return RFAILED;
-   }
-
-   return ROK;
-}
-
-/******************************************************************
-*
-* @brief Send gNB cfg to scheduler via MAC
-*
-* @details
-*
-*    Function : duSendSchGnbCfgToMac 
-*
-*    Functionality: Send gNB cfg to scheduler via MAC
-*
-* @return ROK     - success
-*         RFAILED - failure
-*
-* ****************************************************************/
-S16 duSendSchGnbCfgToMac(RgrCfgReqInfo *cfgReq, U32 trans_id)
-{
-   RgrCfgTransId transId;
-   Pst pst;
-
-   DU_SET_ZERO(&pst, sizeof(Pst));
-   DU_SET_ZERO(&transId, sizeof(RgrCfgTransId));
-
-   transId.trans[0] = MAC_GNB_CFG;
-   transId.trans[1] = cfgReq->action;
-   transId.trans[7] = trans_id & 0x000000ff; trans_id >>= 8;
-   transId.trans[6] = trans_id & 0x000000ff; trans_id >>= 8;
-   transId.trans[5] = trans_id & 0x000000ff; trans_id >>= 8;
-   transId.trans[4] = trans_id & 0x000000ff; trans_id >>= 8;
-
-   pst.selector  = DU_SELECTOR_LC;
-   pst.srcEnt    = ENTDUAPP;
-   pst.dstEnt    = ENTRG;
-   pst.dstInst   = (Inst)0;
-   pst.dstProcId = DU_PROC;
-   pst.srcProcId = DU_PROC;
-   pst.region    = duCb.init.region;
-   pst.event     = (Event) EVTMACSCHCFGREQ;
-
-   cmPkRgrCfgReq(&pst, transId, cfgReq);
-
-   return ROK;
-}
-
 /**********************************************************************
   End of file
  **********************************************************************/
 /**********************************************************************
   End of file
  **********************************************************************/
index 7217d10..f67ef9e 100644 (file)
@@ -18,6 +18,7 @@
 
 /* This file contains all utility functions */
 #include "du_mgr.h"
 
 /* This file contains all utility functions */
 #include "du_mgr.h"
+#include "du_sys_info_hdl.h"
 #include "MIB.h"
 #include "PLMN-IdentityInfo.h"
 #include "odu_common_codec.h"
 #include "MIB.h"
 #include "PLMN-IdentityInfo.h"
 #include "odu_common_codec.h"
@@ -102,7 +103,7 @@ S16 readMacCfg()
 
    /* DL carrier configuration */
    duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
 
    /* DL carrier configuration */
    duCfgParam.macCellCfg.dlCarrCfg.pres = TRUE;
-   duCfgParam.macCellCfg.dlCarrCfg.bw = SUL_ARFCN;
+   duCfgParam.macCellCfg.dlCarrCfg.bw = BANDWIDTH;
    duCfgParam.macCellCfg.dlCarrCfg.freq = NR_ARFCN;
    duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
    duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
    duCfgParam.macCellCfg.dlCarrCfg.freq = NR_ARFCN;
    duCfgParam.macCellCfg.dlCarrCfg.k0[0] = 1;
    duCfgParam.macCellCfg.dlCarrCfg.k0[1] = 1;
@@ -142,11 +143,20 @@ S16 readMacCfg()
    duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
    duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITTY;
    duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
    duCfgParam.macCellCfg.ssbCfg.betaPss = BETA_PSS;
    duCfgParam.macCellCfg.ssbCfg.ssbPeriod = SSB_PERIODICITTY;
    duCfgParam.macCellCfg.ssbCfg.ssbScOffset = SSB_SUBCARRIER_OFFSET;
-   duCfgParam.macCellCfg.ssbCfg.mibPdu[0] = 0x01;
-   duCfgParam.macCellCfg.ssbCfg.mibPdu[1] = 0x01;
-   duCfgParam.macCellCfg.ssbCfg.mibPdu[2] = 0x84;
    duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
    duCfgParam.macCellCfg.ssbCfg.ssbMask[1] = 0;
    duCfgParam.macCellCfg.ssbCfg.ssbMask[0] = 1; /* only one SSB is transmitted */
    duCfgParam.macCellCfg.ssbCfg.ssbMask[1] = 0;
+   if(BuildMibPdu() != ROK)
+       {
+               DU_LOG("\nFailed to build MIB PDU");
+               memset(&duCfgParam.macCellCfg.ssbCfg.mibPdu, 0, 3*sizeof(uint8_t));
+   }
+       else
+       {
+          for(uint8_t idx=0; idx<encBufSize; idx++)
+               {
+                       duCfgParam.macCellCfg.ssbCfg.mibPdu[idx]=encBuf[idx];
+               }
+       }
    duCfgParam.macCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
    duCfgParam.macCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
 
    duCfgParam.macCellCfg.ssbCfg.multCarrBand = SSB_MULT_CARRIER_BAND;
    duCfgParam.macCellCfg.ssbCfg.multCellCarr = MULT_CELL_CARRIER;
 
@@ -199,30 +209,31 @@ S16 readMacCfg()
 }
 
 /*******************************************************************
 }
 
 /*******************************************************************
- *
- * @brief Configures the DU Parameters
- *
- * @details
- *
- *    Function : fillDuPort
- *
- *    Functionality:
- *       - fills the DU Ports.  
- *
- * @params[in] duPort array to be filled
- * @return ROK     - success
- *         RFAILED - failure
- *
- * ****************************************************************/
-
+*
+* @brief Configures the DU Parameters
+*
+* @details
+*
+*    Function : fillDuPort
+*
+*    Functionality:
+*       - fills the DU Ports.  
+*
+* @params[in] duPort array to be filled
+* @return ROK     - success
+*         RFAILED - failure
+*
+* ****************************************************************/
 S16 fillDuPort(U16 *duPort)
 {
 S16 fillDuPort(U16 *duPort)
 {
-   duPort[F1_INTERFACE]   = DU_PORT;     /* DU Port idx  0 38472 */
-   duPort[E2_INTERFACE]   = RIC_PORT;    /* RIC Port idx 1 38482 */
+       duPort[F1_INTERFACE]   = DU_PORT;     /* DU Port idx  0 38472 */
+       duPort[E2_INTERFACE]   = RIC_PORT;    /* RIC Port idx 1 38482 */
 
 
-   RETVALUE(ROK);
+       RETVALUE(ROK);
 }
 
 }
 
+
+
 /*******************************************************************
  *
  * @brief Configures the DU Parameters
 /*******************************************************************
  *
  * @brief Configures the DU Parameters
@@ -250,8 +261,8 @@ S16 readCfg()
 
    cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
    cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
 
    cmInetAddr((S8*)DU_IP_V4_ADDR, &ipv4_du);
    cmInetAddr((S8*)CU_IP_V4_ADDR, &ipv4_cu);
-   cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
-   fillDuPort(duCfgParam.sctpParams.duPort);
+       cmInetAddr((S8*)RIC_IP_V4_ADDR, &ipv4_ric);
+       fillDuPort(duCfgParam.sctpParams.duPort);
 
    /* F1 DU IP Address and Port*/
    duCfgParam.sctpParams.duIpAddr.ipV4Addr = ipv4_du;
 
    /* F1 DU IP Address and Port*/
    duCfgParam.sctpParams.duIpAddr.ipV4Addr = ipv4_du;
@@ -260,11 +271,9 @@ S16 readCfg()
    duCfgParam.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu;
    duCfgParam.sctpParams.cuPort = CU_PORT;
 
    duCfgParam.sctpParams.cuIpAddr.ipV4Addr = ipv4_cu;
    duCfgParam.sctpParams.cuPort = CU_PORT;
 
-   /* Fill RIC Params */
-   duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric;
-   duCfgParam.sctpParams.ricPort            = RIC_PORT;
-
-
+       /* Fill RIC Params */
+       duCfgParam.sctpParams.ricIpAddr.ipV4Addr = ipv4_ric;
+       duCfgParam.sctpParams.ricPort            = RIC_PORT;
    /* EGTP Parameters */
    duCfgParam.egtpParams.localIp.ipV4Pres = TRUE;
    duCfgParam.egtpParams.localIp.ipV4Addr = ipv4_du;
    /* EGTP Parameters */
    duCfgParam.egtpParams.localIp.ipV4Pres = TRUE;
    duCfgParam.egtpParams.localIp.ipV4Addr = ipv4_du;
@@ -302,7 +311,7 @@ S16 readCfg()
        sib1.tac = DU_TAC;
        sib1.ranac = DU_RANAC;
        sib1.cellIdentity = CELL_IDENTITY;
        sib1.tac = DU_TAC;
        sib1.ranac = DU_RANAC;
        sib1.cellIdentity = CELL_IDENTITY;
-       sib1.cellResvdForOpUse =\ 
+       sib1.cellResvdForOpUse = 
                PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
        duCfgParam.sib1Params = sib1;
 
                PLMN_IdentityInfo__cellReservedForOperatorUse_notReserved;
        duCfgParam.sib1Params = sib1;
 
@@ -543,21 +552,21 @@ S16 duReadCfg()
  * ****************************************************************/
 S16 bitStringToInt(BIT_STRING_t *bitString, U16 *val)
 {
  * ****************************************************************/
 S16 bitStringToInt(BIT_STRING_t *bitString, U16 *val)
 {
-   U16 numOctets, idx;
+   U16 idx;
    if(bitString->buf == NULL || bitString->size <= 0)
    {
       DU_LOG("\nDU_APP : Bit string is empty");
       return RFAILED;
    }
 
    if(bitString->buf == NULL || bitString->size <= 0)
    {
       DU_LOG("\nDU_APP : Bit string is empty");
       return RFAILED;
    }
 
-   for(idx=0; idx<bitString->size-1; idx++)
+   for(idx=0; idx< bitString->size-1; idx++)
    {
       *val |= bitString->buf[idx];
       *val <<= 8;
    }
 
    *val |= bitString->buf[idx];
    {
       *val |= bitString->buf[idx];
       *val <<= 8;
    }
 
    *val |= bitString->buf[idx];
-   *val >>= bitString->bits_unused;
+       *val >>= bitString->bits_unused;
 
    return ROK;
 }
 
    return ROK;
 }
index fd9b020..2580cc4 100644 (file)
@@ -39,7 +39,7 @@
 #define NR_CELL_ID 1
 #define DU_NAME "ORAN_OAM_DU"
 #define CELL_TYPE SMALL
 #define NR_CELL_ID 1
 #define DU_NAME "ORAN_OAM_DU"
 #define CELL_TYPE SMALL
-#define DUPLEX_MODE DUP_MODE_TDD
+#define DUPLEX_MODE DUP_MODE_FDD
 #define DU_TAC 1
 #define PLMN_MCC0 3
 #define PLMN_MCC1 1
 #define DU_TAC 1
 #define PLMN_MCC0 3
 #define PLMN_MCC1 1
 #define FREQ_SHIFT_7P5KHZ FALSE
 #define SSB_PBCH_PWR 0
 #define BCH_PAYLOAD MAC_GEN_FULL_PBCH_PAYLD
 #define FREQ_SHIFT_7P5KHZ FALSE
 #define SSB_PBCH_PWR 0
 #define BCH_PAYLOAD MAC_GEN_FULL_PBCH_PAYLD
-#define SUBCARRIER_SPACING 3
+#define SUBCARRIER_SPACING 15
 #define OFFSET_TO_POINT_A 0
 #define BETA_PSS BETA_PSS_0DB
 #define OFFSET_TO_POINT_A 0
 #define BETA_PSS BETA_PSS_0DB
-#define SSB_PERIODICITTY SSB_PRDCTY_MS_20
+#define SSB_PERIODICITTY 20
 #define SSB_SUBCARRIER_OFFSET 0
 #define SSB_MULT_CARRIER_BAND FALSE
 #define MULT_CELL_CARRIER FALSE
 #define SSB_SUBCARRIER_OFFSET 0
 #define SSB_MULT_CARRIER_BAND FALSE
 #define MULT_CELL_CARRIER FALSE
+#define BANDWIDTH 20
 
 #define PRACH_SEQ_LEN SHORT_SEQUENCE
 #define PRACH_SUBCARRIER_SPACING 3
 
 #define PRACH_SEQ_LEN SHORT_SEQUENCE
 #define PRACH_SUBCARRIER_SPACING 3
index dfd0e7d..ed91ea4 100644 (file)
@@ -1575,24 +1575,29 @@ S16 duHandleMacCellCfgCfm(MacCellCfgCfm *macCellCfgCfm)
 {
    S16 ret = ROK;
 
 {
    S16 ret = ROK;
 
-   if(macCellCfgCfm->transId == duCb.duMacCellCfg->transId)
-   {
-      /* free the memory allocated during sending macCellCfg request */
-      DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg));
-      duCb.duMacCellCfg = NULLP;
-      DU_LOG("\nDU-APP : MAC CELL config confirm recieved\n");
-
-
-      /* Build and send GNB-DU config update */
-      ret = BuildAndSendDUConfigUpdate();
-   }
-   else
-   {
-      /* transaction ID missmatch */
-      DU_LOG("\n transaction ID mismatch in macCellCfg");
-      ret = RFAILED;
-   }
-
+   if(macCellCfgCfm->rsp == ROK)  
+       {
+               if(macCellCfgCfm->transId == duCb.duMacCellCfg->transId)
+               {
+                       /* free the memory allocated during sending macCellCfg request */
+                       DU_FREE(duCb.duMacCellCfg,sizeof(MacCellCfg));
+                       duCb.duMacCellCfg = NULLP;
+
+                       /* Build and send GNB-DU config update */
+                       ret = BuildAndSendDUConfigUpdate();
+               }
+               else
+               {
+                       /* transaction ID missmatch */
+                       DU_LOG("\n transaction ID mismatch in macCellCfg");
+                       ret = RFAILED;
+               }
+       }
+       else
+       {
+               DU_LOG("\nMac cell cfg failed");
+               ret = RFAILED;
+       }
    return ret;
 }
 
    return ret;
 }
 
index fa840f1..790a10f 100644 (file)
 
 /* This file contains ASN codec for MIB and SIB1 msgs */
 
 
 /* This file contains ASN codec for MIB and SIB1 msgs */
 
-#include "du_sys_info_hdl.h"
+#include "du_mgr.h"
+#include "du_log.h"
+#include "BCCH-BCH-Message.h"
 #include "MIB.h"
 #include "SIB1.h"
 #include "PLMN-IdentityInfo.h"
 #include "PLMN-IdentitY.h"
 #include "MCC.h"
 #include "MIB.h"
 #include "SIB1.h"
 #include "PLMN-IdentityInfo.h"
 #include "PLMN-IdentitY.h"
 #include "MCC.h"
+#include "du_sys_info_hdl.h"
 
 extern char encBuf[ENC_BUF_MAX_LEN];
 
 
 extern char encBuf[ENC_BUF_MAX_LEN];
 
@@ -31,65 +34,150 @@ extern DuCfgParams duCfgParam;
 
 /*******************************************************************
  *
 
 /*******************************************************************
  *
- * @brief Builds MIB message in Served Cell Info
+ * @brief Builds MIB
  *
  * @details
  *
  *
  * @details
  *
- *    Function : BuildMibMsg
+ *    Function : BuildMib
  *
  *
- *    Functionality: Building MIB message in Served Cell Info
+ *    Functionality: Building MIB
  *
  *
- * @params[in] GNB_DU_System_Information *gnbDuSysInfo
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildMibMsg()
+int BuildMib(MIB_t *mib)
 {
 {
-       MIB_t          *mibMsg;
-       asn_enc_rval_t encRetVal;        /* Encoder return value */
-
-       DU_ALLOC(mibMsg, sizeof(MIB_t));
-       if(!mibMsg)
-       {
-               DU_LOG("DU APP: MIB msg memory allocation failure");
-               return RFAILED;
-       }
-       mibMsg->systemFrameNumber.size = sizeof(uint8_t);
-       DU_ALLOC(mibMsg->systemFrameNumber.buf, 
-                       mibMsg->systemFrameNumber.size);
-       if(!(mibMsg->systemFrameNumber.buf))
+   mib->systemFrameNumber.size = sizeof(uint8_t);
+       DU_ALLOC(mib->systemFrameNumber.buf, 
+                       mib->systemFrameNumber.size);
+       if(!(mib->systemFrameNumber.buf))
        {
                DU_LOG("DU APP: MIB msg memory allocation failure");
                return RFAILED;
        }
 
        {
                DU_LOG("DU APP: MIB msg memory allocation failure");
                return RFAILED;
        }
 
-       *(mibMsg->systemFrameNumber.buf) =
+       *(mib->systemFrameNumber.buf) =
                duCfgParam.mibParams.sysFrmNum;
                duCfgParam.mibParams.sysFrmNum;
-       mibMsg->systemFrameNumber.bits_unused = ODU_VALUE_TWO;
+       mib->systemFrameNumber.bits_unused = ODU_VALUE_TWO;
 
 
-       mibMsg->subCarrierSpacingCommon =\
+       mib->subCarrierSpacingCommon =\
                duCfgParam.mibParams.subCarrierSpacingCommon;
                duCfgParam.mibParams.subCarrierSpacingCommon;
-       mibMsg->ssb_SubcarrierOffset =\
+       mib->ssb_SubcarrierOffset =\
           duCfgParam.mibParams.ssb_SubcarrierOffset;
           duCfgParam.mibParams.ssb_SubcarrierOffset;
-       mibMsg->dmrs_TypeA_Position =\
+       mib->dmrs_TypeA_Position =\
                duCfgParam.mibParams.dmrs_TypeA_Position;
                duCfgParam.mibParams.dmrs_TypeA_Position;
-       mibMsg->pdcch_ConfigSIB1.controlResourceSetZero = \
+       mib->pdcch_ConfigSIB1.controlResourceSetZero = \
           duCfgParam.mibParams.controlResourceSetZero;
           duCfgParam.mibParams.controlResourceSetZero;
-       mibMsg->pdcch_ConfigSIB1.searchSpaceZero = \
+       mib->pdcch_ConfigSIB1.searchSpaceZero = \
           duCfgParam.mibParams.searchSpaceZero;
           duCfgParam.mibParams.searchSpaceZero;
-       mibMsg->cellBarred = duCfgParam.mibParams.cellBarred;
-       mibMsg->intraFreqReselection =
+       mib->cellBarred = duCfgParam.mibParams.cellBarred;
+       mib->intraFreqReselection =
                duCfgParam.mibParams.intraFreqReselection;
                duCfgParam.mibParams.intraFreqReselection;
-       mibMsg->spare.size = sizeof(uint8_t);
-       DU_ALLOC(mibMsg->spare.buf,sizeof(uint8_t));
-       if(!mibMsg->spare.buf)
+       mib->spare.size = sizeof(uint8_t);
+       DU_ALLOC(mib->spare.buf,sizeof(uint8_t));
+       if(!mib->spare.buf)
+       {
+               DU_LOG("DU APP: MIB msg memory allocation failure");
+               return RFAILED;
+       }
+       *(mib->spare.buf) = SPARE;
+       mib->spare.bits_unused = ODU_VALUE_SEVEN;
+   return ROK;
+}
+/*******************************************************************
+ *
+ * @brief Builds MIB PDU for broadcast
+ *
+ * @details
+ *
+ *    Function : BuildMibPdu
+ *
+ *    Functionality: Building MIB PDU for system broadcast
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+int BuildMibPdu()
+{
+   BCCH_BCH_Message_t *bcchMsg;
+       asn_enc_rval_t encRetVal;        /* Encoder return value */
+
+   DU_ALLOC(bcchMsg, sizeof(BCCH_BCH_Message_t));
+   if(!bcchMsg)
+   {
+      DU_LOG("\nMemory allocation failure in BuildMibPdu");
+      return RFAILED;
+   }
+
+   bcchMsg->message.present = BCCH_BCH_MessageType_PR_mib;
+   DU_ALLOC(bcchMsg->message.choice.mib, sizeof(MIB_t));
+   if(!bcchMsg->message.choice.mib)
+   {
+      DU_LOG("\nMemory allocation failure in BuildMibPdu");
+      return RFAILED;
+   }
+   BuildMib(bcchMsg->message.choice.mib);
+       xer_fprint(stdout, &asn_DEF_BCCH_BCH_Message, bcchMsg);
+       cmMemset((U8 *)encBuf, 0, ENC_BUF_MAX_LEN);
+       encBufSize = 0;
+       encRetVal = aper_encode(&asn_DEF_BCCH_BCH_Message, 0,
+                                  bcchMsg, PrepFinalEncBuf, encBuf);
+       printf("\nencbufSize:%d\n", encBufSize);
+       if(encRetVal.encoded    == -1) 
+       {   
+               DU_LOG("\nDU APP: Could not encode BCCH BCH Message Type structure(at %s)\n", 
+                               encRetVal.failed_type?\
+                               encRetVal.failed_type->name
+                               :"unknown");
+               return RFAILED;
+       }  
+
+       /* Print encoded buffer */
+       for(int i=0; i< encBufSize; i++)
+       {
+               printf("%x\t",encBuf[i]);
+       } 
+       printf("\n");
+
+       /* Free allocated memory */
+       DU_FREE(bcchMsg->message.choice.mib->systemFrameNumber.buf,
+                       bcchMsg->message.choice.mib->systemFrameNumber.size);
+       DU_FREE(bcchMsg->message.choice.mib->spare.buf, 
+         bcchMsg->message.choice.mib->spare.size);
+   DU_FREE(bcchMsg->message.choice.mib, sizeof(MIB_t));
+   DU_FREE(bcchMsg, sizeof(BCCH_BCH_MessageType_t));
+
+   return ROK;
+
+}
+/*******************************************************************
+ *
+ * @brief Builds MIB message in Served Cell Info
+ *
+ * @details
+ *
+ *    Function : BuildMibMsg
+ *
+ *    Functionality: Building MIB message in Served Cell Info
+ *
+ * @return ROK     - success
+ *         RFAILED - failure
+ *
+ * ****************************************************************/
+int BuildMibMsg()
+{
+       MIB_t          *mibMsg;
+       asn_enc_rval_t encRetVal;        /* Encoder return value */
+
+       DU_ALLOC(mibMsg, sizeof(MIB_t));
+       if(!mibMsg)
        {
                DU_LOG("DU APP: MIB msg memory allocation failure");
                return RFAILED;
        }
        {
                DU_LOG("DU APP: MIB msg memory allocation failure");
                return RFAILED;
        }
-       *(mibMsg->spare.buf) = SPARE;
-       mibMsg->spare.bits_unused = ODU_VALUE_SEVEN;
+       BuildMib(mibMsg);
 
        xer_fprint(stdout, &asn_DEF_MIB, mibMsg);
        cmMemset((U8 *)encBuf, 0, ENC_BUF_MAX_LEN);
 
        xer_fprint(stdout, &asn_DEF_MIB, mibMsg);
        cmMemset((U8 *)encBuf, 0, ENC_BUF_MAX_LEN);
@@ -138,7 +226,7 @@ S16 BuildMibMsg()
  *         RFAILED - failure
  *
  * ****************************************************************/
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildCellIdentity(CellIdentity_t  *cellIdentity)
+int BuildCellIdentity(CellIdentity_t  *cellIdentity)
 {
    cellIdentity->size = ODU_VALUE_FIVE*sizeof(uint8_t);
        cellIdentity->bits_unused = ODU_VALUE_FOUR;
 {
    cellIdentity->size = ODU_VALUE_FIVE*sizeof(uint8_t);
        cellIdentity->bits_unused = ODU_VALUE_FOUR;
@@ -168,7 +256,7 @@ S16 BuildCellIdentity(CellIdentity_t  *cellIdentity)
  *         RFAILED - failure
  *
  * ****************************************************************/
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildRanac(RAN_AreaCode_t **ranAreaCode)
+int BuildRanac(RAN_AreaCode_t **ranAreaCode)
 {
    RAN_AreaCode_t *ranac;
    DU_ALLOC(ranac, sizeof(RAN_AreaCode_t));
 {
    RAN_AreaCode_t *ranac;
    DU_ALLOC(ranac, sizeof(RAN_AreaCode_t));
@@ -196,7 +284,7 @@ S16 BuildRanac(RAN_AreaCode_t **ranAreaCode)
  *         RFAILED - failure
  *
  * ****************************************************************/
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildTac(TrackingAreaCode_t **trackAreaCode)
+int BuildTac(TrackingAreaCode_t **trackAreaCode)
 {
    TrackingAreaCode_t *tac;
   
 {
    TrackingAreaCode_t *tac;
   
@@ -237,7 +325,7 @@ S16 BuildTac(TrackingAreaCode_t **trackAreaCode)
  *         RFAILED - failure
  *
  * ****************************************************************/
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildPlmnList(CellAccessRelatedInfo_t *cellAccessInfo)
+int BuildPlmnList(CellAccessRelatedInfo_t *cellAccessInfo)
 {
    U8                 idx, idx1, idx2;
        U8                 elementCnt;
 {
    U8                 idx, idx1, idx2;
        U8                 elementCnt;
@@ -378,12 +466,11 @@ S16 BuildPlmnList(CellAccessRelatedInfo_t *cellAccessInfo)
  *
  *    Functionality: Building SIB message in Served Cell Info
  *
  *
  *    Functionality: Building SIB message in Served Cell Info
  *
- * @params[in] GNB_DU_System_Information *gnbDuSysInfo
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
  * @return ROK     - success
  *         RFAILED - failure
  *
  * ****************************************************************/
-S16 BuildSib1Msg()
+int BuildSib1Msg()
 {
        SIB1_t                   *sib1Msg;
        CellAccessRelatedInfo_t  *cellAccessInfo;
 {
        SIB1_t                   *sib1Msg;
        CellAccessRelatedInfo_t  *cellAccessInfo;
index ce635ed..98dd354 100644 (file)
@@ -16,8 +16,6 @@
 ################################################################################
 *******************************************************************************/
 
 ################################################################################
 *******************************************************************************/
 
-#include "du_mgr.h"
-#include "du_log.h"
 #include "odu_common_codec.h"
 
 /* Macros */
 #include "odu_common_codec.h"
 
 /* Macros */
@@ -30,8 +28,9 @@
 #define ODU_VALUE_SEVEN 7
 
 /* Function declarations */
 #define ODU_VALUE_SEVEN 7
 
 /* Function declarations */
-S16 BuildMibMsg();
-S16 BuildSib1Msg();
+int BuildMibPdu();
+int BuildMibMsg();
+int BuildSib1Msg();
 
 /**********************************************************************
          End of file
 
 /**********************************************************************
          End of file