srsLTE/lib/include/srslte/phy/phch/pdsch_cfg_nr.h

163 lines
4.4 KiB
C
Raw Normal View History

/**
2020-10-16 06:18:24 -07:00
*
* \section COPYRIGHT
2020-10-16 06:18:24 -07:00
*
* Copyright 2013-2020 Software Radio Systems Limited
2020-10-16 06:18:24 -07:00
*
* 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.
2020-10-16 06:18:24 -07:00
*
*/
/******************************************************************************
* File: pdsch_cfg_nr.h
*
* Description: Physical downlink shared channel configuration
*
* Reference:
*****************************************************************************/
#ifndef SRSLTE_PDSCH_CFG_NR_H
#define SRSLTE_PDSCH_CFG_NR_H
#include "srslte/phy/common/phy_common_nr.h"
2020-11-10 11:04:12 -08:00
#include "srslte/phy/phch/sch_cfg_nr.h"
2020-10-16 06:18:24 -07:00
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief PDSCH DMRS type
*/
typedef enum {
srslte_dmrs_pdsch_type_1 = 0, // 1 pilot every 2 sub-carriers (default)
srslte_dmrs_pdsch_type_2 // 2 consecutive pilots every 6 sub-carriers
} srslte_dmrs_pdsch_type_t;
/**
* @brief PDSCH DMRS length in symbols
*/
typedef enum {
srslte_dmrs_pdsch_len_1 = 0, // single, 1 symbol long (default)
srslte_dmrs_pdsch_len_2 // double, 2 symbol long
} srslte_dmrs_pdsch_len_t;
/**
* @brief Determines whether the first pilot goes into symbol index 2 or 3
*/
typedef enum {
srslte_dmrs_pdsch_typeA_pos_2 = 0, // Start in slot symbol index 2 (default)
srslte_dmrs_pdsch_typeA_pos_3 // Start in slot symbol index 3
} srslte_dmrs_pdsch_typeA_pos_t;
/**
* @brief Determines additional symbols if possible to be added
*/
typedef enum {
srslte_dmrs_pdsch_add_pos_2 = 0,
srslte_dmrs_pdsch_add_pos_0,
srslte_dmrs_pdsch_add_pos_1,
srslte_dmrs_pdsch_add_pos_3
} srslte_dmrs_pdsch_add_pos_t;
/**
* @brief Provides PDSCH DMRS configuration from higher layers
* @remark Parameters described in TS 38.331 V15.10.0
*/
typedef struct {
/// Parameters provided by IE DMRS-DownlinkConfig
2020-11-03 07:06:47 -08:00
srslte_dmrs_pdsch_type_t type;
srslte_dmrs_pdsch_add_pos_t additional_pos;
srslte_dmrs_pdsch_len_t length;
bool scrambling_id0_present;
uint32_t scrambling_id0;
bool scrambling_id1_present;
uint32_t scrambling_id1;
2020-10-20 02:05:11 -07:00
/// Parameters provided by ServingCellConfigCommon
srslte_dmrs_pdsch_typeA_pos_t typeA_pos;
2020-11-03 07:06:47 -08:00
bool lte_CRS_to_match_around;
/// Parameters provided by FeatureSetDownlink-v1540
bool additional_DMRS_DL_Alt;
} srslte_pdsch_dmrs_cfg_t;
2020-10-16 06:18:24 -07:00
/**
* @brief flatten PDSCH time domain allocation parameters
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-TimeDomainResourceAllocationList
*/
typedef struct SRSLTE_API {
/// Slot offset between DCI and its scheduled PDSCH
uint32_t k0;
/// PDSCH mapping type
srslte_pdsch_mapping_type_t mapping_type;
/// 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;
} srslte_pdsch_allocation_t;
2020-11-03 07:06:47 -08:00
/**
* @brief PDSCH grant information provided by the Downlink Control Information (DCI)
*/
2020-10-16 06:18:24 -07:00
typedef struct SRSLTE_API {
/// UE identifier
uint16_t rnti;
srslte_rnti_type_t rnti_type;
2020-10-16 06:18:24 -07:00
/// Time domain resources
uint32_t k0;
uint32_t S;
uint32_t L;
srslte_pdsch_mapping_type_t mapping;
/// Frequency domain resources
bool prb_idx[SRSLTE_MAX_PRB_NR];
2020-10-16 06:18:24 -07:00
/// Number of DMRS groups without data
/// Described in TS 38.214 Section 5.1.6.2
uint32_t nof_dmrs_cdm_groups_without_data;
2020-11-03 07:06:47 -08:00
/// Spatial resources
uint32_t nof_layers;
/// DMRS Scrambling sequence initialization (false: 0 or true: 1)
bool n_scid;
2020-10-16 06:18:24 -07:00
2020-11-03 07:06:47 -08:00
/// DCI information
srslte_dci_format_nr_t dci_format;
srslte_search_space_type_t dci_search_space;
/// Transport block
2020-11-03 07:06:47 -08:00
uint32_t tb_scaling_field;
/// ....
2020-11-10 11:04:12 -08:00
srslte_sch_tb_t tb[SRSLTE_MAX_TB];
} srslte_pdsch_grant_nr_t;
2020-11-03 07:06:47 -08:00
/**
* @brief flatten PDSCH configuration parameters provided by higher layers
* @remark Described in TS 38.331 V15.10.0 Section PDSCH-Config
*/
typedef struct SRSLTE_API {
2020-11-03 07:06:47 -08:00
bool scrambling_id_present;
uint32_t scambling_id; // Identifier used to initialize data scrambling (0-1023)
srslte_pdsch_dmrs_cfg_t dmrs_cfg_typeA;
srslte_pdsch_dmrs_cfg_t dmrs_cfg_typeB;
2020-11-05 09:54:05 -08:00
2020-11-10 11:04:12 -08:00
srslte_sch_cfg_t sch_cfg; ///< Common shared channel parameters
2020-10-16 06:18:24 -07:00
} srslte_pdsch_cfg_nr_t;
#ifdef __cplusplus
}
#endif
2020-10-16 06:18:24 -07:00
#endif // SRSLTE_PDSCH_CFG_NR_H