X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=src%2F5gnrsch%2Fsch.c;h=d3de74f23c005a958e6ec288a61f26db1eeb9726;hb=9edb21c45713c87a3434d4511ef7c340de8567ea;hp=5fd4bede14c5003c121fad85d483adbd031eff1d;hpb=6521c41a55f8015d12793741917472b5edaf2548;p=o-du%2Fl2.git diff --git a/src/5gnrsch/sch.c b/src/5gnrsch/sch.c index 5fd4bede1..d3de74f23 100644 --- a/src/5gnrsch/sch.c +++ b/src/5gnrsch/sch.c @@ -528,8 +528,8 @@ void fillSsbStartSymb(SchCellCb *cellCb) for(uint8_t idx=0; idxn0 = slotIndex; - /* calculate the PRBs */ - //freqDomRscAllocType0(((offsetPointA-offset)/6), (numRbs/6), FreqDomainResource); - /* fill BWP */ switch(bandwidth) { @@ -760,7 +756,11 @@ void fillSchSib1Cfg(uint8_t mu, uint8_t bandwidth, uint8_t numSlots, SchSib1Cfg pdcch->coresetCfg.coreSetSize = numRbs; pdcch->coresetCfg.startSymbolIndex = firstSymbol; pdcch->coresetCfg.durationSymbols = numSymbols; - memcpy(pdcch->coresetCfg.freqDomainResource,FreqDomainResource,6); + + /* Fill Bitmap for PRBs in coreset */ + fillCoresetFeqDomAllocMap(((offsetPointA-offset)/6), (numRbs/6), FreqDomainResource); + covertFreqDomRsrcMapToIAPIFormat(FreqDomainResource, pdcch->coresetCfg.freqDomainResource); + pdcch->coresetCfg.cceRegMappingType = 1; /* coreset0 is always interleaved */ pdcch->coresetCfg.regBundleSize = 6; /* spec-38.211 sec 7.3.2.2 */ pdcch->coresetCfg.interleaverSize = 2; /* spec-38.211 sec 7.3.2.2 */ @@ -855,6 +855,10 @@ uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) SchCellCfgCfm schCellCfgCfm; Pst rspPst; Inst inst = pst->dstInst-1; + uint8_t coreset0Idx = 0; + uint8_t numRbs = 0; + uint8_t offset = 0; + uint8_t freqDomainResource[FREQ_DOM_RSRC_SIZE] = {0}; SchPdschConfig pdschCfg; #ifdef CALL_FLOW_DEBUG_LOG @@ -871,6 +875,14 @@ uint8_t SchHdlCellCfgReq(Pst *pst, SchCellCfg *schCellCfg) schCellCfg->ssbSchCfg.ssbOffsetPointA); memcpy(&cellCb->cellCfg, schCellCfg, sizeof(SchCellCfg)); + /* Fill coreset frequencyDomainResource bitmap */ + coreset0Idx = cellCb->cellCfg.schInitialDlBwp.pdcchCommon.commonSearchSpace.coresetId; + numRbs = coresetIdxTable[coreset0Idx][1]; + offset = coresetIdxTable[coreset0Idx][3]; + fillCoresetFeqDomAllocMap(((cellCb->cellCfg.ssbSchCfg.ssbOffsetPointA - offset)/6), (numRbs/6), freqDomainResource); + covertFreqDomRsrcMapToIAPIFormat(freqDomainResource, \ + cellCb->cellCfg.schInitialDlBwp.pdcchCommon.commonSearchSpace.freqDomainRsrc); + /* Fill K0 - K1 table for common cfg*/ BuildK0K1Table(cellCb, &cellCb->cellCfg.schInitialDlBwp.k0K1InfoTbl, true, cellCb->cellCfg.schInitialDlBwp.pdschCommon, pdschCfg, DEFAULT_UL_ACK_LIST_COUNT, defaultUlAckTbl);