[Epic-ID:ODUHIGH-557][Task-ID:ODUHIGH-639] Few fixes related to RAR related to byte... 57/14357/2
authorsvaidhya <svaidhya@radisys.com>
Wed, 30 Apr 2025 08:22:24 +0000 (08:22 +0000)
committersvaidhya <svaidhya@radisys.com>
Tue, 13 May 2025 06:42:24 +0000 (06:42 +0000)
Change-Id: I61a88b04e6a0a358ed4e7e715b43762da6c4084f
Signed-off-by: svaidhya <svaidhya@radisys.com>
build/config/tdd_odu_config.xml
src/5gnrmac/lwr_mac_fsm.c
src/5gnrmac/lwr_mac_handle_phy.c
src/5gnrsch/sch.h
src/5gnrsch/sch_msg_router.c
src/5gnrsch/sch_rach.c
src/du_app/du_ue_mgr.c

index 4082c15..7fdfff0 100644 (file)
                      <PDSCH_LENGTH_SYMBOL>13</PDSCH_LENGTH_SYMBOL>
                   </PDSCH_TIME_DOM_RSRC_ALLOC>
                   <PDSCH_TIME_DOM_RSRC_ALLOC>
-                     <K0>1</K0>
+                     <K0>0</K0>
                      <MAP_TYPE>0</MAP_TYPE>
                      <PDSCH_START_SYMBOL>1</PDSCH_START_SYMBOL>
                      <PDSCH_LENGTH_SYMBOL>13</PDSCH_LENGTH_SYMBOL>
                      <PDSCH_LENGTH_SYMBOL>11</PDSCH_LENGTH_SYMBOL>
                   </PDSCH_COMM_TIME_ALLOC>
                   <PDSCH_COMM_TIME_ALLOC>
-                     <PDSCH_K0_CFG>1</PDSCH_K0_CFG>
+                     <PDSCH_K0_CFG>0</PDSCH_K0_CFG>
                      <PDSCH_MAPPING_TYPE>0</PDSCH_MAPPING_TYPE>
                      <PDSCH_START_SYMBOL>3</PDSCH_START_SYMBOL>
                      <PDSCH_LENGTH_SYMBOL>11</PDSCH_LENGTH_SYMBOL>
    </E2AP_CFG>
    <GLOBAL_CFG>
       <RADIO_FRAME_DURATION>10</RADIO_FRAME_DURATION>
-      <PHY_DELTA_DL>2</PHY_DELTA_DL>
+      <PHY_DELTA_DL>1</PHY_DELTA_DL>
       <PHY_DELTA_UL>0</PHY_DELTA_UL>
       <ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL>5</ODU_UE_THROUGHPUT_PRINT_TIME_INTERVAL>
       <ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL>60000</ODU_SNSSAI_THROUGHPUT_PRINT_TIME_INTERVAL>
index adb87e7..1552a07 100644 (file)
@@ -2366,7 +2366,7 @@ void packUlTtiReq(fapi_ul_tti_req_t *ulTtiReq,uint8_t *out, uint32_t *len)
                                        CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.nrOfSymbols, &mBuf, &totalLen);
 
                                        //Fill fapi_pusch_data_t
-                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap &0x01))
+                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap) &0x01)
                                        {
                                        CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschData.rvIndex, &mBuf, &totalLen);
                                        CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschData.harqProcessId, &mBuf, &totalLen);
@@ -2381,7 +2381,7 @@ void packUlTtiReq(fapi_ul_tti_req_t *ulTtiReq,uint8_t *out, uint32_t *len)
                                        }
                                        }
                                        //Fill fapi_pusch_uci_t
-                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap &0x02))
+                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap) &0x02)
                                        {
                                                CMCHKPKLEN(oduPackPostUInt16, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschUci.harqAckBitLength, &mBuf, &totalLen);
                                                CMCHKPKLEN(oduPackPostUInt16, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschUci.csiPart1BitLength, &mBuf, &totalLen);
@@ -2393,7 +2393,7 @@ void packUlTtiReq(fapi_ul_tti_req_t *ulTtiReq,uint8_t *out, uint32_t *len)
                                        }
 
                                        //Fill fapi_pusch_ptrs_t
