diff --git a/srslte/lib/phch/test/pusch_test.c b/srslte/lib/phch/test/pusch_test.c index 0cdf6e64c..8752cc734 100644 --- a/srslte/lib/phch/test/pusch_test.c +++ b/srslte/lib/phch/test/pusch_test.c @@ -169,7 +169,7 @@ int main(int argc, char **argv) { srslte_uci_data_t uci_data_tx; srslte_uci_data_t uci_data_rx; bzero(&uci_data_tx, sizeof(srslte_uci_data_t)); - uci_data_tx.uci_cqi_len = 9; + uci_data_tx.uci_cqi_len = 4; uci_data_tx.uci_ri_len = 0; uci_data_tx.uci_ack_len = 0; memcpy(&uci_data_rx, &uci_data_tx, sizeof(srslte_uci_data_t)); diff --git a/srslte/lib/phch/uci.c b/srslte/lib/phch/uci.c index 28351414b..ff656028b 100644 --- a/srslte/lib/phch/uci.c +++ b/srslte/lib/phch/uci.c @@ -118,13 +118,13 @@ void cqi_pusch_pregen(srslte_uci_cqi_pusch_t *q) { uint8_t word[11]; for (int i=0;i<11;i++) { - uint32_t nwords = (1<<(i+1)); - q->cqi_table[i] = srslte_vec_malloc(sizeof(uint8_t)*nwords*32); + uint32_t nwords = (1<<(i+1)); + q->cqi_table[i] = srslte_vec_malloc(sizeof(uint8_t)*nwords*32); q->cqi_table_s[i] = srslte_vec_malloc(sizeof(int16_t)*nwords*32); for (uint32_t w=0;wcqi_table[i][32*w]); + srslte_bit_unpack(w, &ptr, i+1); + encode_cqi_pusch_block(q, word, i+1, &q->cqi_table[i][32*w]); for (int j=0;j<32;j++) { q->cqi_table_s[i][32*w+j] = 2*q->cqi_table[i][32*w+j]-1; }