A test was missing in the PRACH RX function of the FHI 7.2 in order to know if the frame had a PRACH occasion. This was leading to continuous warning messages as PRACH RX was triggered on frames in which PRACH was not expected by the scheduler.
81 lines
3.2 KiB
C
81 lines
3.2 KiB
C
/*
|
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
* contributor license agreements. See the NOTICE file distributed with
|
|
* this work for additional information regarding copyright ownership.
|
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
|
* the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
|
* except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.openairinterface.org/?page_id=698
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*-------------------------------------------------------------------------------
|
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
* contact@openairinterface.org
|
|
*/
|
|
|
|
#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][XRAN_NUM_OF_SYMBOL_PER_SLOT];
|
|
} 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];
|
|
extern void *gxran_handle;
|
|
|
|
int *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 */
|