From 494a9711e7616aeb52378a08974611f589ed16c4 Mon Sep 17 00:00:00 2001 From: Balaji Shankaran Date: Fri, 3 Jul 2020 15:17:05 +0530 Subject: [PATCH] Integration changes in Sync with Intel Change-Id: I80a4002f7db286839929e92215348bb47a1a6920 Signed-off-by: Balaji Shankaran --- src/5gnrsch/sch_common.c | 90 ++++++++++++++++++++++-------------------------- src/du_app/du_cfg.h | 4 +-- 2 files changed, 43 insertions(+), 51 deletions(-) diff --git a/src/5gnrsch/sch_common.c b/src/5gnrsch/sch_common.c index 7c6f26325..3e14282e7 100644 --- a/src/5gnrsch/sch_common.c +++ b/src/5gnrsch/sch_common.c @@ -176,7 +176,7 @@ int sendUlSchInfoToMac(UlSchedInfo *ulSchedInfo, Inst inst) * @param[in] UlSchedInfo *ulSchedInfo, UL scheduling info * @return void **/ -int schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotIndInfo prachOccasionTimingInfo) +void schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotIndInfo prachOccasionTimingInfo) { uint8_t puschScs; uint8_t numPrachRb = 0; @@ -202,56 +202,48 @@ int schPrachResAlloc(SchCellCb *cell, UlSchedInfo *ulSchedInfo, SlotIndInfo prac y = prachCfgIdxTable[prachCfgIdx][2]; prachSubframe = prachCfgIdxTable[prachCfgIdx][3]; - if((prachOccasionTimingInfo.sfn%x) != y) + if((prachOccasionTimingInfo.sfn%x) == y) { - /* prach occasion does not lie in this SFN */ - DU_LOG("\nPRACH ocassion doesn't lie in this SFN"); - return RFAILED; + /* check for subFrame number */ + if ((1 << prachOccasionTimingInfo.slot) & prachSubframe) + { + /* prach ocassion present in this subframe */ + + prachFormat = prachCfgIdxTable[prachCfgIdx][0]; + prachStartSymbol = prachCfgIdxTable[prachCfgIdx][4]; + prachOcas = prachCfgIdxTable[prachCfgIdx][6]; + + /* freq domain resource determination for RACH*/ + freqStart = cell->cellCfg.schRachCfg.msg1FreqStart; + /* numRa determined as 𝑛 belonging {0,1,.., M − 1}, + * where M is given by msg1Fdm */ + numRa = (cell->cellCfg.schRachCfg.msg1Fdm - 1); + for(idx=0; idxcellCfg.schRachCfg.rootSeqLen) + { + if(numRbForPrachTable[idx][1] == cell->cellCfg.schRachCfg.prachSubcSpacing) + { + if(numRbForPrachTable[idx][2] == puschScs) + { + break; + } + } + } + } + numPrachRb = numRbForPrachTable[idx][3]; + dataType |= SCH_DATATYPE_PRACH; + /* Considering first slot in the frame for PRACH */ + idx = 0; + schUlSlotInfo->assignedPrb[idx] = freqStart+numPrachRb; + } + ulSchedInfo->dataType = dataType; + /* prach info */ + ulSchedInfo->prachSchInfo.numPrachOcas = prachOcas; + ulSchedInfo->prachSchInfo.prachFormat = prachFormat; + ulSchedInfo->prachSchInfo.numRa = numRa; + ulSchedInfo->prachSchInfo.prachStartSymb = prachStartSymbol; } - /* check for subFrame number */ - if ((1 << prachOccasionTimingInfo.slot) & prachSubframe) - { - /* prach ocassion present in this subframe */ - - prachFormat = prachCfgIdxTable[prachCfgIdx][0]; - prachStartSymbol = prachCfgIdxTable[prachCfgIdx][4]; - prachOcas = prachCfgIdxTable[prachCfgIdx][6]; - - /* freq domain resource determination for RACH*/ - freqStart = cell->cellCfg.schRachCfg.msg1FreqStart; - /* numRa determined as 𝑛 belonging {0,1,.., M − 1}, - * where M is given by msg1Fdm */ - numRa = (cell->cellCfg.schRachCfg.msg1Fdm - 1); - for(idx=0; idxcellCfg.schRachCfg.rootSeqLen) - { - if(numRbForPrachTable[idx][1] == cell->cellCfg.schRachCfg.prachSubcSpacing) - { - if(numRbForPrachTable[idx][2] == puschScs) - { - break; - } - } - } - - } - - numPrachRb = numRbForPrachTable[idx][3]; - dataType |= SCH_DATATYPE_PRACH; - /* Considering first slot in the frame for PRACH */ - idx = 0; - schUlSlotInfo->assignedPrb[idx] = freqStart+numPrachRb; - } - - ulSchedInfo->dataType = dataType; - /* prach info */ - ulSchedInfo->prachSchInfo.numPrachOcas = prachOcas; - ulSchedInfo->prachSchInfo.prachFormat = prachFormat; - ulSchedInfo->prachSchInfo.numRa = numRa; - ulSchedInfo->prachSchInfo.prachStartSymb = prachStartSymbol; - - return ROK; } /** diff --git a/src/du_app/du_cfg.h b/src/du_app/du_cfg.h index e6710e192..842e222f7 100644 --- a/src/du_app/du_cfg.h +++ b/src/du_app/du_cfg.h @@ -66,7 +66,7 @@ #define SCS_CARRIER_BANDWIDTH 273 /* Subcarrier spacing- carrier bandwidth */ #define OFFSET_TO_POINT_A 24 /* PRB Offset to Point A */ #define BETA_PSS BETA_PSS_0DB -#define SSB_PERIODICITY 5 +#define SSB_PERIODICITY 20 #define SSB_SUBCARRIER_OFFSET 0 #define SSB_MULT_CARRIER_BAND FALSE #define MULT_CELL_CARRIER FALSE @@ -76,7 +76,7 @@ #define DMRS_TYPE_A_POS 2 /* MACRO defines for PRACH Configuration */ -#define PRACH_CONFIG_IDX 105 +#define PRACH_CONFIG_IDX 88 #define PRACH_FREQ_START 0 #define PRACH_SEQ_LEN SHORT_SEQUENCE #define PRACH_SUBCARRIER_SPACING 1 -- 2.16.6