From: lal.harshita Date: Fri, 10 Feb 2023 06:27:36 +0000 (+0530) Subject: [Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-492] WG8 Alignment [DCI Information] X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?p=o-du%2Fl2.git;a=commitdiff_plain;h=531da47c7bfb6ce138a454f66eb184729860beef [Epic-ID: ODUHIGH-488][Task-ID: ODUHIGH-492] WG8 Alignment [DCI Information] Signed-off-by: lal.harshita Change-Id: I88a3a2a001a873388f85e4bdace4d55a74acea25 Signed-off-by: lal.harshita --- diff --git a/src/5gnrmac/lwr_mac_fsm.c b/src/5gnrmac/lwr_mac_fsm.c index a7c087b94..1cfc9435f 100644 --- a/src/5gnrmac/lwr_mac_fsm.c +++ b/src/5gnrmac/lwr_mac_fsm.c @@ -4505,11 +4505,11 @@ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo) * RBLen = length of contiguously allocted RBs * Spec 38.214 Sec 5.1.2.2.2 */ - if(schDciInfo->formatType == FORMAT0_0) + if(schDciInfo->dciFormatInfo.formatType == FORMAT0_0) { coreset1Size = schDciInfo->coresetCfg.coreSetSize; - rbLen = schDciInfo->format.format0_0.freqAlloc.numPrb; - rbStart = schDciInfo->format.format0_0.freqAlloc.startPrb; + rbLen = schDciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb; + rbStart = schDciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb; if((rbLen >=1) && (rbLen <= coreset1Size - rbStart)) { @@ -4522,15 +4522,15 @@ void fillUlDciPdu(fapi_dl_dci_t *ulDciPtr, DciInfo *schDciInfo) freqDomResAssignSize = ceil(log2(coreset1Size * (coreset1Size + 1) / 2)); } /* Fetching DCI field values */ - dciFormatId = schDciInfo->formatType; /* DCI indentifier for UL DCI */ - timeDomResAssign = schDciInfo->format.format0_0.rowIndex; - freqHopFlag = schDciInfo->format.format0_0.freqHopFlag; - modNCodScheme = schDciInfo->format.format0_0.mcs; - ndi = schDciInfo->format.format0_0.ndi; - redundancyVer = schDciInfo->format.format0_0.rv; - harqProcessNum = schDciInfo->format.format0_0.harqProcId; - puschTpc = schDciInfo->format.format0_0.tpcCmd; - ul_SlInd = schDciInfo->format.format0_0.sUlCfgd; + dciFormatId = schDciInfo->dciFormatInfo.formatType; /* DCI indentifier for UL DCI */ + timeDomResAssign = schDciInfo->dciFormatInfo.format.format0_0.rowIndex; + freqHopFlag = schDciInfo->dciFormatInfo.format.format0_0.freqHopFlag; + modNCodScheme = schDciInfo->dciFormatInfo.format.format0_0.mcs; + ndi = schDciInfo->dciFormatInfo.format.format0_0.ndi; + redundancyVer = schDciInfo->dciFormatInfo.format.format0_0.rvIndex; + harqProcessNum = schDciInfo->dciFormatInfo.format.format0_0.harqProcId; + puschTpc = schDciInfo->dciFormatInfo.format.format0_0.tpcCmd; + ul_SlInd = schDciInfo->dciFormatInfo.format.format0_0.sulIndicator; /* Reversing bits in each DCI field */ dciFormatId = reverseBits(dciFormatId, dciFormatIdSize); diff --git a/src/5gnrsch/sch_fcfs.c b/src/5gnrsch/sch_fcfs.c index 01119bb33..259158eee 100644 --- a/src/5gnrsch/sch_fcfs.c +++ b/src/5gnrsch/sch_fcfs.c @@ -942,7 +942,6 @@ uint8_t schFcfsScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTime, ui { /* Fill DCI for UL grant */ schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); - memcpy(&dciInfo->slotIndInfo, &dciTime, sizeof(SlotTimingInfo)); ueCb->srRcvd = false; ueCb->bsrRcvd = false; cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId; diff --git a/src/5gnrsch/sch_slice_based.c b/src/5gnrsch/sch_slice_based.c index 2ed18e276..80f4af082 100644 --- a/src/5gnrsch/sch_slice_based.c +++ b/src/5gnrsch/sch_slice_based.c @@ -941,7 +941,6 @@ uint8_t schSliceBasedScheduleUlLc(SlotTimingInfo dciTime, SlotTimingInfo puschTi { /* Fill DCI for UL grant */ schFillUlDci(ueCb, puschInfo, dciInfo, isRetx, *hqP); - memcpy(&dciInfo->slotIndInfo, &dciTime, sizeof(SlotTimingInfo)); ueCb->srRcvd = false; ueCb->bsrRcvd = false; cell->schUlSlotInfo[puschTime.slot]->puschUe = ueCb->ueId; diff --git a/src/5gnrsch/sch_ue_mgr.c b/src/5gnrsch/sch_ue_mgr.c index 254d21277..8bfa40ab7 100644 --- a/src/5gnrsch/sch_ue_mgr.c +++ b/src/5gnrsch/sch_ue_mgr.c @@ -963,7 +963,7 @@ uint8_t schFillPuschAlloc(SchUeCb *ueCb, SlotTimingInfo puschTime, uint32_t tbSi uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo *dciInfo) { SchCellCb *cellCb = raCb->cell; - dciInfo->cellId = cellCb->cellId; + dciInfo->crnti = raCb->tcrnti; SchUlHqProcCb *msg3HqProc = &raCb->msg3HqProc; if (msg3HqProc == NULLP) @@ -995,24 +995,24 @@ uint8_t schFillUlDciForMsg3Retx(SchRaCb *raCb, SchPuschInfo *puschInfo, DciInfo dciInfo->coresetCfg.cceIndex = 0; /* 0-3 for UL and 4-7 for DL */ dciInfo->coresetCfg.aggregationLevel = 4; /* same as for sib1 */ - dciInfo->formatType = FORMAT0_0; + dciInfo->dciFormatInfo.formatType = FORMAT0_0; msg3HqProc->tbInfo.rvIdx++; msg3HqProc->tbInfo.rv = schCmnDlRvTbl[msg3HqProc->tbInfo.rvIdx & 0x03]; /* fill UL grant */ - dciInfo->format.format0_0.resourceAllocType = msg3HqProc->puschResType; - dciInfo->format.format0_0.freqAlloc.startPrb = msg3HqProc->puschStartPrb; - dciInfo->format.format0_0.freqAlloc.numPrb = msg3HqProc->puschNumPrb; - dciInfo->format.format0_0.timeAlloc.startSymb = msg3HqProc->strtSymbl; - dciInfo->format.format0_0.timeAlloc.numSymb = msg3HqProc->numSymbl; - dciInfo->format.format0_0.rowIndex = 0; /* row Index */ - dciInfo->format.format0_0.mcs = msg3HqProc->tbInfo.iMcs; - dciInfo->format.format0_0.harqProcId = msg3HqProc->procId; - dciInfo->format.format0_0.puschHopFlag = FALSE; /* disabled */ - dciInfo->format.format0_0.freqHopFlag = FALSE; /* disabled */ - dciInfo->format.format0_0.ndi = msg3HqProc->tbInfo.ndi; /* new transmission */ - dciInfo->format.format0_0.rv = msg3HqProc->tbInfo.rv; - dciInfo->format.format0_0.tpcCmd = 0; //Sphoorthi TODO: check - dciInfo->format.format0_0.sUlCfgd = FALSE; /* SUL not configured */ + dciInfo->dciFormatInfo.format.format0_0.resourceAllocType = msg3HqProc->puschResType; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAllocType = msg3HqProc->puschResType; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb = msg3HqProc->puschStartPrb; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb = msg3HqProc->puschNumPrb; + dciInfo->dciFormatInfo.format.format0_0.timeAlloc.startSymb = msg3HqProc->strtSymbl; + dciInfo->dciFormatInfo.format.format0_0.timeAlloc.numSymb = msg3HqProc->numSymbl; + dciInfo->dciFormatInfo.format.format0_0.rowIndex = 0; /* row Index */ + dciInfo->dciFormatInfo.format.format0_0.mcs = msg3HqProc->tbInfo.iMcs; + dciInfo->dciFormatInfo.format.format0_0.harqProcId = msg3HqProc->procId; + dciInfo->dciFormatInfo.format.format0_0.freqHopFlag = FALSE; /* disabled */ + dciInfo->dciFormatInfo.format.format0_0.ndi = msg3HqProc->tbInfo.ndi; /* new transmission */ + dciInfo->dciFormatInfo.format.format0_0.rvIndex = msg3HqProc->tbInfo.rv; + dciInfo->dciFormatInfo.format.format0_0.tpcCmd = 0; //Sphoorthi TODO: check + dciInfo->dciFormatInfo.format.format0_0.sulIndicator = FALSE; /* SUL not configured */ /* Fill DCI Structure */ dciInfo->dciInfo.rnti = raCb->tcrnti; @@ -1077,7 +1077,6 @@ uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, b coreset1 = ueCb->ueCfg.spCellCfg.servCellRecfg.initDlBwp.pdcchCfg.cRSetToAddModList[0]; } - dciInfo->cellId = cellCb->cellId; dciInfo->crnti = ueCb->crnti; /* fill bwp cfg */ @@ -1103,23 +1102,25 @@ uint8_t schFillUlDci(SchUeCb *ueCb, SchPuschInfo *puschInfo, DciInfo *dciInfo, b dciInfo->coresetCfg.cceIndex = 0; /* 0-3 for UL and 4-7 for DL */ dciInfo->coresetCfg.aggregationLevel = 4; /* same as for sib1 */ - dciInfo->formatType = FORMAT0_0; + dciInfo->dciFormatInfo.formatType = FORMAT0_0; /* fill UL grant */ - dciInfo->format.format0_0.resourceAllocType = puschInfo->fdAlloc.resAllocType; - dciInfo->format.format0_0.freqAlloc.startPrb = puschInfo->fdAlloc.resAlloc.type1.startPrb; - dciInfo->format.format0_0.freqAlloc.numPrb = puschInfo->fdAlloc.resAlloc.type1.numPrb; - dciInfo->format.format0_0.timeAlloc.startSymb = puschInfo->tdAlloc.startSymb; - dciInfo->format.format0_0.timeAlloc.numSymb = puschInfo->tdAlloc.numSymb; - dciInfo->format.format0_0.rowIndex = 0; /* row Index */ - dciInfo->format.format0_0.mcs = puschInfo->tbInfo.mcs; - dciInfo->format.format0_0.harqProcId = puschInfo->harqProcId; - dciInfo->format.format0_0.puschHopFlag = FALSE; /* disabled */ - dciInfo->format.format0_0.freqHopFlag = FALSE; /* disabled */ - dciInfo->format.format0_0.ndi = puschInfo->tbInfo.ndi; /* new transmission */ - dciInfo->format.format0_0.rv = puschInfo->tbInfo.rv; - dciInfo->format.format0_0.tpcCmd = 0; //Sphoorthi TODO: check - dciInfo->format.format0_0.sUlCfgd = FALSE; /* SUL not configured */ + dciInfo->dciFormatInfo.format.format0_0.resourceAllocType = puschInfo->fdAlloc.resAllocType; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAllocType = puschInfo->fdAlloc.resAllocType; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.startPrb = \ + puschInfo->fdAlloc.resAlloc.type1.startPrb; + dciInfo->dciFormatInfo.format.format0_0.freqAlloc.resAlloc.type1.numPrb = \ + puschInfo->fdAlloc.resAlloc.type1.numPrb; + dciInfo->dciFormatInfo.format.format0_0.timeAlloc.startSymb = puschInfo->tdAlloc.startSymb; + dciInfo->dciFormatInfo.format.format0_0.timeAlloc.numSymb = puschInfo->tdAlloc.numSymb; + dciInfo->dciFormatInfo.format.format0_0.rowIndex = 0; /* row Index */ + dciInfo->dciFormatInfo.format.format0_0.mcs = puschInfo->tbInfo.mcs; + dciInfo->dciFormatInfo.format.format0_0.harqProcId = puschInfo->harqProcId; + dciInfo->dciFormatInfo.format.format0_0.freqHopFlag = FALSE; /* disabled */ + dciInfo->dciFormatInfo.format.format0_0.ndi = puschInfo->tbInfo.ndi; /* new transmission */ + dciInfo->dciFormatInfo.format.format0_0.rvIndex = puschInfo->tbInfo.rv; + dciInfo->dciFormatInfo.format.format0_0.tpcCmd = 0; //Sphoorthi TODO: check + dciInfo->dciFormatInfo.format.format0_0.sulIndicator = FALSE; /* SUL not configured */ /* Fill DCI Structure */ dciInfo->dciInfo.rnti = ueCb->crnti; diff --git a/src/cm/mac_sch_interface.h b/src/cm/mac_sch_interface.h index 5e977247c..db34fd732 100644 --- a/src/cm/mac_sch_interface.h +++ b/src/cm/mac_sch_interface.h @@ -469,6 +469,7 @@ typedef struct uint8_t totNumSsb; /*S = Total Number of Actual SSB transmitted*/ }SchSsbCfg; +/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-32 BWP Information */ typedef struct bwpCfg { uint8_t subcarrierSpacing; @@ -976,56 +977,80 @@ typedef struct schSlotValue SlotTimingInfo ulDciTime; }SchSlotValue; +typedef struct freqDomainAlloc +{ + uint8_t resAllocType; /* Resource allocation type */ + union + { + ResAllocType0 type0; + ResAllocType1 type1; + }resAlloc; +}FreqDomainAlloc; + +/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-36 DCI Format0_0 Configuration */ typedef struct format0_0 { uint8_t resourceAllocType; - /* since we are using type-1, hence rbBitmap excluded */ - FreqDomainRsrc freqAlloc; + FreqDomainAlloc freqAlloc; TimeDomainAlloc timeAlloc; uint16_t rowIndex; uint8_t mcs; - uint8_t harqProcId; /* HARQ Process ID */ - bool puschHopFlag; + uint8_t harqProcId; bool freqHopFlag; - uint8_t ndi; /* NDI */ - uint8_t rv; /* Redundancy Version */ + uint8_t ndi; + uint8_t rvIndex; uint8_t tpcCmd; - bool sUlCfgd; + bool sulIndicator; }Format0_0; +/* Reference -> O-RAN.WG8.AAD.0-v07.00, Table 9-40 DCI Format 0_1 Configuration */ typedef struct format0_1 { -/* TBD */ - + uint8_t carrierIndicator; + bool sulIndicator; + uint8_t bwpIndicator; + uint8_t resourceAlloc; + FreqDomainRsrc freqAlloc; + TimeDomainAlloc timeAlloc; + uint16_t rowIndex; + uint8_t mcs; + uint8_t harqProcId; + bool freqHopFlag; + uint8_t ndi; + uint8_t rvIndex; + uint8_t firstDownlinkAssignmentIndex; + uint8_t secondDownlinkAssignmentIndex; + uint8_t tpcCommand; + uint8_t srsResourceSetIndicator; + uint8_t srsResourceIndicator; + uint8_t tpmi; + uint8_t antennaPorts; + uint8_t srsRequest; + uint8_t csiRequest; + uint8_t cbgTransmissionInfo; + uint8_t ptrsDmrs; + uint8_t betaOffsetIndicator; + bool dmrsSequenceInitialization; + bool ulschIndicatior; }Format0_1; -typedef struct format1_0 +typedef struct dciFormat { -/* TBD */ - -}Format1_0; - -typedef struct format1_1 -{ -/* TBD */ -}Format1_1; - -typedef struct dciInfo -{ - uint16_t cellId; - uint16_t crnti; /* CRNI */ - SlotTimingInfo slotIndInfo; /* Slot Info: sfn, slot number */ - BwpCfg bwpCfg; /* BWP Cfg */ - CoresetCfg coresetCfg; /* Coreset1 Cfg */ - FormatType formatType; /* DCI Format */ + FormatType formatType; /* DCI Format */ union { Format0_0 format0_0; /* Format 0_0 */ Format0_1 format0_1; /* Format 0_1 */ - Format1_0 format1_0; /* Format 1_0 */ - Format1_1 format1_1; /* Format 1_1 */ }format; - DlDCI dciInfo; +}DciFormat; + +typedef struct dciInfo +{ + uint16_t crnti; /* CRNTI */ + BwpCfg bwpCfg; /* BWP Cfg */ + CoresetCfg coresetCfg; /* Coreset1 Cfg */ + DciFormat dciFormatInfo; /* Dci Format */ + DlDCI dciInfo; /* DlDCI */ }DciInfo; @@ -1074,16 +1099,6 @@ typedef struct tbInfo SchMcsTable mcsTable; /* MCS Table */ }TbInfo; -typedef struct freqDomainAlloc -{ - uint8_t resAllocType; /* Resource allocation type */ - union - { - ResAllocType0 type0; - ResAllocType1 type1; - }resAlloc; -}FreqDomainAlloc; - typedef struct schPuschInfo { uint8_t harqProcId; /* HARQ Process ID */