srsLTE: Added PUCCH format 3 valid correlation

master
Xavier Arteaga 4 years ago committed by Xavier Arteaga
parent 0192130742
commit 729986f259

@ -55,6 +55,7 @@
#define SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1 (0.5f)
#define SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT1A (0.5f)
#define SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT2 (0.5f)
#define SRSLTE_PUCCH_DEFAULT_THRESHOLD_FORMAT3 (0.5f)
#define SRSLTE_PUCCH_DEFAULT_THRESHOLD_DMRS (0.4f)
typedef struct {

@ -75,6 +75,7 @@ typedef struct SRSLTE_API {
float threshold_format1;
float threshold_data_valid_format1a;
float threshold_data_valid_format2;
float threshold_data_valid_format3;
float threshold_dmrs_detection;
// PUCCH configuration generated during a call to encode/decode

@ -809,7 +809,7 @@ static bool decode_signal(srslte_pucch_t* q,
break;
case SRSLTE_PUCCH_FORMAT_3:
corr = (float)decode_signal_format3(q, sf, cfg, pucch_bits, q->z) / 4800.0f;
detected = true;
detected = corr > cfg->threshold_data_valid_format3;
break;
default:
ERROR("PUCCH format %d not implemented\n", cfg->format);
@ -831,7 +831,7 @@ static void decode_bits(srslte_pucch_cfg_t* cfg,
uint32_t nof_ack = srslte_uci_cfg_total_ack(&cfg->uci_cfg);
memcpy(uci_data->ack.ack_value, pucch_bits, nof_ack);
uci_data->scheduling_request = (pucch_bits[nof_ack] == 1);
uci_data->ack.valid = true;
uci_data->ack.valid = pucch_found;
} else {
// If was looking for scheduling request, update value
if (cfg->uci_cfg.is_scheduling_request_tti) {

@ -886,11 +886,16 @@ int srslte_uci_data_info(srslte_uci_cfg_t* uci_cfg, srslte_uci_value_t* uci_data
uint32_t nof_acks = srslte_uci_cfg_total_ack(uci_cfg);
if (nof_acks) {
n = srslte_print_check(str, str_len, n, ", ack=");
for (uint32_t i = 0; i < nof_acks; i++) {
n = srslte_print_check(str, str_len, n, "%d", uci_data->ack.ack_value[i]);
}
if (uci_cfg->ack[0].N_bundle) {
n = srslte_print_check(str, str_len, n, ", n_bundle=%d", uci_cfg->ack[0].N_bundle);
if (uci_data->ack.valid) {
for (uint32_t i = 0; i < nof_acks; i++) {
n = srslte_print_check(str, str_len, n, "%d", uci_data->ack.ack_value[i]);
}
if (uci_cfg->ack[0].N_bundle) {
n = srslte_print_check(str, str_len, n, ", n_bundle=%d", uci_cfg->ack[0].N_bundle);
}
} else {
n = srslte_print_check(str, str_len, n, "invalid");
}
}

Loading…
Cancel
Save