Merge "Fixes for SSB transmission in Radio mode integration [Issue-ID: ODUHIGH-267]"
authorHarshita Lal <harshita.lal@radisys.com>
Wed, 21 Apr 2021 15:42:05 +0000 (15:42 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Wed, 21 Apr 2021 15:42:05 +0000 (15:42 +0000)
1  2 
src/5gnrsch/sch.c

diff --combined src/5gnrsch/sch.c
@@@ -704,7 -704,7 +704,7 @@@ uint8_t schInitCellCb(Inst inst, SchCel
   *              uint8_t offsetPointA : offset
   *  @return  void
   **/
 -void fillSchSib1Cfg(uint8_t bandwidth, uint8_t numSlots, SchSib1Cfg *sib1SchCfg, uint16_t pci, uint8_t offsetPointA)
 +void fillSchSib1Cfg(uint8_t mu, uint8_t bandwidth, uint8_t numSlots, SchSib1Cfg *sib1SchCfg, uint16_t pci, uint8_t offsetPointA)
  {
     uint8_t coreset0Idx = 0;
     uint8_t searchSpace0Idx = 0;
     uint8_t FreqDomainResource[6] = {0};
     uint16_t tbSize = 0;
     uint8_t numPdschSymbols = 12; /* considering pdsch region from 2 to 13 */
 +   uint8_t ssbIdx = 0;
  
     PdcchCfg *pdcch = &(sib1SchCfg->sib1PdcchCfg);
     PdschCfg *pdsch = &(sib1SchCfg->sib1PdschCfg);
      * [(O . 2^u + i . M )  ] mod numSlotsPerSubframe 
      * assuming u = 0, i = 0, numSlotsPerSubframe = 10
      * Also, from this configuration, coreset0 is only on even subframe */
 -   slotIndex = ((oValue * 1) + (0 * mValue)) % numSlots; 
 +   slotIndex = (int)((oValue*pow(2, mu)) + floor(ssbIdx*mValue))%numSlots;
     sib1SchCfg->n0 = slotIndex;
  
     /* calculate the PRBs */
@@@ -877,7 -876,7 +877,7 @@@ uint8_t SchHdlCellCfgReq(Pst *pst, SchC
     cellCb->macInst = pst->srcInst;
  
     /* derive the SIB1 config parameters */
 -   fillSchSib1Cfg(schCellCfg->bandwidth, cellCb->numSlots,
 +   fillSchSib1Cfg(schCellCfg->numerology, schCellCfg->bandwidth, cellCb->numSlots,
         &(schCellCfg->sib1SchCfg), schCellCfg->phyCellId,
         schCellCfg->ssbSchCfg.ssbOffsetPointA);
     memcpy(&cellCb->cellCfg, schCellCfg, sizeof(SchCellCfg));
@@@ -945,7 -944,7 +945,7 @@@ uint8_t MacSchDlRlcBoInfo(Pst *pst, DlR
        return RFAILED;
     }
  
-    slot = (cell->slotInfo.slot + SCHED_DELTA + PHY_DELTA + BO_DELTA) % cell->numSlots;
+    slot = (cell->slotInfo.slot + SCHED_DELTA + PHY_DELTA_DL + BO_DELTA) % cell->numSlots;
     schDlSlotInfo = cell->schDlSlotInfo[slot];
  
     SCH_ALLOC(schDlSlotInfo->dlMsgInfo, sizeof(DlMsgInfo));