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.
114 lines
3.7 KiB
C
114 lines
3.7 KiB
C
4 years ago
|
/**
|
||
11 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
11 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
11 years ago
|
*
|
||
4 years ago
|
* By using this file, you agree to the terms and conditions set
|
||
|
* forth in the LICENSE file which can be found at the top level of
|
||
|
* the distribution.
|
||
11 years ago
|
*
|
||
|
*/
|
||
|
|
||
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
|
|
||
4 years ago
|
#ifndef SRSRAN_REGS_H
|
||
|
#define SRSRAN_REGS_H
|
||
11 years ago
|
|
||
4 years ago
|
#include "srsran/config.h"
|
||
|
#include "srsran/phy/common/phy_common.h"
|
||
5 years ago
|
#include <stdbool.h>
|
||
11 years ago
|
|
||
5 years ago
|
#define REGS_PHICH_NSYM 12
|
||
|
#define REGS_PHICH_REGS_X_GROUP 3
|
||
11 years ago
|
|
||
5 years ago
|
#define REGS_PCFICH_NSYM 16
|
||
|
#define REGS_PCFICH_NREGS 4
|
||
11 years ago
|
|
||
5 years ago
|
#define REGS_RE_X_REG 4
|
||
11 years ago
|
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
11 years ago
|
uint32_t k[4];
|
||
|
uint32_t k0;
|
||
|
uint32_t l;
|
||
5 years ago
|
bool assigned;
|
||
4 years ago
|
} srsran_regs_reg_t;
|
||
11 years ago
|
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
5 years ago
|
uint32_t nof_regs;
|
||
4 years ago
|
srsran_regs_reg_t** regs;
|
||
|
} srsran_regs_ch_t;
|
||
11 years ago
|
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
|
srsran_cell_t cell;
|
||
5 years ago
|
uint32_t max_ctrl_symbols;
|
||
|
uint32_t ngroups_phich;
|
||
6 years ago
|
uint32_t ngroups_phich_m1;
|
||
6 years ago
|
|
||
4 years ago
|
srsran_phich_r_t phich_res;
|
||
|
srsran_phich_length_t phich_len;
|
||
5 years ago
|
|
||
4 years ago
|
srsran_regs_ch_t pcfich;
|
||
|
srsran_regs_ch_t* phich; // there are several phich
|
||
|
srsran_regs_ch_t pdcch[3]; /* PDCCH indexing, permutation and interleaving is computed for
|
||
5 years ago
|
the three possible CFI value */
|
||
6 years ago
|
|
||
|
uint32_t phich_mi;
|
||
5 years ago
|
uint32_t nof_regs;
|
||
4 years ago
|
srsran_regs_reg_t* regs;
|
||
|
} srsran_regs_t;
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_init(srsran_regs_t* h, srsran_cell_t cell);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_init_opts(srsran_regs_t* h, srsran_cell_t cell, uint32_t phich_mi, bool mbsfn_or_sf1_6_tdd);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API void srsran_regs_free(srsran_regs_t* h);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_nregs(srsran_regs_t* h, uint32_t cfi);
|
||
7 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_ncce(srsran_regs_t* h, uint32_t cfi);
|
||
7 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pcfich_put(srsran_regs_t* h, cf_t symbols[REGS_PCFICH_NSYM], cf_t* slot_symbols);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pcfich_get(srsran_regs_t* h, cf_t* slot_symbols, cf_t symbols[REGS_PCFICH_NSYM]);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API uint32_t srsran_regs_phich_nregs(srsran_regs_t* h);
|
||
6 years ago
|
|
||
4 years ago
|
SRSRAN_API int
|
||
|
srsran_regs_phich_add(srsran_regs_t* h, cf_t symbols[REGS_PHICH_NSYM], uint32_t ngroup, cf_t* slot_symbols);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int
|
||
|
srsran_regs_phich_get(srsran_regs_t* h, cf_t* slot_symbols, cf_t symbols[REGS_PHICH_NSYM], uint32_t ngroup);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API uint32_t srsran_regs_phich_ngroups(srsran_regs_t* h);
|
||
6 years ago
|
|
||
4 years ago
|
SRSRAN_API uint32_t srsran_regs_phich_ngroups_m1(srsran_regs_t* h);
|
||
6 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_phich_reset(srsran_regs_t* h, cf_t* slot_symbols);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_put(srsran_regs_t* h, uint32_t cfi, cf_t* d, cf_t* slot_symbols);
|
||
5 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_put_offset(srsran_regs_t* h,
|
||
5 years ago
|
uint32_t cfi,
|
||
|
cf_t* d,
|
||
|
cf_t* slot_symbols,
|
||
|
uint32_t start_reg,
|
||
|
uint32_t nof_regs);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_get(srsran_regs_t* h, uint32_t cfi, cf_t* slot_symbols, cf_t* d);
|
||
11 years ago
|
|
||
4 years ago
|
SRSRAN_API int srsran_regs_pdcch_get_offset(srsran_regs_t* h,
|
||
5 years ago
|
uint32_t cfi,
|
||
|
cf_t* slot_symbols,
|
||
|
cf_t* d,
|
||
|
uint32_t start_reg,
|
||
|
uint32_t nof_regs);
|
||
|
|
||
4 years ago
|
#endif // SRSRAN_REGS_H
|