nfapi: size SRS channel-estimate buffers for 64 gNB antenna elements

The SRS.indication report structs were dimensioned for 8 gNB antenna
elements: channel_matrix held 272*2*8*4 bytes and the report TLV value
carried 64 KiB. A massive-MIMO L1 (Aerial) reporting the normalized
channel IQ matrix for 64 antenna elements needs up to
272 PRGs * 4 UE ports * 64 elements * 4 B = 272 KiB per report.

Introduce NFAPI_NR_SRS_MAX_* dimensioning macros and size both
channel_matrix and the report TLV value from them, so the two buffers
stay consistent (the report TLV previously allowed more UE ports than
channel_matrix could hold).

Assisted-by: Claude Code:claude-fable-5
Signed-off-by: default avatarGabriele Gemmi <g.gemmi@northeastern.edu>
parent 0dab3bb6
...@@ -1924,13 +1924,23 @@ typedef struct { ...@@ -1924,13 +1924,23 @@ typedef struct {
// Normalized channel I/Q matrix // Normalized channel I/Q matrix
// Dimensioning of the SRS channel-estimate buffers: up to 64 gNB antenna
// elements (Ng), 4 sampled UE SRS ports (Nu), 272 PRGs and 4-byte complex
// samples (iqSize).
#define NFAPI_NR_SRS_MAX_PRGS 272
#define NFAPI_NR_SRS_MAX_GNB_ANTENNA_ELEMENTS 64
#define NFAPI_NR_SRS_MAX_UE_SRS_PORTS 4
#define NFAPI_NR_SRS_MAX_IQ_SAMPLE_SIZE 4
#define NFAPI_NR_SRS_CHANNEL_MATRIX_SIZE \
(NFAPI_NR_SRS_MAX_PRGS * NFAPI_NR_SRS_MAX_UE_SRS_PORTS * NFAPI_NR_SRS_MAX_GNB_ANTENNA_ELEMENTS * NFAPI_NR_SRS_MAX_IQ_SAMPLE_SIZE)
typedef struct { typedef struct {
uint8_t normalized_iq_representation; // 0: 16-bit normalized complex number (iqSize = 2); 1: 32-bit normalized complex number (iqSize = 4) uint8_t normalized_iq_representation; // 0: 16-bit normalized complex number (iqSize = 2); 1: 32-bit normalized complex number (iqSize = 4)
uint16_t num_gnb_antenna_elements; // Ng: Number of gNB antenna elements. Value: 0511 uint16_t num_gnb_antenna_elements; // Ng: Number of gNB antenna elements. Value: 0511
uint16_t num_ue_srs_ports; // Nu: Number of sampled UE SRS ports. Value: 07 uint16_t num_ue_srs_ports; // Nu: Number of sampled UE SRS ports. Value: 07
uint16_t prg_size; // Size in RBs of a precoding resource block group (PRG) – to which the same digital beamforming gets applied. Value: 1->272 uint16_t prg_size; // Size in RBs of a precoding resource block group (PRG) – to which the same digital beamforming gets applied. Value: 1->272
uint16_t num_prgs; // Number of PRGs Np to be reported for this SRS PDU. Value: 0-> 272 uint16_t num_prgs; // Number of PRGs Np to be reported for this SRS PDU. Value: 0-> 272
uint8_t channel_matrix[272*2*8*4]; // Array of (numPRGs*Nu*Ng) entries of the type denoted by iqRepresentation H{PRG pI} [ueAntenna uI, gNB antenna gI] = array[uI*Ng*Np + gI*Np + pI]; uI: 0…Nu-1 (UE antenna index); gI: 0…Ng-1 (gNB antenna index); pI: 0…Np-1 (PRG index) uint8_t channel_matrix[NFAPI_NR_SRS_CHANNEL_MATRIX_SIZE]; // Array of (numPRGs*Nu*Ng) entries of the type denoted by iqRepresentation H{PRG pI} [ueAntenna uI, gNB antenna gI] = array[uI*Ng*Np + gI*Np + pI]; uI: 0…Nu-1 (UE antenna index); gI: 0…Ng-1 (gNB antenna index); pI: 0…Np-1 (PRG index)
} nfapi_nr_srs_normalized_channel_iq_matrix_t; } nfapi_nr_srs_normalized_channel_iq_matrix_t;
// Beamforming report // Beamforming report
...@@ -1957,7 +1967,7 @@ typedef struct { ...@@ -1957,7 +1967,7 @@ typedef struct {
typedef struct { typedef struct {
uint16_t tag; // 0: Report is carried directly in the value field; 3: The offset from the end of the control portion of the message to the beginning of the report. Other values are reserved. uint16_t tag; // 0: Report is carried directly in the value field; 3: The offset from the end of the control portion of the message to the beginning of the report. Other values are reserved.
uint32_t length; // Length of the actual report in bytes, without the padding bytes. uint32_t length; // Length of the actual report in bytes, without the padding bytes.
uint32_t value[16384]; // tag=0: Only the most significant bytes of the size indicated by ‘length’ field are valid. Remaining bytes are zero padded to the nearest 32-bit bit boundary; Tag=2 Offset from the end of the control portion of the message to the payload is in the value field. Occupies 32-bits. uint32_t value[NFAPI_NR_SRS_CHANNEL_MATRIX_SIZE / 4]; // tag=0: Only the most significant bytes of the size indicated by ‘length’ field are valid. Remaining bytes are zero padded to the nearest 32-bit bit boundary; Tag=2 Offset from the end of the control portion of the message to the payload is in the value field. Occupies 32-bits.
} nfapi_srs_report_tlv_t; } nfapi_srs_report_tlv_t;
typedef struct { typedef struct {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment