From f7ed592ef53661fb7771ba008ee94ef295b0f3c7 Mon Sep 17 00:00:00 2001 From: Parminder Singh Date: Tue, 1 Sep 2020 18:39:44 +0200 Subject: [PATCH] Fixed available_bits calculation for PTRS in -n option in ulsim --- openair1/SIMULATION/NR_PHY/ulsim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index d161984f5d..4a5fa72fce 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -901,7 +901,8 @@ int main(int argc, char **argv) //----------------- count and print errors ----------------- //---------------------------------------------------------- - if (pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) { + if ((pusch_pdu->pdu_bit_map & PUSCH_PDU_BITMAP_PUSCH_PTRS) && (trial==0)) { + ptrs_symbols = 0; for (int i = pusch_pdu->start_symbol_index; i < pusch_pdu->start_symbol_index + pusch_pdu->nr_of_symbols; i++){ ptrs_symbols += ((gNB->pusch_vars[UE_id]->ptrs_symbols) >> i) & 1; }