Minor NR related corrections

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent 24cfed6489
commit 2e39e103f8

@ -295,8 +295,6 @@ typedef struct SRSLTE_API {
uint32_t id; uint32_t id;
uint32_t coreset_id; uint32_t coreset_id;
uint32_t duration; // in slots uint32_t duration; // in slots
uint32_t periodicity;
uint32_t offset;
srslte_search_space_type_t type; srslte_search_space_type_t type;
uint32_t nof_candidates[SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR]; uint32_t nof_candidates[SRSLTE_SEARCH_SPACE_NOF_AGGREGATION_LEVELS_NR];
} srslte_search_space_t; } srslte_search_space_t;

@ -77,11 +77,6 @@
*/ */
#define SRSLTE_PUCCH_NR_MAX_NOF_SETS 4 #define SRSLTE_PUCCH_NR_MAX_NOF_SETS 4
/**
* Maximum numer of NR-PUCCH CS indexes (TS 38.213 Table 9.2.1-1: PUCCH resource sets...)
*/
#define SRSLTE_PUCCH_NR_MAX_NOF_CS_INDEXES 4
typedef enum SRSLTE_API { typedef enum SRSLTE_API {
SRSLTE_PUCCH_NR_FORMAT_0 = 0, SRSLTE_PUCCH_NR_FORMAT_0 = 0,
SRSLTE_PUCCH_NR_FORMAT_1, SRSLTE_PUCCH_NR_FORMAT_1,

@ -49,11 +49,16 @@
* @brief Uplink Control Information (UCI) message configuration * @brief Uplink Control Information (UCI) message configuration
*/ */
typedef struct SRSLTE_API { typedef struct SRSLTE_API {
/// Common Parameters
uint32_t o_ack; ///< Number of HARQ-ACK bits uint32_t o_ack; ///< Number of HARQ-ACK bits
uint32_t o_sr; ///< Number of SR bits uint32_t o_sr; ///< Number of SR bits
uint32_t o_csi1; ///< Number of CSI1 report number of bits uint32_t o_csi1; ///< Number of CSI1 report number of bits
uint32_t o_csi2; ///< Number of CSI2 report number of bits uint32_t o_csi2; ///< Number of CSI2 report number of bits
srslte_mod_t modulation; ///< Modulation (PUSCH only)
/// PUSCH only parameters
srslte_mod_t modulation; ///< Modulation
/// PUCCH only parameters
uint16_t rnti; ///< RNTI uint16_t rnti; ///< RNTI
uint32_t pucch_resource_id; ///< PUCCH resource indicator field in the DCI format 1_0 or DCI format 1_1 uint32_t pucch_resource_id; ///< PUCCH resource indicator field in the DCI format 1_0 or DCI format 1_1
uint32_t n_cce_0; ///< index of a first CCE for the PDCCH reception uint32_t n_cce_0; ///< index of a first CCE for the PDCCH reception

@ -114,6 +114,11 @@ SRSLTE_API int srslte_uci_nr_decode_pucch(srslte_uci_nr_t* q,
int8_t* llr, int8_t* llr,
srslte_uci_value_nr_t* value); srslte_uci_value_nr_t* value);
/**
* @brief Calculates the total number of UCI bits
* @param uci_cfg UCI configuration
* @return The number of total bits carrying HARQ ACK, CSI reports and SR bits
*/
SRSLTE_API uint32_t srslte_uci_nr_total_bits(const srslte_uci_cfg_nr_t* uci_cfg); SRSLTE_API uint32_t srslte_uci_nr_total_bits(const srslte_uci_cfg_nr_t* uci_cfg);
/** /**

@ -19,7 +19,7 @@
#include "srslte/phy/phch/dci_nr.h" #include "srslte/phy/phch/dci_nr.h"
#include "srslte/phy/phch/pdcch_nr.h" #include "srslte/phy/phch/pdcch_nr.h"
#include "srslte/phy/phch/pdsch_nr.h" #include "srslte/phy/phch/pdsch_nr.h"
#include <srslte/phy/phch/uci_cfg_nr.h> #include "srslte/phy/phch/uci_cfg_nr.h"
/** /**
* Maximum number of CORESET * Maximum number of CORESET
@ -89,7 +89,7 @@ typedef struct {
typedef struct { typedef struct {
srslte_pdsch_ack_cc_nr_t cc[SRSLTE_MAX_CARRIERS]; srslte_pdsch_ack_cc_nr_t cc[SRSLTE_MAX_CARRIERS];
uint32_t nof_cc; uint32_t nof_cc;
bool use_pusch; // Ser to true, if UCI bits are carried by PUSCH bool use_pusch; // Set to true, if UCI bits are carried by PUSCH
} srslte_pdsch_ack_nr_t; } srslte_pdsch_ack_nr_t;
typedef struct SRSLTE_API { typedef struct SRSLTE_API {

@ -557,8 +557,7 @@ static int pucch_nr_format2_encode(srslte_pucch_nr_t* q,
uint32_t l_end = resource->start_symbol_idx + resource->nof_symbols; uint32_t l_end = resource->start_symbol_idx + resource->nof_symbols;
uint32_t k_start = SRSLTE_MIN(carrier->nof_prb - 1, resource->starting_prb) * SRSLTE_NRE; uint32_t k_start = SRSLTE_MIN(carrier->nof_prb - 1, resource->starting_prb) * SRSLTE_NRE;
uint32_t k_end = SRSLTE_MIN(carrier->nof_prb, resource->starting_prb + resource->nof_prb) * SRSLTE_NRE; uint32_t k_end = SRSLTE_MIN(carrier->nof_prb, resource->starting_prb + resource->nof_prb) * SRSLTE_NRE;
uint32_t i = 0; for (uint32_t l = l_start, i = 0; l < l_end; l++) {
for (uint32_t l = l_start; l < l_end; l++) {
cf_t* symbol_ptr = &slot_symbols[l * carrier->nof_prb * SRSLTE_NRE]; cf_t* symbol_ptr = &slot_symbols[l * carrier->nof_prb * SRSLTE_NRE];
for (uint32_t k = k_start; k < k_end; k += 3) { for (uint32_t k = k_start; k < k_end; k += 3) {
symbol_ptr[k] = q->d[i++]; symbol_ptr[k] = q->d[i++];
@ -566,17 +565,6 @@ static int pucch_nr_format2_encode(srslte_pucch_nr_t* q,
} }
} }
if (i * 2 != E) {
ERROR("Unmatched number of channel bits (%d!=%d); rb=(%d,%d); sym=(%d,%d)\n",
E,
2 * i,
k_start,
k_end,
l_start,
l_end);
return SRSLTE_ERROR;
}
return SRSLTE_SUCCESS; return SRSLTE_SUCCESS;
} }

@ -639,7 +639,7 @@ int ue_dl_nr_pdsch_k1(const srslte_ue_dl_nr_harq_ack_cfg_t* cfg, const srslte_dc
return SRSLTE_ERROR; return SRSLTE_ERROR;
} }
return cfg->dl_data_to_ul_ack[dci_dl->harq_feedback]; return (int)cfg->dl_data_to_ul_ack[dci_dl->harq_feedback];
} }
int srslte_ue_dl_nr_pdsch_ack_resource(const srslte_ue_dl_nr_harq_ack_cfg_t* cfg, int srslte_ue_dl_nr_pdsch_ack_resource(const srslte_ue_dl_nr_harq_ack_cfg_t* cfg,
@ -684,8 +684,8 @@ int srslte_ue_dl_nr_gen_ack(const srslte_ue_dl_nr_harq_ack_cfg_t* cfg,
} }
// According TS 38.213 9.1.3 Type-2 HARQ-ACK codebook determination // According TS 38.213 9.1.3 Type-2 HARQ-ACK codebook determination
// This clause applies if the UE is configured with pdsch-HARQ-ACK-Codebook = dynamic.
if (cfg->pdsch_harq_ack_codebook == srslte_pdsch_harq_ack_codebook_dynamic) { if (cfg->pdsch_harq_ack_codebook == srslte_pdsch_harq_ack_codebook_dynamic) {
// This clause applies if the UE is configured with pdsch-HARQ-ACK-Codebook = dynamic.
return ue_dl_nr_gen_ack_type2(cfg, ack_info, uci_data); return ue_dl_nr_gen_ack_type2(cfg, ack_info, uci_data);
} }

@ -333,6 +333,9 @@ bool cc_worker::work_ul()
srslte_ue_ul_nr_pucch_info(&resource, &uci_data, str.data(), str.size()); srslte_ue_ul_nr_pucch_info(&resource, &uci_data, str.data(), str.size());
logger.info("PUCCH: cc=%d, %s, tti_tx=%d", cc_idx, str.data(), ul_slot_cfg.idx); logger.info("PUCCH: cc=%d, %s, tti_tx=%d", cc_idx, str.data(), ul_slot_cfg.idx);
} }
} else {
// No NR signal shall be transmitted
srslte_vec_cf_zero(tx_buffer[0], ue_ul.ifft.sf_sz);
} }
return true; return true;

Loading…
Cancel
Save