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.
181 lines
6.9 KiB
C
181 lines
6.9 KiB
C
11 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
9 years ago
|
* Copyright 2013-2015 Software Radio Systems Limited
|
||
11 years ago
|
*
|
||
|
* \section LICENSE
|
||
|
*
|
||
10 years ago
|
* This file is part of the srsLTE library.
|
||
11 years ago
|
*
|
||
10 years ago
|
* srsLTE is free software: you can redistribute it and/or modify
|
||
10 years ago
|
* it under the terms of the GNU Affero General Public License as
|
||
11 years ago
|
* published by the Free Software Foundation, either version 3 of
|
||
|
* the License, or (at your option) any later version.
|
||
|
*
|
||
10 years ago
|
* srsLTE is distributed in the hope that it will be useful,
|
||
11 years ago
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
10 years ago
|
* GNU Affero General Public License for more details.
|
||
11 years ago
|
*
|
||
10 years ago
|
* A copy of the GNU Affero General Public License can be found in
|
||
11 years ago
|
* the LICENSE file in the top-level directory of this distribution
|
||
|
* and at http://www.gnu.org/licenses/.
|
||
|
*
|
||
|
*/
|
||
|
|
||
10 years ago
|
/******************************************************************************
|
||
|
* File: pdcch.h
|
||
|
*
|
||
|
* Description: Physical downlink control channel.
|
||
|
*
|
||
|
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10 Sec. 6.8
|
||
|
*****************************************************************************/
|
||
|
|
||
11 years ago
|
#ifndef PDCCH_
|
||
|
#define PDCCH_
|
||
|
|
||
10 years ago
|
#include "srslte/config.h"
|
||
8 years ago
|
#include "srslte/phy/common/phy_common.h"
|
||
|
#include "srslte/phy/mimo/precoding.h"
|
||
|
#include "srslte/phy/mimo/layermap.h"
|
||
|
#include "srslte/phy/modem/mod.h"
|
||
|
#include "srslte/phy/modem/demod_soft.h"
|
||
|
#include "srslte/phy/scrambling/scrambling.h"
|
||
|
#include "srslte/phy/fec/rm_conv.h"
|
||
|
#include "srslte/phy/fec/convcoder.h"
|
||
|
#include "srslte/phy/fec/viterbi.h"
|
||
|
#include "srslte/phy/fec/crc.h"
|
||
|
#include "srslte/phy/phch/dci.h"
|
||
|
#include "srslte/phy/phch/regs.h"
|
||
11 years ago
|
|
||
10 years ago
|
|
||
11 years ago
|
|
||
|
|
||
10 years ago
|
typedef enum SRSLTE_API {
|
||
11 years ago
|
SEARCH_UE, SEARCH_COMMON
|
||
10 years ago
|
} srslte_pdcch_search_mode_t;
|
||
11 years ago
|
|
||
|
|
||
|
/* PDCCH object */
|
||
10 years ago
|
typedef struct SRSLTE_API {
|
||
10 years ago
|
srslte_cell_t cell;
|
||
11 years ago
|
uint32_t nof_regs;
|
||
|
uint32_t nof_cce;
|
||
|
uint32_t max_bits;
|
||
8 years ago
|
uint32_t nof_rx_antennas;
|
||
|
|
||
10 years ago
|
srslte_regs_t *regs;
|
||
11 years ago
|
|
||
|
/* buffers */
|
||
8 years ago
|
cf_t *ce[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS];
|
||
|
cf_t *symbols[SRSLTE_MAX_PORTS];
|
||
10 years ago
|
cf_t *x[SRSLTE_MAX_PORTS];
|
||
|
cf_t *d;
|
||
|
uint8_t *e;
|
||
10 years ago
|
float rm_f[3 * (SRSLTE_DCI_MAX_BITS + 16)];
|
||
10 years ago
|
float *llr;
|
||
11 years ago
|
|
||
|
/* tx & rx objects */
|
||
10 years ago
|
srslte_modem_table_t mod;
|
||
10 years ago
|
srslte_sequence_t seq[SRSLTE_NSUBFRAMES_X_FRAME];
|
||
10 years ago
|
srslte_viterbi_t decoder;
|
||
|
srslte_crc_t crc;
|
||
9 years ago
|
|
||
10 years ago
|
} srslte_pdcch_t;
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_pdcch_init(srslte_pdcch_t *q,
|
||
|
srslte_regs_t *regs,
|
||
|
srslte_cell_t cell);
|
||
11 years ago
|
|
||
8 years ago
|
SRSLTE_API int srslte_pdcch_init_multi(srslte_pdcch_t *q,
|
||
|
srslte_regs_t *regs,
|
||
|
srslte_cell_t cell,
|
||
|
uint32_t nof_rx_antennas);
|
||
|
|
||
10 years ago
|
SRSLTE_API void srslte_pdcch_free(srslte_pdcch_t *q);
|
||
11 years ago
|
|
||
11 years ago
|
|
||
8 years ago
|
SRSLTE_API void srslte_pdcch_set_cfi(srslte_pdcch_t *q,
|
||
|
uint32_t cfi);
|
||
|
|
||
8 years ago
|
SRSLTE_API float srslte_pdcch_coderate(uint32_t nof_bits,
|
||
|
uint32_t l);
|
||
|
|
||
11 years ago
|
/* Encoding function */
|
||
10 years ago
|
SRSLTE_API int srslte_pdcch_encode(srslte_pdcch_t *q,
|
||
|
srslte_dci_msg_t *msg,
|
||
|
srslte_dci_location_t location,
|
||
|
uint16_t rnti,
|
||
|
cf_t *sf_symbols[SRSLTE_MAX_PORTS],
|
||
|
uint32_t nsubframe,
|
||
|
uint32_t cfi);
|
||
|
|
||
|
/* Decoding functions: Extract the LLRs and save them in the srslte_pdcch_t object */
|
||
|
SRSLTE_API int srslte_pdcch_extract_llr(srslte_pdcch_t *q,
|
||
|
cf_t *sf_symbols,
|
||
|
cf_t *ce[SRSLTE_MAX_PORTS],
|
||
|
float noise_estimate,
|
||
|
uint32_t nsubframe,
|
||
|
uint32_t cfi);
|
||
|
|
||
8 years ago
|
SRSLTE_API int srslte_pdcch_extract_llr_multi(srslte_pdcch_t *q,
|
||
8 years ago
|
cf_t *sf_symbols[SRSLTE_MAX_PORTS],
|
||
|
cf_t *ce[SRSLTE_MAX_PORTS][SRSLTE_MAX_PORTS],
|
||
8 years ago
|
float noise_estimate,
|
||
|
uint32_t nsubframe,
|
||
|
uint32_t cfi);
|
||
|
|
||
10 years ago
|
/* Decoding functions: Try to decode a DCI message after calling srslte_pdcch_extract_llr */
|
||
|
SRSLTE_API int srslte_pdcch_decode_msg(srslte_pdcch_t *q,
|
||
|
srslte_dci_msg_t *msg,
|
||
|
srslte_dci_location_t *location,
|
||
|
srslte_dci_format_t format,
|
||
10 years ago
|
uint16_t *crc_rem);
|
||
11 years ago
|
|
||
9 years ago
|
SRSLTE_API int srslte_pdcch_dci_decode(srslte_pdcch_t *q,
|
||
|
float *e,
|
||
|
uint8_t *data,
|
||
|
uint32_t E,
|
||
|
uint32_t nof_bits,
|
||
|
uint16_t *crc);
|
||
|
|
||
|
SRSLTE_API int srslte_pdcch_dci_encode(srslte_pdcch_t *q,
|
||
|
uint8_t *data,
|
||
|
uint8_t *e,
|
||
|
uint32_t nof_bits,
|
||
|
uint32_t E,
|
||
|
uint16_t rnti);
|
||
|
|
||
|
SRSLTE_API void srslte_pdcch_dci_encode_conv(srslte_pdcch_t *q,
|
||
|
uint8_t *data,
|
||
|
uint32_t nof_bits,
|
||
|
uint8_t *coded_data,
|
||
|
uint16_t rnti);
|
||
|
|
||
11 years ago
|
/* Function for generation of UE-specific search space DCI locations */
|
||
10 years ago
|
SRSLTE_API uint32_t srslte_pdcch_ue_locations(srslte_pdcch_t *q,
|
||
|
srslte_dci_location_t *locations,
|
||
|
uint32_t max_locations,
|
||
|
uint32_t nsubframe,
|
||
|
uint32_t cfi,
|
||
|
uint16_t rnti);
|
||
11 years ago
|
|
||
9 years ago
|
SRSLTE_API uint32_t srslte_pdcch_ue_locations_ncce(uint32_t nof_cce,
|
||
|
srslte_dci_location_t *c,
|
||
|
uint32_t max_candidates,
|
||
|
uint32_t nsubframe, uint16_t rnti);
|
||
|
|
||
11 years ago
|
/* Function for generation of common search space DCI locations */
|
||
10 years ago
|
SRSLTE_API uint32_t srslte_pdcch_common_locations(srslte_pdcch_t *q,
|
||
|
srslte_dci_location_t *locations,
|
||
|
uint32_t max_locations,
|
||
|
uint32_t cfi);
|
||
11 years ago
|
|
||
9 years ago
|
SRSLTE_API uint32_t srslte_pdcch_common_locations_ncce(uint32_t nof_cce,
|
||
|
srslte_dci_location_t *c,
|
||
|
uint32_t max_candidates);
|
||
|
|
||
9 years ago
|
|
||
11 years ago
|
#endif
|