From 489129cb56295dd8963e9fcf41e3b87c21459d1c Mon Sep 17 00:00:00 2001 From: ismagom Date: Fri, 6 Mar 2015 14:11:48 +0100 Subject: [PATCH] Fixed ifft in ue_ul --- lte/examples/prach_ue.c | 8 +------- lte/phy/lib/ue/src/ue_ul.c | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lte/examples/prach_ue.c b/lte/examples/prach_ue.c index c328808c4..41a375119 100644 --- a/lte/examples/prach_ue.c +++ b/lte/examples/prach_ue.c @@ -465,8 +465,7 @@ int main(int argc, char **argv) { uint32_t ul_sf_idx = (ue_sync_get_sfidx(&ue_sync)+6)%10; - //ue_ul_set_cfo(&ue_ul, sync_get_cfo(&ue_sync.strack)); - + ue_ul_set_cfo(&ue_ul, sync_get_cfo(&ue_sync.strack)); bit_pack_vector((uint8_t*) conn_request_msg, data, ra_pusch.mcs.tbs); n = ue_ul_pusch_encode_rnti(&ue_ul, &ra_pusch, data, ul_sf_idx, rar_msg.temp_c_rnti, ul_signal); if (n < 0) { @@ -474,11 +473,6 @@ int main(int argc, char **argv) { exit(-1); } - vec_save_file("pusch_d2.dat", ue_ul.pusch.pusch_d, sizeof(float)*ra_pusch.mcs.tbs); - vec_save_file("sf_symbols2.dat", ue_ul.sf_symbols, sizeof(cf_t)*SF_LEN_RE(cell.nof_prb, cell.cp)); - vec_save_file("refsignal1_2.dat", ue_ul.refsignal, sizeof(cf_t)*12*3); - vec_save_file("ulsignal2.dat", ul_signal, sizeof(cf_t)*SF_LEN_PRB(cell.nof_prb)); - gettimeofday(&tdata[2], NULL); get_time_interval(tdata); printf("time exec UL: %d\n",tdata[0].tv_usec); diff --git a/lte/phy/lib/ue/src/ue_ul.c b/lte/phy/lib/ue/src/ue_ul.c index 376a7dddf..48a9f79ba 100644 --- a/lte/phy/lib/ue/src/ue_ul.c +++ b/lte/phy/lib/ue/src/ue_ul.c @@ -52,7 +52,7 @@ int ue_ul_init(ue_ul_t *q, q->cell = cell; - if (lte_fft_init(&q->fft, q->cell.cp, q->cell.nof_prb)) { + if (lte_ifft_init(&q->fft, q->cell.cp, q->cell.nof_prb)) { fprintf(stderr, "Error initiating FFT\n"); goto clean_exit; } @@ -182,21 +182,17 @@ int ue_ul_pusch_uci_encode_rnti(ue_ul_t *q, ra_pusch_t *ra_ul, uint8_t *data, uc ret = LIBLTE_ERROR; - printf("setting harq tbs: %d, rv_idx: %d, sf_idx: %d\n", ra_ul->mcs.tbs, ra_ul->rv_idx, sf_idx); if (harq_setup_ul(&q->harq_process[0], ra_ul->mcs, ra_ul->rv_idx, sf_idx, &ra_ul->prb_alloc)) { fprintf(stderr, "Error configuring HARQ process\n"); return ret; } - printf("encode rnti: %d\n", rnti); if (pusch_encode_rnti(&q->pusch, &q->harq_process[0], data, rnti, q->sf_symbols)) { fprintf(stderr, "Error encoding TB\n"); return ret; } - printf("drms cfg prb: %d, beta: %f\n", ra_ul->prb_alloc.L_prb, q->pusch_drms_cfg.beta_pusch); q->pusch_drms_cfg.nof_prb = ra_ul->prb_alloc.L_prb; - for (uint32_t i=0;i<2;i++) { // FIXME: Pregenerate for all possible number of prb if (refsignal_dmrs_pusch_gen(&q->drms, &q->pusch_drms_cfg, 2*sf_idx+i, q->refsignal)) {