changed LTE_TS and added file save

master
ismagom 10 years ago
parent 003c9e49b1
commit 6208093981

@ -473,7 +473,12 @@ int main(int argc, char **argv) {
fprintf(stderr, "Error encoding PUSCH\n");
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);
@ -489,11 +494,12 @@ int main(int argc, char **argv) {
uint32_t n_ta = lte_N_ta_new_rar(rar_msg.timing_adv_cmd);
printf("ta: %d, n_ta: %d\n", rar_msg.timing_adv_cmd, n_ta);
float time_adv_sec = ((float) n_ta)*LTE_TS;
float time_adv_sec = ((float) n_ta)*TS_PRB(cell.nof_prb);
vec_sc_prod_cfc(ul_signal, 2, ul_signal, SF_LEN_PRB(cell.nof_prb));
timestamp_copy(&next_tx_time, &uhd_time);
timestamp_add(&next_tx_time, 0, 0.006 - time_adv_sec); // send after 6 sub-frames (6 ms)
printf("Send %d samples PUSCH sfn: %d. Last frame time = %.6f"
"send PUSCH time = %.6f TA: %.1f us\n",

@ -41,8 +41,6 @@
#define LTE_NSOFT_BITS 250368 // Soft buffer size for Category 1 UE
#define LTE_TS (1.0/(15000.0*2048.0))
#define MAX_PORTS 4
#define MAX_LAYERS 8
#define MAX_CODEWORDS 2
@ -100,6 +98,10 @@ typedef enum {CPNORM, CPEXT} lte_cp_t;
#define SLOT_LEN_RE(nof_prb, cp) (nof_prb*RE_X_RB*CP_NSYMB(cp))
#define SF_LEN_RE(nof_prb, cp) (2*SLOT_LEN_RE(nof_prb, cp))
#define TS_SYMBOLSZ(symbol_sz) (1.0/(15000.0*symbol_sz))
#define TS_PRB(nof_prb) TS_SYMBOLSZ(lte_symbol_sz(nof_prb))
#define SLOT_IDX_CPNORM(symbol_idx, symbol_sz) (symbol_idx==0?0:(symbol_sz + CP(symbol_sz, CPNORM_0_LEN) + \
(symbol_idx-1)*(symbol_sz+CP(symbol_sz, CPNORM_LEN))))
#define SLOT_IDX_CPEXT(idx, symbol_sz) (idx*(symbol_sz+CP(symbol_sz, CPEXT_LEN)))

Loading…
Cancel
Save