Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[Epic-ID: ODUHIGH-518] Alignment to latest ORAN WG8 Spec: O-RAN.WG8.AAD.0-R003-v09.00
[o-du/l2.git]
/
src
/
5gnrsch
/
sch.c
diff --git
a/src/5gnrsch/sch.c
b/src/5gnrsch/sch.c
index
8d8dba6
..
293add2
100644
(file)
--- a/
src/5gnrsch/sch.c
+++ b/
src/5gnrsch/sch.c
@@
-381,7
+381,7
@@
void schInitTddSlotCfg(SchCellCb *cell, SchCellCfg *schCellCfg)
int8_t slotIdx, symbIdx;
periodicityInMicroSec = schGetPeriodicityInMsec(schCellCfg->tddCfg.tddPeriod);
int8_t slotIdx, symbIdx;
periodicityInMicroSec = schGetPeriodicityInMsec(schCellCfg->tddCfg.tddPeriod);
- cell->numSlotsInPeriodicity = (periodicityInMicroSec * pow(2,
schCellCfg
->numerology))/1000;
+ cell->numSlotsInPeriodicity = (periodicityInMicroSec * pow(2,
cell
->numerology))/1000;
cell->slotFrmtBitMap = 0;
schFillSlotConfig(cell, schCellCfg->tddCfg);
for(slotIdx = cell->numSlotsInPeriodicity-1; slotIdx >= 0; slotIdx--)
cell->slotFrmtBitMap = 0;
schFillSlotConfig(cell, schCellCfg->tddCfg);
for(slotIdx = cell->numSlotsInPeriodicity-1; slotIdx >= 0; slotIdx--)
@@
-434,7
+434,7
@@
void fillSsbStartSymb(SchCellCb *cellCb)
{
uint8_t cnt, scs, symbIdx, ssbStartSymbArr[SCH_MAX_SSB_BEAM];
{
uint8_t cnt, scs, symbIdx, ssbStartSymbArr[SCH_MAX_SSB_BEAM];
- scs = cellCb->cellCfg.s
csCommon
;
+ scs = cellCb->cellCfg.s
sbScs
;
memset(ssbStartSymbArr, 0, sizeof(SCH_MAX_SSB_BEAM));
symbIdx = 0;
memset(ssbStartSymbArr, 0, sizeof(SCH_MAX_SSB_BEAM));
symbIdx = 0;
@@
-496,6
+496,7
@@
void fillSsbStartSymb(SchCellCb *cellCb)
**/
uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
{
**/
uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
{
+ uint16_t scsInKhz = 0;
SchCellCb *cell= NULLP;
SCH_ALLOC(cell, sizeof(SchCellCb));
if(!cell)
SchCellCb *cell= NULLP;
SCH_ALLOC(cell, sizeof(SchCellCb));
if(!cell)
@@
-506,7
+507,11
@@
uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
cell->cellId = schCellCfg->cellId;
cell->instIdx = inst;
cell->cellId = schCellCfg->cellId;
cell->instIdx = inst;
- switch(schCellCfg->numerology)
+ scsInKhz = convertScsEnumValToScsVal(schCellCfg->ssbScs);
+
+ /*Ref : 3GPP 38.211 Table 4.2-1: SCS = (2 ^ numerology * 15kHz)*/
+ cell->numerology = log2(scsInKhz/BASE_SCS);
+ switch(cell->numerology)
{
case SCH_NUMEROLOGY_0:
{
{
case SCH_NUMEROLOGY_0:
{
@@
-534,7
+539,7
@@
uint8_t schInitCellCb(Inst inst, SchCellCfg *schCellCfg)
}
break;
default:
}
break;
default:
- DU_LOG("\nERROR --> SCH : Numerology %d not supported",
schCellCfg
->numerology);
+ DU_LOG("\nERROR --> SCH : Numerology %d not supported",
cell
->numerology);
}
#ifdef NR_TDD
schInitTddSlotCfg(cell, schCellCfg);
}
#ifdef NR_TDD
schInitTddSlotCfg(cell, schCellCfg);
@@
-795,7
+800,7
@@
uint8_t SchProcCellCfgReq(Pst *pst, SchCellCfg *schCellCfg)
cellCb->macInst = pst->srcInst;
/* derive the SIB1 config parameters */
cellCb->macInst = pst->srcInst;
/* derive the SIB1 config parameters */
- ret = fillSchSib1Cfg(
schCellCfg
->numerology, schCellCfg->dlBandwidth, cellCb->numSlots,
+ ret = fillSchSib1Cfg(
cellCb
->numerology, schCellCfg->dlBandwidth, cellCb->numSlots,
&(schCellCfg->pdcchCfgSib1), &(cellCb->sib1SchCfg), schCellCfg->phyCellId,
schCellCfg->dlCfgCommon.schFreqInfoDlSib.offsetToPointA, schCellCfg->sib1PduLen);
&(schCellCfg->pdcchCfgSib1), &(cellCb->sib1SchCfg), schCellCfg->phyCellId,
schCellCfg->dlCfgCommon.schFreqInfoDlSib.offsetToPointA, schCellCfg->sib1PduLen);