Merge branch 'enhancement-74-SoDeRa' into develop
This commit is contained in:
@@ -147,18 +147,22 @@ void config_BBU_mod( rrh_module_t *mod_enb, uint8_t RT_flag, uint8_t NRT_flag) {
|
||||
mod_enb->devs->openair0_cfg = mod_enb->eth_dev.openair0_cfg;
|
||||
|
||||
/* check sanity of configuration parameters and print */
|
||||
check_dev_config(mod_enb);
|
||||
|
||||
check_dev_config(mod_enb);
|
||||
if (rf_config_file[0] == '\0')
|
||||
mod_enb->devs->openair0_cfg->configFilename = NULL;
|
||||
else
|
||||
mod_enb->devs->openair0_cfg->configFilename = rf_config_file;
|
||||
/* initialize and configure the RF device */
|
||||
if (openair0_device_load(mod_enb->devs, mod_enb->devs->openair0_cfg)<0) {
|
||||
LOG_E(RRH,"Exiting, cannot initialize RF device.\n");
|
||||
exit(-1);
|
||||
} else {
|
||||
} else {
|
||||
if (mod_enb->devs->type != NONE_DEV) {
|
||||
/* start RF device */
|
||||
if (mod_enb->devs->type == EXMIMO_DEV) {
|
||||
//call start function for exmino
|
||||
} else {
|
||||
|
||||
if (mod_enb->devs->trx_start_func(mod_enb->devs)!=0)
|
||||
LOG_E(RRH,"Unable to initiate RF device.\n");
|
||||
else
|
||||
|
||||
@@ -290,6 +290,8 @@ double bw = 10.0e6;
|
||||
|
||||
static int tx_max_power[MAX_NUM_CCs]; /* = {0,0}*/;
|
||||
|
||||
char rf_config_file[1024];
|
||||
|
||||
int chain_offset=0;
|
||||
|
||||
#ifndef EXMIMO
|
||||
@@ -454,6 +456,7 @@ void help (void) {
|
||||
printf(" sudo -E lte-softmodem [options]\n");
|
||||
printf(" sudo -E ./lte-softmodem -O ../../../targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.exmimo2.openEPC.conf -S -V -m 26 -t 16 -x 1 --ulsch-max-errors 100 -W\n\n");
|
||||
printf("Options:\n");
|
||||
printf(" --rf-config-file Configuration file for front-end (e.g. LMS7002M)\n");
|
||||
printf(" --ulsch-max-errors set the max ULSCH erros\n");
|
||||
printf(" --calib-ue-rx set UE RX calibration\n");
|
||||
printf(" --calib-ue-rx-med \n");
|
||||
@@ -980,10 +983,17 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
|
||||
len = phy_vars_eNB->lte_frame_parms.samples_per_tti>>1;
|
||||
else
|
||||
len = phy_vars_eNB->lte_frame_parms.samples_per_tti;
|
||||
|
||||
for (i=0; i<len; i++) {
|
||||
/*
|
||||
for (i=0;i<len;i+=4) {
|
||||
dummy_tx_b[i] = 0x100;
|
||||
dummy_tx_b[i+1] = 0x01000000;
|
||||
dummy_tx_b[i+2] = 0xff00;
|
||||
dummy_tx_b[i+3] = 0xff000000;
|
||||
}*/
|
||||
for (i=0; i<len; i++) {
|
||||
tx_offset = (int)slot_offset+time_offset[aa]+i;
|
||||
|
||||
|
||||
if (tx_offset<0)
|
||||
tx_offset += LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*phy_vars_eNB->lte_frame_parms.samples_per_tti;
|
||||
|
||||
@@ -993,7 +1003,6 @@ void do_OFDM_mod_rt(int subframe,PHY_VARS_eNB *phy_vars_eNB)
|
||||
((short*)&phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset])[0] = ((short*)dummy_tx_b)[2*i]<<openair0_cfg[0].iq_txshift;
|
||||
|
||||
((short*)&phy_vars_eNB->lte_eNB_common_vars.txdata[0][aa][tx_offset])[1] = ((short*)dummy_tx_b)[2*i+1]<<openair0_cfg[0].iq_txshift;
|
||||
|
||||
}
|
||||
// if S-subframe switch to RX in second subframe
|
||||
if (subframe_select(&phy_vars_eNB->lte_frame_parms,subframe) == SF_S) {
|
||||
@@ -2095,6 +2104,7 @@ static void get_options (int argc, char **argv)
|
||||
|
||||
enum long_option_e {
|
||||
LONG_OPTION_START = 0x100, /* Start after regular single char options */
|
||||
LONG_OPTION_RF_CONFIG_FILE,
|
||||
LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS,
|
||||
LONG_OPTION_CALIB_UE_RX,
|
||||
LONG_OPTION_CALIB_UE_RX_MED,
|
||||
@@ -2111,6 +2121,7 @@ static void get_options (int argc, char **argv)
|
||||
};
|
||||
|
||||
static const struct option long_options[] = {
|
||||
{"rf-config-file",required_argument, NULL, LONG_OPTION_RF_CONFIG_FILE},
|
||||
{"ulsch-max-errors",required_argument, NULL, LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS},
|
||||
{"calib-ue-rx", required_argument, NULL, LONG_OPTION_CALIB_UE_RX},
|
||||
{"calib-ue-rx-med", required_argument, NULL, LONG_OPTION_CALIB_UE_RX_MED},
|
||||
@@ -2129,11 +2140,19 @@ static void get_options (int argc, char **argv)
|
||||
|
||||
while ((c = getopt_long (argc, argv, "A:a:C:dEK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:Tx:",long_options,NULL)) != -1) {
|
||||
switch (c) {
|
||||
case LONG_OPTION_RF_CONFIG_FILE:
|
||||
if (strlen(optarg)<=1024)
|
||||
strcpy(rf_config_file,optarg);
|
||||
else {
|
||||
printf("Configuration filename is too long\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
case LONG_OPTION_MAXPOWER:
|
||||
tx_max_power[0]=atoi(optarg);
|
||||
for (CC_id=1;CC_id<MAX_NUM_CCs;CC_id++)
|
||||
tx_max_power[CC_id]=tx_max_power[0];
|
||||
|
||||
break;
|
||||
case LONG_OPTION_ULSCH_MAX_CONSECUTIVE_ERRORS:
|
||||
ULSCH_max_consecutive_errors = atoi(optarg);
|
||||
printf("Set ULSCH_max_consecutive_errors = %d\n",ULSCH_max_consecutive_errors);
|
||||
@@ -2624,8 +2643,12 @@ int main( int argc, char **argv )
|
||||
}
|
||||
logInit();
|
||||
|
||||
rf_config_file[0]='\0';
|
||||
get_options (argc, argv); //Command-line options
|
||||
|
||||
if (rf_config_file[0] == '\0')
|
||||
openair0_cfg[0].configFilename = NULL;
|
||||
else
|
||||
openair0_cfg[0].configFilename = rf_config_file;
|
||||
|
||||
// initialize the log (see log.h for details)
|
||||
set_glog(glog_level, glog_verbosity);
|
||||
|
||||
@@ -529,11 +529,11 @@ static void *UE_thread_synch(void *arg)
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef OAI_USRP
|
||||
#if defined(OAI_USRP) || defined(OAI_BLADERF) || defined(OAI_LMSSDR)
|
||||
openair0_cfg[card].rx_gain[i] = UE->rx_total_gain_dB;//-USRP_GAIN_OFFSET;
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
switch(UE->lte_frame_parms.N_RB_DL) {
|
||||
case 6:
|
||||
openair0_cfg[card].rx_gain[i] -= 12;
|
||||
@@ -555,7 +555,7 @@ static void *UE_thread_synch(void *arg)
|
||||
printf("Unknown number of RBs %d\n",UE->lte_frame_parms.N_RB_DL);
|
||||
break;
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,8 +111,7 @@ rrh_module_t *ue_array;
|
||||
|
||||
openair0_vtimestamp hw_counter=0;
|
||||
|
||||
|
||||
|
||||
char rf_config_file[1024];
|
||||
|
||||
static void debug_init(void);
|
||||
static void get_options(int argc, char *argv[]);
|
||||
@@ -143,7 +142,7 @@ static int get_address(char* if_name, uint8_t flag);
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
unsigned int i;
|
||||
|
||||
rf_config_file[0]='\0';
|
||||
/* parse input arguments */
|
||||
get_options(argc, argv);
|
||||
/* initialize logger and signal analyzer */
|
||||
@@ -257,7 +256,7 @@ static void get_options(int argc, char *argv[]) {
|
||||
|
||||
int opt;
|
||||
|
||||
while ((opt = getopt(argc, argv, "xvhlte:n:u:g:r:m:i:")) != -1) {
|
||||
while ((opt = getopt(argc, argv, "xvhlte:n:u:g:r:m:i:f:")) != -1) {
|
||||
|
||||
switch (opt) {
|
||||
case 'n':
|
||||
@@ -299,6 +298,14 @@ static void get_options(int argc, char *argv[]) {
|
||||
/*In loopback mode rrh sends back to bbu what it receives*/
|
||||
loopback_flag=1;
|
||||
break;
|
||||
case 'f':
|
||||
if (strlen(optarg)<=1024)
|
||||
strcpy(rf_config_file,optarg);
|
||||
else {
|
||||
printf("Configuration filename is too long\n");
|
||||
exit(-1);
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
/* When measurements are enabled statistics related to TX/RX time are printed */
|
||||
measurements_flag=1;
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#ifndef RRH_GW_EXTERNS_H_
|
||||
#define RRH_GW_EXTERNS_H_
|
||||
extern char rf_config_file[1024];
|
||||
|
||||
extern openair0_timestamp timestamp_UE_tx[4] ,timestamp_UE_rx[4] ,timestamp_eNB_rx[4],timestamp_eNB_tx[4];
|
||||
extern openair0_vtimestamp hw_counter;
|
||||
|
||||
Reference in New Issue
Block a user