From a79ccb99926ab6e93e826a93441347436a6f5269 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Fri, 25 Mar 2022 21:45:37 +0100 Subject: [PATCH] fix nr_deinterleaving_ldpc() again, we are now too short in the buffer --- common/utils/assertions.h | 4 ++-- openair1/PHY/CODING/nr_rate_matching.c | 27 +++++++++++++++----------- openair1/SIMULATION/NR_PHY/dlschsim.c | 2 +- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/common/utils/assertions.h b/common/utils/assertions.h index 573036b1d9..c8959d0adb 100644 --- a/common/utils/assertions.h +++ b/common/utils/assertions.h @@ -44,9 +44,9 @@ #define _Assert_(cOND, aCTION, fORMAT, aRGS...) \ do { \ if (!(cOND)) { \ - fprintf(stderr, "\nAssertion ("#cOND") failed!\n" \ + fprintf(stderr, "\nAssertion (%s) failed!\n" \ "In %s() %s:%d\n" fORMAT, \ - __FUNCTION__, __FILE__, __LINE__, ##aRGS); \ + #cOND, __FUNCTION__, __FILE__, __LINE__, ##aRGS); \ aCTION; \ } \ } while(0) diff --git a/openair1/PHY/CODING/nr_rate_matching.c b/openair1/PHY/CODING/nr_rate_matching.c index 29a1e363e9..fbad79cad7 100644 --- a/openair1/PHY/CODING/nr_rate_matching.c +++ b/openair1/PHY/CODING/nr_rate_matching.c @@ -309,25 +309,28 @@ void nr_interleaving_ldpc(uint32_t E, uint8_t Qm, uint8_t *e,uint8_t *f) void nr_deinterleaving_ldpc(uint32_t E, uint8_t Qm, int16_t *e,int16_t *f) { + switch(Qm) { case 2: { - int16_t *e1=e+(E/2); - int16_t *end=f+E-4; - while( fpdu=test_input; + dlsch->harq_process.pdu=test_input; //estimated_output = harq_process->b; #ifdef DEBUG_NR_DLSCHSIM