further cleanup in defs_nr_UE.h
This commit is contained in:
@@ -24,9 +24,9 @@
|
|||||||
author: Hongzhi WANG (TCL)
|
author: Hongzhi WANG (TCL)
|
||||||
date: 12.09.2017
|
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
|
//#define DEBUG_SEGMENTATION
|
||||||
|
|
||||||
int32_t nr_segmentation(unsigned char *input_buffer,
|
int32_t nr_segmentation(unsigned char *input_buffer,
|
||||||
@@ -174,8 +174,6 @@ else
|
|||||||
return Kb;
|
return Kb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,12 +19,10 @@
|
|||||||
* contact@openairinterface.org
|
* contact@openairinterface.org
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "PHY/defs_nr_UE.h"
|
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
#include "modulation_UE.h"
|
#include "modulation_UE.h"
|
||||||
#include "nr_modulation.h"
|
#include "nr_modulation.h"
|
||||||
#include "PHY/LTE_ESTIMATION/lte_estimation.h"
|
|
||||||
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
#include "PHY/NR_UE_ESTIMATION/nr_estimation.h"
|
||||||
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
|
#include "PHY/nr_phy_common/inc/nr_phy_common.h"
|
||||||
#include <common/utils/LOG/log.h>
|
#include <common/utils/LOG/log.h>
|
||||||
|
|||||||
@@ -33,24 +33,11 @@
|
|||||||
#ifndef DMRS_NR_H
|
#ifndef DMRS_NR_H
|
||||||
#define DMRS_NR_H
|
#define DMRS_NR_H
|
||||||
|
|
||||||
#include "PHY/defs_nr_UE.h"
|
|
||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||||
#include "PHY/NR_REFSIG/pss_nr.h"
|
#include "PHY/NR_REFSIG/pss_nr.h"
|
||||||
#include "PHY/NR_REFSIG/sss_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);
|
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);
|
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);
|
uint16_t get_dmrs_freq_idx_ul(uint16_t n, uint8_t k_prime, uint8_t delta, uint8_t dmrs_type);
|
||||||
|
|||||||
@@ -32,9 +32,8 @@
|
|||||||
#ifndef PSS_NR_H
|
#ifndef PSS_NR_H
|
||||||
#define 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/types.h"
|
||||||
|
|
||||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||||
|
|
||||||
/************** CODE GENERATION ***********************************/
|
/************** CODE GENERATION ***********************************/
|
||||||
|
|||||||
@@ -33,20 +33,6 @@
|
|||||||
#ifndef PTRS_NR_H
|
#ifndef PTRS_NR_H
|
||||||
#define 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,
|
void set_ptrs_symb_idx(uint16_t *ptrs_symbols,
|
||||||
uint8_t duration_in_symbols,
|
uint8_t duration_in_symbols,
|
||||||
uint8_t start_symbol,
|
uint8_t start_symbol,
|
||||||
@@ -86,8 +72,8 @@ int8_t nr_ptrs_process_slot(uint16_t dmrsSymbPos,
|
|||||||
uint16_t ptrsSymbPos,
|
uint16_t ptrsSymbPos,
|
||||||
int16_t *estPerSymb,
|
int16_t *estPerSymb,
|
||||||
uint16_t startSymbIdx,
|
uint16_t startSymbIdx,
|
||||||
uint16_t noSymb
|
uint16_t noSymb);
|
||||||
);
|
|
||||||
/* general function to estimate common phase error based upon PTRS */
|
/* general function to estimate common phase error based upon PTRS */
|
||||||
void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
|
void nr_ptrs_cpe_estimation(uint8_t K_ptrs,
|
||||||
uint8_t ptrsReOffset,
|
uint8_t ptrsReOffset,
|
||||||
|
|||||||
@@ -33,9 +33,7 @@
|
|||||||
#define SSS_NR_H
|
#define SSS_NR_H
|
||||||
|
|
||||||
#include "limits.h"
|
#include "limits.h"
|
||||||
#include "PHY/defs_nr_UE.h"
|
|
||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
|
|
||||||
#include "pss_nr.h"
|
#include "pss_nr.h"
|
||||||
|
|
||||||
/************** DEFINE ********************************************/
|
/************** DEFINE ********************************************/
|
||||||
|
|||||||
@@ -33,11 +33,8 @@
|
|||||||
#ifndef LOWPAPR_SEQUENCES_NR_H
|
#ifndef LOWPAPR_SEQUENCES_NR_H
|
||||||
#define LOWPAPR_SEQUENCES_NR_H
|
#define LOWPAPR_SEQUENCES_NR_H
|
||||||
|
|
||||||
#include "PHY/defs_nr_UE.h"
|
|
||||||
#include "PHY/types.h"
|
#include "PHY/types.h"
|
||||||
|
|
||||||
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
#include "PHY/NR_REFSIG/ss_pbch_nr.h"
|
||||||
|
|
||||||
#include "PHY/defs_nr_common.h"
|
#include "PHY/defs_nr_common.h"
|
||||||
#include "PHY/defs_gNB.h"
|
#include "PHY/defs_gNB.h"
|
||||||
|
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
#include "PHY/NR_REFSIG/dmrs_nr.h"
|
||||||
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
#include "PHY/NR_REFSIG/ptrs_nr.h"
|
||||||
#include "common/utils/nr/nr_common.h"
|
#include "common/utils/nr/nr_common.h"
|
||||||
|
#include "PHY/NR_TRANSPORT/nr_transport_common_proto.h"
|
||||||
#include "executables/softmodem-common.h"
|
#include "executables/softmodem-common.h"
|
||||||
#include "SCHED_NR/sched_nr.h"
|
#include "SCHED_NR/sched_nr.h"
|
||||||
|
|
||||||
|
|||||||
@@ -104,18 +104,11 @@
|
|||||||
/// Context data structure for gNB subframe processing
|
/// Context data structure for gNB subframe processing
|
||||||
typedef struct {
|
typedef struct {
|
||||||
/// Component Carrier index
|
/// Component Carrier index
|
||||||
uint8_t CC_id;
|
uint8_t CC_id;
|
||||||
/// Last RX timestamp
|
/// Last RX timestamp
|
||||||
openair0_timestamp_t timestamp_rx;
|
openair0_timestamp_t timestamp_rx;
|
||||||
} UE_nr_proc_t;
|
} 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 debug_msg if (((mac_xface->frame%100) == 0) || (mac_xface->frame < 50)) msg
|
||||||
|
|
||||||
#define NEIGHBOR_CELL_MAX_CONSECUTIVE_FAILURES 10
|
#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
|
#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
|
#endif
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int nb_search_space;
|
int nb_search_space;
|
||||||
@@ -246,18 +228,6 @@ typedef struct {
|
|||||||
|
|
||||||
#define NR_PSBCH_DMRS_LENGTH 297 // in mod symbols
|
#define NR_PSBCH_DMRS_LENGTH 297 // in mod symbols
|
||||||
#define NR_PSBCH_DMRS_LENGTH_DWORD 20 // ceil(2(QPSK)*NR_PBCH_DMRS_LENGTH/32)
|
#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
|
#define PBCH_A 24
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -390,15 +360,11 @@ typedef struct PHY_VARS_NR_UE_s {
|
|||||||
fapi_nr_config_request_t nrUE_config;
|
fapi_nr_config_request_t nrUE_config;
|
||||||
nr_synch_request_t synch_request;
|
nr_synch_request_t synch_request;
|
||||||
|
|
||||||
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
NR_UE_PRACH *prach_vars[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||||
NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE];
|
NR_UE_PRS *prs_vars[NR_MAX_PRS_COMB_SIZE];
|
||||||
uint8_t prs_active_gNBs;
|
uint8_t prs_active_gNBs;
|
||||||
NR_DL_UE_HARQ_t dl_harq_processes[2][NR_MAX_DLSCH_HARQ_PROCESSES];
|
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];
|
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
|
// Scrambling IDs used in PUSCH DMRS
|
||||||
c16_t X_u[64][839];
|
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[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||||
int dlsch_received_last[NUMBER_OF_CONNECTED_gNB_MAX];
|
int dlsch_received_last[NUMBER_OF_CONNECTED_gNB_MAX];
|
||||||
int dlsch_fer[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;
|
uint8_t init_sync_frame;
|
||||||
/// temporary offset during cell search prior to MIB decoding
|
/// temporary offset during cell search prior to MIB decoding
|
||||||
int ssb_offset;
|
int ssb_offset;
|
||||||
|
|||||||
Reference in New Issue
Block a user