From c7940f455c4238b3a1b9b339bec440a2f1040dfa Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Mon, 11 Oct 2021 15:36:34 +0200 Subject: [PATCH] More clear equation to calculate number of PRACH subframes --- srsue/src/phy/prach.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/srsue/src/phy/prach.cc b/srsue/src/phy/prach.cc index 9f679e5b5..f227ddf12 100644 --- a/srsue/src/phy/prach.cc +++ b/srsue/src/phy/prach.cc @@ -248,7 +248,7 @@ cf_t* prach::generate(float cfo, uint32_t* nof_sf, float* target_power) srsran_cfo_correct(&cfo_h, buffer[f_idx][preamble_idx], signal_buffer, cfo / srsran_symbol_sz(cell.nof_prb)); // pad guard symbols with zeros - uint32_t nsf = (len - 1) / SRSRAN_SF_LEN_PRB(cell.nof_prb) + 1; + uint32_t nsf = SRSRAN_CEIL(len, SRSRAN_SF_LEN_PRB(cell.nof_prb)); srsran_vec_cf_zero(&signal_buffer[len], (nsf * SRSRAN_SF_LEN_PRB(cell.nof_prb) - len)); *nof_sf = nsf;