pusch_cqi_block: fixed incorrect table generation

master
Ismael Gomez 9 years ago
parent b934a27075
commit eeed44264c

@ -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));

@ -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;w<nwords;w++) {
uint8_t *ptr = word;
srslte_bit_unpack(w, &ptr, i);
encode_cqi_pusch_block(q, word, i, &q->cqi_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;
}

Loading…
Cancel
Save