Commit 264725c5 authored by yilmazt's avatar yilmazt

Changes to fix errors #1

parent ccd60195
This diff is collapsed.
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
#define MAX_BANDS_PER_RRU 4 #define MAX_BANDS_PER_RRU 4
#define MAX_RRU_CONFIG_SIZE 1024
#ifdef OCP_FRAMEWORK #ifdef OCP_FRAMEWORK
...@@ -272,9 +273,9 @@ typedef struct RU_proc_t_s { ...@@ -272,9 +273,9 @@ typedef struct RU_proc_t_s {
/// symbol mask for IF4p5 reception per subframe /// symbol mask for IF4p5 reception per subframe
uint32_t symbol_mask[10]; uint32_t symbol_mask[10];
/// number of slave threads /// number of slave threads
int num_slaves; int num_slaves;
/// array of pointers to slaves /// array of pointers to slaves
struct RU_proc_t_s **slave_proc; struct RU_proc_t_s **slave_proc;
#ifdef PHY_TX_THREAD #ifdef PHY_TX_THREAD
/// pthread structure for PRACH thread /// pthread structure for PRACH thread
pthread_t pthread_phy_tx; pthread_t pthread_phy_tx;
...@@ -323,7 +324,7 @@ typedef enum { ...@@ -323,7 +324,7 @@ typedef enum {
typedef struct RU_t_s{ typedef struct RU_t_s{
/// index of this ru /// index of this ru
uint32_t idx; uint32_t idx;
/// Pointer to configuration file /// Pointer to configuration file
char *rf_config_file; char *rf_config_file;
/// southbound interface /// southbound interface
RU_if_south_t if_south; RU_if_south_t if_south;
...@@ -340,7 +341,7 @@ typedef struct RU_t_s{ ...@@ -340,7 +341,7 @@ typedef struct RU_t_s{
/// flag to indicate the RU is a slave to another source /// flag to indicate the RU is a slave to another source
int is_slave; int is_slave;
/// Total gain of receive chain /// Total gain of receive chain
uint32_t rx_total_gain_dB; uint32_t rx_total_gain_dB;
/// number of bands that this device can support /// number of bands that this device can support
int num_bands; int num_bands;
/// band list /// band list
...@@ -363,7 +364,11 @@ typedef struct RU_t_s{ ...@@ -363,7 +364,11 @@ typedef struct RU_t_s{
struct LTE_DL_FRAME_PARMS *frame_parms; struct LTE_DL_FRAME_PARMS *frame_parms;
struct NR_DL_FRAME_PARMS *nr_frame_parms; struct NR_DL_FRAME_PARMS *nr_frame_parms;
///timing offset used in TDD ///timing offset used in TDD
int N_TA_offset; int N_TA_offset;
/// SF extension used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
int sf_extension;
/// "end of burst delay" used in TDD (unit: number of samples at 30.72MHz) (this is an expert option)
int end_of_burst_delay;
/// RF device descriptor /// RF device descriptor
openair0_device rfdevice; openair0_device rfdevice;
/// HW configuration /// HW configuration
...@@ -373,49 +378,49 @@ typedef struct RU_t_s{ ...@@ -373,49 +378,49 @@ typedef struct RU_t_s{
int num_gNB; int num_gNB;
/// list of NBs using this RU /// list of NBs using this RU
struct PHY_VARS_eNB_s *eNB_list[NUMBER_OF_eNB_MAX]; struct PHY_VARS_eNB_s *eNB_list[NUMBER_OF_eNB_MAX];
struct PHY_VARS_gNB_s *gNB_list[NUMBER_OF_eNB_MAX]; struct PHY_VARS_gNB_s *gNB_list[NUMBER_OF_gNB_MAX];
/// Mapping of antenna ports to RF chain index /// Mapping of antenna ports to RF chain index
openair0_rf_map rf_map; openair0_rf_map rf_map;
/// IF device descriptor /// IF device descriptor
openair0_device ifdevice; openair0_device ifdevice;
/// Pointer for ifdevice buffer struct /// Pointer for ifdevice buffer struct
if_buffer_t ifbuffer; if_buffer_t ifbuffer;
/// if prach processing is to be performed in RU /// if prach processing is to be performed in RU
int do_prach; int do_prach;
/// function pointer to synchronous RX fronthaul function (RRU,3GPP_eNB/3GPP_gNB) /// function pointer to synchronous RX fronthaul function (RRU,3GPP_eNB/3GPP_gNB)
void (*fh_south_in)(struct RU_t_s *ru,int *frame, int *subframe); void (*fh_south_in)(struct RU_t_s *ru,int *frame, int *subframe);
/// function pointer to synchronous TX fronthaul function /// function pointer to synchronous TX fronthaul function
void (*fh_south_out)(struct RU_t_s *ru); void (*fh_south_out)(struct RU_t_s *ru);
/// function pointer to synchronous RX fronthaul function (RRU) /// function pointer to synchronous RX fronthaul function (RRU)
void (*fh_north_in)(struct RU_t_s *ru,int *frame, int *subframe); void (*fh_north_in)(struct RU_t_s *ru,int *frame, int *subframe);
/// function pointer to synchronous RX fronthaul function (RRU) /// function pointer to synchronous RX fronthaul function (RRU)
void (*fh_north_out)(struct RU_t_s *ru); void (*fh_north_out)(struct RU_t_s *ru);
/// function pointer to asynchronous fronthaul interface /// function pointer to asynchronous fronthaul interface
void (*fh_north_asynch_in)(struct RU_t_s *ru,int *frame, int *subframe); void (*fh_north_asynch_in)(struct RU_t_s *ru,int *frame, int *subframe);
/// function pointer to asynchronous fronthaul interface /// function pointer to asynchronous fronthaul interface
void (*fh_south_asynch_in)(struct RU_t_s *ru,int *frame, int *subframe); void (*fh_south_asynch_in)(struct RU_t_s *ru,int *frame, int *subframe);
/// function pointer to initialization function for radio interface /// function pointer to initialization function for radio interface
int (*start_rf)(struct RU_t_s *ru); int (*start_rf)(struct RU_t_s *ru);
/// function pointer to release function for radio interface /// function pointer to release function for radio interface
int (*stop_rf)(struct RU_t_s *ru); int (*stop_rf)(struct RU_t_s *ru);
/// function pointer to initialization function for radio interface /// function pointer to initialization function for radio interface
int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB); int (*start_if)(struct RU_t_s *ru, struct PHY_VARS_eNB_s *eNB);
int (*nr_start_if)(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB);
/// function pointer to RX front-end processing routine (DFTs/prefix removal or NULL) /// function pointer to RX front-end processing routine (DFTs/prefix removal or NULL)
void (*feprx)(struct RU_t_s *ru); void (*feprx)(struct RU_t_s *ru);
/// function pointer to TX front-end processing routine (IDFTs and prefix removal or NULL) /// function pointer to TX front-end processing routine (IDFTs and prefix removal or NULL)
void (*feptx_ofdm)(struct RU_t_s *ru); void (*feptx_ofdm)(struct RU_t_s *ru);
/// function pointer to TX front-end processing routine (PRECODING) /// function pointer to TX front-end processing routine (PRECODING)
void (*feptx_prec)(struct RU_t_s *ru); void (*feptx_prec)(struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb/nr-gnb. /// function pointer to wakeup routine in lte-enb/nr-gnb.
int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru); int (*wakeup_rxtx)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru);
int (*nr_wakeup_rxtx)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru); int (*nr_wakeup_rxtx)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru);
/// function pointer to wakeup routine in lte-enb/nr-gnb. /// function pointer to wakeup routine in lte-enb/nr-gnb.
void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); void (*wakeup_prach_eNB)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB, struct RU_t_s *ru, int frame, int subframe);
void (*wakeup_prach_gNB)(struct PHY_VARS_gNB_s *gNB,struct RU_t_s *ru,int frame,int subframe);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0)) #if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// function pointer to wakeup routine in lte-enb. /// function pointer to wakeup routine in lte-enb.
void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB,struct RU_t_s *ru,int frame,int subframe); void (*wakeup_prach_eNB_br)(struct PHY_VARS_eNB_s *eNB, struct RU_t_s *ru, int frame, int subframe);
#endif #endif
/// function pointer to NB entry routine /// function pointer to NB entry routine
...@@ -443,29 +448,25 @@ typedef struct RU_t_s{ ...@@ -443,29 +448,25 @@ typedef struct RU_t_s{
/// Timing statistics (Fronthaul transport) /// Timing statistics (Fronthaul transport)
time_stats_t transport; time_stats_t transport;
/// RX and TX buffers for precoder output /// RX and TX buffers for precoder output
RU_COMMON common; RU_COMMON common;
/// beamforming weight vectors per eNB /// beamforming weight vectors per eNB
int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15]; int32_t **beam_weights[NUMBER_OF_eNB_MAX+1][15];
/// beamforming weight vectors per eNB /// beamforming weight vectors per gNB
int32_t **nrbeam_weights[NUMBER_OF_gNB_MAX+1][16]; int32_t **nrbeam_weights[NUMBER_OF_gNB_MAX+1][16];
/// received frequency-domain signal for PRACH (IF4p5 RRU) /// received frequency-domain signal for PRACH (IF4p5 RRU)
int16_t **prach_rxsigF; int16_t **prach_rxsigF;
/// received frequency-domain signal for PRACH BR (IF4p5 RRU) /// received frequency-domain signal for PRACH BR (IF4p5 RRU)
int16_t **prach_rxsigF_br[4]; int16_t **prach_rxsigF_br[4];
/// sequence number for IF5 /// sequence number for IF5
uint8_t seqno; uint8_t seqno;
/// initial timestamp used as an offset make first real timestamp 0 /// initial timestamp used as an offset make first real timestamp 0
openair0_timestamp ts_offset; openair0_timestamp ts_offset;
/// process scheduling variables /// process scheduling variables
RU_proc_t proc; RU_proc_t proc;
/// stats thread pthread descriptor /// stats thread pthread descriptor
pthread_t ru_stats_thread; pthread_t ru_stats_thread;
} RU_t; } RU_t;
#define MAX_RRU_CONFIG_SIZE 1024
typedef enum { typedef enum {
RAU_tick=0, RAU_tick=0,
RRU_capabilities=1, RRU_capabilities=1,
...@@ -487,8 +488,6 @@ typedef enum { ...@@ -487,8 +488,6 @@ typedef enum {
MAX_FH_FMTs =4 MAX_FH_FMTs =4
} FH_fmt_options_t; } FH_fmt_options_t;
#define MAX_BANDS_PER_RRU 4
typedef struct RRU_capabilities_s { typedef struct RRU_capabilities_s {
/// Fronthaul format /// Fronthaul format
FH_fmt_options_t FH_fmt; FH_fmt_options_t FH_fmt;
...@@ -513,7 +512,6 @@ typedef struct RRU_capabilities_s { ...@@ -513,7 +512,6 @@ typedef struct RRU_capabilities_s {
} RRU_capabilities_t; } RRU_capabilities_t;
typedef struct RRU_config_s { typedef struct RRU_config_s {
/// Fronthaul format /// Fronthaul format
RU_if_south_t FH_fmt; RU_if_south_t FH_fmt;
/// number of EUTRA bands (<=4) configured in RRU /// number of EUTRA bands (<=4) configured in RRU
......
This diff is collapsed.
...@@ -531,7 +531,7 @@ typedef struct PHY_VARS_gNB_s { ...@@ -531,7 +531,7 @@ typedef struct PHY_VARS_gNB_s {
module_id_t Mod_id; module_id_t Mod_id;
uint8_t CC_id; uint8_t CC_id;
uint8_t configured; uint8_t configured;
gNB_L1_proc_t proc; gNB_L1_proc_t proc;
int single_thread_flag; int single_thread_flag;
int abstraction_flag; int abstraction_flag;
int num_RU; int num_RU;
...@@ -541,13 +541,13 @@ typedef struct PHY_VARS_gNB_s { ...@@ -541,13 +541,13 @@ typedef struct PHY_VARS_gNB_s {
/// Ethernet parameters for fronthaul interface /// Ethernet parameters for fronthaul interface
eth_params_t eth_params; eth_params_t eth_params;
int rx_total_gain_dB; int rx_total_gain_dB;
int (*start_if)(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB); int (*nr_start_if)(struct RU_t_s *ru, struct PHY_VARS_gNB_s *gNB);
uint8_t local_flag; uint8_t local_flag;
nfapi_nr_config_request_t gNB_config; nfapi_nr_config_request_t gNB_config;
NR_DL_FRAME_PARMS frame_parms; NR_DL_FRAME_PARMS frame_parms;
PHY_MEASUREMENTS_gNB measurements; PHY_MEASUREMENTS_gNB measurements;
NR_IF_Module_t *if_inst; NR_IF_Module_t *if_inst;
NR_UL_IND_t UL_INFO; NR_UL_IND_t UL_INFO;
pthread_mutex_t UL_INFO_mutex; pthread_mutex_t UL_INFO_mutex;
/// NFAPI RX ULSCH information /// NFAPI RX ULSCH information
nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU]; nfapi_rx_indication_pdu_t rx_pdu_list[NFAPI_RX_IND_MAX_PDU];
...@@ -564,24 +564,24 @@ typedef struct PHY_VARS_gNB_s { ...@@ -564,24 +564,24 @@ typedef struct PHY_VARS_gNB_s {
/// NFAPI PRACH information /// NFAPI PRACH information
nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES]; nfapi_preamble_pdu_t preamble_list[MAX_NUM_RX_PRACH_PREAMBLES];
Sched_Rsp_t Sched_INFO; Sched_Rsp_t Sched_INFO;
NR_gNB_PDCCH pdcch_vars; NR_gNB_PDCCH pdcch_vars;
NR_gNB_PBCH pbch; NR_gNB_PBCH pbch;
LTE_eNB_PHICH phich_vars[2]; LTE_eNB_PHICH phich_vars[2];
NR_gNB_COMMON common_vars; NR_gNB_COMMON common_vars;
LTE_eNB_UCI uci_vars[NUMBER_OF_UE_MAX]; LTE_eNB_UCI uci_vars[NUMBER_OF_UE_MAX];
LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX]; LTE_eNB_SRS srs_vars[NUMBER_OF_UE_MAX];
LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX]; LTE_eNB_PUSCH *pusch_vars[NUMBER_OF_UE_MAX];
LTE_eNB_PRACH prach_vars; LTE_eNB_PRACH prach_vars;
NR_gNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams NR_gNB_DLSCH_t *dlsch[NUMBER_OF_UE_MAX][2]; // Nusers times two spatial streams
NR_gNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1][2]; // [Nusers times + number of RA][2 codewords], index 0 in [NUMBER_OF_UE_MAX+1] is for RA NR_gNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1][2]; // [Nusers times + number of RA][2 codewords], index 0 in [NUMBER_OF_UE_MAX+1] is for RA
// LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA // LTE_eNB_ULSCH_t *ulsch[NUMBER_OF_UE_MAX+1]; // Nusers + number of RA
NR_gNB_DLSCH_t *dlsch_SI,*dlsch_ra,*dlsch_p; NR_gNB_DLSCH_t *dlsch_SI,*dlsch_ra,*dlsch_p;
NR_gNB_DLSCH_t *dlsch_MCH; NR_gNB_DLSCH_t *dlsch_MCH;
NR_gNB_DLSCH_t *dlsch_PCH; NR_gNB_DLSCH_t *dlsch_PCH;
LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX]; LTE_eNB_UE_stats UE_stats[NUMBER_OF_UE_MAX];
LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX]; LTE_eNB_UE_stats *UE_stats_ptr[NUMBER_OF_UE_MAX];
uint8_t pbch_configured; uint8_t pbch_configured;
uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE uint8_t pbch_pdu[4]; //PBCH_PDU_SIZE
......
...@@ -1428,9 +1428,9 @@ static void* ru_thread( void* param ) { ...@@ -1428,9 +1428,9 @@ static void* ru_thread( void* param ) {
} }
else{ else{
// Start IF device if any // Start IF device if any
if (ru->start_if) { if (ru->nr_start_if) {
LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx); LOG_I(PHY,"Starting IF interface for RU %d\n",ru->idx);
AssertFatal(ru->start_if(ru,NULL) == 0, "Could not start the IF device\n"); AssertFatal(ru->nr_start_if(ru,NULL) == 0, "Could not start the IF device\n");
if (ru->if_south == LOCAL_RF) ret = connect_rau(ru); if (ru->if_south == LOCAL_RF) ret = connect_rau(ru);
else ret = attach_rru(ru); else ret = attach_rru(ru);
AssertFatal(ret==0,"Cannot connect to remote radio\n"); AssertFatal(ret==0,"Cannot connect to remote radio\n");
...@@ -1671,7 +1671,7 @@ void *ru_thread_synch(void *arg) { ...@@ -1671,7 +1671,7 @@ void *ru_thread_synch(void *arg) {
} }
*/ */
int start_if(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB) { int nr_start_if(struct RU_t_s *ru,struct PHY_VARS_gNB_s *gNB) {
return(ru->ifdevice.trx_start_func(&ru->ifdevice)); return(ru->ifdevice.trx_start_func(&ru->ifdevice));
} }
...@@ -2067,7 +2067,7 @@ void set_function_spec_param(RU_t *ru) ...@@ -2067,7 +2067,7 @@ void set_function_spec_param(RU_t *ru)
ru->feprx = NULL; // nothing (this is a time-domain signal) ru->feprx = NULL; // nothing (this is a time-domain signal)
ru->feptx_ofdm = NULL; // nothing (this is a time-domain signal) ru->feptx_ofdm = NULL; // nothing (this is a time-domain signal)
ru->feptx_prec = NULL; // nothing (this is a time-domain signal) ru->feptx_prec = NULL; // nothing (this is a time-domain signal)
ru->start_if = start_if; // need to start the if interface for if5 ru->nr_start_if = nr_start_if; // need to start the if interface for if5
ru->ifdevice.host_type = RRU_HOST; ru->ifdevice.host_type = RRU_HOST;
ru->rfdevice.host_type = RRU_HOST; ru->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params; ru->ifdevice.eth_params = &ru->eth_params;
...@@ -2092,7 +2092,7 @@ void set_function_spec_param(RU_t *ru) ...@@ -2092,7 +2092,7 @@ void set_function_spec_param(RU_t *ru)
ru->feprx = (get_nprocs()<=2) ? fep_full :ru_fep_full_2thread; // RX DFTs ru->feprx = (get_nprocs()<=2) ? fep_full :ru_fep_full_2thread; // RX DFTs
ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU) ru->feptx_ofdm = (get_nprocs()<=2) ? nr_feptx_ofdm : nr_feptx_ofdm_2thread; // this is fep with idft only (no precoding in RRU)
ru->feptx_prec = NULL; ru->feptx_prec = NULL;
ru->start_if = start_if; // need to start the if interface for if4p5 ru->nr_start_if = nr_start_if; // need to start the if interface for if4p5
ru->ifdevice.host_type = RRU_HOST; ru->ifdevice.host_type = RRU_HOST;
ru->rfdevice.host_type = RRU_HOST; ru->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params; ru->ifdevice.eth_params = &ru->eth_params;
...@@ -2116,7 +2116,7 @@ void set_function_spec_param(RU_t *ru) ...@@ -2116,7 +2116,7 @@ void set_function_spec_param(RU_t *ru)
ru->feptx_prec = feptx_prec; // this is fep with idft and precoding ru->feptx_prec = feptx_prec; // this is fep with idft and precoding
ru->fh_north_in = NULL; // no incoming fronthaul from north ru->fh_north_in = NULL; // no incoming fronthaul from north
ru->fh_north_out = NULL; // no outgoing fronthaul to north ru->fh_north_out = NULL; // no outgoing fronthaul to north
ru->start_if = NULL; // no if interface ru->nr_start_if = NULL; // no if interface
ru->rfdevice.host_type = RAU_HOST; ru->rfdevice.host_type = RAU_HOST;
} }
ru->fh_south_in = rx_rf; // local synchronous RF RX ru->fh_south_in = rx_rf; // local synchronous RF RX
...@@ -2149,7 +2149,7 @@ void set_function_spec_param(RU_t *ru) ...@@ -2149,7 +2149,7 @@ void set_function_spec_param(RU_t *ru)
ru->fh_south_asynch_in = NULL; // no asynchronous UL ru->fh_south_asynch_in = NULL; // no asynchronous UL
ru->start_rf = NULL; // no local RF ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL; ru->stop_rf = NULL;
ru->start_if = start_if; // need to start if interface for IF5 ru->nr_start_if = nr_start_if; // need to start if interface for IF5
ru->ifdevice.host_type = RAU_HOST; ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params; ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru; ru->ifdevice.configure_rru = configure_ru;
...@@ -2174,7 +2174,7 @@ void set_function_spec_param(RU_t *ru) ...@@ -2174,7 +2174,7 @@ void set_function_spec_param(RU_t *ru)
ru->fh_north_asynch_in = NULL; ru->fh_north_asynch_in = NULL;
ru->start_rf = NULL; // no local RF ru->start_rf = NULL; // no local RF
ru->stop_rf = NULL; ru->stop_rf = NULL;
ru->start_if = start_if; // need to start if interface for IF4p5 ru->nr_start_if = nr_start_if; // need to start if interface for IF4p5
ru->ifdevice.host_type = RAU_HOST; ru->ifdevice.host_type = RAU_HOST;
ru->ifdevice.eth_params = &ru->eth_params; ru->ifdevice.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru; ru->ifdevice.configure_rru = configure_ru;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment