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.

65 lines
1.7 KiB
C

/**
*
* \section COPYRIGHT
*
* Copyright 2013-2021 Software Radio Systems Limited
*
* 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.
*
*/
#ifndef SRSRAN_UCI_CFG_H
#define SRSRAN_UCI_CFG_H
#include "srsran/phy/phch/cqi.h"
#define SRSRAN_UCI_MAX_ACK_BITS 10
#define SRSRAN_UCI_MAX_ACK_SR_BITS (SRSRAN_UCI_MAX_ACK_BITS + 1)
#define SRSRAN_UCI_MAX_M 9
typedef struct SRSRAN_API {
uint8_t ack_value[SRSRAN_UCI_MAX_ACK_BITS];
bool valid;
} srsran_uci_value_ack_t;
typedef struct SRSRAN_API {
bool pending_tb[SRSRAN_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
uint32_t ncce[SRSRAN_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;
} srsran_uci_cfg_ack_t;
typedef struct SRSRAN_API {
srsran_uci_cfg_ack_t ack[SRSRAN_MAX_CARRIERS];
srsran_cqi_cfg_t cqi;
bool is_scheduling_request_tti;
} srsran_uci_cfg_t;
typedef struct SRSRAN_API {
bool scheduling_request;
srsran_cqi_value_t cqi;
srsran_uci_value_ack_t ack;
uint8_t ri; // Only 1-bit supported for RI
} srsran_uci_value_t;
typedef struct SRSRAN_API {
srsran_uci_cfg_t cfg;
srsran_uci_value_t value;
} srsran_uci_data_t;
typedef enum { UCI_BIT_0 = 0, UCI_BIT_1 = 1, UCI_BIT_REPETITION = 2, UCI_BIT_PLACEHOLDER = 3 } srsran_uci_bit_type_t;
typedef struct {
uint32_t position;
srsran_uci_bit_type_t type;
} srsran_uci_bit_t;
#endif // SRSRAN_UCI_CFG_H