From 728a9033698c4c73d49abf029b4a799a2d525cc5 Mon Sep 17 00:00:00 2001 From: Ahmed Hussein Date: Thu, 16 Apr 2020 19:30:52 +0200 Subject: [PATCH] Making "is_ptrs_symbol" as a static inline function --- openair1/PHY/NR_REFSIG/ptrs_nr.c | 22 ---------------------- openair1/PHY/NR_REFSIG/ptrs_nr.h | 15 ++++++++++++++- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/openair1/PHY/NR_REFSIG/ptrs_nr.c b/openair1/PHY/NR_REFSIG/ptrs_nr.c index 26cc323f4f..785252126a 100644 --- a/openair1/PHY/NR_REFSIG/ptrs_nr.c +++ b/openair1/PHY/NR_REFSIG/ptrs_nr.c @@ -181,28 +181,6 @@ uint8_t is_ptrs_subcarrier(uint16_t k, return 0; } -/******************************************************************* -* -* NAME : is_ptrs_symbol -* -* PARAMETERS : l ofdm symbol index within slot -* ptrs_symbols bit mask of ptrs -* -* RETURN : 1 if symbol is ptrs, or 0 otherwise -* -* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH -* -*********************************************************************/ - -uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols) -{ - - if (((ptrs_symbols>>l)&1) == 1) - return 1; - - return 0; -} - /* int main(int argc, char const *argv[]) { diff --git a/openair1/PHY/NR_REFSIG/ptrs_nr.h b/openair1/PHY/NR_REFSIG/ptrs_nr.h index b2fa1274a8..e8a4e61232 100644 --- a/openair1/PHY/NR_REFSIG/ptrs_nr.h +++ b/openair1/PHY/NR_REFSIG/ptrs_nr.h @@ -65,7 +65,20 @@ uint8_t is_ptrs_subcarrier(uint16_t k, uint16_t start_sc, uint16_t ofdm_symbol_size); -uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols); +/******************************************************************* +* +* NAME : is_ptrs_symbol +* +* PARAMETERS : l ofdm symbol index within slot +* ptrs_symbols bit mask of ptrs +* +* RETURN : 1 if symbol is ptrs, or 0 otherwise +* +* DESCRIPTION : 3GPP TS 38.211 6.4.1.2 Phase-tracking reference signal for PUSCH +* +*********************************************************************/ + +static inline uint8_t is_ptrs_symbol(uint8_t l, uint16_t ptrs_symbols) { return ((ptrs_symbols >> l) & 1); }