split of external clock and external time sources
This commit is contained in:
@@ -200,7 +200,7 @@ typedef struct {
|
||||
//! clock source
|
||||
clock_source_t clock_source;
|
||||
//! timing_source
|
||||
clock_source_t timing_source;
|
||||
clock_source_t time_source;
|
||||
//! Auto calibration flag
|
||||
int autocal[4];
|
||||
//! rf devices work with x bits iqs when oai have its own iq format
|
||||
|
||||
@@ -115,7 +115,7 @@ extern volatile int oai_exit;
|
||||
|
||||
extern void phy_init_RU(RU_t*);
|
||||
|
||||
void init_RU(char*);
|
||||
void init_RU(char*,clock_source_t,clock_source_t);
|
||||
void stop_RU(RU_t *ru);
|
||||
void do_ru_sync(RU_t *ru);
|
||||
|
||||
@@ -1339,6 +1339,7 @@ void fill_rf_config(RU_t *ru, char *rf_config_file) {
|
||||
}
|
||||
else AssertFatal(1==0,"Unknown N_RB_DL %d\n",fp->N_RB_DL);
|
||||
|
||||
|
||||
if (fp->frame_type==TDD)
|
||||
cfg->duplex_mode = duplex_mode_TDD;
|
||||
else //FDD
|
||||
@@ -2198,7 +2199,7 @@ void init_precoding_weights(PHY_VARS_eNB *eNB) {
|
||||
|
||||
extern void RCconfig_RU(void);
|
||||
|
||||
void init_RU(char *rf_config_file) {
|
||||
void init_RU(char *rf_config_file, clock_source_t clock_source,clock_source_t time_source) {
|
||||
|
||||
int ru_id;
|
||||
RU_t *ru;
|
||||
@@ -2228,7 +2229,9 @@ void init_RU(char *rf_config_file) {
|
||||
ru->in_synch = (ru->is_slave == 1) ? 0 : 1;
|
||||
// use eNB_list[0] as a reference for RU frame parameters
|
||||
// NOTE: multiple CC_id are not handled here yet!
|
||||
|
||||
ru->openair0_cfg.clock_source = clock_source;
|
||||
ru->openair0_cfg.time_source = time_source;
|
||||
;
|
||||
|
||||
eNB0 = ru->eNB_list[0];
|
||||
if ((ru->function != NGFI_RRU_IF5) && (ru->function != NGFI_RRU_IF4p5))
|
||||
|
||||
@@ -126,7 +126,7 @@ volatile int start_UE = 0;
|
||||
#endif
|
||||
volatile int oai_exit = 0;
|
||||
|
||||
static clock_source_t clock_source = internal;
|
||||
static clock_source_t clock_source = internal,time_source=internal;
|
||||
static int wait_for_sync = 0;
|
||||
|
||||
static char UE_flag=0;
|
||||
@@ -800,6 +800,7 @@ void init_openair0() {
|
||||
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
|
||||
|
||||
openair0_cfg[card].clock_source = clock_source;
|
||||
openair0_cfg[card].time_source = time_source;
|
||||
|
||||
|
||||
openair0_cfg[card].tx_num_channels=min(2,((UE_flag==0) ? RC.eNB[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx));
|
||||
@@ -1249,7 +1250,7 @@ int main( int argc, char **argv )
|
||||
|
||||
if (RC.nb_RU >0) {
|
||||
printf("Initializing RU threads\n");
|
||||
init_RU(rf_config_file);
|
||||
init_RU(rf_config_file,clock_source,time_source);
|
||||
for (ru_id=0;ru_id<RC.nb_RU;ru_id++) {
|
||||
RC.ru[ru_id]->rf_map.card=0;
|
||||
RC.ru[ru_id]->rf_map.chain=CC_id+chain_offset;
|
||||
|
||||
@@ -243,7 +243,7 @@ extern void stop_eNB(int);
|
||||
extern void kill_eNB_proc(int inst);
|
||||
|
||||
// In lte-ru.c
|
||||
extern void init_RU(const char*);
|
||||
extern void init_RU(const char*,clock_source_t,clock_source_t);
|
||||
|
||||
// In lte-ue.c
|
||||
extern int setup_ue_buffers(PHY_VARS_UE **phy_vars_ue, openair0_config_t *openair0_cfg);
|
||||
|
||||
Reference in New Issue
Block a user