mirror of https://github.com/pvnis/srsRAN_4G.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
153 lines
5.0 KiB
C
153 lines
5.0 KiB
C
9 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
|
* Copyright 2013-2015 Software Radio Systems Limited
|
||
|
*
|
||
|
* \section LICENSE
|
||
|
*
|
||
|
* This file is part of the srsLTE library.
|
||
|
*
|
||
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU Affero General Public License as
|
||
|
* published by the Free Software Foundation, either version 3 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
|
* srsLTE is distributed in the hope that it will be useful,
|
||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
|
* GNU Affero General Public License for more details.
|
||
|
*
|
||
|
* A copy of the GNU Affero General Public License can be found in
|
||
|
* the LICENSE file in the top-level directory of this distribution
|
||
|
* and at http://www.gnu.org/licenses/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
/******************************************************************************
|
||
|
* File: enb_ul.h
|
||
|
*
|
||
|
* Description: ENB uplink object.
|
||
|
*
|
||
|
* This module is a frontend to all the uplink data and control
|
||
|
* channel processing modules for the ENB receiver side.
|
||
|
*
|
||
|
* Reference:
|
||
|
*****************************************************************************/
|
||
|
|
||
|
#ifndef ENBUL_H
|
||
|
#define ENBUL_H
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
|
||
8 years ago
|
#include "srslte/phy/common/phy_common.h"
|
||
|
#include "srslte/phy/dft/ofdm.h"
|
||
|
#include "srslte/phy/ch_estimation/chest_ul.h"
|
||
|
#include "srslte/phy/phch/prach.h"
|
||
|
#include "srslte/phy/phch/pusch.h"
|
||
|
#include "srslte/phy/phch/pusch_cfg.h"
|
||
|
#include "srslte/phy/phch/ra.h"
|
||
9 years ago
|
|
||
8 years ago
|
#include "srslte/phy/utils/vector.h"
|
||
|
#include "srslte/phy/utils/debug.h"
|
||
9 years ago
|
|
||
|
#include "srslte/config.h"
|
||
|
|
||
9 years ago
|
typedef struct {
|
||
|
uint32_t n_prb_lowest;
|
||
|
uint32_t n_dmrs;
|
||
|
} srslte_enb_ul_phich_info_t;
|
||
|
|
||
8 years ago
|
typedef struct {
|
||
|
bool uci_cfg_en;
|
||
|
bool srs_cfg_en;
|
||
|
srslte_uci_cfg_t uci_cfg;
|
||
|
srslte_refsignal_srs_cfg_t srs_cfg;
|
||
|
srslte_pucch_sched_t pucch_sched;
|
||
|
} srslte_enb_ul_user_t;
|
||
|
|
||
9 years ago
|
typedef struct SRSLTE_API {
|
||
|
srslte_cell_t cell;
|
||
8 years ago
|
|
||
9 years ago
|
cf_t *sf_symbols;
|
||
|
cf_t *ce;
|
||
|
|
||
|
srslte_ofdm_t fft;
|
||
|
srslte_chest_ul_t chest;
|
||
9 years ago
|
|
||
|
srslte_pusch_t pusch;
|
||
9 years ago
|
srslte_pucch_t pucch;
|
||
9 years ago
|
srslte_prach_t prach;
|
||
|
|
||
9 years ago
|
srslte_pusch_cfg_t pusch_cfg;
|
||
8 years ago
|
|
||
|
srslte_pusch_hopping_cfg_t hopping_cfg;
|
||
|
|
||
|
// Configuration for each user
|
||
8 years ago
|
srslte_enb_ul_user_t **users;
|
||
8 years ago
|
|
||
9 years ago
|
} srslte_enb_ul_t;
|
||
|
|
||
|
typedef struct {
|
||
8 years ago
|
uint16_t rnti;
|
||
9 years ago
|
srslte_ra_ul_dci_t grant;
|
||
|
srslte_dci_location_t location;
|
||
|
uint32_t rv_idx;
|
||
|
uint32_t current_tx_nb;
|
||
|
uint8_t *data;
|
||
|
srslte_softbuffer_rx_t *softbuffer;
|
||
8 years ago
|
bool needs_pdcch;
|
||
9 years ago
|
} srslte_enb_ul_pusch_t;
|
||
|
|
||
|
/* This function shall be called just after the initial synchronization */
|
||
|
SRSLTE_API int srslte_enb_ul_init(srslte_enb_ul_t *q,
|
||
|
srslte_cell_t cell,
|
||
8 years ago
|
srslte_prach_cfg_t* prach_cfg,
|
||
|
srslte_refsignal_dmrs_pusch_cfg_t *pusch_cfg,
|
||
8 years ago
|
srslte_pusch_hopping_cfg_t *hopping_cfg,
|
||
8 years ago
|
srslte_pucch_cfg_t *pucch_cfg);
|
||
9 years ago
|
|
||
|
SRSLTE_API void srslte_enb_ul_free(srslte_enb_ul_t *q);
|
||
|
|
||
8 years ago
|
SRSLTE_API int srslte_enb_ul_add_rnti(srslte_enb_ul_t *q,
|
||
9 years ago
|
uint16_t rnti);
|
||
|
|
||
8 years ago
|
SRSLTE_API void srslte_enb_ul_rem_rnti(srslte_enb_ul_t *q,
|
||
|
uint16_t rnti);
|
||
|
|
||
|
SRSLTE_API int srslte_enb_ul_cfg_ue(srslte_enb_ul_t *q, uint16_t rnti,
|
||
8 years ago
|
srslte_uci_cfg_t *uci_cfg,
|
||
8 years ago
|
srslte_pucch_sched_t *pucch_sched,
|
||
8 years ago
|
srslte_refsignal_srs_cfg_t *srs_cfg);
|
||
|
|
||
|
|
||
9 years ago
|
SRSLTE_API void srslte_enb_ul_fft(srslte_enb_ul_t *q,
|
||
|
cf_t *signal_buffer);
|
||
|
|
||
8 years ago
|
SRSLTE_API int srslte_enb_ul_get_pucch(srslte_enb_ul_t *q,
|
||
8 years ago
|
uint16_t rnti,
|
||
8 years ago
|
uint32_t pdcch_n_cce,
|
||
|
uint32_t sf_rx,
|
||
|
srslte_uci_data_t *uci_data);
|
||
8 years ago
|
|
||
9 years ago
|
SRSLTE_API int srslte_enb_ul_get_pusch(srslte_enb_ul_t *q,
|
||
9 years ago
|
srslte_ra_ul_grant_t *grant,
|
||
9 years ago
|
srslte_softbuffer_rx_t *softbuffer,
|
||
8 years ago
|
uint16_t rnti,
|
||
9 years ago
|
uint32_t rv_idx,
|
||
|
uint32_t current_tx_nb,
|
||
|
uint8_t *data,
|
||
8 years ago
|
srslte_uci_data_t *uci_data,
|
||
8 years ago
|
uint32_t tti);
|
||
9 years ago
|
|
||
9 years ago
|
SRSLTE_API int srslte_enb_ul_detect_prach(srslte_enb_ul_t *q,
|
||
|
uint32_t tti,
|
||
|
uint32_t freq_offset,
|
||
|
cf_t *signal,
|
||
|
uint32_t *indices,
|
||
8 years ago
|
float *offsets,
|
||
8 years ago
|
float *peak2avg);
|
||
9 years ago
|
|
||
|
|
||
|
#endif
|