Properly pass the frequency offset to Tx/Rx endpoints
This commit is contained in:
@@ -883,6 +883,7 @@ static void fill_split7_2_config(split7_config_t *split7, const nfapi_nr_config_
|
||||
const nfapi_nr_prach_config_t *prach_config = &config->prach_config;
|
||||
const nfapi_nr_tdd_table_t *tdd_table = &config->tdd_table;
|
||||
const nfapi_nr_cell_config_t *cell_config = &config->cell_config;
|
||||
const nfapi_nr_carrier_config_t *carrier_config = &config->carrier_config;
|
||||
|
||||
DevAssert(prach_config->prach_ConfigurationIndex.tl.tag == NFAPI_NR_CONFIG_PRACH_CONFIG_INDEX_TAG);
|
||||
split7->prach_index = prach_config->prach_ConfigurationIndex.value;
|
||||
@@ -902,6 +903,12 @@ static void fill_split7_2_config(split7_config_t *split7, const nfapi_nr_config_
|
||||
}
|
||||
|
||||
split7->fftSize = log2(ofdm_symbol_size);
|
||||
|
||||
// M-plane related parameters
|
||||
for (size_t i = 0; i < 5 ; i++) {
|
||||
split7->dl_k0[i] = carrier_config->dl_k0[i].value;
|
||||
split7->ul_k0[i] = carrier_config->ul_k0[i].value;
|
||||
}
|
||||
}
|
||||
|
||||
/* this function maps the RU tx and rx buffers to the available rf chains.
|
||||
|
||||
@@ -198,6 +198,10 @@ typedef struct split7_config {
|
||||
} slot_dirs[160];
|
||||
/*! this is the exponent in 2^X for the FFT size */
|
||||
uint16_t fftSize;
|
||||
|
||||
// M-plane related parameters
|
||||
uint16_t dl_k0[5];
|
||||
uint16_t ul_k0[5];
|
||||
} split7_config_t;
|
||||
|
||||
/*! \brief RF frontend parameters set by application */
|
||||
|
||||
@@ -104,7 +104,9 @@ static bool create_proc_elem_v2(struct ly_ctx **ctx, const ru_session_t *ru_sess
|
||||
return true;
|
||||
}
|
||||
|
||||
static LY_ERR fill_uplane_ch_common_v2(const xran_mplane_t *xran_mplane, const size_t idx, struct lyd_node **root)
|
||||
typedef enum { UP_CH_RX, UP_CH_TX } uplane_dir_t;
|
||||
|
||||
static LY_ERR fill_uplane_ch_common_v2(const uplane_dir_t dir, const xran_mplane_t *xran_mplane, const openair0_config_t *oai, const size_t idx, struct lyd_node **root)
|
||||
{
|
||||
LY_ERR ret = LY_SUCCESS;
|
||||
|
||||
@@ -114,8 +116,13 @@ static LY_ERR fill_uplane_ch_common_v2(const xran_mplane_t *xran_mplane, const s
|
||||
ret = lyd_new_term(*root, NULL, "cp-length-other", "0", 0, NULL);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"cp-length-other\" node.\n");
|
||||
|
||||
// to we actually store this from DU config file?
|
||||
ret = lyd_new_term(*root, NULL, "offset-to-absolute-frequency-center", "0", 0, NULL);
|
||||
char freq_offset[8];
|
||||
if (dir == UP_CH_RX) {
|
||||
snprintf(freq_offset, sizeof(freq_offset), "%d", oai->split7.ul_k0[oai->nr_scs_for_raster]);
|
||||
} else {
|
||||
snprintf(freq_offset, sizeof(freq_offset), "%d", oai->split7.dl_k0[oai->nr_scs_for_raster]);
|
||||
}
|
||||
ret = lyd_new_term(*root, NULL, "offset-to-absolute-frequency-center", freq_offset, 0, NULL);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"offset-to-absolute-frequency-center\" node.\n");
|
||||
|
||||
struct lyd_node *compression_node = NULL;
|
||||
@@ -171,7 +178,7 @@ static bool fill_uplane_ch_rx_v2(const xran_mplane_t *xran_mplane, const openair
|
||||
{
|
||||
LY_ERR ret = LY_SUCCESS;
|
||||
|
||||
ret = fill_uplane_ch_common_v2(xran_mplane, idx, root);
|
||||
ret = fill_uplane_ch_common_v2(UP_CH_RX, xran_mplane, oai, idx, root);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create common nodes.\n");
|
||||
|
||||
return true;
|
||||
@@ -181,7 +188,7 @@ static bool fill_uplane_ch_tx_v2(const xran_mplane_t *xran_mplane, const openair
|
||||
{
|
||||
LY_ERR ret = LY_SUCCESS;
|
||||
|
||||
ret = fill_uplane_ch_common_v2(xran_mplane, idx, root);
|
||||
ret = fill_uplane_ch_common_v2(UP_CH_TX, xran_mplane, oai, idx, root);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create common nodes.\n");
|
||||
|
||||
return true;
|
||||
@@ -274,7 +281,7 @@ static bool create_uplane_conf_v2(struct ly_ctx **ctx, const ru_session_t *ru_se
|
||||
ret = lyd_new_list(*root, NULL, "low-level-rx-endpoints", 0, &pusch_node, ru_session->ru_mplane_config.rx_endpoints.name[i]);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"low-level-rx-endpoints\" node.\n");
|
||||
|
||||
success = fill_uplane_ch_rx_v2(&ru_session->xran_mplane, i, &pusch_node);
|
||||
success = fill_uplane_ch_rx_v2(&ru_session->xran_mplane, oai, i, &pusch_node);
|
||||
VERIFY_SUCCESS(success, "[MPLANE] Failed to fill \"low-level-rx-endpoints\" node for %s.\n", ru_session->ru_mplane_config.rx_endpoints.name[i]);
|
||||
|
||||
const size_t prach_endpoint_name_offset = i + (ru_session->ru_mplane_config.rx_endpoints.num / 2);
|
||||
@@ -282,7 +289,7 @@ static bool create_uplane_conf_v2(struct ly_ctx **ctx, const ru_session_t *ru_se
|
||||
ret = lyd_new_list(*root, NULL, "low-level-rx-endpoints", 0, &prach_node, ru_session->ru_mplane_config.rx_endpoints.name[prach_endpoint_name_offset]);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"low-level-rx-endpoints\" node.\n");
|
||||
|
||||
success = fill_uplane_ch_rx_v2(&ru_session->xran_mplane, i + ru_session->xran_mplane.prach_offset, &prach_node);
|
||||
success = fill_uplane_ch_rx_v2(&ru_session->xran_mplane, oai, i + ru_session->xran_mplane.prach_offset, &prach_node);
|
||||
VERIFY_SUCCESS(success, "[MPLANE] Failed to fill \"low-level-rx-endpoints\" node for %s.\n", ru_session->ru_mplane_config.rx_endpoints.name[prach_endpoint_name_offset]);
|
||||
}
|
||||
|
||||
@@ -293,7 +300,7 @@ static bool create_uplane_conf_v2(struct ly_ctx **ctx, const ru_session_t *ru_se
|
||||
ret = lyd_new_list(*root, NULL, "low-level-tx-endpoints", 0, &pdsch_node, ru_session->ru_mplane_config.tx_endpoints.name[i]);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"low-level-tx-endpoints\" node.\n");
|
||||
|
||||
success = fill_uplane_ch_tx_v2(&ru_session->xran_mplane, i, &pdsch_node);
|
||||
success = fill_uplane_ch_tx_v2(&ru_session->xran_mplane, oai, i, &pdsch_node);
|
||||
VERIFY_SUCCESS(success, "[MPLANE] Failed to fill \"low-level-tx-endpoints\" node for %s.\n", ru_session->ru_mplane_config.tx_endpoints.name[i]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user