diff --git a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c index 255d7d62e3..bdd7b224ce 100644 --- a/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c +++ b/nfapi/open-nFAPI/fapi/src/nr_fapi_p5.c @@ -1143,15 +1143,21 @@ uint8_t pack_nr_config_request(void *msg, uint8_t **ppWritePackedMsg, uint8_t *e &pack_uint8_tlv_value); numTLVs++; // END Measurement Config -#ifndef ENABLE_AERIAL - // START Digital Beam Table (DBT) PDU - if (pNfapiMsg->dbt_config.num_dig_beams != 0) { - nfapi_nr_dbt_tlv_ve_t dbt_tlv = {.tl.tag = NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, .value = pNfapiMsg->dbt_config}; - pack_nr_tlv(NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG, &dbt_tlv, ppWritePackedMsg, end, &pack_dbt_table_tlv_value); - numTLVs++; - } - // END Digital Beam Table (DBT) PDU +#ifdef ENABLE_AERIAL + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_NUM_TX_PORT_TAG, + &(pNfapiMsg->carrier_config.num_tx_port), + ppWritePackedMsg, + end, + &pack_uint16_tlv_value); + numTLVs++; + retval &= pack_nr_tlv(NFAPI_NR_CONFIG_NUM_RX_PORT_TAG, + &(pNfapiMsg->carrier_config.num_rx_port), + ppWritePackedMsg, + end, + &pack_uint16_tlv_value); + numTLVs++; +#else // START Precoding Matrix (PM) PDU if (pNfapiMsg->pmi_list.num_pm_idx != 0) { nfapi_nr_pm_tlv_ve_t pm_tlv = {.tl.tag = NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG, .value = pNfapiMsg->pmi_list}; diff --git a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h index b466303cd8..5ffff64de4 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/nfapi_nr_interface_scf.h @@ -332,6 +332,10 @@ typedef struct #define NFAPI_NR_CONFIG_TDD_TABLE 0x1035 #define NFAPI_NR_CONFIG_BEAMFORMING_TABLE_TAG 0x1043 // This tag was added in version 5 of the SCF222 standard ( Table 3-50 of SCF222.10.05 ) #define NFAPI_NR_CONFIG_PRECODING_TABLE_V6_TAG 0x104B // This tag was added in version 6 of the SCF222 standard ( Table 3-52 of SCF222.10.06 ) +#ifdef ENABLE_AERIAL + #define NFAPI_NR_CONFIG_NUM_TX_PORT_TAG 0xA016 + #define NFAPI_NR_CONFIG_NUM_RX_PORT_TAG 0xA017 +#endif //table 3-21 typedef struct @@ -347,6 +351,8 @@ typedef struct nfapi_uint16_tlv_t ul_grid_size[5];//Grid size 𝑁𝑔𝑟𝑖𝑑 𝑠𝑖𝑧𝑒,𝜇 for each of the numerologies [38.211, sec 4.4.2]. Value: 0->275 0 = this numerology not used nfapi_uint16_tlv_t num_rx_ant;// nfapi_uint8_tlv_t frequency_shift_7p5khz;//Indicates presence of 7.5KHz frequency shift. Value: 0 = false 1 = true + nfapi_uint16_tlv_t num_tx_port; //used by Aerial L1 when BF mode is enabled to signal the number of logical antenna ports + nfapi_uint16_tlv_t num_rx_port; //used by Aerial L1 when BF mode is enabled to signal the number of logical antenna ports } nfapi_nr_carrier_config_t; diff --git a/openair2/LAYER2/NR_MAC_gNB/config.c b/openair2/LAYER2/NR_MAC_gNB/config.c index bc402e7125..fa452b5dfd 100644 --- a/openair2/LAYER2/NR_MAC_gNB/config.c +++ b/openair2/LAYER2/NR_MAC_gNB/config.c @@ -691,7 +691,19 @@ static void config_common(gNB_MAC_INST *nrmac, const nr_mac_config_t *config, NR cfg->carrier_config.num_tx_ant.value); cfg->num_tlv++; cfg->num_tlv++; - +#ifdef ENABLE_AERIAL + if (nrmac->beam_info.beam_mode == PRECONFIGURED_BEAM_IDX) { + // if we are doing BF in Aerial we need these Custom TLV + cfg->carrier_config.num_rx_ant.value = 64; //TOOD: Read number of baseband ports (phy ant) from Config? + cfg->carrier_config.num_tx_ant.value = 64; //TOOD: Read number of baseband ports (phy ant) from Config? + }else{ + // In CAT-A Mode these are equal to num_rx_ant (and Aerial ignores the value) + cfg->carrier_config.num_rx_port.value = pusch_AntennaPorts; + cfg->carrier_config.num_rx_port.tl.tag = NFAPI_NR_CONFIG_NUM_RX_PORT_TAG; + cfg->carrier_config.num_tx_port.value = num_pdsch_antenna_ports; + cfg->carrier_config.num_tx_port.tl.tag = NFAPI_NR_CONFIG_NUM_TX_PORT_TAG; + } +#endif // Frame structure configuration uint8_t mu = frequencyInfoUL->scs_SpecificCarrierList.list.array[0]->subcarrierSpacing; if (cfg->cell_config.frame_duplex_type.value == TDD) {