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.
234 lines
7.4 KiB
C
234 lines
7.4 KiB
C
4 years ago
|
/**
|
||
4 years ago
|
*
|
||
4 years ago
|
* \section COPYRIGHT
|
||
4 years ago
|
*
|
||
4 years ago
|
* Copyright 2013-2021 Software Radio Systems Limited
|
||
4 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.
|
||
4 years ago
|
*
|
||
|
*/
|
||
|
|
||
|
/******************************************************************************
|
||
|
* File: pdsch_cfg_nr.h
|
||
|
*
|
||
|
* Description: Physical downlink shared channel configuration
|
||
|
*
|
||
|
* Reference:
|
||
|
*****************************************************************************/
|
||
|
|
||
4 years ago
|
#ifndef SRSRAN_PHCH_CFG_NR_H
|
||
|
#define SRSRAN_PHCH_CFG_NR_H
|
||
4 years ago
|
|
||
4 years ago
|
#include "srsran/phy/common/phy_common_nr.h"
|
||
|
#include "srsran/phy/phch/sch_cfg_nr.h"
|
||
|
#include "srsran/phy/phch/uci_cfg_nr.h"
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief PDSCH DMRS type
|
||
|
*/
|
||
|
typedef enum {
|
||
4 years ago
|
srsran_dmrs_sch_type_1 = 0, // 1 pilot every 2 sub-carriers (default)
|
||
|
srsran_dmrs_sch_type_2 // 2 consecutive pilots every 6 sub-carriers
|
||
|
} srsran_dmrs_sch_type_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief PDSCH DMRS length in symbols
|
||
|
*/
|
||
|
typedef enum {
|
||
4 years ago
|
srsran_dmrs_sch_len_1 = 0, // single, 1 symbol long (default)
|
||
|
srsran_dmrs_sch_len_2 // double, 2 symbol long
|
||
|
} srsran_dmrs_sch_len_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Determines whether the first pilot goes into symbol index 2 or 3
|
||
|
*/
|
||
|
typedef enum {
|
||
4 years ago
|
srsran_dmrs_sch_typeA_pos_2 = 0, // Start in slot symbol index 2 (default)
|
||
|
srsran_dmrs_sch_typeA_pos_3 // Start in slot symbol index 3
|
||
|
} srsran_dmrs_sch_typeA_pos_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Determines additional symbols if possible to be added
|
||
|
*/
|
||
|
typedef enum {
|
||
4 years ago
|
srsran_dmrs_sch_add_pos_2 = 0,
|
||
|
srsran_dmrs_sch_add_pos_0,
|
||
|
srsran_dmrs_sch_add_pos_1,
|
||
|
srsran_dmrs_sch_add_pos_3
|
||
|
} srsran_dmrs_sch_add_pos_t;
|
||
4 years ago
|
|
||
|
/**
|
||
4 years ago
|
* @brief Provides PDSCH DMRS configuration
|
||
4 years ago
|
* @remark Parameters described in TS 38.331 V15.10.0
|
||
|
*/
|
||
|
typedef struct {
|
||
|
/// Parameters provided by IE DMRS-DownlinkConfig
|
||
4 years ago
|
srsran_dmrs_sch_type_t type;
|
||
|
srsran_dmrs_sch_add_pos_t additional_pos;
|
||
|
srsran_dmrs_sch_len_t length;
|
||
4 years ago
|
bool scrambling_id0_present;
|
||
|
uint32_t scrambling_id0;
|
||
|
bool scrambling_id1_present;
|
||
|
uint32_t scrambling_id1;
|
||
4 years ago
|
|
||
4 years ago
|
/// Parameters provided by ServingCellConfigCommon
|
||
4 years ago
|
srsran_dmrs_sch_typeA_pos_t typeA_pos;
|
||
4 years ago
|
bool lte_CRS_to_match_around;
|
||
4 years ago
|
|
||
|
/// Parameters provided by FeatureSetDownlink-v1540
|
||
|
bool additional_DMRS_DL_Alt;
|
||
|
|
||
4 years ago
|
} srsran_dmrs_sch_cfg_t;
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
4 years ago
|
* @brief Common flatten PDSCH and PUSCH time domain allocation parameters
|
||
4 years ago
|
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-TimeDomainResourceAllocationList
|
||
4 years ago
|
* @remark Described in TS 38.331 V15.10.0 Section PUSCH-TimeDomainResourceAllocationList
|
||
4 years ago
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
/// For PDSCH Slot offset between DCI and its scheduled PDSCH
|
||
|
/// For PUSCH parameter K2
|
||
|
uint32_t k;
|
||
4 years ago
|
|
||
4 years ago
|
/// SCH mapping type
|
||
4 years ago
|
srsran_sch_mapping_type_t mapping_type;
|
||
4 years ago
|
|
||
|
/// An index giving valid combinations of start symbol and length (jointly encoded) as start and length indicator
|
||
|
/// (SLIV). The network configures the field so that the allocation does not cross the slot boundary
|
||
|
uint32_t sliv;
|
||
|
|
||
4 years ago
|
} srsran_sch_time_ra_t;
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief PDSCH grant information provided by the Downlink Control Information (DCI)
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
/// UE identifier
|
||
4 years ago
|
uint16_t rnti;
|
||
4 years ago
|
srsran_rnti_type_t rnti_type;
|
||
4 years ago
|
|
||
4 years ago
|
/// Time domain resources
|
||
4 years ago
|
uint32_t k; // k0 for PDSCH, k2 for PUSCH
|
||
4 years ago
|
uint32_t S;
|
||
|
uint32_t L;
|
||
4 years ago
|
srsran_sch_mapping_type_t mapping;
|
||
4 years ago
|
|
||
|
/// Frequency domain resources
|
||
4 years ago
|
bool prb_idx[SRSRAN_MAX_PRB_NR];
|
||
4 years ago
|
uint32_t nof_prb;
|
||
4 years ago
|
|
||
4 years ago
|
/// Number of DMRS groups without data
|
||
|
/// Described in TS 38.214 Section 5.1.6.2
|
||
|
uint32_t nof_dmrs_cdm_groups_without_data;
|
||
|
|
||
4 years ago
|
/// Linear DMRS power offset. Zero means unset and it is equivalent to one.
|
||
|
/// For PUSCH, see TS 38.214 Table 6.2.2-1 for more information
|
||
|
float beta_dmrs;
|
||
|
|
||
4 years ago
|
/// Spatial resources
|
||
|
uint32_t nof_layers;
|
||
|
|
||
4 years ago
|
/// DMRS Scrambling sequence initialization (false: 0 or true: 1)
|
||
|
bool n_scid;
|
||
4 years ago
|
|
||
4 years ago
|
/// DCI information
|
||
4 years ago
|
srsran_dci_format_nr_t dci_format;
|
||
|
srsran_search_space_type_t dci_search_space;
|
||
4 years ago
|
|
||
4 years ago
|
/// Transport block
|
||
4 years ago
|
uint32_t tb_scaling_field;
|
||
4 years ago
|
/// ....
|
||
4 years ago
|
|
||
4 years ago
|
srsran_sch_tb_t tb[SRSRAN_MAX_TB];
|
||
|
} srsran_sch_grant_nr_t;
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
|
* @brief Beta offset configuration provided from upper layers
|
||
|
* @remark Configure according to TS 38.331 BetaOffsets
|
||
|
*/
|
||
|
typedef struct {
|
||
|
uint32_t ack_index1; ///< Use for up to 2 HARQ-ACK bits. Set to 11 if absent.
|
||
|
uint32_t ack_index2; ///< Use for up to 11 HARQ-ACK bits. Set to 11 if absent.
|
||
|
uint32_t ack_index3; ///< Use for more than 11 HARQ-ACK bits. Set to 11 if absent.
|
||
|
uint32_t csi1_index1; ///< Use for up to 11 CSI bits. Set to 13 if absent.
|
||
|
uint32_t csi1_index2; ///< Use for more than 11 CSI bits. Set to 13 if absent.
|
||
|
uint32_t csi2_index1; ///< Use for up to 11 CSI bits. Set to 13 if absent.
|
||
|
uint32_t csi2_index2; ///< Use for more than 11 CSI bits. Set to 13 if absent.
|
||
4 years ago
|
} srsran_beta_offsets_t;
|
||
4 years ago
|
|
||
4 years ago
|
/**
|
||
4 years ago
|
* @brief flatten SCH configuration parameters provided by higher layers
|
||
4 years ago
|
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-Config
|
||
4 years ago
|
* @remark Described in TS 38.331 V15.10.0 Section PUSCH-Config
|
||
4 years ago
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
// Serving cell parameters
|
||
|
uint32_t scs_cfg; // Subcarrier spacing configuration
|
||
4 years ago
|
srsran_dmrs_sch_typeA_pos_t typeA_pos;
|
||
4 years ago
|
|
||
|
bool scrambling_id_present;
|
||
|
uint32_t scambling_id; // Identifier used to initialize data scrambling (0-1023)
|
||
|
|
||
4 years ago
|
struct {
|
||
4 years ago
|
srsran_dmrs_sch_type_t type;
|
||
|
srsran_dmrs_sch_add_pos_t additional_pos;
|
||
|
srsran_dmrs_sch_len_t length;
|
||
4 years ago
|
bool scrambling_id0_present;
|
||
|
uint32_t scrambling_id0;
|
||
|
bool scrambling_id1_present;
|
||
|
uint32_t scrambling_id1;
|
||
4 years ago
|
bool present;
|
||
4 years ago
|
} dmrs_typeA;
|
||
|
|
||
4 years ago
|
struct {
|
||
4 years ago
|
srsran_dmrs_sch_type_t type;
|
||
|
srsran_dmrs_sch_add_pos_t additional_pos;
|
||
|
srsran_dmrs_sch_len_t length;
|
||
4 years ago
|
bool scrambling_id0_present;
|
||
|
uint32_t scrambling_id0;
|
||
|
bool scrambling_id1_present;
|
||
|
uint32_t scrambling_id1;
|
||
|
bool present;
|
||
|
} dmrs_typeB;
|
||
4 years ago
|
|
||
4 years ago
|
srsran_sch_time_ra_t common_time_ra[SRSRAN_MAX_NOF_DL_ALLOCATION];
|
||
4 years ago
|
uint32_t nof_common_time_ra;
|
||
4 years ago
|
|
||
4 years ago
|
srsran_sch_time_ra_t dedicated_time_ra[SRSRAN_MAX_NOF_DL_ALLOCATION];
|
||
4 years ago
|
uint32_t nof_dedicated_time_ra;
|
||
4 years ago
|
|
||
|
bool rbg_size_cfg_1; ///< RBG size configuration (1 or 2)
|
||
4 years ago
|
|
||
4 years ago
|
srsran_sch_cfg_t sch_cfg; ///< Common shared channel parameters
|
||
4 years ago
|
|
||
|
/// PUSCH only
|
||
4 years ago
|
srsran_beta_offsets_t beta_offsets; /// Semi-static only.
|
||
4 years ago
|
float scaling; /// Indicates a scaling factor to limit the number of resource elements assigned to UCI on PUSCH.
|
||
4 years ago
|
} srsran_sch_hl_cfg_nr_t;
|
||
4 years ago
|
|
||
|
/**
|
||
|
* @brief Common NR-SCH (PDSCH and PUSCH for NR) configuration
|
||
|
*/
|
||
4 years ago
|
typedef struct SRSRAN_API {
|
||
4 years ago
|
bool scrambling_id_present;
|
||
|
uint32_t scambling_id; // Identifier used to initialize data scrambling (0-1023)
|
||
|
|
||
4 years ago
|
srsran_dmrs_sch_cfg_t dmrs;
|
||
|
srsran_sch_grant_nr_t grant;
|
||
4 years ago
|
|
||
4 years ago
|
srsran_sch_cfg_t sch_cfg; ///< Common shared channel parameters
|
||
4 years ago
|
|
||
4 years ago
|
/// PUSCH only parameters
|
||
4 years ago
|
srsran_uci_cfg_nr_t uci; ///< Uplink Control Information configuration
|
||
4 years ago
|
bool enable_transform_precoder;
|
||
|
float beta_harq_ack_offset;
|
||
|
float beta_csi_part1_offset;
|
||
4 years ago
|
float beta_csi_part2_offset;
|
||
4 years ago
|
float scaling;
|
||
4 years ago
|
bool freq_hopping_enabled;
|
||
4 years ago
|
} srsran_sch_cfg_nr_t;
|
||
4 years ago
|
|
||
4 years ago
|
#endif // SRSRAN_PHCH_CFG_NR_H
|