-                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap &0x04))
+                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap) &0x04)
                                        {
                                                CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschPtrs.numPtrsPorts, &mBuf, &totalLen);
                                                for(uint8_t portIdx = 0; portIdx < ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschPtrs.numPtrsPorts; portIdx++)
@@ -2407,7 +2407,7 @@ void packUlTtiReq(fapi_ul_tti_req_t *ulTtiReq,uint8_t *out, uint32_t *len)
                                                CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.puschPtrs.ulPtrsPower, &mBuf, &totalLen);
                                        }
                                        //Fill fapi_dfts_ofdm_t
-                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap &0x08))
+                                       if(reverseBytes16(ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.pduBitMap) &0x08)
                                        {
                                                CMCHKPKLEN(oduPackPostUInt8, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.dftsOfdm.lowPaprGroupNumber, &mBuf, &totalLen);
                                                CMCHKPKLEN(oduPackPostUInt16, ulTtiReq->pdus[pduIdx].pdu.pusch_pdu.dftsOfdm.lowPaprSequenceNumber, &mBuf, &totalLen);
@@ -3947,7 +3947,7 @@ void fillRarDlDciPdu(fapi_dl_dci_t *dlDciPtr, PdcchCfg *rarPdcchInfo)
       }
 
 #ifdef OAI_TESTING 
-      dlDciPtr[0].payloadSizeBits = reverseBytes16(dlDciPtr[0].payloadSizeBits);
+      dlDciPtr[0].payloadSizeBits = reverseBytes16(39);
 #endif
       /* Initialize buffer */
       for(bytePos = 0; bytePos < numBytes; bytePos++)
@@ -3969,6 +3969,8 @@ void fillRarDlDciPdu(fapi_dl_dci_t *dlDciPtr, PdcchCfg *rarPdcchInfo)
            tbScaling, tbScalingSize);
       fillDlDciPayload(dlDciPtr[0].payload, &bytePos, &bitPos,\
            reserved, reservedSize);
+      dlDciPtr[0].payload[4] = 0x15;
+
    }
 } /* fillRarDlDciPdu */
 
@@ -4905,13 +4907,13 @@ uint8_t fillRarTxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, RarInfo
    uint8_t tlvPaddingLen =get_tlv_padding(rarInfo->rarPduLen);
    uint16_t totalLen= rarInfo->rarPduLen +tlvPaddingLen;
    pduDesc[pduIndex].pdu_length = totalLen;
-   pduDesc[pduIndex].pdu_length = reverseBytes16(pduDesc[pduIndex].pdu_length);
+   pduDesc[pduIndex].pdu_length = reverseBytes32(pduDesc[pduIndex].pdu_length);
 
    pduDesc[pduIndex].pdu_index = reverseBytes16(pduIndex);
    pduDesc[pduIndex].num_tlvs = reverseBytes32(1);
    /* fill the TLV */
    pduDesc[pduIndex].tlvs[0].tag = reverseBytes16(FAPI_TX_DATA_PAYLOAD);
-   pduDesc[pduIndex].tlvs[0].length = reverseBytes16(rarInfo->rarPduLen);
+   pduDesc[pduIndex].tlvs[0].length = reverseBytes32(rarInfo->rarPduLen);
 
    memcpy(pduDesc[pduIndex].tlvs[0].value.direct, rarInfo->rarPdu, rarInfo->rarPduLen);
 
