Merge branch 'working_mac' into test_mac_tti_threads

master
ismagom 9 years ago
commit aab347b6a9

@ -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) {
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,
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(pucch2_bits, 2*sizeof(uint8_t));
// 1-bit ACK + SR
// 1-bit ACK + optional SR
if (uci_data.uci_ack_len == 1) {
format = SRSLTE_PUCCH_FORMAT_1A;
pucch_bits[0] = uci_data.uci_ack;
}
// 2-bit ACK + SR
else if (uci_data.uci_ack_len == 2 && uci_data.scheduling_request) {
// 2-bit ACK + optional SR
else if (uci_data.uci_ack_len == 2) {
format = SRSLTE_PUCCH_FORMAT_1B;
pucch_bits[0] = uci_data.uci_ack;
pucch_bits[1] = uci_data.uci_ack_2;
}
// 2-bit ACK with channel selection
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
// SR only
else if (uci_data.scheduling_request) {
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
uint32_t n_pucch = 0;
if (format == SRSLTE_PUCCH_FORMAT_1) {
if (uci_data.scheduling_request) {
n_pucch = q->pucch_sched.n_pucch_sr;
} else if (format < SRSLTE_PUCCH_FORMAT_2) {
if (q->pucch_sched.sps_enabled) {

Loading…
Cancel
Save