Merge branch 'master' into next

master
Ismael Gomez 8 years ago
commit 23a362c9b0

@ -182,7 +182,7 @@ int main(int argc, char **argv) {
}
gettimeofday(&tdata[2], NULL);
get_time_interval(tdata);
printf("done in %d s %d ms\n", (int) tdata[0].tv_sec, (int) tdata[0].tv_usec/1000);
printf("done in %ld s %ld ms\n", (int) tdata[0].tv_sec, (int) tdata[0].tv_usec/1000);
printf("\n\tFr.Cnt\tN_id_2\tN_id_1\tSubf\tPSS Peak/Avg\tIdx\tm0\tm1\tCFO\n");
printf("\t===============================================================================\n");

@ -131,13 +131,13 @@ int main(int argc, char **argv) {
srslte_refsignal_dmrs_pusch_gen(&refs, nof_prb, sf_idx, cshift_dmrs, signal);
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("DMRS ExecTime: %d us\n", t[0].tv_usec);
printf("DMRS ExecTime: %ld us\n", t[0].tv_usec);
gettimeofday(&t[1], NULL);
srslte_refsignal_srs_gen(&refs, sf_idx, signal);
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("SRS ExecTime: %d us\n", t[0].tv_usec);
printf("SRS ExecTime: %ld us\n", t[0].tv_usec);
}
}
}

@ -173,7 +173,7 @@ int main(int argc, char **argv) {
}
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("Execution Time: %d us\n", t[0].tv_usec);
printf("Execution Time: %ld us\n", t[0].tv_usec);
/* check errors */
mse = 0;

@ -159,7 +159,7 @@ int main(int argc, char **argv) {
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("Bit: %d us\n", t[0].tv_usec);
printf("Bit: %ld us\n", t[0].tv_usec);
/* Test packed implementation */
srslte_bit_pack_vector(input, input_bytes, num_bits);
@ -170,8 +170,8 @@ int main(int argc, char **argv) {
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("Byte: %d us\n", t[0].tv_usec);
printf("Byte: %ld us\n", t[0].tv_usec);
for (int i=0;i<num_bits/mod.nbits_x_symbol;i++) {
if (symbols[i] != symbols_bytes[i]) {
printf("error in symbol %d\n", i);
@ -183,8 +183,8 @@ int main(int argc, char **argv) {
gettimeofday(&x, NULL);
srslte_demod_soft_demodulate(modulation, symbols, llr, num_bits / mod.nbits_x_symbol);
gettimeofday(&y, NULL);
printf("\nElapsed time [ns]: %d\n", (int) y.tv_usec - (int) x.tv_usec);
printf("\nElapsed time [ns]: %ld\n", (int) y.tv_usec - (int) x.tv_usec);
for (i=0;i<num_bits;i++) {
output[i] = llr[i]>=0 ? 1 : 0;
}

@ -341,7 +341,7 @@ int srslte_prach_init(srslte_prach_t *p,
int ret = SRSLTE_ERROR;
if(p != NULL &&
N_ifft_ul < 2049 &&
config_idx < 16 &&
config_idx < 64 &&
root_seq_index < MAX_ROOTS)
{
uint32_t preamble_format = srslte_prach_get_preamble_format(config_idx);

@ -114,7 +114,7 @@ int main(int argc, char **argv) {
srslte_prach_detect(p, frequency_offset, &preamble[p->N_cp], prach_len, indices, &n_indices);
gettimeofday(&t[2], NULL);
get_time_interval(t);
printf("texec=%d us\n", t[0].tv_usec);
printf("texec=%ld us\n", t[0].tv_usec);
if(n_indices != 1 || indices[0] != seq_index)
return -1;
}

@ -156,7 +156,7 @@ int main(int argc, char **argv) {
}
gettimeofday(&t[2], NULL);
get_time_interval(t);
INFO("format %d, n_pucch: %d, ncs: %d, d: %d, t_exec=%d us\n", format, n_pucch, ncs, d, t[0].tv_usec);
INFO("format %d, n_pucch: %d, ncs: %d, d: %d, t_exec=%ld us\n", format, n_pucch, ncs, d, t[0].tv_usec);
}
}
}

@ -284,6 +284,8 @@ int rf_uhd_open(char *args, void **h)
}
}
uhd_string_vector_free(&devices_str);
/* Create UHD handler */
printf("Opening USRP with args: %s\n", args);
uhd_error error = uhd_usrp_make(&handler->usrp, args);
@ -359,6 +361,19 @@ int rf_uhd_close(void *h)
{
rf_uhd_stop_rx_stream(h);
rf_uhd_handler_t *handler = (rf_uhd_handler_t*) h;
uhd_tx_metadata_free(&handler->tx_md);
uhd_rx_metadata_free(&handler->rx_md_first);
uhd_rx_metadata_free(&handler->rx_md);
uhd_meta_range_free(&handler->rx_gain_range);
uhd_tx_streamer_free(&handler->tx_stream);
uhd_rx_streamer_free(&handler->rx_stream);
if (handler->has_rssi) {
uhd_sensor_value_free(&handler->rssi_value);
}
uhd_usrp_free(&handler->usrp);
/** Something else to close the USRP?? */
return 0;
}

@ -131,7 +131,7 @@ int main(int argc, char **argv) {
srslte_scrambling_b(&seq, scrambled_b);
get_time_interval(t);
printf("Texec=%d us for %d bits\n", t[0].tv_usec, seq.len);
printf("Texec=%ld us for %d bits\n", t[0].tv_usec, seq.len);
for (i=0;i<seq.len;i++) {
if (scrambled_b[i] != input_b[i]) {
@ -164,7 +164,7 @@ int main(int argc, char **argv) {
srslte_scrambling_f(&seq, scrambled_f);
get_time_interval(t);
printf("Texec=%d us for %d bits\n", t[0].tv_usec, seq.len);
printf("Texec=%ld us for %d bits\n", t[0].tv_usec, seq.len);
for (i=0;i<seq.len;i++) {
if (scrambled_f[i] != input_f[i]) {

Loading…
Cancel
Save