@@ -5922,7 +5924,7 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
 {
    if(ulTtiReqPdu != NULLP)
    {
-      memset(&ulTtiReqPdu->pdu.pusch_pdu, 0, sizeof(fapi_ul_pusch_pdu_t));
+//      memset(&ulTtiReqPdu->pdu.pusch_pdu, 0, sizeof(fapi_ul_pusch_pdu_t));
 #ifdef OAI_TESTING
       ulTtiReqPdu->pduType = reverseBytes16(PUSCH_PDU_TYPE);
       ulTtiReqPdu->pduSize = reverseBytes16(sizeof(fapi_ul_pusch_pdu_t));
index c49934a..d78556d 100644 (file)
@@ -205,23 +205,37 @@ uint8_t procRachInd(fapi_rach_indication_t  *fapiRachInd)
       return RFAILED;
    }
    rachInd->cellId = lwrMacCb.cellCb[0].cellId;
+#ifndef OAI_TESTING
    rachInd->timingInfo.sfn = fapiRachInd->sfn;
    rachInd->timingInfo.slot = fapiRachInd->slot;
+#else
+   rachInd->timingInfo.sfn = reverseBytes16(fapiRachInd->sfn);
+   rachInd->timingInfo.slot = reverseBytes16(fapiRachInd->slot);
+#endif
    rachInd->numPdu = fapiRachInd->numPdus;
    for(pduIdx=0; pduIdx < rachInd->numPdu; pduIdx++)
    {
       rachPdu = &rachInd->rachPdu[pduIdx];
+#ifndef OAI_TESTING
       rachPdu->pci = fapiRachInd->rachPdu[pduIdx].phyCellId;
+#else
+      rachPdu->pci = reverseBytes16(fapiRachInd->rachPdu[pduIdx].phyCellId);
+#endif
       rachPdu->symbolIdx = fapiRachInd->rachPdu[pduIdx].symbolIndex;
       rachPdu->slotIdx = fapiRachInd->rachPdu[pduIdx].slotIndex;
       rachPdu->freqIdx = fapiRachInd->rachPdu[pduIdx].freqIndex;
-      rachPdu->numPream = fapiRachInd->rachPdu[pduIdx].numPreamble; 
+      rachPdu->numPream = fapiRachInd->rachPdu[pduIdx].numPreamble;
       for(prmbleIdx=0; prmbleIdx<rachPdu->numPream; prmbleIdx++)
       {
         rachPdu->preamInfo[prmbleIdx].preamIdx = \
            fapiRachInd->rachPdu[pduIdx].preambleInfo[prmbleIdx].preambleIndex;
+#ifndef OAI_TESTING
         rachPdu->preamInfo[prmbleIdx].timingAdv = \
            fapiRachInd->rachPdu[pduIdx].preambleInfo[prmbleIdx].timingAdvance;
+#else
+        rachPdu->preamInfo[prmbleIdx].timingAdv = \
+           reverseBytes16(fapiRachInd->rachPdu[pduIdx].preambleInfo[prmbleIdx].timingAdvance);
+#endif
       }
    }
 
@@ -268,26 +282,43 @@ uint8_t procCrcInd(fapi_crc_ind_t  *fapiCrcInd)
    }
 
    crcInd->cellId = lwrMacCb.cellCb[0].cellId;
+#ifndef OAI_TESTING
    crcInd->timingInfo.sfn = fapiCrcInd->sfn;
    crcInd->timingInfo.slot = fapiCrcInd->slot;
    crcInd->numCrc = fapiCrcInd->numCrcs;
+#else
+   crcInd->timingInfo.sfn = reverseBytes16(fapiCrcInd->sfn);
+   crcInd->timingInfo.slot = reverseBytes16(fapiCrcInd->slot);
+   crcInd->numCrc = reverseBytes16(fapiCrcInd->numCrcs);
+#endif
 
    for(crcInfoIdx = 0; crcInfoIdx < crcInd->numCrc; crcInfoIdx++)
    {
       crcIndInfo = &crcInd->crcInfo[crcInfoIdx];
+#ifndef OAI_TESTING
       crcIndInfo->handle      = fapiCrcInd->crc[crcInfoIdx].handle;
       crcIndInfo->rnti        = fapiCrcInd->crc[crcInfoIdx].rnti;
+      crcIndInfo->numCb       = fapiCrcInd->crc[crcInfoIdx].numCb;
+#else
+      crcIndInfo->handle      = reverseBytes32(fapiCrcInd->crc[crcInfoIdx].handle);
+      crcIndInfo->rnti        = reverseBytes16(fapiCrcInd->crc[crcInfoIdx].rnti);
+      crcIndInfo->numCb       = reverseBytes16(fapiCrcInd->crc[crcInfoIdx].numCb);
+#endif
       crcIndInfo->harqId      = fapiCrcInd->crc[crcInfoIdx].harqId;
       crcIndInfo->tbCrcStatus = fapiCrcInd->crc[crcInfoIdx].tbCrcStatus;
-      crcIndInfo->numCb       = fapiCrcInd->crc[crcInfoIdx].numCb;
       for(crcStatusIdx = 0; crcStatusIdx < crcIndInfo->numCb; crcStatusIdx++)
       {
         crcIndInfo->cbCrcStatus[crcStatusIdx] = \
            fapiCrcInd->crc[crcInfoIdx].cbCrcStatus[crcStatusIdx];
       }
       crcIndInfo->ul_cqi  = fapiCrcInd->crc[crcInfoIdx].ul_cqi;
+#ifndef OAI_TESTING
       crcIndInfo->timingAdvance = fapiCrcInd->crc[crcInfoIdx].timingAdvance;
       crcIndInfo->rssi = fapiCrcInd->crc[crcInfoIdx].rssi;
+#else
+      crcIndInfo->timingAdvance = reverseBytes16(fapiCrcInd->crc[crcInfoIdx].timingAdvance);
+      crcIndInfo->rssi = reverseBytes16(fapiCrcInd->crc[crcInfoIdx].rssi);
+#endif
    }
 
    /* Fill post and sent to MAC */
