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.
143 lines
4.7 KiB
C
143 lines
4.7 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: regs.h
|
||
|
*
|
||
|
* Description: Resource element mapping functions.
|
||
|
*
|
||
|
* Reference: 3GPP TS 36.211 version 10.0.0 Release 10
|
||
|
*****************************************************************************/
|
||
11 years ago
|
|
||
|
#ifndef _REGS_H_
|
||
|
#define _REGS_H_
|
||
|
|
||
|
#include <stdbool.h>
|
||
10 years ago
|
#include "srslte/config.h"
|
||
8 years ago
|
#include "srslte/phy/common/phy_common.h"
|
||
11 years ago
|
|
||
11 years ago
|
#define REGS_PHICH_NSYM 12
|
||
|
#define REGS_PHICH_REGS_X_GROUP 3
|
||
11 years ago
|
|
||
11 years ago
|
#define REGS_PCFICH_NSYM 16
|
||
|
#define REGS_PCFICH_NREGS 4
|
||
11 years ago
|
|
||
11 years ago
|
#define REGS_RE_X_REG 4
|
||
11 years ago
|
|
||
|
|
||
10 years ago
|
typedef struct SRSLTE_API {
|
||
11 years ago
|
uint32_t k[4];
|
||
|
uint32_t k0;
|
||
|
uint32_t l;
|
||
11 years ago
|
bool assigned;
|
||
10 years ago
|
}srslte_regs_reg_t;
|
||
11 years ago
|
|
||
10 years ago
|
typedef struct SRSLTE_API {
|
||
11 years ago
|
uint32_t nof_regs;
|
||
10 years ago
|
srslte_regs_reg_t **regs;
|
||
|
}srslte_regs_ch_t;
|
||
11 years ago
|
|
||
10 years ago
|
typedef struct SRSLTE_API {
|
||
10 years ago
|
srslte_cell_t cell;
|
||
11 years ago
|
uint32_t max_ctrl_symbols;
|
||
|
uint32_t cfi;
|
||
11 years ago
|
bool cfi_initiated;
|
||
11 years ago
|
uint32_t ngroups_phich;
|
||
11 years ago
|
|
||
10 years ago
|
srslte_phich_resources_t phich_res;
|
||
|
srslte_phich_length_t phich_len;
|
||
11 years ago
|
|
||
10 years ago
|
srslte_regs_ch_t pcfich;
|
||
|
srslte_regs_ch_t *phich; // there are several phich
|
||
|
srslte_regs_ch_t pdcch[3]; /* PDCCH indexing, permutation and interleaving is computed for
|
||
11 years ago
|
the three possible CFI value */
|
||
11 years ago
|
|
||
11 years ago
|
uint32_t nof_regs;
|
||
10 years ago
|
srslte_regs_reg_t *regs;
|
||
|
}srslte_regs_t;
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_init(srslte_regs_t *h,
|
||
|
srslte_cell_t cell);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API void srslte_regs_free(srslte_regs_t *h);
|
||
|
SRSLTE_API int srslte_regs_set_cfi(srslte_regs_t *h,
|
||
|
uint32_t nof_ctrl_symbols);
|
||
11 years ago
|
|
||
|
|
||
10 years ago
|
SRSLTE_API uint32_t srslte_regs_pcfich_nregs(srslte_regs_t *h);
|
||
|
SRSLTE_API int srslte_regs_pcfich_put(srslte_regs_t *h,
|
||
|
cf_t symbols[REGS_PCFICH_NSYM],
|
||
11 years ago
|
cf_t *slot_symbols);
|
||
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_pcfich_get(srslte_regs_t *h,
|
||
|
cf_t *slot_symbols,
|
||
|
cf_t symbols[REGS_PCFICH_NSYM]);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API uint32_t srslte_regs_phich_nregs(srslte_regs_t *h);
|
||
|
SRSLTE_API int srslte_regs_phich_add(srslte_regs_t *h,
|
||
|
cf_t symbols[REGS_PHICH_NSYM],
|
||
|
uint32_t ngroup,
|
||
|
cf_t *slot_symbols);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_phich_get(srslte_regs_t *h,
|
||
|
cf_t *slot_symbols,
|
||
|
cf_t symbols[REGS_PHICH_NSYM],
|
||
|
uint32_t ngroup);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API uint32_t srslte_regs_phich_ngroups(srslte_regs_t *h);
|
||
|
SRSLTE_API int srslte_regs_phich_reset(srslte_regs_t *h,
|
||
|
cf_t *slot_symbols);
|
||
11 years ago
|
|
||
9 years ago
|
SRSLTE_API int srslte_regs_pdcch_nregs(srslte_regs_t *h,
|
||
|
uint32_t cfi);
|
||
|
|
||
|
SRSLTE_API int srslte_regs_pdcch_ncce(srslte_regs_t *h,
|
||
|
uint32_t cfi);
|
||
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_pdcch_put(srslte_regs_t *h,
|
||
|
cf_t *d,
|
||
|
cf_t *slot_symbols);
|
||
11 years ago
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_pdcch_put_offset(srslte_regs_t *h,
|
||
|
cf_t *d,
|
||
10 years ago
|
cf_t *slot_symbols,
|
||
|
uint32_t start_reg,
|
||
|
uint32_t nof_regs);
|
||
|
|
||
10 years ago
|
SRSLTE_API int srslte_regs_pdcch_get(srslte_regs_t *h,
|
||
10 years ago
|
cf_t *slot_symbols,
|
||
10 years ago
|
cf_t *d);
|
||
|
|
||
|
SRSLTE_API int srslte_regs_pdcch_get_offset(srslte_regs_t *h,
|
||
|
cf_t *slot_symbols,
|
||
|
cf_t *d,
|
||
|
uint32_t start_reg,
|
||
|
uint32_t nof_regs);
|
||
10 years ago
|
|
||
11 years ago
|
#endif // REGS_H_
|
||
11 years ago
|
|
||
|
|