diff --git a/openair1/PHY/CODING/nr_segmentation.c b/openair1/PHY/CODING/nr_segmentation.c index 57c21a5980..8312471b34 100644 --- a/openair1/PHY/CODING/nr_segmentation.c +++ b/openair1/PHY/CODING/nr_segmentation.c @@ -24,9 +24,9 @@ author: Hongzhi WANG (TCL) date: 12.09.2017 */ -#include "PHY/defs_nr_UE.h" -//#include "SCHED/extern.h" +#include "common/utils/LOG/log.h" +#include "openair1/PHY/CODING/coding_defs.h" //#define DEBUG_SEGMENTATION int32_t nr_segmentation(unsigned char *input_buffer, @@ -174,8 +174,6 @@ else return Kb; } - - #ifdef MAIN main() { diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index c534ed7eea..99cbf1c652 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -19,12 +19,10 @@ * contact@openairinterface.org */ -#include "PHY/defs_nr_UE.h" #include "PHY/defs_gNB.h" #include "PHY/defs_nr_common.h" #include "modulation_UE.h" #include "nr_modulation.h" -#include "PHY/LTE_ESTIMATION/lte_estimation.h" #include "PHY/NR_UE_ESTIMATION/nr_estimation.h" #include "PHY/nr_phy_common/inc/nr_phy_common.h" #include diff --git a/openair1/PHY/NR_REFSIG/dmrs_nr.h b/openair1/PHY/NR_REFSIG/dmrs_nr.h index 5f17478874..8e275568e3 100644 --- a/openair1/PHY/NR_REFSIG/dmrs_nr.h +++ b/openair1/PHY/NR_REFSIG/dmrs_nr.h @@ -33,24 +33,11 @@ #ifndef DMRS_NR_H #define DMRS_NR_H -#include "PHY/defs_nr_UE.h" #include "PHY/types.h" #include "PHY/NR_REFSIG/ss_pbch_nr.h" #include "PHY/NR_REFSIG/pss_nr.h" #include "PHY/NR_REFSIG/sss_nr.h" -/************** CODE GENERATION ***********************************/ - -/************** DEFINE ********************************************/ - - -/************* STRUCTURES *****************************************/ - - -/************** VARIABLES *****************************************/ - -/************** FUNCTION ******************************************/ - int pseudo_random_sequence(int M_PN, uint32_t *c, uint32_t cinit); void lte_gold_new(LTE_DL_FRAME_PARMS *frame_parms, uint32_t lte_gold_table[20][2][14], uint16_t Nid_cell); uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type); diff --git a/openair1/PHY/NR_REFSIG/pss_nr.h b/openair1/PHY/NR_REFSIG/pss_nr.h index 07ab520e90..15ae316d74 100644 --- a/openair1/PHY/NR_REFSIG/pss_nr.h +++ b/openair1/PHY/NR_REFSIG/pss_nr.h @@ -32,9 +32,8 @@ #ifndef PSS_NR_H #define PSS_NR_H -#include "PHY/defs_nr_UE.h" +#include "PHY/defs_nr_common.h" #include "PHY/types.h" - #include "PHY/NR_REFSIG/ss_pbch_nr.h" /************** CODE GENERATION ***********************************/ diff --git a/openair1/PHY/NR_REFSIG/ptrs_nr.h b/openair1/PHY/NR_REFSIG/ptrs_nr.h index 75f526dad5..dad093f712 100644 --- a/openair1/PHY/NR_REFSIG/ptrs_nr.h +++ b/openair1/PHY/NR_REFSIG/ptrs_nr.h @@ -33,20 +33,6 @@ #ifndef PTRS_NR_H #define PTRS_NR_H -#include "PHY/defs_nr_UE.h" - -/************** CODE GENERATION ***********************************/ - -/************** DEFINE ********************************************/ - - -/************* STRUCTURES *****************************************/ - - -/************** VARIABLES *****************************************/ - -/************** FUNCTION ******************************************/ - void set_ptrs_symb_idx(uint16_t *ptrs_symbols, uint8_t duration_in_symbols, uint8_t start_symbol, @@ -86,8 +72,8 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos, uint16_t ptrsSymbPos, int16_t *estPerSymb, uint16_t startSymbIdx, - uint16_t noSymb - ); + uint16_t noSymb); + /* general function to estimate common phase error based upon PTRS */ void nr_ptrs_cpe_estimation(uint8_t K_ptrs, uint8_t ptrsReOffset, diff --git a/openair1/PHY/NR_REFSIG/sss_nr.h b/openair1/PHY/NR_REFSIG/sss_nr.h index 8175869205..5bb55ebe2f 100644 --- a/openair1/PHY/NR_REFSIG/sss_nr.h +++ b/openair1/PHY/NR_REFSIG/sss_nr.h @@ -33,9 +33,7 @@ #define SSS_NR_H #include "limits.h" -#include "PHY/defs_nr_UE.h" #include "PHY/types.h" - #include "pss_nr.h" /************** DEFINE ********************************************/ diff --git a/openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h b/openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h index 9ed101f247..845a2cd830 100644 --- a/openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h +++ b/openair1/PHY/NR_REFSIG/ul_ref_seq_nr.h @@ -33,11 +33,8 @@ #ifndef LOWPAPR_SEQUENCES_NR_H #define LOWPAPR_SEQUENCES_NR_H -#include "PHY/defs_nr_UE.h" #include "PHY/types.h" - #include "PHY/NR_REFSIG/ss_pbch_nr.h" - #include "PHY/defs_nr_common.h" #include "PHY/defs_gNB.h" diff --git a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c index 9018aabfde..94531448a9 100644 --- a/openair1/PHY/NR_TRANSPORT/nr_dlsch.c +++ b/openair1/PHY/NR_TRANSPORT/nr_dlsch.c @@ -37,6 +37,7 @@ #include "PHY/NR_REFSIG/dmrs_nr.h" #include "PHY/NR_REFSIG/ptrs_nr.h" #include "common/utils/nr/nr_common.h" +#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h" #include "executables/softmodem-common.h" #include "SCHED_NR/sched_nr.h" diff --git a/openair1/PHY/defs_nr_UE.h b/openair1/PHY/defs_nr_UE.h index 2eca4fbbd1..daae2fec36 100644 --- a/openair1/PHY/defs_nr_UE.h +++ b/openair1/PHY/defs_nr_UE.h @@ -104,18 +104,11 @@ /// Context data structure for gNB subframe processing typedef struct { /// Component Carrier index - uint8_t CC_id; + uint8_t CC_id; /// Last RX timestamp openair0_timestamp_t timestamp_rx; } UE_nr_proc_t; -typedef enum { - NR_PBCH_EST=0, - NR_PDCCH_EST, - NR_PDSCH_EST, - NR_SSS_EST, -} NR_CHANNEL_EST_t; - #define debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg #define NEIGHBOR_CELL_MAX_CONSECUTIVE_FAILURES 10 @@ -227,17 +220,6 @@ typedef struct { #define MAX_NR_DCI_DECODED_SLOT 10 // This value is not specified -typedef enum { - _format_0_0_found = 0, - _format_0_1_found = 1, - _format_1_0_found = 2, - _format_1_1_found = 3, - _format_2_0_found = 4, - _format_2_1_found = 5, - _format_2_2_found = 6, - _format_2_3_found = 7 -} format_found_t; - #endif typedef struct { int nb_search_space; @@ -246,18 +228,6 @@ typedef struct { #define NR_PSBCH_DMRS_LENGTH 297 // in mod symbols #define NR_PSBCH_DMRS_LENGTH_DWORD 20 // ceil(2(QPSK)*NR_PBCH_DMRS_LENGTH/32) - -/* NR Sidelink PSBCH payload fields - TODO: This will be removed in the future and - filled in by the upper layers once developed. */ -typedef struct { - uint32_t coverageIndicator : 1; - uint32_t tddConfig : 12; - uint32_t DFN : 10; - uint32_t slotIndex : 7; - uint32_t reserved : 2; -} PSBCH_payload; - #define PBCH_A 24 typedef struct { @@ -390,15 +360,11 @@ typedef struct PHY_VARS_NR_UE_s { fapi_nr_config_request_t nrUE_config; nr_synch_request_t synch_request; - NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX]; - NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE]; - uint8_t prs_active_gNBs; + NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX]; + NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE]; + uint8_t prs_active_gNBs; NR_DL_UE_HARQ_t dl_harq_processes[2][NR_MAX_DLSCH_HARQ_PROCESSES]; NR_UL_UE_HARQ_t ul_harq_processes[NR_MAX_ULSCH_HARQ_PROCESSES]; - //Paging parameters - uint32_t IMSImod1024; - uint32_t PF; - uint32_t PO; // Scrambling IDs used in PUSCH DMRS c16_t X_u[64][839]; @@ -427,21 +393,6 @@ typedef struct PHY_VARS_NR_UE_s { int dlsch_received[NUMBER_OF_CONNECTED_gNB_MAX]; int dlsch_received_last[NUMBER_OF_CONNECTED_gNB_MAX]; int dlsch_fer[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_SI_received[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_SI_errors[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_ra_received[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_ra_errors[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_p_received[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_p_errors[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mch_received[NUMBER_OF_CONNECTED_gNB_MAX]; - int current_dlsch_cqi[NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mch_received_sf[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mcch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mtch_received[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mcch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mtch_errors[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mcch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; - int dlsch_mtch_trials[MAX_MBSFN_AREA][NUMBER_OF_CONNECTED_gNB_MAX]; uint8_t init_sync_frame; /// temporary offset during cell search prior to MIB decoding int ssb_offset;