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.
105 lines
5.1 KiB
C
105 lines
5.1 KiB
C
4 years ago
|
/**
|
||
|
*
|
||
|
* \section COPYRIGHT
|
||
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
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.
|
||
|
*
|
||
|
*/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_DMRS_PUCCH_H
|
||
|
#define SRSRAN_DMRS_PUCCH_H
|
||
4 years ago
|
|
||
4 years ago
|
#include "srsran/config.h"
|
||
|
#include "srsran/phy/ch_estimation/chest_ul.h"
|
||
|
#include "srsran/phy/phch/pucch_nr.h"
|
||
4 years ago
|
|
||
4 years ago
|
#define SRSRAN_DMRS_PUCCH_FORMAT_3_4_MAX_NSYMB 4
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Computes the symbol indexes carrying DMRS for NR-PUCCH formats 3 and 4
|
||
|
* @remark Implements TS 38.211 Table 6.4.1.3.3.2-1: DM-RS positions for PUCCH format 3 and 4.
|
||
|
* @param[in] resource Provides the format 3 or 4 resource
|
||
|
* @param[out] idx Destination data for storing the symbol indexes
|
||
4 years ago
|
* @return The number of DMRS symbols if the resource is valid, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_dmrs_pucch_format_3_4_get_symbol_idx(const srsran_pucch_nr_resource_t* resource,
|
||
|
uint32_t idx[SRSRAN_DMRS_PUCCH_FORMAT_3_4_MAX_NSYMB]);
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief Puts NR-PUCCH format 1 DMRS in the provided resource grid
|
||
|
* @param[in] q NR-PUCCH encoder/decoder object
|
||
|
* @param[in] carrier Carrier configuration
|
||
|
* @param[in] cfg PUCCH common configuration
|
||
|
* @param[in] slot slot configuration
|
||
|
* @param[in] resource PUCCH format 1 resource
|
||
|
* @param[out] slot_symbols Resource grid of the given slot
|
||
4 years ago
|
* @return SRSRAN_SUCCESS if successful, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_dmrs_pucch_format1_put(const srsran_pucch_nr_t* q,
|
||
|
const srsran_carrier_nr_t* carrier,
|
||
|
const srsran_pucch_nr_common_cfg_t* cfg,
|
||
|
const srsran_slot_cfg_t* slot,
|
||
|
const srsran_pucch_nr_resource_t* resource,
|
||
4 years ago
|
cf_t* slot_symbols);
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Estimates NR-PUCCH format 1 resource elements from their DMRS in the provided resource grid
|
||
|
* @param[in] q NR-PUCCH encoder/decoder object
|
||
|
* @param[in] carrier Carrier configuration
|
||
|
* @param[in] cfg PUCCH common configuration
|
||
|
* @param[in] slot slot configuration
|
||
|
* @param[in] resource PUCCH format 1 resource
|
||
|
* @param[in] slot_symbols Resource grid of the given slot
|
||
|
* @param[out] res UL Channel estimator result
|
||
4 years ago
|
* @return SRSRAN_SUCCESS if successful, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
SRSRAN_API int srsran_dmrs_pucch_format1_estimate(const srsran_pucch_nr_t* q,
|
||
|
const srsran_carrier_nr_t* carrier,
|
||
|
const srsran_pucch_nr_common_cfg_t* cfg,
|
||
|
const srsran_slot_cfg_t* slot,
|
||
|
const srsran_pucch_nr_resource_t* resource,
|
||
4 years ago
|
const cf_t* slot_symbols,
|
||
4 years ago
|
srsran_chest_ul_res_t* res);
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief Puts NR-PUCCH format 2 DMRS in the provided resource grid
|
||
|
* @param[in] q NR-PUCCH encoder/decoder object
|
||
|
* @param[in] carrier Carrier configuration
|
||
|
* @param[in] cfg PUCCH common configuration
|
||
|
* @param[in] slot slot configuration
|
||
|
* @param[in] resource PUCCH format 2 resource
|
||
|
* @param[out] slot_symbols Resource grid of the given slot
|
||
4 years ago
|
* @return SRSRAN_SUCCESS if successful, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
int srsran_dmrs_pucch_format2_put(const srsran_pucch_nr_t* q,
|
||
|
const srsran_carrier_nr_t* carrier,
|
||
|
const srsran_pucch_nr_common_cfg_t* cfg,
|
||
|
const srsran_slot_cfg_t* slot,
|
||
|
const srsran_pucch_nr_resource_t* resource,
|
||
4 years ago
|
cf_t* slot_symbols);
|
||
|
|
||
|
/**
|
||
|
* @brief Estimates NR-PUCCH format 2 resource elements from their DMRS in the provided resource grid
|
||
|
* @param[in] q NR-PUCCH encoder/decoder object
|
||
|
* @param[in] carrier Carrier configuration
|
||
|
* @param[in] cfg PUCCH common configuration
|
||
|
* @param[in] slot slot configuration
|
||
|
* @param[in] resource PUCCH format 2 resource
|
||
|
* @param[in] slot_symbols Resource grid of the given slot
|
||
|
* @param[out] res UL Channel estimator result
|
||
4 years ago
|
* @return SRSRAN_SUCCESS if successful, SRSRAN_ERROR code otherwise
|
||
4 years ago
|
*/
|
||
4 years ago
|
int srsran_dmrs_pucch_format2_estimate(const srsran_pucch_nr_t* q,
|
||
|
const srsran_carrier_nr_t* carrier,
|
||
|
const srsran_pucch_nr_common_cfg_t* cfg,
|
||
|
const srsran_slot_cfg_t* slot,
|
||
|
const srsran_pucch_nr_resource_t* resource,
|
||
4 years ago
|
const cf_t* slot_symbols,
|
||
4 years ago
|
srsran_chest_ul_res_t* res);
|
||
4 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_DMRS_PUCCH_H
|