pssch_test: zero sample vectors after alloc

This commit is contained in:
Andre Puschmann 2020-04-23 20:49:24 +02:00
parent 723503fded
commit edcf6d1e51
2 changed files with 8 additions and 0 deletions

View File

@ -144,18 +144,21 @@ int base_init()
ERROR("Error allocating memory\n");
return SRSLTE_ERROR;
}
srslte_vec_cf_zero(sf_buffer, sf_n_re);
equalized_sf_buffer = srslte_vec_cf_malloc(sf_n_re);
if (!equalized_sf_buffer) {
ERROR("Error allocating memory\n");
return SRSLTE_ERROR;
}
srslte_vec_cf_zero(equalized_sf_buffer, sf_n_re);
input_buffer = srslte_vec_cf_malloc(sf_n_samples);
if (!input_buffer) {
ERROR("Error allocating memory\n");
return SRSLTE_ERROR;
}
srslte_vec_cf_zero(input_buffer, sf_n_samples);
srslte_sci_init(&sci, cell, sl_comm_resource_pool);

View File

@ -109,6 +109,11 @@ int main(int argc, char** argv)
uint32_t N_x_id = 255;
uint32_t sf_n_re = SRSLTE_SF_LEN_RE(cell.nof_prb, cell.cp);
cf_t* sf_buffer = srslte_vec_cf_malloc(sf_n_re);
if (!sf_buffer) {
ERROR("Error allocating memory\n");
return SRSLTE_ERROR;
}
srslte_vec_cf_zero(sf_buffer, sf_n_re);
// Transport block buffer
uint8_t tb[SRSLTE_SL_SCH_MAX_TB_LEN] = {};