From cf3780c04d366ab8f7203e899ac411c50d41bbc8 Mon Sep 17 00:00:00 2001 From: Parminder Singh Date: Mon, 26 Oct 2020 10:29:39 +0100 Subject: [PATCH] Added PTRS related definitions and variables for DL processing in UE - Added PTRS variables in transport UE header file - Added DMRS inline symbol check function in refsig.h - Added PTRS estimation and other related structures in defs_nr_UE.h file --- openair1/PHY/NR_REFSIG/nr_refsig.h | 2 ++ openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h | 13 +++++++++++++ openair1/PHY/defs_nr_UE.h | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/openair1/PHY/NR_REFSIG/nr_refsig.h b/openair1/PHY/NR_REFSIG/nr_refsig.h index ced7f9eb66..5dbe6ec1bd 100644 --- a/openair1/PHY/NR_REFSIG/nr_refsig.h +++ b/openair1/PHY/NR_REFSIG/nr_refsig.h @@ -56,7 +56,9 @@ void nr_gen_ref_conj_symbols(uint32_t *in, uint32_t length, int16_t *output, uin uint8_t get_next_dmrs_symbol_in_slot(uint16_t ul_dmrs_symb_pos, uint8_t counter, uint8_t end_symbol); uint8_t get_dmrs_symbols_in_slot(uint16_t l_prime_mask, uint16_t nb_symb); + void nr_generate_modulation_table(void); +static inline uint8_t is_dmrs_symbol(uint8_t l, uint16_t dmrsSymbMask ) { return ((dmrsSymbMask >> l) & 0x1); } extern __m64 byte2m64_re[256]; extern __m64 byte2m64_im[256]; diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h index d1dd0f785b..3ff537aee7 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_transport_ue.h @@ -314,6 +314,19 @@ typedef struct { uint8_t codeword; /// HARQ-ACKs NR_UE_HARQ_STATUS_t harq_ack; + /// PTRS Frequency Density + uint8_t PTRSFreqDensity; + /// PTRS Time Density + uint8_t PTRSTimeDensity; + uint8_t PTRSPortIndex ; + uint8_t nEpreRatioOfPDSCHToPTRS; + uint8_t PTRSReOffset; + /// bit mask of PT-RS ofdm symbol indicies + uint16_t ptrs_symbols; + // PTRS symbol index, to be updated every PTRS symbol within a slot. + uint8_t ptrs_symbol_index; + /// PDU BITMAP + uint16_t pduBitmap; } NR_DL_UE_HARQ_t; typedef struct { diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 4df8404994..f59e415204 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -338,6 +338,10 @@ typedef struct { /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx /// - second index: ? [0..168*N_RB_DL[ int32_t **dl_ch_estimates_ext; + /// \brief Downlink channel estimates extracted in PRBS. + /// - first index: ? [0..7] (hard coded) FIXME! accessed via \c nb_antennas_rx + /// - second index: ? [0..168*N_RB_DL[ + int32_t **dl_ch_ptrs_estimates_ext; /// \brief Downlink cross-correlation of MIMO channel estimates (unquantized PMI) extracted in PRBS. For the SIC receiver we need to store the history of this for each harq process and round /// - first index: ? [0..7] (hard coded) accessed via \c harq_pid /// - second index: ? [0..7] (hard coded) accessed via \c round @@ -414,6 +418,16 @@ typedef struct { uint32_t llr_offset[14]; // llr length per ofdm symbol uint32_t llr_length[14]; + // llr offset per ofdm symbol + uint32_t dl_valid_re[14]; + /// \brief Estimated phase error based upon PTRS on each symbol . + /// - first index: ? [0..7] Number of Antenna + /// - second index: ? [0...14] smybol per slot + int32_t **ptrs_phase_per_slot; + /// \brief Estimated phase error based upon PTRS on each symbol . + /// - first index: ? [0..7] Number of Antenna + /// - second index: ? [0...14] smybol per slot + int32_t **ptrs_re_per_slot; } NR_UE_PDSCH; #define NR_PDCCH_DEFS_NR_UE @@ -892,7 +906,7 @@ typedef struct { uint32_t nr_gold_pbch[2][64][NR_PBCH_DMRS_LENGTH_DWORD]; /// PDSCH DMRS - uint32_t nr_gold_pdsch[2][20][14][NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD]; + uint32_t nr_gold_pdsch[2][20][14][NR_MAX_PDSCH_DMRS_INIT_LENGTH_DWORD];//sfn /// PDCCH DMRS uint32_t nr_gold_pdcch[7][20][3][52];