@@ -332,20 +363,33 @@ uint8_t procRxDataInd(fapi_rx_data_indication_t  *fapiRxDataInd)
    }
 
    rxDataInd->cellId = lwrMacCb.cellCb[0].cellId;
+#ifndef OAI_TESTING
    rxDataInd->timingInfo.sfn = fapiRxDataInd->sfn; 
    rxDataInd->timingInfo.slot = fapiRxDataInd->slot;
    rxDataInd->numPdus = fapiRxDataInd->numPdus;
-
+#else
+   rxDataInd->timingInfo.sfn = reverseBytes16(fapiRxDataInd->sfn); 
+   rxDataInd->timingInfo.slot = reverseBytes16(fapiRxDataInd->slot);
+   rxDataInd->numPdus = reverseBytes16(fapiRxDataInd->numPdus);
+#endif
    for(pduIdx = 0; pduIdx < rxDataInd->numPdus; pduIdx++)
    {
       pdu = &rxDataInd->pdus[pduIdx];
+#ifndef OAI_TESTING
       pdu->handle = fapiRxDataInd->pdus[pduIdx].handle;
       pdu->rnti = fapiRxDataInd->pdus[pduIdx].rnti;
-      pdu->harqId = fapiRxDataInd->pdus[pduIdx].harqId;
       pdu->pduLength = fapiRxDataInd->pdus[pduIdx].pdu_length;
-      pdu->ul_cqi = fapiRxDataInd->pdus[pduIdx].ul_cqi;
       pdu->timingAdvance = fapiRxDataInd->pdus[pduIdx].timingAdvance;
       pdu->rssi = fapiRxDataInd->pdus[pduIdx].rssi;
+#else
+      pdu->handle = reverseBytes32(fapiRxDataInd->pdus[pduIdx].handle);
+      pdu->rnti = reverseBytes16(fapiRxDataInd->pdus[pduIdx].rnti);
+      pdu->pduLength = reverseBytes16(fapiRxDataInd->pdus[pduIdx].pdu_length);
+      pdu->timingAdvance = reverseBytes16(fapiRxDataInd->pdus[pduIdx].timingAdvance);
+      pdu->rssi = reverseBytes16(fapiRxDataInd->pdus[pduIdx].rssi);
+#endif
+      pdu->harqId = fapiRxDataInd->pdus[pduIdx].harqId;
+      pdu->ul_cqi = fapiRxDataInd->pdus[pduIdx].ul_cqi;
 
       MAC_ALLOC_SHRABL_BUF(pdu->pduData, pdu->pduLength);
       memcpy(pdu->pduData, fapiRxDataInd->pdus[pduIdx].pduData, pdu->pduLength);
@@ -382,14 +426,21 @@ uint8_t fillUciIndPucchF0F1(UciPucchF0F1 *pduInfo, fapi_uci_o_pucch_f0f1_t *fapi
 
    uint8_t harqIdx;
    uint8_t ret = ROK;
-   
+
+#ifndef OAI_TESTING
    pduInfo->handle        = fapiPduInfo->handle;
-   pduInfo->pduBitmap     = fapiPduInfo->pduBitmap;
-   pduInfo->pucchFormat   = fapiPduInfo->pucchFormat;
-   pduInfo->ul_cqi        = fapiPduInfo->ul_cqi;
    pduInfo->crnti         = fapiPduInfo->rnti;
    pduInfo->timingAdvance = fapiPduInfo->timingAdvance;
    pduInfo->rssi          = fapiPduInfo->rssi;   
+#else
+   pduInfo->handle        = reverseBytes32(fapiPduInfo->handle);
+   pduInfo->crnti         = reverseBytes16(fapiPduInfo->rnti);
+   pduInfo->timingAdvance = reverseBytes16(fapiPduInfo->timingAdvance);
+   pduInfo->rssi          = reverseBytes16(fapiPduInfo->rssi);   
+#endif
+   pduInfo->pduBitmap     = fapiPduInfo->pduBitmap;
+   pduInfo->pucchFormat   = fapiPduInfo->pucchFormat;
+   pduInfo->ul_cqi        = fapiPduInfo->ul_cqi;
    if(fapiPduInfo->srInfo.srIndication)
    {
       pduInfo->srInfo.srIndPres = fapiPduInfo->srInfo.srIndication;
@@ -441,13 +492,24 @@ uint8_t procUciInd(fapi_uci_indication_t  *fapiUciInd)
    DU_LOG("\nDEBUG  -->  LWR_MAC: Processing UCI Indication");
    memset(macUciInd, 0, sizeof(UciInd));
    macUciInd->cellId = lwrMacCb.cellCb[0].cellId;
+#ifndef OAI_TESTING 
    macUciInd->slotInd.sfn = fapiUciInd->sfn; 
    macUciInd->slotInd.slot = fapiUciInd->slot;
    macUciInd->numUcis = fapiUciInd->numUcis;
-
+#else
+   macUciInd->slotInd.sfn = reverseBytes16(fapiUciInd->sfn); 
+   macUciInd->slotInd.slot = reverseBytes16(fapiUciInd->slot);
+   macUciInd->numUcis = reverseBytes16(fapiUciInd->numUcis);
+#endif
    for(pduIdx = 0; pduIdx < macUciInd->numUcis; pduIdx++)
    {
+#ifndef OAI_TESTING 
       macUciInd->pdus[pduIdx].pduType = fapiUciInd->uciPdu[pduIdx].pduType;
+      macUciInd->pdus[pduIdx].pduSize = fapiUciInd->uciPdu[pduIdx].pduSize;
+#else
+      macUciInd->pdus[pduIdx].pduType = reverseBytes16(fapiUciInd->uciPdu[pduIdx].pduType);
+      macUciInd->pdus[pduIdx].pduSize = reverseBytes16(fapiUciInd->uciPdu[pduIdx].pduSize);
+#endif
       switch(macUciInd->pdus[pduIdx].pduType)
       {
          case UCI_IND_PUSCH:
@@ -455,7 +517,6 @@ uint8_t procUciInd(fapi_uci_indication_t  *fapiUciInd)
          case UCI_IND_PUCCH_F0F1:
          {
             UciPucchF0F1 *pduInfo = NULLP;
-            macUciInd->pdus[pduIdx].pduSize = fapiUciInd->uciPdu[pduIdx].pduSize;
             pduInfo = &macUciInd->pdus[pduIdx].uci.uciPucchF0F1;
             ret = fillUciIndPucchF0F1(pduInfo, &fapiUciInd->uciPdu[pduIdx].uci.uciPucchF0F1);
          }
index 20ff586..11a7702 100644 (file)
@@ -37,7 +37,7 @@
 
 #define SCHED_DELTA 1
 #define BO_DELTA 1
-#define RAR_DELAY   2
+#define RAR_DELAY   1
 #define MSG4_DELAY  1
 #define PDSCH_START_RB 10
 /* Considering pdsch region from 3 to 13, DMRS exclued.
index 4cbd958..48d3fa9 100755 (executable)
@@ -180,7 +180,7 @@ void callFlowSchMsgRouter(Pst *pst)
             strcpy(message,"EVENT_DL_CQI_TO_SCH");
             break;
          }
-      case EVENT_PHR_IND_TO_SCH
+      case EVENT_PHR_IND_TO_SCH:
          {
             strcpy(message,"EVENT_PHR_IND_TO_SCH");
          }
index 3ce6c74..e051824 100644 (file)
@@ -913,6 +913,7 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
    uint8_t  dmrsStartSymbol, startSymbol, numSymbol ;
    uint16_t numRbs = 0;
    uint16_t tbSize = 0;
+   uint8_t freqDomainResource[FREQ_DOM_RSRC_SIZE] = {0};
    PdschCfg *pdsch;
 
    SchBwpDlCfg *initialBwp = &cell->cellCfg.dlCfgCommon.schInitialDlBwp;
@@ -942,16 +943,27 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
    }
 
    /* fill BWP */
+#ifndef OAI_TESTING
    bwp->freqAlloc.numPrb   = initialBwp->bwp.freqAlloc.numPrb;
    bwp->freqAlloc.startPrb = initialBwp->bwp.freqAlloc.startPrb;
+   pdcch->coresetCfg.durationSymbols = numSymbols;
+#else
+   bwp->freqAlloc.numPrb   = 48;
+   bwp->freqAlloc.startPrb = 110;
+   pdcch->coresetCfg.durationSymbols = 1;
+#endif
    bwp->subcarrierSpacing  = initialBwp->bwp.scs;
    bwp->cyclicPrefix       = initialBwp->bwp.cyclicPrefix;
 
    /* fill the PDCCH PDU */
    pdcch->coresetCfg.startSymbolIndex = firstSymbol;
-   pdcch->coresetCfg.durationSymbols = numSymbols;
+#ifndef OAI_TESTING
    memcpy(pdcch->coresetCfg.freqDomainResource, \
       cell->cellCfg.dlCfgCommon.schInitialDlBwp.pdcchCommon.commonSearchSpace.freqDomainRsrc, FREQ_DOM_RSRC_SIZE);
+#else
+   freqDomainResource[0]=255; 
+   memcpy(pdcch->coresetCfg.freqDomainResource,freqDomainResource, FREQ_DOM_RSRC_SIZE);
+#endif
 
    pdcch->coresetCfg.cceRegMappingType = 1; /* coreset0 is always interleaved */
    pdcch->coresetCfg.regBundleSize = 6;    /* spec-38.211 sec 7.3.2.2 */
@@ -964,15 +976,15 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
    pdcch->dci[0].rnti = cell->raReq[ueId-1]->raRnti; /* RA-RNTI */
    pdcch->dci[0].scramblingId = cell->cellCfg.phyCellId;
    pdcch->dci[0].scramblingRnti = 0;
-   pdcch->dci[0].cceIndex = 4; /* considering SIB1 is sent at cce 0-1-2-3 */
+   pdcch->dci[0].cceIndex = 0; /* considering SIB1 is sent at cce 0-1-2-3 */
    pdcch->dci[0].aggregLevel = 4;
-   pdcch->dci[0].beamPdcchInfo.numPrgs = 1;
-   pdcch->dci[0].beamPdcchInfo.prgSize = 1;
-   pdcch->dci[0].beamPdcchInfo.digBfInterfaces = 0;
+   pdcch->dci[0].beamPdcchInfo.numPrgs = 0;
+   pdcch->dci[0].beamPdcchInfo.prgSize = 0;
+   pdcch->dci[0].beamPdcchInfo.digBfInterfaces = 1;
    pdcch->dci[0].beamPdcchInfo.prg[0].pmIdx = 0;
    pdcch->dci[0].beamPdcchInfo.prg[0].beamIdx[0] = 0;
    pdcch->dci[0].txPdcchPower.beta_pdcch_1_0 = 0;
-   pdcch->dci[0].txPdcchPower.powerControlOffsetSS = 0;
+   pdcch->dci[0].txPdcchPower.powerControlOffsetSS = 1;
 
    pdsch = &pdcch->dci[0].pdschCfg;
    /* fill the PDSCH PDU */
@@ -983,31 +995,37 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
    pdsch->numCodewords = 1;
    for(cwCount = 0; cwCount < pdsch->numCodewords; cwCount++)
    {
-      pdsch->codeword[cwCount].targetCodeRate = 308;
+      pdsch->codeword[cwCount].targetCodeRate = 1200;
       pdsch->codeword[cwCount].qamModOrder = 2;
-      pdsch->codeword[cwCount].mcsIndex = mcs; /* mcs configured to 4 */
+      pdsch->codeword[cwCount].mcsIndex = 0; /* mcs configured to 4 */
       pdsch->codeword[cwCount].mcsTable = 0;   /* notqam256 */
       pdsch->codeword[cwCount].rvIndex = 0;
       /* RAR PDU length and FAPI payload header length */
       tbSize = schCalcTbSize(RAR_PAYLOAD_SIZE + TX_PAYLOAD_HDR_LEN);
       pdsch->codeword[cwCount].tbSize = tbSize;
+#ifdef OAI_TESTING
+      pdsch->codeword[cwCount].tbSize = 28;
+#endif
    }
    pdsch->dataScramblingId = cell->cellCfg.phyCellId;
    pdsch->numLayers = 1;
    pdsch->transmissionScheme = 0;
    pdsch->refPoint = 0;
-   pdsch->dmrs.dlDmrsSymbPos = DL_DMRS_SYMBOL_POS
+   pdsch->dmrs.dlDmrsSymbPos = 2180
    pdsch->dmrs.dmrsConfigType = 0; /* type-1 */
    pdsch->dmrs.dlDmrsScramblingId = cell->cellCfg.phyCellId;
    pdsch->dmrs.scid = 0;
-   pdsch->dmrs.numDmrsCdmGrpsNoData = 1;
-   pdsch->dmrs.dmrsPorts = 0;
+   pdsch->dmrs.numDmrsCdmGrpsNoData = 2;
+   pdsch->dmrs.dmrsPorts = 1;
    pdsch->dmrs.mappingType      = DMRS_MAP_TYPE_A;  /* Type-A */
    pdsch->dmrs.nrOfDmrsSymbols  = NUM_DMRS_SYMBOLS;
    pdsch->dmrs.dmrsAddPos       = DMRS_ADDITIONAL_POS;
 
    pdsch->pdschTimeAlloc.rowIndex = k0Index;
    pdsch->pdschTimeAlloc.startSymb = initialBwp->pdschCommon.timeDomRsrcAllocList[k0Index].startSymbol;
+#ifdef OAI_TESTING
+   pdsch->pdschTimeAlloc.startSymb = 1;
+#endif
    pdsch->pdschTimeAlloc.numSymb = initialBwp->pdschCommon.timeDomRsrcAllocList[k0Index].lengthSymbol;
 
    pdsch->pdschFreqAlloc.vrbPrbMapping = 0; /* non-interleaved */
@@ -1016,6 +1034,10 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
    pdsch->pdschFreqAlloc.numPrb = \
       schCalcNumPrb(tbSize, mcs, initialBwp->pdschCommon.timeDomRsrcAllocList[k0Index].lengthSymbol);
 
+#ifdef OAI_TESTING
+   pdsch->pdschFreqAlloc.startPrb = 0;
+   pdsch->pdschFreqAlloc.numPrb = 8;
+#endif
    /* Find total symbols occupied including DMRS */
    dmrsStartSymbol = findDmrsStartSymbol(pdsch->dmrs.dlDmrsSymbPos);
    /* If there are no DRMS symbols, findDmrsStartSymbol() returns MAX_SYMB_PER_SLOT, 
@@ -1041,8 +1063,8 @@ uint8_t schFillRar(SchCellCb *cell, SlotTimingInfo rarTime, uint16_t ueId, RarAl
       return RFAILED;
    }
 
-   pdsch->beamPdschInfo.numPrgs = 1;
-   pdsch->beamPdschInfo.prgSize = 1;
+   pdsch->beamPdschInfo.numPrgs = 0;
+   pdsch->beamPdschInfo.prgSize = 0;
    pdsch->beamPdschInfo.digBfInterfaces = 0;
    pdsch->beamPdschInfo.prg[0].pmIdx = 0;
    pdsch->beamPdschInfo.prg[0].beamIdx[0] = 0;
index c3e2d1d..ac6229f 100644 (file)
@@ -778,7 +778,7 @@ uint8_t fillDefaultInitDlBwp(InitialDlBwp *initDlBwp)
          }
          if(initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].k0)
          {
-            *(initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].k0) = 1;
+            *(initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].k0) = 0;
          }
          initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].mappingType = MAPPING_TYPEA;
          initDlBwp->pdschCfg.timeDomRsrcAllociList[idx].startSymbol = PDSCH_START_SYMBOL;