Skip to content

Commit

Permalink
Changing all p5 and p7 messages
Browse files Browse the repository at this point in the history
Change-Id: Ic3978349513469bd8769ec3bbbf839aa262632d8
Signed-off-by: pborla <[email protected]>
  • Loading branch information
pborla committed Feb 5, 2025
1 parent aef8383 commit 8f9d084
Show file tree
Hide file tree
Showing 7 changed files with 917 additions and 50 deletions.
823 changes: 776 additions & 47 deletions src/5gnrmac/lwr_mac_fsm.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/5gnrmac/lwr_mac_phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ uint8_t LwrMacSendToL1(void *msg)
uint32_t msgLen =0;
p_fapi_api_queue_elem_t currMsg = NULLP;

#ifdef CALL_FLOW_DEBUG_LOG
#ifndef CALL_FLOW_DEBUG_LOG
char message[100];

currMsg = (p_fapi_api_queue_elem_t)msg;
Expand Down
4 changes: 4 additions & 0 deletions src/cm/common_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
#define MAX_NUM_CELL 2 /* Changed to 2 to support cell Id 2 even if there is only one cell in DU */
#define MAX_NUM_MU 4
#define MAX_NUM_UE 3
#ifdef OAI_TESTING
#define MAX_NUM_UE_PER_TTI 1
#else
#define MAX_NUM_UE_PER_TTI 2
#endif
#define MAX_NUM_LC MAX_DRB_LCID + 1 /*Spec 38.331: Sec 6.4: maxLC-ID Keyword*/
#define MAX_NUM_SRB 3 /* Max. no of Srbs */
#define MAX_NUM_DRB 29 /* spec 38.331, maxDRB */
Expand Down
4 changes: 4 additions & 0 deletions src/cm/mac_sch_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@
#define QPSK_MODULATION 2

#define RAR_PAYLOAD_SIZE 10 /* As per spec 38.321, sections 6.1.5 and 6.2.3, RAR PDU is 8 bytes long and 2 bytes of padding */
#ifdef OAI_TESTING
#define TX_PAYLOAD_HDR_LEN 0 /* OAI L1 requires */
#else
#define TX_PAYLOAD_HDR_LEN 32 /* Intel L1 requires adding a 32 byte header to transmitted payload */
#endif
#define UL_TX_BUFFER_SIZE 5

#define MAX_NUM_CONFIG_SLOTS 160 /*Max number of slots as per the numerology*/
Expand Down
18 changes: 18 additions & 0 deletions src/cm/ssi.h
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,15 @@
return (ret); \
}

#ifdef OAI_TESTING
#define CMCHKPKLEN(func, val, mBuf, len) \
{ \
uint8_t ret; \
if ((ret = func(val, mBuf, len)) != ROK) \
return (ret); \
}
#endif

