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

65 lines
1.7 KiB
C
Raw Normal View History

/**
2019-04-23 01:53:11 -07:00
*
* \section COPYRIGHT
2019-04-23 01:53:11 -07:00
*
* Copyright 2013-2020 Software Radio Systems Limited
2019-04-23 01:53:11 -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.
2019-04-23 01:53:11 -07:00
*
*/
#ifndef SRSLTE_UCI_CFG_H
#define SRSLTE_UCI_CFG_H
#include "srslte/phy/phch/cqi.h"
#define SRSLTE_UCI_MAX_ACK_BITS 10
2020-03-04 05:53:41 -08:00
#define SRSLTE_UCI_MAX_ACK_SR_BITS (SRSLTE_UCI_MAX_ACK_BITS + 1)
2019-04-23 01:53:11 -07:00
#define SRSLTE_UCI_MAX_M 9
typedef struct SRSLTE_API {
uint8_t ack_value[SRSLTE_UCI_MAX_ACK_BITS];
bool valid;
} srslte_uci_value_ack_t;
typedef struct SRSLTE_API {
2020-02-10 03:59:23 -08:00
bool pending_tb[SRSLTE_MAX_CODEWORDS]; //< Indicates whether there was a grant that requires an ACK/NACK
uint32_t nof_acks; //< Number of transport blocks, deduced from transmission mode
2019-04-23 01:53:11 -07:00
uint32_t ncce[SRSLTE_UCI_MAX_M];
uint32_t N_bundle;
uint32_t tdd_ack_M;
uint32_t tdd_ack_m;
bool tdd_is_multiplex;
uint32_t tpc_for_pucch;
uint32_t grant_cc_idx;
2019-04-23 01:53:11 -07:00
} srslte_uci_cfg_ack_t;
typedef struct SRSLTE_API {
srslte_uci_cfg_ack_t ack[SRSLTE_MAX_CARRIERS];
2019-04-23 01:53:11 -07:00
srslte_cqi_cfg_t cqi;
bool is_scheduling_request_tti;
} srslte_uci_cfg_t;
typedef struct SRSLTE_API {
bool scheduling_request;
srslte_cqi_value_t cqi;
srslte_uci_value_ack_t ack;
uint8_t ri; // Only 1-bit supported for RI
} srslte_uci_value_t;
typedef struct SRSLTE_API {
srslte_uci_cfg_t cfg;
srslte_uci_value_t value;
} srslte_uci_data_t;
typedef enum { UCI_BIT_0 = 0, UCI_BIT_1 = 1, UCI_BIT_REPETITION = 2, UCI_BIT_PLACEHOLDER = 3 } srslte_uci_bit_type_t;
typedef struct {
uint32_t position;
srslte_uci_bit_type_t type;
} srslte_uci_bit_t;
#endif // SRSLTE_UCI_CFG_H