mirror of
https://gitlab.eurecom.fr/oai/openairinterface5g.git
synced 2026-07-13 04:30:28 +00:00
[M-plane] FFT offset is a positive value in [Ts]
In the future, adapt to long PRACH format. Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
This commit is contained in:
@@ -88,7 +88,7 @@ static bool create_proc_elem_v2(const ru_session_t *ru_session, const size_t idx
|
||||
return true;
|
||||
}
|
||||
|
||||
typedef enum { UP_CH_RX, UP_CH_TX } uplane_dir_t;
|
||||
typedef enum { UP_CH_RX, UP_CH_TX, UP_CH_PRACH } 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)
|
||||
{
|
||||
@@ -116,7 +116,7 @@ static LY_ERR fill_uplane_ch_common_v2(const uplane_dir_t dir, const xran_mplane
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"cp-length-other\" node.\n");
|
||||
|
||||
char freq_offset[8];
|
||||
if (dir == UP_CH_RX) {
|
||||
if (dir == UP_CH_RX || dir == UP_CH_PRACH) {
|
||||
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]);
|
||||
@@ -173,11 +173,11 @@ static LY_ERR fill_uplane_ch_common_v2(const uplane_dir_t dir, const xran_mplane
|
||||
return LY_SUCCESS;
|
||||
}
|
||||
|
||||
static bool fill_uplane_ch_rx_v2(const xran_mplane_t *xran_mplane, const openair0_config_t *oai, const size_t idx, struct lyd_node **root)
|
||||
static bool fill_uplane_ch_rx_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;
|
||||
|
||||
ret = fill_uplane_ch_common_v2(UP_CH_RX, xran_mplane, oai, idx, root);
|
||||
ret = fill_uplane_ch_common_v2(dir, xran_mplane, oai, idx, root);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create common nodes.\n");
|
||||
|
||||
const char *managed_delay = xran_mplane->managed_delay ? "true" : "false";
|
||||
@@ -190,8 +190,13 @@ static bool fill_uplane_ch_rx_v2(const xran_mplane_t *xran_mplane, const openair
|
||||
|
||||
// Note: set of allowed values is restricted by SCS derived from values in supported-frame-structures.
|
||||
char ul_fft_offset[8];
|
||||
const int frame = (oai->split7.fftSize << 4) + oai->nr_scs_for_raster;
|
||||
snprintf(ul_fft_offset, sizeof(ul_fft_offset), "%d", frame - xran_mplane->frame_str);
|
||||
int frame = 0;
|
||||
if (dir == UP_CH_RX) {
|
||||
frame = (oai->split7.fftSize << 4) + oai->nr_scs_for_raster;
|
||||
} else if (dir == UP_CH_PRACH) {
|
||||
frame = (oai->split7.prach_fftSize << 4) + oai->nr_scs_for_raster; // TODO: handle long PRACH
|
||||
}
|
||||
snprintf(ul_fft_offset, sizeof(ul_fft_offset), "%d", xran_mplane->frame_str - frame);
|
||||
ret = lyd_new_term(fft_offset, NULL, "ul-fft-sampling-offset", ul_fft_offset, 0, NULL);
|
||||
VERIFY_SUCCESS(ret == LY_SUCCESS, "[MPLANE] Failed to create \"ul-fft-sampling-offset\" node.\n");
|
||||
|
||||
@@ -311,7 +316,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0
|
||||
ret = lyd_new_list(*root, NULL, "low-level-rx-endpoints", 0, &pusch_node, ru_session->ru_mplane_config.rx_endpoints.name[i * i_rx]);
|
||||
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, oai, i, &pusch_node);
|
||||
success = fill_uplane_ch_rx_v2(UP_CH_RX, &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 * i_rx]);
|
||||
|
||||
const size_t prach_endpoint_name_offset = i * i_rx + (ru_session->ru_mplane_config.rx_endpoints.num / 2);
|
||||
@@ -319,7 +324,7 @@ static bool create_uplane_conf_v2(const ru_session_t *ru_session, const openair0
|
||||
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, oai, i + ru_session->xran_mplane.prach_offset, &prach_node);
|
||||
success = fill_uplane_ch_rx_v2(UP_CH_PRACH, &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]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user