#define CMCHKPKLOG(func, val, mBuf, errCode, pst) \
{ \
S16 ret; \
Expand Down Expand Up @@ -878,6 +887,15 @@
#define CMCHKPK(func, val, mBuf) \
func(val, mBuf);

#ifdef OAI_TESTING
#define CMCHKPKLEN(func, val, mBuf, len) \
{ \
uint8_t ret; \
if ((ret = func(val, mBuf, len)) != ROK) \
return (ret); \
}
#endif

#define CMCHKPKLOG(func, val, mBuf, errCode, pst) \
func(val, mBuf);

Expand Down
24 changes: 22 additions & 2 deletions src/intel_fapi/fapi_interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,11 @@ extern "C" {
#define FAPI_MAX_NUMBER_OF_CODEWORDS_PER_PDU 2 // Based on MAX_DL_CODEWORD
// Based on (MAX_NUM_PDSCH*MAX_DL_CODEWORD + MAX_NUM_PDCCH + MAX_NUM_SRS +
// 1 PBCH/SLOT)
#ifdef OAI_TESTING
#define FAPI_MAX_NUMBER_DL_PDUS_PER_TTI 15
#else
#define FAPI_MAX_NUMBER_DL_PDUS_PER_TTI 129
#endif

#define FAPI_MAX_NUMBER_OF_UES_PER_TTI 16 // Per common_ran_parameters.h
// Based on Max Tb size of 1376264 bits + 24 crc over (8848-24) and O/H
Expand Down Expand Up @@ -336,7 +340,7 @@ typedef struct {
union
{
uint32_t *ptr; // TLV with unsigned 32 bit value
uint32_t direct[380]; // TLV with unsigned 32 bit value
uint32_t direct[1000]; // TLV with unsigned 32 bit value
}value;
#ifdef OAI_TESTING
} __attribute__((packed)) fapi_uint32_ptr_tlv_t;
Expand Down Expand Up @@ -756,10 +760,11 @@ typedef struct {
// Updated per 5G FAPI
typedef struct {
fapi_msg_t header;
uint8_t number_of_tlvs;
#ifndef OAI_TESTING
uint8_t number_of_tlvs;
uint8_t pad[3];
#endif
uint16_t number_of_tlvs;
fapi_uint32_tlv_t tlvs[FAPI_MAX_NUM_TLVS_CONFIG]; // 5G FAPI Table 3-17
#ifdef OAI_TESTING
} __attribute__((packed)) fapi_config_req_t;
Expand Down Expand Up @@ -942,6 +947,14 @@ typedef struct {
} fapi_codeword_pdu_t;
#endif

#ifdef OAI_TESTING
typedef struct
{
uint8_t ldpcBaseGraph;
uint32_t tbSizeLbrmBytes;
} __attribute__((packed))fapi_pdsch_maintenance_param_v3;
#endif

// Updated per 5G FAPI
typedef struct {
uint16_t pduBitMap;
Expand Down Expand Up @@ -992,6 +1005,8 @@ typedef struct {
uint8_t nrOfDmrsSymbols;
uint8_t dmrsAddPos;
uint8_t pad2;
#else
fapi_pdsch_maintenance_param_v3 maintParamV3;
#endif
#ifdef OAI_TESTING
} __attribute__((packed)) fapi_dl_pdsch_pdu_t;
Expand Down Expand Up @@ -1195,6 +1210,10 @@ typedef struct {

// Updated per 5G FAPI
typedef struct {
#ifdef OAI_TESTING
uint8_t trp_scheme;
#endif

uint16_t numPrgs;
uint16_t prgSize;
uint8_t digBfInterface;
Expand Down Expand Up @@ -1271,6 +1290,7 @@ typedef struct {
fapi_dfts_ofdm_t dftsOfdm;
fapi_ul_rx_bmform_pdu_t beamforming; // 5G FAPI Table 3-46
#ifdef OAI_TESTING
fapi_pdsch_maintenance_param_v3 maintParamV3;
} __attribute__((packed)) fapi_ul_pusch_pdu_t;
#else
} fapi_ul_pusch_pdu_t;
Expand Down
92 changes: 92 additions & 0 deletions src/mt/ss_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,98 @@ Buffer *mBuf /* message buffer */
} /* end of SUnpkF64 */
#endif /* SS_FLOAT */

#ifdef OAI_TESTING
/*
*
* Fun: oduPackPostUInt8
*
* Desc: This function packs an unsigned 8 bit value into a message.
*
* Ret: ROK - ok
* RFAILED - failed, general (optional)
* ROUTRES - failed, out of resources (optional)
*
* Notes: None
*
* File: ss_pack.c
*
*/
uint8_t oduPackPostUInt8
(
uint8_t in, uint8_t **out, uint16_t *total_length
)
{
uint8_t *pOut = *out;
pOut[0] = in;
(*out) += 1;
(*total_length) += 1; // Increment the total length by 1
return ROK;
} /* end of oduPackPostUInt8 */

/*
*
* Fun: oduPackPostUInt16
*
* Desc: This function packs an unsigned 16 bit value into a message.
*
* Ret: ROK - ok
* RFAILED - failed, general (optional)
* ROUTRES - failed, out of resources (optional)
*
* Notes: None
*
* File: ss_pack.c
*
*/

uint8_t oduPackPostUInt16
(
uint16_t in, uint8_t **out, uint16_t *total_length
)
{
uint8_t *pOut = *out;

pOut[1] = (in & 0xFF00) >> 8;
pOut[0] = (in & 0xFF);
(*out) += 2;
(*total_length) += 2; // Increment the total length by 2i
return ROK;
} /* end of oduPackPostUInt16 */

/*
*
* Fun: oduPackPostUInt32
*
* Desc: This function packs an unsigned 32 bit value into a message.
*
* Ret: ROK - ok
* RFAILED - failed, general (optional)
* ROUTRES - failed, out of resources (optional)
*
* Notes: None
*
* File: ss_pack.c
*
*/

uint8_t oduPackPostUInt32( uint32_t in, uint8_t **out, uint16_t *total_length)
{
uint8_t *pOut = *out;

pOut[3] = (in & 0xFF000000) >> 24;
pOut[2] = (in & 0xFF0000) >> 16;
pOut[1] = (in & 0xFF00) >> 8;
pOut[0] = (in & 0xFF);
(*out) += 4;

(*total_length) += 4; // Increment the total length by 4
return ROK;

} /* end of oduPackPostUInt32 */


#endif

/**********************************************************************
End of file
**********************************************************************/

0 comments on commit 8f9d084

Please sign in to comment.