# macro for output file name and makefile name
#
-PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DINTEL_WLS -DEGTP_TEST
+PLTFRM_FLAGS= -UMSPD -DODU -DINTEL_FAPI #-DODU_SLOT_IND_DEBUG_LOG #-DINTEL_WLS -DEGTP_TEST
ifeq ($(MODE),TDD)
PLTFRM_FLAGS += -DMODE=TDD
numPduEncoded++;
}
printf("\033[1;34m");
- DU_LOG("\nLWR_MAC: SIB1 sent...");
+ DU_LOG("\nLWR_MAC: SIB1 sent...");
printf("\033[0m");
}
}
fillPdcchPdu(&dlTtiReq->pdus[numPduEncoded], \
&currDlSlot->dlInfo, rntiType, CORESET_TYPE1);
DU_LOG("\nLWR_MAC: DL MSG sent...");
- }
+ }
printf("\033[0m");
numPduEncoded++;
msgLen = sizeof(fapi_dl_tti_req_t) - sizeof(fapi_msg_t);
fillMsgHeader(&dlTtiReq->header, FAPI_DL_TTI_REQUEST, msgLen);
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+ DU_LOG("\nLWR_MAC: Sending DL TTI Request");
+#endif
LwrMacSendToPhy(dlTtiReq->header.msg_id, sizeof(fapi_dl_tti_req_t), \
(void *)dlTtiReq);
{
msgLen = sizeof(fapi_dl_tti_req_t) - sizeof(fapi_msg_t);
fillMsgHeader(&dlTtiReq->header, FAPI_DL_TTI_REQUEST, msgLen);
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+ DU_LOG("\nLWR_MAC: Sending DL TTI Request");
+#endif
LwrMacSendToPhy(dlTtiReq->header.msg_id, sizeof(fapi_dl_tti_req_t), (void *)dlTtiReq);
}
memset(currDlSlot, 0, sizeof(MacDlSlot));
msgLen = txDataReqMsgSize - sizeof(fapi_msg_t);
fillMsgHeader(&txDataReq->header, FAPI_TX_DATA_REQUEST, msgLen);
+ DU_LOG("\nLWR_MAC: Sending TX DATA Request");
LwrMacSendToPhy(txDataReq->header.msg_id, txDataReqMsgSize, \
(void *)txDataReq);
}
}
msgLen = sizeof(fapi_ul_tti_req_t) - sizeof(fapi_msg_t);
fillMsgHeader(&ulTtiReq->header, FAPI_UL_TTI_REQUEST, msgLen);
-
- DU_LOG("\nLWR_MAC: Sending UL TTI Request");
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+ DU_LOG("\nLWR_MAC: Sending UL TTI Request");
+#endif
LwrMacSendToPhy(ulTtiReq->header.msg_id, msgSize, (void *)ulTtiReq);
memset(currUlSlot, 0, sizeof(MacUlSlot));
case MAC_LCID_MIN ... MAC_LCID_MAX :
{
DU_LOG("\nMAC : PDU received for LC ID %d", lcId);
-
pduLen--;
idx++;
{
uint16_t cellIdx;
CrcIndInfo crcIndInfo;
-
DU_LOG("\nMAC : Received CRC indication");
-
GET_CELL_IDX(crcInd->cellId, cellIdx);
/* Considering one pdu and one preamble */
crcIndInfo.cellId = macCb.macCell[cellIdx]->cellId;;
uint8_t fapiMacRxDataInd(Pst *pst, RxDataInd *rxDataInd)
{
uint16_t pduIdx;
-
DU_LOG("\nMAC : Received Rx Data indication");
-
/* TODO : compare the handle received in RxDataInd with handle send in PUSCH
* PDU, which is stored in raCb */
DU_LOG("\nMAC: Received DL data for sfn=%d slot=%d", \
dlData->slotInfo.sfn, dlData->slotInfo.slot);
-
/* Copy the pdus to be muxed into mac Dl data */
macDlData.numPdu = dlData->numPdu;
for(pduIdx = 0; pduIdx < dlData->numPdu; pduIdx++)
DU_LOG("\nMAC: Memory allocation failure in sendSchResultRepToRlc");
return RFAILED;
}
- DU_LOG("\nMAC: Send scheduled result report for sfn %d slot %d", slotInfo.sfn, slotInfo.slot);
+ DU_LOG("\nMAC: Send scheduled result report for sfn %d slot %d", slotInfo.sfn, slotInfo.slot);
schedRpt->cellId = dlInfo.cellId;
schedRpt->rnti = dlInfo.dlMsgAlloc->crnti;
schedRpt->numLc = dlInfo.dlMsgAlloc->numLc;
uint8_t ret;
VOLATILE uint32_t startTime=0;
+#ifdef ODU_SLOT_IND_DEBUG_LOG
DU_LOG("\nMAC : Slot Indication received");
-
+#endif
/*starting Task*/
ODU_START_TASK(&startTime, PID_MAC_TTI_IND);
RLC_SHRABL_STATIC_BUF_FREE(rlckwuSap->pst.region, rlckwuSap->pst.pool, discSduInfo, sizeof(KwuDiscSduInfo));
}
-
DU_LOG("\nRLC: rlcAssembleSdus: BO after assembly = %d UEID:%d CELLID:%d",
amDl->bo, rbCb->rlcId.ueId, rbCb->rlcId.cellId);
-
return;
}
{
Pst pst;
RrcDeliveryReport *rrcDelivery;
-
+
DU_LOG("\nRLC : Filling the RRC Delivery Report");
RLC_ALLOC_SHRABL_BUF(RLC_MEM_REGION_UL, RLC_POOL, rrcDelivery, sizeof(RrcDeliveryReport));
RguCDatIndInfo *cLchUlDat; /* UL data on common logical channel */
/* Initializing dedicated logical channel Database */
+ DU_LOG("\nRLC: Received UL Data request from MAC");
for(idx = 0; idx < MAX_NUM_LC; idx++)
{
dLchData[idx].lcId = idx;
RguDStaIndInfo *dLchSchInfo; /* Dedicated logical channel scheduling result */
DU_LOG("\nRLC : Received scheduling report from MAC");
-
for(idx=0; idx < schRep->numLc; idx++)
{
/* If it is common channel, fill status indication information
Inst inst = pst->dstInst-SCH_INST_START;
DU_LOG("\nSCH : Received RLC BO Status indication");
-
cell = schCb[inst].cells[inst];
GET_UE_IDX(dlBoInfo->crnti, ueIdx);
uint8_t lcgIdx;
DU_LOG("\nSCH : Received BSR");
-
cellCb = schCb[schInst].cells[schInst];
ueCb = schGetUeCb(cellCb, bsrInd->crnti);
SchCellCb *cellCb = schCb[inst].cells[inst];
DU_LOG("\nSCH : Received SR");
+
ueCb = schGetUeCb(cellCb, uciInd->crnti);
if(uciInd->numSrBits)
* ****************************************************************/
uint8_t duHandleSlotInd(Pst *pst, SlotIndInfo *slotInfo)
{
-
- DU_LOG("\nDU APP : Slot Indication received");
-
if(slotInfo->cellId <=0 || slotInfo->cellId > MAX_NUM_CELL)
{
DU_LOG("\nDU APP : Invalid Cell Id %d", slotInfo->cellId);
}
if(!duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd)
{
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+ DU_LOG("\nDU APP : Slot Indication received");
+#endif
duCb.actvCellLst[slotInfo->cellId-1]->firstSlotIndRcvd = true;
if((duCb.actvCellLst[slotInfo->cellId-1] != NULL) && \
(duCb.actvCellLst[slotInfo->cellId-1]->cellStatus == \
bool ueCcchCtxtFound = false;
DU_LOG("\nDU_APP : DL RRC message transfer Recevied");
+
dlRrcMsg = &f1apMsg->choice.initiatingMessage->value.choice.DLRRCMessageTransfer;
ret = ROK;
fillMsgHeader(&fapiConfigRsp->header, FAPI_CONFIG_RESPONSE, msgLen);
DU_LOG("\nPHY_STUB: Sending Config Response to Lower Mac");
+
procPhyMessages(fapiConfigRsp->header.msg_id, \
sizeof(fapi_config_resp_t), (void *)fapiConfigRsp);
MAC_FREE(fapiConfigRsp, sizeof(fapi_config_resp_t));
LCId is CCCH(0)
From 38.321 section 6.1.1
*/
+ DU_LOG("\nForming MSG3 PDU");
pdu[byteIdx++] = 0;
/* Hardcoding MAC PDU */
pdu[byteIdx++] = 181;
{
uint8_t lcgId = 0;
uint8_t bufferSizeIdx = 6;
-
+
+ DU_LOG("\nForming SHORT BSR PDU");
/* For Short BSR
MAC subheader format is R/R/LcId (1Byte)
LCId is 61
case MSG_TYPE_MSG5:
{
+ DU_LOG("\nForming MSG5 PDU");
uint8_t msg5PduLen = 33;
/* For RRC setup complete
MAC subheader format is R/F/LCId/L (2/3 bytes)
memset(slotIndMsg, 0, sizeof(fapi_slot_ind_t));
slotIndMsg->sfn = sfnValue;
slotIndMsg->slot = slotValue;
- DU_LOG("\n\nPHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
+#ifdef ODU_SLOT_IND_DEBUG_LOG
+ DU_LOG("\n\nPHY_STUB: SLOT indication [%d:%d]",sfnValue,slotValue);
+#endif
/* increment for the next TTI */
slotValue++;
if(sfnValue >= MAX_SFN_VALUE && slotValue > MAX_SLOT_VALUE)
#ifdef INTEL_FAPI
fapi_dl_tti_req_t *dlTtiReq;
dlTtiReq = (fapi_dl_tti_req_t *)msg;
-
- printf("\nPHY STUB: DL TTI Request at sfn=%d slot=%d",dlTtiReq->sfn,dlTtiReq->slot);
-#if 0
- printf("\nPHY_STUB: SFN %d", dlTtiReq->sfn);
- printf("\nPHY_STUB: SLOT %d", dlTtiReq->slot);
- printf("\nPHY_STUB: nPdus %d", dlTtiReq->nPdus);
- printf("\nPHY_STUB: nGroup %d", dlTtiReq->nGroup);
- /* Printing SSB CONFIGURED VALUES */
- printf("\nPHY_STUB: physCellId %d", dlTtiReq->pdus->u.ssb_pdu.physCellId);
- printf("\nPHY_STUB: betaPss %d", dlTtiReq->pdus->u.ssb_pdu.betaPss);
- printf("\nPHY_STUB: ssbBlockIndex %d", dlTtiReq->pdus->u.ssb_pdu.ssbBlockIndex);
- printf("\nPHY_STUB: ssbSubCarrierOffset %d", dlTtiReq->pdus->u.ssb_pdu.ssbSubCarrierOffset);
- printf("\nPHY_STUB: ssbOffsetPointA %d", dlTtiReq->pdus->u.ssb_pdu.ssbOffsetPointA);
- printf("\nPHY_STUB: bchPayloadFlag %d", dlTtiReq->pdus->u.ssb_pdu.bchPayloadFlag);
- printf("\nPHY_STUB: bchPayload %x", dlTtiReq->pdus->u.ssb_pdu.bchPayload);
-#endif
+
uint8_t pduCount = 0;
+
+#ifdef ODU_SLOT_IND_DEBUG_LOG
if(dlTtiReq->nPdus == 0)
{
DU_LOG("\nPHY_STUB: No PDU in DL TTI Request");
}
+ else
+ {
+ DU_LOG("\nPHY STUB: DL TTI Request at sfn=%d slot=%d",dlTtiReq->sfn,dlTtiReq->slot);
+ }
+#endif
+
for(pduCount=0; pduCount<dlTtiReq->nPdus; pduCount++)
{
if(dlTtiReq->pdus[pduCount].pduType == 3) //SSB_PDU_TYPE
- DU_LOG("\nPHY_STUB: SSB PDU");
+ {
+ DU_LOG("\nPHY_STUB: SSB PDU");
+ }
else if(dlTtiReq->pdus[pduCount].pduType == 0)
- DU_LOG("\nPHY_STUB: PDCCH PDU");
+ {
+ DU_LOG("\nPHY_STUB: PDCCH PDU");
+ }
else if(dlTtiReq->pdus[pduCount].pduType == 1)
- DU_LOG("\nPHY_STUB: PDSCH PDU");
+ {
+ DU_LOG("\nPHY_STUB: PDSCH PDU");
+ }
}
/* Free FAPI message */
#ifdef INTEL_FAPI
fapi_tx_data_req_t *txDataReq;
txDataReq = (fapi_tx_data_req_t *)msg;
-
DU_LOG("\nPHY STUB: TX DATA Request at sfn=%d slot=%d",txDataReq->sfn,txDataReq->slot);
-
MAC_FREE(txDataReq, msgLen);
#endif
return ROK;
{
#ifdef INTEL_FAPI
fapi_ul_tti_req_t *ulTtiReq = NULLP;
-
- DU_LOG("\nPHY STUB: Received UL TTI Request");
-
ulTtiReq = (fapi_ul_tti_req_t *)msg;
uint8_t numPdus = ulTtiReq->nPdus;
+#ifdef ODU_SLOT_IND_DEBUG_LOG
if(numPdus == 0)
{
- DU_LOG("\nPHY STUB: No PDU in UL TTI");
+ DU_LOG("\nPHY STUB: No PDU received in UL TTI Req");
+ }
+ else
+ {
+ DU_LOG("\nPHY STUB: Received UL TTI Request");
}
+#endif
+
while(numPdus)
{
if(ulTtiReq->pdus[numPdus-1].pduType == 0)
if(ulTtiReq->pdus[numPdus-1].pduType == 1)
{
DU_LOG("\nPHY STUB: PUSCH PDU");
- l1BuildAndSendRxDataInd(ulTtiReq->slot, ulTtiReq->sfn, \
+ l1BuildAndSendRxDataInd(ulTtiReq->slot, ulTtiReq->sfn, \
ulTtiReq->pdus[numPdus-1].pdu.pusch_pdu);
}
if(ulTtiReq->pdus[numPdus-1].pduType == 2)