Added fix for SSB and SIB1 repeatition 55/5755/1
authorsphoorthi <sphoorthi.dayanand@radisys.com>
Fri, 12 Mar 2021 04:52:25 +0000 (10:22 +0530)
committersphoorthi <sphoorthi.dayanand@radisys.com>
Fri, 12 Mar 2021 04:52:29 +0000 (10:22 +0530)
Change-Id: I825955e0d07e264bbaf7764061b8302cc3c941ac
Signed-off-by: sphoorthi <sphoorthi.dayanand@radisys.com>
src/5gnrsch/sch.c
src/5gnrsch/sch.h
src/5gnrsch/sch_slot_ind.c
src/phy_stub/phy_stub_msg_hdl.c

index afbcb18..08f3997 100644 (file)
@@ -678,6 +678,8 @@ uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
       cell->schUlSlotInfo[idx] = schUlSlotInfo;
 
    }
+   cell->firstSsbTransmitted = false;
+   cell->firstSib1Transmitted = false;
    fillSsbStartSymb(cell);
    schCb[inst].cells[inst] = cell;
 
index 900a7f2..11ec501 100644 (file)
@@ -199,6 +199,8 @@ typedef struct schCellCb
    SchDlSlotInfo **schDlSlotInfo;                   /*!< SCH resource allocations in DL */
    SchUlSlotInfo **schUlSlotInfo;                   /*!< SCH resource allocations in UL */
    SchCellCfg    cellCfg;                           /*!< Cell ocnfiguration */
+   bool          firstSsbTransmitted;
+   bool          firstSib1Transmitted;
    uint8_t       ssbStartSymbArr[SCH_MAX_SSB_BEAM]; /*!<start symbol per SSB beam */
    SchRaCb       raCb[MAX_NUM_UE];                  /*!< Rach Cb */
    uint16_t      numActvUe;                         /*!<Number of active UEs */
index 2c8a853..935d22c 100644 (file)
@@ -251,8 +251,10 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
    if (sfnSlot % SCH_MIB_TRANS == 0)
    {
       dlBrdcstAlloc->ssbTrans = SSB_TRANSMISSION;
+      if(!cell->firstSsbTransmitted)
+         cell->firstSsbTransmitted = true;
    }
-   else if (sfnSlot % ssb_rep == 0)
+   else if (cell->firstSsbTransmitted && (sfnSlot % ssb_rep == 0))
    {
       dlBrdcstAlloc->ssbTrans = SSB_REPEAT;
    }
@@ -265,8 +267,10 @@ uint8_t schProcessSlotInd(SlotIndInfo *slotInd, Inst schInst)
    if(sfnSlot % cell->cellCfg.sib1SchCfg.sib1NewTxPeriod == 0)
    {
       dlBrdcstAlloc->sib1Trans = SIB1_TRANSMISSION;
+      if(!cell->firstSib1Transmitted)
+         cell->firstSib1Transmitted = true;
    }
-   else if (sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0)
+   else if (cell->firstSib1Transmitted && (sfnSlot % cell->cellCfg.sib1SchCfg.sib1RepetitionPeriod == 0))
    {
       dlBrdcstAlloc->sib1Trans = SIB1_REPITITION;
    }
index 1974165..98fa2a6 100644 (file)
@@ -1023,7 +1023,7 @@ S16 l1HdlUlTtiReq(uint16_t msgLen, void *msg)
       numPdus--;
    }
 
-   if(rachIndSent == false && ulTtiReq->sfn == 2 && ulTtiReq->slot == 6)
+   if(rachIndSent == false && ulTtiReq->sfn == 16 && ulTtiReq->slot == 6)
    {
       rachIndSent = true;
       l1BuildAndSendRachInd(ulTtiReq->slot, ulTtiReq->sfn);