Fixed segfault in pthread_join in pdsch_ue. Fixed default cell in pdsch_enodeb

master
ismagom 10 years ago
parent 86625ecc95
commit 29ae13e1e0

@ -51,7 +51,8 @@ char *output_file_name = NULL;
srslte_cell_t cell = { srslte_cell_t cell = {
6, // nof_prb 6, // nof_prb
1, // nof_ports 1, // nof_ports
1, // cell_id 0, // bw idx
0, // cell_id
SRSLTE_CP_NORM, // cyclic prefix SRSLTE_CP_NORM, // cyclic prefix
SRSLTE_PHICH_R_1, // PHICH resources SRSLTE_PHICH_R_1, // PHICH resources
SRSLTE_PHICH_NORM // PHICH length SRSLTE_PHICH_NORM // PHICH length
@ -588,9 +589,6 @@ int main(int argc, char **argv) {
/* Transform to OFDM symbols */ /* Transform to OFDM symbols */
srslte_ofdm_rx_sf(&ifft, sf_buffer, output_buffer); srslte_ofdm_rx_sf(&ifft, sf_buffer, output_buffer);
float norm_factor = (float) cell.nof_prb/15/sqrtf(ra_dl.prb_alloc.slot[0].nof_prb);
srslte_vec_sc_prod_cfc(output_buffer, uhd_amp*norm_factor, output_buffer, SRSLTE_SF_LEN_PRB(cell.nof_prb));
/* send to file or usrp */ /* send to file or usrp */
if (output_file_name) { if (output_file_name) {
if (!null_file_sink) { if (!null_file_sink) {
@ -599,7 +597,9 @@ int main(int argc, char **argv) {
usleep(1000); usleep(1000);
} else { } else {
#ifndef DISABLE_UHD #ifndef DISABLE_UHD
srslte_vec_sc_prod_cfc(output_buffer, uhd_amp, output_buffer, sf_n_samples); // FIXME
float norm_factor = (float) cell.nof_prb/15/sqrtf(ra_dl.prb_alloc.slot[0].nof_prb);
srslte_vec_sc_prod_cfc(output_buffer, uhd_amp*norm_factor, output_buffer, SRSLTE_SF_LEN_PRB(cell.nof_prb));
cuhd_send(uhd, output_buffer, sf_n_samples, true); cuhd_send(uhd, output_buffer, sf_n_samples, true);
#endif #endif
} }

@ -501,8 +501,12 @@ int main(int argc, char **argv) {
sf_cnt++; sf_cnt++;
} // Main loop } // Main loop
pthread_cancel(plot_thread); if (!prog_args.disable_plots) {
if (!pthread_kill(plot_thread, 0)) {
pthread_kill(plot_thread, SIGHUP);
pthread_join(plot_thread, NULL); pthread_join(plot_thread, NULL);
}
}
srslte_ue_dl_free(&ue_dl); srslte_ue_dl_free(&ue_dl);
srslte_ue_sync_free(&ue_sync); srslte_ue_sync_free(&ue_sync);

@ -482,7 +482,7 @@ int srslte_pbch_decode(srslte_pbch_t *q, cf_t *slot1_symbols, cf_t *ce_slot1[SRS
if (nant != 3) { if (nant != 3) {
DEBUG("Trying %d TX antennas with %d frames\n", nant, q->frame_idx); DEBUG("Trying %d TX antennas with %d frames\n", nant, q->frame_idx);
/* in conctrol channels, only diversity is supported */ /* in control channels, only diversity is supported */
if (nant == 1) { if (nant == 1) {
/* no need for layer demapping */ /* no need for layer demapping */
srslte_predecoding_single(&q->precoding, q->symbols[0], q->ce[0], q->d, srslte_predecoding_single(&q->precoding, q->symbols[0], q->ce[0], q->d,
@ -569,7 +569,6 @@ int srslte_pbch_encode(srslte_pbch_t *q, uint8_t bch_payload[BCH_PAYLOAD_LEN], c
srslte_convcoder_encode(&q->encoder, q->data, q->data_enc, BCH_PAYLOADCRC_LEN); srslte_convcoder_encode(&q->encoder, q->data, q->data_enc, BCH_PAYLOADCRC_LEN);
srslte_rm_conv_tx(q->data_enc, BCH_ENCODED_LEN, q->rm_b, 4 * nof_bits); srslte_rm_conv_tx(q->data_enc, BCH_ENCODED_LEN, q->rm_b, 4 * nof_bits);
} }
srslte_scrambling_b_offset(&q->seq, &q->rm_b[q->frame_idx * nof_bits], srslte_scrambling_b_offset(&q->seq, &q->rm_b[q->frame_idx * nof_bits],

Loading…
Cancel
Save