Commit 264725c5 authored by yilmazt's avatar yilmazt

Changes to fix errors #1

parent ccd60195
This diff is collapsed.
......@@ -35,6 +35,7 @@
#define MAX_BANDS_PER_RRU 4
#define MAX_RRU_CONFIG_SIZE 1024
#ifdef OCP_FRAMEWORK
......@@ -364,6 +365,10 @@ typedef struct RU_t_s{
struct NR_DL_FRAME_PARMS *nr_frame_parms;
///timing offset used in TDD
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
openair0_device rfdevice;
/// HW configuration
......@@ -373,7 +378,7 @@ typedef struct RU_t_s{
int num_gNB;
/// list of NBs using this RU
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
openair0_rf_map rf_map;
/// IF device descriptor
......@@ -399,7 +404,8 @@ typedef struct RU_t_s{
/// function pointer to release function for radio interface
int (*stop_rf)(struct RU_t_s *ru);
/// 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)
void (*feprx)(struct RU_t_s *ru);
/// function pointer to TX front-end processing routine (IDFTs and prefix removal or NULL)
......@@ -410,12 +416,11 @@ typedef struct RU_t_s{
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);
/// 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_gNB)(struct PHY_VARS_gNB_s *gNB,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);
#if (RRC_VERSION >= MAKE_VERSION(14, 0, 0))
/// 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
/// function pointer to NB entry routine
......@@ -446,7 +451,7 @@ typedef struct RU_t_s{
RU_COMMON common;
/// beamforming weight vectors per eNB
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];
/// received frequency-domain signal for PRACH (IF4p5 RRU)
int16_t **prach_rxsigF;
......@@ -460,12 +465,8 @@ typedef struct RU_t_s{
RU_proc_t proc;
/// stats thread pthread descriptor
pthread_t ru_stats_thread;
} RU_t;
#define MAX_RRU_CONFIG_SIZE 1024
typedef enum {
RAU_tick=0,
RRU_capabilities=1,
......@@ -487,8 +488,6 @@ typedef enum {
MAX_FH_FMTs =4
} FH_fmt_options_t;
#define MAX_BANDS_PER_RRU 4
typedef struct RRU_capabilities_s {
/// Fronthaul format
FH_fmt_options_t FH_fmt;
......@@ -513,7 +512,6 @@ typedef struct RRU_capabilities_s {
} RRU_capabilities_t;
typedef struct RRU_config_s {
/// Fronthaul format
RU_if_south_t FH_fmt;
/// number of EUTRA bands (<=4) configured in RRU
......
This diff is collapsed.
......@@ -541,7 +541,7 @@ typedef struct PHY_VARS_gNB_s {
/// Ethernet parameters for fronthaul interface
eth_params_t eth_params;
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;
nfapi_nr_config_request_t gNB_config;
NR_DL_FRAME_PARMS frame_parms;
......
......@@ -1428,9 +1428,9 @@ static void* ru_thread( void* param ) {
}
else{
// 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);
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);
else ret = attach_rru(ru);
AssertFatal(ret==0,"Cannot connect to remote radio\n");
......@@ -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));
}
......@@ -2067,7 +2067,7 @@ void set_function_spec_param(RU_t *ru)
ru->feprx = 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->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->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
......@@ -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->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->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->rfdevice.host_type = RRU_HOST;
ru->ifdevice.eth_params = &ru->eth_params;
......@@ -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->fh_north_in = NULL; // no incoming fronthaul from 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->fh_south_in = rx_rf; // local synchronous RF RX
......@@ -2149,7 +2149,7 @@ void set_function_spec_param(RU_t *ru)
ru->fh_south_asynch_in = NULL; // no asynchronous UL
ru->start_rf = NULL; // no local RF
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.eth_params = &ru->eth_params;
ru->ifdevice.configure_rru = configure_ru;
......@@ -2174,7 +2174,7 @@ void set_function_spec_param(RU_t *ru)
ru->fh_north_asynch_in = NULL;
ru->start_rf = NULL; // no local RF
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.eth_params = &ru->eth_params;
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