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.
176 lines
5.7 KiB
C
176 lines
5.7 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_dl.h
|
||
|
*
|
||
|
* Description: ENB downlink object.
|
||
|
*
|
||
|
* This module is a frontend to all the downlink data and control
|
||
|
* channel processing modules for the ENB transmitter side.
|
||
|
*
|
||
|
* Reference:
|
||
|
*****************************************************************************/
|
||
|
|
||
|
#ifndef ENBDL_H
|
||
|
#define ENBDL_H
|
||
|
|
||
|
#include <stdbool.h>
|
||
|
|
||
8 years ago
|
#include "srslte/phy/common/phy_common.h"
|
||
|
#include "srslte/phy/dft/ofdm.h"
|
||
|
#include "srslte/phy/sync/pss.h"
|
||
|
#include "srslte/phy/sync/sss.h"
|
||
|
#include "srslte/phy/ch_estimation/refsignal_dl.h"
|
||
|
#include "srslte/phy/phch/dci.h"
|
||
|
#include "srslte/phy/phch/pbch.h"
|
||
|
#include "srslte/phy/phch/pcfich.h"
|
||
|
#include "srslte/phy/phch/pdcch.h"
|
||
|
#include "srslte/phy/phch/pdsch.h"
|
||
|
#include "srslte/phy/phch/pdsch_cfg.h"
|
||
|
#include "srslte/phy/phch/phich.h"
|
||
|
#include "srslte/phy/phch/ra.h"
|
||
|
#include "srslte/phy/phch/regs.h"
|
||
9 years ago
|
|
||
8 years ago
|
#include "srslte/phy/enb/enb_ul.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"
|
||
|
|
||
|
typedef struct SRSLTE_API {
|
||
|
srslte_cell_t cell;
|
||
|
|
||
|
cf_t *sf_symbols[SRSLTE_MAX_PORTS];
|
||
|
cf_t *slot1_symbols[SRSLTE_MAX_PORTS];
|
||
|
|
||
|
srslte_ofdm_t ifft;
|
||
|
srslte_pbch_t pbch;
|
||
|
srslte_pcfich_t pcfich;
|
||
|
srslte_regs_t regs;
|
||
|
srslte_pdcch_t pdcch;
|
||
|
srslte_pdsch_t pdsch;
|
||
|
srslte_phich_t phich;
|
||
|
|
||
|
srslte_refsignal_cs_t csr_signal;
|
||
|
srslte_pdsch_cfg_t pdsch_cfg;
|
||
|
srslte_ra_dl_dci_t dl_dci;
|
||
|
|
||
|
srslte_dci_format_t dci_format;
|
||
|
uint32_t cfi;
|
||
|
|
||
|
cf_t pss_signal[SRSLTE_PSS_LEN];
|
||
|
float sss_signal0[SRSLTE_SSS_LEN];
|
||
|
float sss_signal5[SRSLTE_SSS_LEN];
|
||
9 years ago
|
|
||
8 years ago
|
float tx_amp;
|
||
9 years ago
|
|
||
|
} srslte_enb_dl_t;
|
||
|
|
||
|
typedef struct {
|
||
8 years ago
|
uint16_t rnti;
|
||
9 years ago
|
srslte_ra_dl_dci_t grant;
|
||
|
srslte_dci_location_t location;
|
||
9 years ago
|
srslte_softbuffer_tx_t *softbuffer;
|
||
9 years ago
|
uint8_t *data;
|
||
9 years ago
|
} srslte_enb_dl_pdsch_t;
|
||
9 years ago
|
|
||
|
typedef struct {
|
||
8 years ago
|
uint16_t rnti;
|
||
9 years ago
|
uint8_t ack;
|
||
8 years ago
|
uint32_t n_prb_lowest;
|
||
|
uint32_t n_dmrs;
|
||
9 years ago
|
} srslte_enb_dl_phich_t;
|
||
9 years ago
|
|
||
|
/* This function shall be called just after the initial synchronization */
|
||
|
SRSLTE_API int srslte_enb_dl_init(srslte_enb_dl_t *q,
|
||
8 years ago
|
srslte_cell_t cell);
|
||
9 years ago
|
|
||
|
SRSLTE_API void srslte_enb_dl_free(srslte_enb_dl_t *q);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_set_cfi(srslte_enb_dl_t *q,
|
||
|
uint32_t cfi);
|
||
|
|
||
8 years ago
|
SRSLTE_API void srslte_enb_dl_set_amp(srslte_enb_dl_t *q,
|
||
|
float amp);
|
||
|
|
||
9 years ago
|
SRSLTE_API void srslte_enb_dl_clear_sf(srslte_enb_dl_t *q);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_put_sync(srslte_enb_dl_t *q,
|
||
|
uint32_t sf_idx);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_put_refs(srslte_enb_dl_t *q,
|
||
|
uint32_t sf_idx);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_put_mib(srslte_enb_dl_t *q,
|
||
|
uint32_t tti);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_put_pcfich(srslte_enb_dl_t *q,
|
||
|
uint32_t sf_idx);
|
||
|
|
||
9 years ago
|
SRSLTE_API void srslte_enb_dl_put_phich(srslte_enb_dl_t *q,
|
||
|
uint8_t ack,
|
||
|
uint32_t n_prb_lowest,
|
||
|
uint32_t n_dmrs,
|
||
|
uint32_t sf_idx);
|
||
|
|
||
9 years ago
|
SRSLTE_API void srslte_enb_dl_put_base(srslte_enb_dl_t *q,
|
||
|
uint32_t tti);
|
||
|
|
||
|
SRSLTE_API void srslte_enb_dl_gen_signal(srslte_enb_dl_t *q,
|
||
|
cf_t *signal_buffer);
|
||
|
|
||
8 years ago
|
SRSLTE_API int srslte_enb_dl_add_rnti(srslte_enb_dl_t *q,
|
||
9 years ago
|
uint16_t rnti);
|
||
|
|
||
8 years ago
|
SRSLTE_API void srslte_enb_dl_rem_rnti(srslte_enb_dl_t *q,
|
||
|
uint16_t rnti);
|
||
9 years ago
|
|
||
9 years ago
|
SRSLTE_API int srslte_enb_dl_put_pdsch(srslte_enb_dl_t *q,
|
||
|
srslte_ra_dl_grant_t *grant,
|
||
9 years ago
|
srslte_softbuffer_tx_t *softbuffer,
|
||
8 years ago
|
uint16_t rnti,
|
||
9 years ago
|
uint32_t rv_idx,
|
||
|
uint32_t sf_idx,
|
||
|
uint8_t *data);
|
||
|
|
||
|
SRSLTE_API int srslte_enb_dl_put_pdcch_dl(srslte_enb_dl_t *q,
|
||
|
srslte_ra_dl_dci_t *grant,
|
||
|
srslte_dci_format_t format,
|
||
|
srslte_dci_location_t location,
|
||
8 years ago
|
uint16_t rnti,
|
||
9 years ago
|
uint32_t sf_idx);
|
||
|
|
||
|
SRSLTE_API int srslte_enb_dl_put_pdcch_ul(srslte_enb_dl_t *q,
|
||
|
srslte_ra_ul_dci_t *grant,
|
||
|
srslte_dci_location_t location,
|
||
8 years ago
|
uint16_t rnti,
|
||
9 years ago
|
uint32_t sf_idx);
|
||
|
|
||
|
|
||
|
#endif
|