Fixed bug transmitting SR with HARQ

master
ismagom 10 years ago
parent 218a4908d9
commit ca2fddc511

@ -256,7 +256,7 @@ bool ul_buffer::generate_data(ul_sched_grant *grant, srslte_softbuffer_tx_t *sof
} else if (uci_data.scheduling_request || uci_data.uci_cqi_len > 0 || uci_data.uci_ack_len) { } else if (uci_data.scheduling_request || uci_data.uci_cqi_len > 0 || uci_data.uci_ack_len) {
n = srslte_ue_ul_pucch_encode(&ue_ul, uci_data, tti%10, signal_buffer); n = srslte_ue_ul_pucch_encode(&ue_ul, uci_data, tti, signal_buffer);
Info("PUCCH: TTI=%d, CFO= %.1f KHz n_cce=%d, ack=%s, sr=%s, shortened=%s\n", tti, cfo*15e3, last_n_cce, Info("PUCCH: TTI=%d, CFO= %.1f KHz n_cce=%d, ack=%s, sr=%s, shortened=%s\n", tti, cfo*15e3, last_n_cce,
uci_data.uci_ack_len>0?(uci_data.uci_ack?"1":"0"):"no",uci_data.scheduling_request?"yes":"no", uci_data.uci_ack_len>0?(uci_data.uci_ack?"1":"0"):"no",uci_data.scheduling_request?"yes":"no",

@ -208,24 +208,18 @@ int srslte_ue_ul_pucch_encode(srslte_ue_ul_t *q, srslte_uci_data_t uci_data,
bzero(pucch_bits, SRSLTE_PUCCH_MAX_BITS*sizeof(uint8_t)); bzero(pucch_bits, SRSLTE_PUCCH_MAX_BITS*sizeof(uint8_t));
bzero(pucch2_bits, 2*sizeof(uint8_t)); bzero(pucch2_bits, 2*sizeof(uint8_t));
// 1-bit ACK + SR // 1-bit ACK + optional SR
if (uci_data.uci_ack_len == 1) { if (uci_data.uci_ack_len == 1) {
format = SRSLTE_PUCCH_FORMAT_1A; format = SRSLTE_PUCCH_FORMAT_1A;
pucch_bits[0] = uci_data.uci_ack; pucch_bits[0] = uci_data.uci_ack;
} }
// 2-bit ACK + SR // 2-bit ACK + optional SR
else if (uci_data.uci_ack_len == 2 && uci_data.scheduling_request) { else if (uci_data.uci_ack_len == 2) {
format = SRSLTE_PUCCH_FORMAT_1B; format = SRSLTE_PUCCH_FORMAT_1B;
pucch_bits[0] = uci_data.uci_ack; pucch_bits[0] = uci_data.uci_ack;
pucch_bits[1] = uci_data.uci_ack_2; pucch_bits[1] = uci_data.uci_ack_2;
} }
// 2-bit ACK with channel selection // SR only
else if (uci_data.uci_ack_len == 2 && uci_data.channel_selection) {
format = SRSLTE_PUCCH_FORMAT_1B;
pucch_bits[0] = uci_data.uci_ack;
pucch_bits[1] = uci_data.uci_ack_2;
}
// scheduling_request
else if (uci_data.scheduling_request) { else if (uci_data.scheduling_request) {
format = SRSLTE_PUCCH_FORMAT_1; format = SRSLTE_PUCCH_FORMAT_1;
} }
@ -260,7 +254,7 @@ int srslte_ue_ul_pucch_encode(srslte_ue_ul_t *q, srslte_uci_data_t uci_data,
// Choose n_pucch // Choose n_pucch
uint32_t n_pucch = 0; uint32_t n_pucch = 0;
if (format == SRSLTE_PUCCH_FORMAT_1) { if (uci_data.scheduling_request) {
n_pucch = q->pucch_sched.n_pucch_sr; n_pucch = q->pucch_sched.n_pucch_sr;
} else if (format < SRSLTE_PUCCH_FORMAT_2) { } else if (format < SRSLTE_PUCCH_FORMAT_2) {
if (q->pucch_sched.sps_enabled) { if (q->pucch_sched.sps_enabled) {

Loading…
Cancel
Save