[Epic-ID: ODUHIGH-517][Task-ID: ODUHIGH-540][SubTask-Id: ODUHIGH-549] Multi PDSCH... 94/12294/2
authorsvaidhya <svaidhya@radisys.com>
Thu, 14 Dec 2023 08:10:26 +0000 (13:40 +0530)
committersvaidhya <svaidhya@radisys.com>
Thu, 14 Dec 2023 10:07:34 +0000 (15:37 +0530)
Change-Id: Icd03c9cfbccff11d7d6ed47215539c98783a154e
Signed-off-by: svaidhya <svaidhya@radisys.com>
src/5gnrsch/sch.h
src/5gnrsch/sch_common.c
src/5gnrsch/sch_fcfs.c
src/5gnrsch/sch_rach.c
src/5gnrsch/sch_slot_ind.c
src/cm/common_def.h

index 1e3f9c7..39aa042 100644 (file)
@@ -326,7 +326,6 @@ typedef struct schDlSlotInfo
    SsbInfo      ssbInfo[MAX_SSB_IDX];     /*!< SSB info */
    bool         sib1Pres;                 /*!< Flag to determine if SIB1 is present in this slot */
    uint8_t      pdcchUe;                  /*!< UE for which PDCCH Common is scheduled in this slot */
-   uint8_t      pdschUe;                  /*!< UE for which PDSCH is scheduled in this slot */
    RarAlloc     *rarAlloc[MAX_NUM_UE];    /*!< RAR allocation per UE*/
    DciInfo      *ulGrant;
    DlMsgSchInfo *dlMsgAlloc[MAX_NUM_UE];  /*!< Dl msg allocation per UE*/
index d8c677f..5454db2 100644 (file)
@@ -1896,7 +1896,6 @@ uint8_t schProcessMsg4Req(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId
    schAllocPucchResource(cell, pucchTime, cell->raCb[ueId-1].tcrnti, &cell->ueCb[ueId-1], isRetxMsg4, *msg4HqProc);
 
    cell->schDlSlotInfo[pdcchTime.slot]->pdcchUe = ueId;
-   cell->schDlSlotInfo[pdschTime.slot]->pdschUe = ueId;
    cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId;
    cell->raCb[ueId-1].msg4recvd = FALSE;
    if(isRetxMsg4)
index 09e2c64..28cc528 100644 (file)
@@ -1158,12 +1158,13 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst)
    bool           isMsg4Pending = false, isMsg4Scheduled = false;
    bool           isDlMsgPending = false, isDlMsgScheduled = false;
    bool           isUlGrantPending = false, isUlGrantScheduled = false;
+   bool           isNodeFreed = false;
 
    fcfsCell = (SchFcfsCellCb *)cell->schSpcCell;
    
    /* Select first UE in the linked list to be scheduled next */
    pendingUeNode = fcfsCell->ueToBeScheduled.first;
-   if(pendingUeNode)
+   while(pendingUeNode)
    {
       if(pendingUeNode->node)
       {
@@ -1215,6 +1216,7 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst)
             if(isRarScheduled || isMsg4Scheduled)
             {
                schFcfsRemoveUeFrmScheduleLst(cell, pendingUeNode);
+               isNodeFreed = true;
             }
             /* If RAR/MSG4 is pending but couldnt be scheduled then,
              * put this UE at the end of linked list to be scheduled later */
@@ -1319,9 +1321,23 @@ void schFcfsScheduleSlot(SchCellCb *cell, SlotTimingInfo *slotInd, Inst schInst)
             else
             {
                schFcfsRemoveUeFrmScheduleLst(cell, pendingUeNode);
+               isNodeFreed = true;
             }
          }
       }
+      if(cell->schDlSlotInfo[slotInd->slot]->prbAlloc.numPrbAlloc >= MAX_NUM_RB)
+      {
+        DU_LOG("\nINFO   -->  SCH: No PRB available to proceed with next UE");
+        return;     
+      }
+      if(isNodeFreed == false)
+      {
+         pendingUeNode= pendingUeNode->next;
+      }
+      else
+      {
+        pendingUeNode = fcfsCell->ueToBeScheduled.first;
+      }
    }
 }
 
index e4f6fb4..c002ea7 100644 (file)
@@ -596,10 +596,6 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin
             ADD_DELTA_TO_TIME(dciTime, rarTime, k0, cell->numSlots);
             rarSlot = rarTime.slot;
             
-            /* If PDSCH is already scheduled on this slot, cannot schedule PDSCH for another UE here. */
-            if(cell->schDlSlotInfo[rarSlot]->pdschUe != 0)
-               continue;
-
             /* If Contention-FREE RA is in progress, allocate resources for
              * PUCCH for next UL message */
             if(cell->raReq[ueId-1]->isCFRA)
@@ -784,7 +780,6 @@ bool schProcessRaReq(Inst schInst, SchCellCb *cell, SlotTimingInfo currTime, uin
       }
 
       cell->schDlSlotInfo[dciSlot]->pdcchUe = ueId;
-      cell->schDlSlotInfo[rarSlot]->pdschUe = ueId;
       if(cell->raReq[ueId-1]->isCFRA)
          cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId;
       else
index 4830bd1..e83a041 100644 (file)
@@ -238,7 +238,6 @@ bool schFillBoGrantDlSchedInfo(SchCellCb *cell, SlotTimingInfo currTime, uint8_t
 
    schAllocPucchResource(cell, pucchTime, crnti, ueCb, isRetx, *hqP);
 
-   cell->schDlSlotInfo[pdschTime.slot]->pdschUe = ueId;
    cell->schUlSlotInfo[pucchTime.slot]->pucchUe = ueId;
 
    /*Re-setting the BO's of all DL LCs in this UE*/
@@ -476,10 +475,6 @@ bool findValidK0K1Value(SchCellCb *cell, SlotTimingInfo currTime, uint8_t ueId,
          continue;
       }
 #endif
-      if(cell->schDlSlotInfo[pdschTime->slot]->pdschUe != 0)
-      {
-         continue; 
-      }
 
       numK1 = k0K1InfoTbl->k0k1TimingInfo[pdcchTime->slot].k0Indexes[k0TblIdx].k1TimingInfo.numK1;
       for(k1TblIdx = 0; k1TblIdx < numK1; k1TblIdx++)
index 9e7bef4..c5b8bf6 100644 (file)
@@ -61,7 +61,7 @@
 #define MAX_NUM_CELL 2 /* Changed to 2 to support cell Id 2 even if there is only one cell in DU */
 #define MAX_NUM_MU   4
 #define MAX_NUM_UE   3
-#define MAX_NUM_UE_PER_TTI 1
+#define MAX_NUM_UE_PER_TTI 2
 #define MAX_NUM_LC   MAX_DRB_LCID + 1   /*Spec 38.331: Sec 6.4: maxLC-ID Keyword*/
 #define MAX_NUM_SRB  3    /* Max. no of Srbs */
 #define MAX_NUM_DRB  29   /* spec 38.331, maxDRB */