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.
167 lines
5.6 KiB
C
167 lines
5.6 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_CSI_CFG_H
|
||
|
#define SRSRAN_CSI_CFG_H
|
||
4 years ago
|
|
||
|
#include "pucch_cfg_nr.h"
|
||
4 years ago
|
#include "srsran/config.h"
|
||
4 years ago
|
#include <stdint.h>
|
||
|
|
||
|
/**
|
||
|
* @brief Maximum number of CSI report configurations defined in TS 38.331 maxNrofCSI-ReportConfigurations
|
||
|
*/
|
||
4 years ago
|
#define SRSRAN_CSI_MAX_NOF_REPORT 48
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Maximum number of CSI-RS resources defined in TS 38.331 maxNrofCSI-ResourceConfigurations
|
||
|
*/
|
||
4 years ago
|
#define SRSRAN_CSI_MAX_NOF_RESOURCES 112
|
||
4 years ago
|
/**
|
||
|
* @brief CSI report types defined in TS 38.331 CSI-ReportConfig
|
||
|
*/
|
||
4 years ago
|
typedef enum SRSRAN_API {
|
||
|
SRSRAN_CSI_REPORT_TYPE_NONE = 0,
|
||
|
SRSRAN_CSI_REPORT_TYPE_PERIODIC,
|
||
|
SRSRAN_CSI_REPORT_TYPE_SEMI_PERSISTENT_ON_PUCCH,
|
||
|
SRSRAN_CSI_REPORT_TYPE_SEMI_PERSISTENT_ON_PUSCH,
|
||
|
SRSRAN_CSI_REPORT_TYPE_APERIODIC,
|
||
|
} srsran_csi_report_type_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CSI report quantities defined in TS 38.331 CSI-ReportConfig
|
||
|
*/
|
||
4 years ago
|
typedef enum SRSRAN_API {
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_NONE = 0,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_PMI_CQI,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_I1,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_I1_CQI,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_CQI,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RSRP,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_SSB_INDEX_RSRP,
|
||
|
SRSRAN_CSI_REPORT_QUANTITY_CRI_RI_LI_PMI_CQI
|
||
|
} srsran_csi_report_quantity_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CSI report frequency configuration defined in TS 38.331 CSI-ReportConfig
|
||
|
*/
|
||
4 years ago
|
typedef enum SRSRAN_API {
|
||
|
SRSRAN_CSI_REPORT_FREQ_WIDEBAND = 0,
|
||
|
SRSRAN_CSI_REPORT_FREQ_SUBBAND
|
||
|
} srsran_csi_report_freq_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CQI table selection
|
||
|
*/
|
||
4 years ago
|
typedef enum SRSRAN_API {
|
||
|
SRSRAN_CSI_CQI_TABLE_1 = 0,
|
||
|
SRSRAN_CSI_CQI_TABLE_2,
|
||
|
SRSRAN_CSI_CQI_TABLE_3,
|
||
|
} srsran_csi_cqi_table_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CSI periodic report configuration from upper layers
|
||
|
* @remark Described in TS 38.331 CSI-ReportConfig
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
uint32_t period; ///< Period in slots
|
||
|
uint32_t offset; ///< Offset from beginning of the period in slots
|
||
4 years ago
|
srsran_pucch_nr_resource_t resource; ///< PUCCH resource to use for reporting
|
||
|
} srsran_csi_periodic_report_cfg_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CSI report configuration from higher layers
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
uint32_t channel_meas_id; ///< Channel measurement resource identifier
|
||
|
uint32_t interf_meas_id; ///< Interference measurement resource identifier
|
||
|
bool interf_meas_present; ///< Indicates if interference measurement identifier is present
|
||
4 years ago
|
srsran_csi_report_type_t type; ///< CSI report type (none, periodic, semiPersistentOnPUCCH, ...)
|
||
4 years ago
|
union {
|
||
|
void* none; ///< Reserved, no configured
|
||
4 years ago
|
srsran_csi_periodic_report_cfg_t periodic; ///< Used for periodic reporting
|
||
4 years ago
|
// ... add here other types
|
||
|
};
|
||
4 years ago
|
srsran_csi_report_quantity_t quantity; ///< Report quantity
|
||
|
srsran_csi_cqi_table_t cqi_table; ///< CQI table selection
|
||
|
srsran_csi_report_freq_t freq_cfg; ///< Determine whether it is wideband or subband
|
||
|
} srsran_csi_hl_report_cfg_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief General CSI configuration provided by higher layers
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
|
srsran_csi_hl_report_cfg_t reports[SRSRAN_CSI_MAX_NOF_REPORT]; ///< CSI report configuration
|
||
4 years ago
|
// ... add here physical CSI measurement sets
|
||
4 years ago
|
} srsran_csi_hl_cfg_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Generic measurement structure
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
uint32_t cri; ///< CSI-RS Resource Indicator
|
||
|
float wideband_rsrp_dBm; ///< Measured NZP-CSI-RS RSRP (Ignore for IM-CSI-RS)
|
||
|
float wideband_epre_dBm; ///< Measured EPRE
|
||
|
float wideband_snr_db; ///< SNR calculated from NZP-CSI-RS RSRP and EPRE (Ignore for IM-CSI-RS)
|
||
|
|
||
|
// Resource set context
|
||
|
uint32_t nof_ports; ///< Number of antenna ports
|
||
|
uint32_t K_csi_rs; ///< Number of CSI-RS in the corresponding resource set
|
||
4 years ago
|
} srsran_csi_measurements_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief CSI report configuration
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
|
srsran_csi_report_type_t type; ///< CSI report type (none, periodic, semiPersistentOnPUCCH, ...)
|
||
|
srsran_csi_report_quantity_t quantity; ///< Report quantity
|
||
|
srsran_pucch_nr_resource_t pucch_resource; ///< PUCCH resource to use for periodic reporting
|
||
|
srsran_csi_report_freq_t freq_cfg; ///< Determine whether it is wideband or subband
|
||
4 years ago
|
|
||
|
// Resource set context
|
||
|
uint32_t nof_ports; ///< Number of antenna ports
|
||
|
uint32_t K_csi_rs; ///< Number of CSI-RS in the corresponding resource set
|
||
4 years ago
|
bool has_part2; ///< Set to true if the report has part 2
|
||
4 years ago
|
} srsran_csi_report_cfg_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Wideband CSI report values
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
uint32_t ri;
|
||
|
uint32_t pmi;
|
||
|
uint32_t cqi;
|
||
4 years ago
|
} srsran_csi_report_wideband_cri_ri_pmi_cqi_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Unified CSI report values
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
uint32_t cri; ///< CSI-RS Resource Indicator
|
||
|
union {
|
||
|
void* none;
|
||
4 years ago
|
srsran_csi_report_wideband_cri_ri_pmi_cqi_t wideband_cri_ri_pmi_cqi;
|
||
4 years ago
|
};
|
||
|
bool valid; ///< Used by receiver only
|
||
4 years ago
|
} srsran_csi_report_value_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Complete report configuration and value
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
|
srsran_csi_report_cfg_t cfg[SRSRAN_CSI_MAX_NOF_REPORT]; ///< Configuration ready for encoding
|
||
|
srsran_csi_report_value_t value[SRSRAN_CSI_MAX_NOF_REPORT]; ///< Quantified values
|
||
4 years ago
|
uint32_t nof_reports; ///< Total number of reports to transmit
|
||
4 years ago
|
} srsran_csi_reports_t;
|
||
4 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_CSI_CFG_H
|