Skip to content

Commit

Permalink
Fixing the Tx_data request msg structure as per the OAI
Browse files Browse the repository at this point in the history
Change-Id: Ie7d406a359b2f4d7c58a9f6501bdf55502adb492
Signed-off-by: pborla <[email protected]>
  • Loading branch information
pborla committed Sep 26, 2024
1 parent dc898dd commit 1d7e745
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 38 deletions.
2 changes: 1 addition & 1 deletion build/config/cellConfig.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<nRPCI>1</nRPCI>
<ssbFrequency>3000000</ssbFrequency>
<ssbPeriodicity>20</ssbPeriodicity>
<ssbSubCarrierSpacing>15</ssbSubCarrierSpacing>
<ssbSubCarrierSpacing>30</ssbSubCarrierSpacing>
<ssbOffset>0</ssbOffset>
<ssbDuration>1</ssbDuration>
<nRSectorCarrierRef>CN=John Smith,OU=Sales,O=ACME Limited,L=Moab,ST=Utah,C=US</nRSectorCarrierRef>
Expand Down
4 changes: 2 additions & 2 deletions build/config/tdd_odu_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@
</F1_DU_SRVD_CELL_INFO>
<MIB_PARAMS>
<SYS_FRAME_NUM>0</SYS_FRAME_NUM>
<SUB_CARR_SPACE>0</SUB_CARR_SPACE>
<SUB_CARR_SPACE>1</SUB_CARR_SPACE>
<SSB_SC_OFFSET>0</SSB_SC_OFFSET>
<DMRS_TYPEA_POSITION>0</DMRS_TYPEA_POSITION>
<CORESET_0_INDEX>0</CORESET_0_INDEX>
Expand Down Expand Up @@ -518,7 +518,7 @@
</CELL_CFG>
<SSB_CFG>
<SSB_PBSC_PWR>0</SSB_PBSC_PWR>
<SCS_CMN>0</SCS_CMN> <!--SCS_15-->
<SCS_CMN>1</SCS_CMN> <!--SCS_30-->
<SSB_OFFSET_PT_A>24</SSB_OFFSET_PT_A>
<SSB_PERIOD>2</SSB_PERIOD>
<SSB_SC_OFFSET>0</SSB_SC_OFFSET>
Expand Down
26 changes: 24 additions & 2 deletions src/5gnrmac/lwr_mac_fsm.c
Original file line number Diff line number Diff line change
Expand Up @@ -3617,9 +3617,11 @@ void fillPagePdschPdu(fapi_dl_tti_req_pdu_t *dlTtiReqPdu, fapi_vendor_dl_tti_req
dlTtiReqPdu->pdu.pdsch_pdu.preCodingAndBeamforming.pmi_bfi[0].beamIdx[0].beamidx = 0;
dlTtiReqPdu->pdu.pdsch_pdu.powerControlOffset = 0;
dlTtiReqPdu->pdu.pdsch_pdu.powerControlOffsetSS = 0;
#ifndef OAI_TESTING
dlTtiReqPdu->pdu.pdsch_pdu.mappingType = pageAlloc->pageDlSch.timeAlloc.mappingType;
dlTtiReqPdu->pdu.pdsch_pdu.nrOfDmrsSymbols = pageAlloc->pageDlSch.dmrs.nrOfDmrsSymbols;
dlTtiReqPdu->pdu.pdsch_pdu.dmrsAddPos = pageAlloc->pageDlSch.dmrs.dmrsAddPos;
#endif

dlTtiReqPdu->pduSize = sizeof(fapi_dl_pdsch_pdu_t);

Expand Down Expand Up @@ -3705,10 +3707,11 @@ void fillPdschPdu(fapi_dl_tti_req_pdu_t *dlTtiReqPdu, fapi_vendor_dl_tti_req_pdu
beamIdx[0].beamidx = pdschInfo->beamPdschInfo.prg[0].beamIdx[0];
dlTtiReqPdu->pdu.pdsch_pdu.powerControlOffset = pdschInfo->txPdschPower.powerControlOffset;
dlTtiReqPdu->pdu.pdsch_pdu.powerControlOffsetSS = pdschInfo->txPdschPower.powerControlOffsetSS;
#ifndef OAI_TESTING
dlTtiReqPdu->pdu.pdsch_pdu.mappingType = pdschInfo->dmrs.mappingType;
dlTtiReqPdu->pdu.pdsch_pdu.nrOfDmrsSymbols = pdschInfo->dmrs.nrOfDmrsSymbols;
dlTtiReqPdu->pdu.pdsch_pdu.dmrsAddPos = pdschInfo->dmrs.dmrsAddPos;

#endif
dlTtiReqPdu->pduSize = sizeof(fapi_dl_pdsch_pdu_t);

#ifndef OAI_TESTING
Expand Down Expand Up @@ -3853,7 +3856,12 @@ uint8_t calcTxDataReqPduCount(MacDlSlot *dlSlot)
uint8_t fillSib1TxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, MacCellCfg *macCellCfg,
PdschCfg *pdschCfg)
{
#ifndef OAI_TESTING
uint32_t payloadSize = 0;
#else
uint16_t payloadSize = 0;
#endif

uint8_t *sib1Payload = NULLP;
fapi_api_queue_elem_t *payloadElem = NULLP;
#ifdef INTEL_WLS_MEM
Expand Down Expand Up @@ -3914,7 +3922,13 @@ uint8_t fillSib1TxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, MacCel
* ********************************************************************/
uint8_t fillPageTxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, DlPageAlloc *pageAllocInfo)
{

#ifndef OAI_TESTING
uint32_t payloadSize = 0;
#else
uint16_t payloadSize = 0;
#endif

uint8_t *pagePayload = NULLP;
fapi_api_queue_elem_t *payloadElem = NULLP;
#ifdef INTEL_WLS_MEM
Expand Down Expand Up @@ -3975,7 +3989,13 @@ uint8_t fillPageTxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, DlPage
* ********************************************************************/
uint8_t fillRarTxDataReq(fapi_tx_pdu_desc_t *pduDesc, uint16_t pduIndex, RarInfo *rarInfo, PdschCfg *pdschCfg)
{
uint16_t payloadSize;

#ifndef OAI_TESTING
uint32_t payloadSize = 0;
#else
uint16_t payloadSize = 0;
#endif

uint8_t *rarPayload = NULLP;
fapi_api_queue_elem_t *payloadElem = NULLP;
#ifdef INTEL_WLS_MEM
Expand Down Expand Up @@ -4954,12 +4974,14 @@ void fillPuschPdu(fapi_ul_tti_req_pdu_t *ulTtiReqPdu, fapi_vendor_ul_tti_req_pdu
ulTtiReqPdu->pdu.pusch_pdu.nrOfSymbols = \
puschInfo->tdAlloc.numSymb;
#ifdef INTEL_FAPI
#ifndef OAI_TESTING
ulTtiReqPdu->pdu.pusch_pdu.mappingType = \
puschInfo->dmrsMappingType;
ulTtiReqPdu->pdu.pusch_pdu.nrOfDmrsSymbols = \
puschInfo->nrOfDmrsSymbols;
ulTtiReqPdu->pdu.pusch_pdu.dmrsAddPos = \
puschInfo->dmrsAddPos;
#endif
#endif
ulTtiReqPdu->pdu.pusch_pdu.puschData.rvIndex = \
puschInfo->tbInfo.rv;
Expand Down
77 changes: 44 additions & 33 deletions src/intel_fapi/fapi_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -747,19 +747,19 @@ extern "C" {
uint8_t nrOfLayers;
uint8_t transmissionScheme;
uint8_t refPoint;
uint8_t dmrsConfigType;
uint16_t dlDmrsSymbPos;
uint8_t dmrsConfigType;
uint16_t dlDmrsScramblingId;
uint8_t scid;
uint8_t numDmrsCdmGrpsNoData;
uint16_t dmrsPorts;
uint8_t resourceAlloc;
#ifndef OAI_TESTING
uint8_t pad1;
#endif
uint16_t dlDmrsScramblingId;
uint16_t dmrsPorts;
uint8_t rbBitmap[36];
uint16_t rbStart;
uint16_t rbSize;
uint8_t rbBitmap[36];
uint8_t vrbToPrbMapping;
uint8_t startSymbIndex;
uint8_t nrOfSymbols;
Expand All @@ -774,10 +774,10 @@ extern "C" {
uint8_t isLastCbPresent;
uint8_t isInlineTbCrc;
uint32_t dlTbCrc; // 5G FAPI Table 3-38
#ifndef OAI_TESTING
uint8_t mappingType;
uint8_t nrOfDmrsSymbols;
uint8_t dmrsAddPos;
#ifndef OAI_TESTING
uint8_t pad2;
#endif
} fapi_dl_pdsch_pdu_t;
Expand Down Expand Up @@ -828,8 +828,8 @@ extern "C" {
uint8_t betaPss;
uint8_t ssbBlockIndex;
uint8_t ssbSubCarrierOffset;
uint8_t bchPayloadFlag;
uint16_t ssbOffsetPointA;
uint8_t bchPayloadFlag;
fapi_bch_payload_t bchPayload;
fapi_precoding_bmform_t preCodingAndBeamforming; // 5G FAPI Table 3-40
} fapi_dl_ssb_pdu_t;
Expand Down Expand Up @@ -906,16 +906,16 @@ extern "C" {
// Updated per 5G FAPI
typedef struct {
uint8_t numPtrsPorts;
fapi_ptrs_info_t ptrsInfo[FAPI_MAX_NUM_PTRS_PORTS];
uint8_t ptrsTimeDensity;
uint8_t ptrsFreqDensity; // 5G FAPI Table 3-49 Subset
uint8_t ulPtrsPower;
fapi_ptrs_info_t ptrsInfo[FAPI_MAX_NUM_PTRS_PORTS];
} fapi_pusch_ptrs_t;

// Updated per 5G FAPI
typedef struct {
uint16_t lowPaprSequenceNumber;
uint8_t lowPaprGroupNumber;
uint16_t lowPaprSequenceNumber;
uint8_t ulPtrsSampleDensity;
uint8_t ulPtrsTimeDensityTransformPrecoding;
#ifndef OAI_TESTING
Expand Down Expand Up @@ -959,35 +959,36 @@ extern "C" {
uint16_t bwpStart;
uint8_t subCarrierSpacing;
uint8_t cyclicPrefix;
uint8_t mcsIndex;
uint8_t mcsTable;
uint16_t targetCodeRate;
uint8_t qamModOrder;
uint8_t mcsIndex;
uint8_t mcsTable;
uint8_t transformPrecoding;
uint16_t dataScramblingId;
uint8_t nrOfLayers;
uint8_t dmrsConfigType;
uint16_t ulDmrsSymbPos;
uint8_t dmrsConfigType;
uint16_t ulDmrsScramblingId;
uint16_t puschIdentity; //ADDED as per : 55G FAPI: PHY API Version: 222.10.02
uint8_t scid;
uint8_t numDmrsCdmGrpsNoData;
uint16_t dmrsPorts;
uint16_t nTpPuschId;
uint16_t tpPi2Bpsk;
uint8_t rbBitmap[36];
uint8_t resourceAlloc;
uint8_t rbBitmap[36];
uint16_t rbStart;
uint16_t rbSize;
uint8_t vrbToPrbMapping;
uint8_t frequencyHopping;
uint16_t txDirectCurrentLocation;
uint8_t resourceAlloc;
uint8_t uplinkFrequencyShift7p5khz;
uint8_t startSymbIndex;
uint8_t nrOfSymbols;
#ifndef OAI_TESTING
uint16_t nTpPuschId;
uint16_t tpPi2Bpsk;
uint8_t mappingType;
uint8_t nrOfDmrsSymbols;
uint8_t dmrsAddPos;
#ifndef OAI_TESTING
uint8_t pad;
#endif

Expand Down Expand Up @@ -1020,12 +1021,12 @@ extern "C" {
uint8_t startSymbolIndex;
uint8_t nrOfSymbols;
uint8_t freqHopFlag;
uint16_t secondHopPrb;
uint8_t groupHopFlag;
uint8_t sequenceHopFlag;
#ifndef OAI_TESTING
uint8_t pad3;
#endif
uint16_t secondHopPrb;
uint16_t hoppingId;
uint16_t initialCyclicShift;
uint16_t dataScramblingId;
Expand Down Expand Up @@ -1061,8 +1062,8 @@ extern "C" {
uint8_t numRepetitions;
uint8_t timeStartPosition;
uint8_t configIndex;
uint8_t bandwidthIndex;
uint16_t sequenceId;
uint8_t bandwidthIndex;
uint8_t combSize;
uint8_t combOffset;
uint8_t cyclicShift;
Expand Down Expand Up @@ -1129,9 +1130,15 @@ extern "C" {

// Updated per 5G FAPI
typedef struct {
#ifndef OAI_TESTING
uint32_t pdu_length;
uint16_t pdu_index;
uint16_t num_tlvs;
#else
uint16_t pdu_length;
uint16_t pdu_index;
uint32_t num_tlvs;
#endif
fapi_uint8_ptr_tlv_t tlvs[FAPI_MAX_NUMBER_OF_TLVS_PER_PDU]; // 5G FAPI Table 3-58 Subset
} fapi_tx_pdu_desc_t;

Expand All @@ -1152,10 +1159,10 @@ extern "C" {
uint32_t handle;
uint16_t rnti;
uint8_t harqId;
uint16_t pdu_length;
uint8_t ul_cqi;
uint16_t timingAdvance;
uint16_t rssi;
uint16_t pdu_length;
#ifndef OAI_TESTING
uint8_t pad[2];
#endif
Expand All @@ -1180,14 +1187,14 @@ extern "C" {
uint16_t rnti;
uint8_t harqId;
uint8_t tbCrcStatus;
uint16_t numCb;
uint8_t cbCrcStatus[FAPI_MAX_NUM_CB_PER_TTI_IN_BYTES]; // 5G FAPI Table 3-62 subset
uint8_t ul_cqi;
uint16_t timingAdvance;
uint16_t rssi;
#ifndef OAI_TESTING
uint8_t pad;
#endif
uint16_t numCb;
uint16_t timingAdvance;
uint16_t rssi;
uint8_t cbCrcStatus[FAPI_MAX_NUM_CB_PER_TTI_IN_BYTES]; // 5G FAPI Table 3-62 subset
} fapi_crc_ind_info_t;

// Updated per 5G FAPI
Expand Down Expand Up @@ -1234,11 +1241,10 @@ extern "C" {

// Updated per 5G FAPI
typedef struct {

uint32_t handle;
uint8_t pduBitmap;
uint8_t ul_cqi;
uint32_t handle;
uint16_t rnti;
uint8_t ul_cqi;
uint16_t timingAdvance;
uint16_t rssi; // 5G FAPI Table 3-64
fapi_harq_info_t harqInfo; // This is included if indicated by the pduBitmap
Expand Down Expand Up @@ -1280,30 +1286,35 @@ extern "C" {

// Updated per 5G FAPI
typedef struct {
uint32_t handle;
uint8_t pduBitmap;
uint32_t handle;
uint16_t rnti;
uint8_t pucchFormat;
uint8_t ul_cqi;
#ifndef OAI_TESTING
uint8_t pad;
#endif
uint16_t rnti;
uint16_t timingAdvance;
uint16_t rssi; // 5G FAPI Table 3-66
#ifndef OAI_TESTING
uint8_t pad;
uint16_t num_uci_bits;
uint8_t uciBits[FAPI_MAX_UCI_BIT_BYTE_LEN];
#else
fapi_sr_f2f3f4_info_t srF2F3F4Info; //ADDED as per : 55G FAPI: PHY API Version: 222.10.02
fapi_harq_f2f3f4_info_t harqF2F3F4Info;
fapi_csi_p1_info_t csiP1Info;
fapi_csi_p2_info_t csiP2Info;
#endif
} fapi_uci_o_pucch_f2f3f4_t;

// Updated per 5G FAPI
typedef struct {
uint32_t handle;
uint8_t pduBitmap;
uint32_t handle;
uint16_t rnti;
uint8_t pucchFormat;
uint8_t ul_cqi;
#ifndef OAI_TESTING
uint8_t pad;
#endif
uint16_t rnti;
uint16_t timingAdvance;
uint16_t rssi; // 5G FAPI Table 3-65
#ifndef OAI_TESTING
Expand Down

0 comments on commit 1d7e745

Please sign in to comment.