Files
openairinterface5g/radio/fhi_72/oran-init.h
T
Teodora VladićandRomain Beurdouche 1bc8e64641 Process PRACH packets
* Move PRACH callback in the oaioran.h/c since now used in K release.
* Reset the number of PRACH packets.
* Handle PRACH queue in the same manner as for PUSCH (95c8fa46).

Co-authored-by: Romain Beurdouche <romain.beurdouche@eurecom.fr>
Signed-off-by: Teodora Vladić <teodora.vladic@openairinterface.org>
2026-04-23 18:42:25 +02:00

68 lines
2.3 KiB
C

/*
* SPDX-License-Identifier: LicenseRef-CSSL-1.0
*/
#ifndef ORAN_INIT_H
#define ORAN_INIT_H
#include "common/utils/nr/nr_common.h"
#include "openair2/LAYER2/NR_MAC_COMMON/nr_prach_config.h"
typedef struct oran_bufs {
struct xran_flat_buffer tx[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN][XRAN_NUM_OF_SYMBOL_PER_SLOT];
struct xran_flat_buffer tx_prbmap[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_flat_buffer rx[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN][XRAN_NUM_OF_SYMBOL_PER_SLOT];
struct xran_flat_buffer rx_prbmap[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_flat_buffer prach[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN][XRAN_NUM_OF_SYMBOL_PER_SLOT];
struct xran_flat_buffer prachdecomp[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
} oran_bufs_t;
typedef struct oran_buf_list {
// xran API requires buffer lists as structs of arrays
struct xran_buffer_list src[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_buffer_list srccp[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_buffer_list dst[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_buffer_list dstcp[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_buffer_list prachdst[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
struct xran_buffer_list prachdstdecomp[XRAN_MAX_ANTENNA_NR][XRAN_N_FE_BUF_LEN];
oran_bufs_t bufs;
} oran_buf_list_t;
typedef struct oran_port_instance_t {
oran_buf_list_t *buf_list;
void *instanceHandle;
//uint32_t dpdkPoolIndex[MAX_SW_XRAN_INTERFACE_NUM];
struct xran_cb_tag prach_tag;
struct xran_cb_tag pusch_tag;
} oran_port_instance_t;
extern struct xran_fh_config gxran_fh_config[XRAN_PORTS_NUM];
#if defined F_RELEASE
extern void *gxran_handle;
#elif defined K_RELEASE
extern void *gxran_handle[XRAN_PORTS_NUM];
#endif
void *oai_oran_initialize(struct xran_fh_init *fh_init, struct xran_fh_config *fh_config);
oran_buf_list_t *get_xran_buffers(uint32_t port_id);
struct xran_fh_init *get_xran_fh_init(void);
struct xran_fh_config *get_xran_fh_config(uint32_t port_id);
/**
* @brief queries PRACH information necessary for the FHI
*
* @arg port_id XRAN port id
* @return PRACH information holding among other information:
* - N_dur PRACH duration from TS 38.211 Table 6.3.3.2-2/3/4
* - x from TS 38.211 Table 6.3.3.2-2/3/4
* - y from TS 38.211 Table 6.3.3.2-2/3/4
*/
nr_prach_info_t get_prach_info(uint32_t port_id);
#endif /* ORAN_INIT_H */