debugging information in lte-enb, addition of external reference option in lte-softmodem and usrp_lib.cpp
This commit is contained in:
@@ -664,7 +664,7 @@ add_boolean_option(ENABLE_NEW_MULTICAST False "specific to oaisim")
|
|||||||
add_boolean_option(EXMIMO_IOT True "????")
|
add_boolean_option(EXMIMO_IOT True "????")
|
||||||
add_boolean_option(LARGE_SCALE False "specific to oaisim: defines max eNB=2 and max UE=120")
|
add_boolean_option(LARGE_SCALE False "specific to oaisim: defines max eNB=2 and max UE=120")
|
||||||
add_boolean_option(LOCALIZATION False "???")
|
add_boolean_option(LOCALIZATION False "???")
|
||||||
add_integer_option(MAX_NUM_CCs 2 "????")
|
add_integer_option(MAX_NUM_CCs 1 "????")
|
||||||
add_boolean_option(MU_RECEIVER False "????")
|
add_boolean_option(MU_RECEIVER False "????")
|
||||||
add_boolean_option(NEW_FFT True "????")
|
add_boolean_option(NEW_FFT True "????")
|
||||||
add_boolean_option(OPENAIR1 True "????")
|
add_boolean_option(OPENAIR1 True "????")
|
||||||
|
|||||||
@@ -134,6 +134,14 @@ typedef struct {
|
|||||||
double offset;
|
double offset;
|
||||||
} rx_gain_calib_table_t;
|
} rx_gain_calib_table_t;
|
||||||
|
|
||||||
|
/*! \brief Clock source types */
|
||||||
|
typedef enum {
|
||||||
|
//! This tells the underlying hardware to use the internal reference
|
||||||
|
internal=0,
|
||||||
|
//! This tells the underlying hardware to use the external reference
|
||||||
|
external=1
|
||||||
|
} clock_source_t;
|
||||||
|
|
||||||
/*! \brief RF frontend parameters set by application */
|
/*! \brief RF frontend parameters set by application */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
//! Module ID for this configuration
|
//! Module ID for this configuration
|
||||||
@@ -186,6 +194,8 @@ typedef struct {
|
|||||||
double rx_bw;
|
double rx_bw;
|
||||||
//! TX bandwidth in Hz
|
//! TX bandwidth in Hz
|
||||||
double tx_bw;
|
double tx_bw;
|
||||||
|
//! clock source
|
||||||
|
clock_source_t clock_source;
|
||||||
//! Auto calibration flag
|
//! Auto calibration flag
|
||||||
int autocal[4];
|
int autocal[4];
|
||||||
//! rf devices work with x bits iqs when oai have its own iq format
|
//! rf devices work with x bits iqs when oai have its own iq format
|
||||||
|
|||||||
@@ -587,7 +587,10 @@ extern "C" {
|
|||||||
// s->usrp->set_tx_subdev_spec(tx_subdev);
|
// s->usrp->set_tx_subdev_spec(tx_subdev);
|
||||||
|
|
||||||
// lock mboard clocks
|
// lock mboard clocks
|
||||||
s->usrp->set_clock_source("internal");
|
if (openair0_cfg[0].clock_source == internal)
|
||||||
|
s->usrp->set_clock_source("internal");
|
||||||
|
else
|
||||||
|
s->usrp->set_clock_source("external");
|
||||||
|
|
||||||
//Setting device type to USRP X300/X310
|
//Setting device type to USRP X300/X310
|
||||||
device->type=USRP_X300_DEV;
|
device->type=USRP_X300_DEV;
|
||||||
@@ -643,6 +646,12 @@ extern "C" {
|
|||||||
// s->usrp->set_clock_source("internal");
|
// s->usrp->set_clock_source("internal");
|
||||||
// set master clock rate and sample rate for tx & rx for streaming
|
// set master clock rate and sample rate for tx & rx for streaming
|
||||||
|
|
||||||
|
// lock mboard clocks
|
||||||
|
if (openair0_cfg[0].clock_source == internal)
|
||||||
|
s->usrp->set_clock_source("internal");
|
||||||
|
else
|
||||||
|
s->usrp->set_clock_source("external");
|
||||||
|
|
||||||
device->type = USRP_B200_DEV;
|
device->type = USRP_B200_DEV;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+14
-11
@@ -654,11 +654,11 @@ void fh_if5_asynch_UL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (proc->subframe_rx != *subframe) {
|
if (proc->subframe_rx != *subframe) {
|
||||||
LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe);
|
LOG_E(PHY,"fh_if5_asynch_UL: subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
if (proc->frame_rx != *frame) {
|
if (proc->frame_rx != *frame) {
|
||||||
LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->frame_rx,*frame);
|
LOG_E(PHY,"fh_if5_asynch_UL: subframe_rx %d is not what we expect %d\n",proc->frame_rx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -688,11 +688,11 @@ void fh_if4p5_asynch_UL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (proc->frame_rx != *frame) {
|
if (proc->frame_rx != *frame) {
|
||||||
LOG_E(PHY,"frame_rx %d is not what we expect %d\n",proc->frame_rx,*frame);
|
LOG_E(PHY,"fh_if4p5_asynch_UL: frame_rx %d is not what we expect %d\n",proc->frame_rx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
if (proc->subframe_rx != *subframe) {
|
if (proc->subframe_rx != *subframe) {
|
||||||
LOG_E(PHY,"subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe);
|
LOG_E(PHY,"fh_if4p5_asynch_UL: subframe_rx %d is not what we expect %d\n",proc->subframe_rx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -728,11 +728,11 @@ void fh_if5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (subframe_tx != *subframe) {
|
if (subframe_tx != *subframe) {
|
||||||
LOG_E(PHY,"subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe);
|
LOG_E(PHY,"fh_if5_asynch_DL: subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
if (frame_tx != *frame) {
|
if (frame_tx != *frame) {
|
||||||
LOG_E(PHY,"frame_tx %d is not what we expect %d\n",frame_tx,*frame);
|
LOG_E(PHY,"fh_if5_asynch_DL: frame_tx %d is not what we expect %d\n",frame_tx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -760,11 +760,11 @@ void fh_if4p5_asynch_DL(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (frame_tx != *frame) {
|
if (frame_tx != *frame) {
|
||||||
LOG_E(PHY,"frame_tx %d is not what we expect %d\n",frame_tx,*frame);
|
LOG_E(PHY,"fh_if4p5_asynch_DL: frame_tx %d is not what we expect %d\n",frame_tx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
if (subframe_tx != *subframe) {
|
if (subframe_tx != *subframe) {
|
||||||
LOG_E(PHY,"subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe);
|
LOG_E(PHY,"fh_if4p5_asynch_DL: subframe_tx %d is not what we expect %d\n",subframe_tx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -882,6 +882,9 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
fp->samples_per_tti,
|
fp->samples_per_tti,
|
||||||
fp->nb_antennas_rx);
|
fp->nb_antennas_rx);
|
||||||
|
|
||||||
|
if (rxs != fp->samples_per_tti)
|
||||||
|
printf("Asked for %d samples, got %d from USRP\n",fp->samples_per_tti,rxs);
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME( VCD_SIGNAL_DUMPER_FUNCTIONS_TRX_READ, 0 );
|
||||||
|
|
||||||
if (proc->first_rx == 1)
|
if (proc->first_rx == 1)
|
||||||
@@ -892,16 +895,16 @@ void rx_rf(PHY_VARS_eNB *eNB,int *frame,int *subframe) {
|
|||||||
// synchronize first reception to frame 0 subframe 0
|
// synchronize first reception to frame 0 subframe 0
|
||||||
|
|
||||||
proc->timestamp_tx = proc->timestamp_rx+(4*fp->samples_per_tti);
|
proc->timestamp_tx = proc->timestamp_rx+(4*fp->samples_per_tti);
|
||||||
//printf("trx_read <- USRP TS %llu (sf %d, f %d, first_rx %d)\n", proc->timestamp_rx,proc->subframe_rx,proc->frame_rx,proc->first_rx);
|
// printf("trx_read <- USRP TS %lu (offset %d sf %d, f %d, first_rx %d)\n", proc->timestamp_rx,eNB->ts_offset,proc->subframe_rx,proc->frame_rx,proc->first_rx);
|
||||||
|
|
||||||
if (proc->first_rx == 0) {
|
if (proc->first_rx == 0) {
|
||||||
if (proc->subframe_rx != *subframe){
|
if (proc->subframe_rx != *subframe){
|
||||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->timestamp_rx,proc->subframe_rx,*subframe);
|
LOG_E(PHY,"rx_rf: Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->subframe_rx %d, subframe %d)\n",proc->timestamp_rx,proc->subframe_rx,*subframe);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (proc->frame_rx != *frame) {
|
if (proc->frame_rx != *frame) {
|
||||||
LOG_E(PHY,"Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->timestamp_rx,proc->frame_rx,*frame);
|
LOG_E(PHY,"rx_rf: Received Timestamp (%llu) doesn't correspond to the time we think it is (proc->frame_rx %d frame %d)\n",proc->timestamp_rx,proc->frame_rx,*frame);
|
||||||
exit_fun("Exiting");
|
exit_fun("Exiting");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -168,6 +168,7 @@ volatile int oai_exit = 0;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static clock_source_t clock_source = internal;
|
||||||
|
|
||||||
static char UE_flag=0;
|
static char UE_flag=0;
|
||||||
unsigned int mmapped_dma=0;
|
unsigned int mmapped_dma=0;
|
||||||
@@ -386,6 +387,7 @@ void help (void) {
|
|||||||
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
|
printf(" --loop-memory get softmodem (UE) to loop through memory instead of acquiring from HW\n");
|
||||||
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
|
printf(" --mmapped-dma sets flag for improved EXMIMO UE performance\n");
|
||||||
printf(" --single-thread runs lte-softmodem in only one thread\n");
|
printf(" --single-thread runs lte-softmodem in only one thread\n");
|
||||||
|
printf(" --external-clock tells hardware to use an external clock reference\n");
|
||||||
printf(" -C Set the downlink frequency for all component carriers\n");
|
printf(" -C Set the downlink frequency for all component carriers\n");
|
||||||
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
|
printf(" -d Enable soft scope and L1 and L2 stats (Xforms)\n");
|
||||||
printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n");
|
printf(" -F Calibrate the EXMIMO borad, available files: exmimo2_2arxg.lime exmimo2_2brxg.lime \n");
|
||||||
@@ -657,7 +659,7 @@ void *l2l1_task(void *arg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
static void get_options (int argc, char **argv)
|
static void get_options (int argc, char **argv)
|
||||||
{
|
{
|
||||||
@@ -693,6 +695,7 @@ static void get_options (int argc, char **argv)
|
|||||||
LONG_OPTION_PHYTEST,
|
LONG_OPTION_PHYTEST,
|
||||||
LONG_OPTION_MMAPPED_DMA,
|
LONG_OPTION_MMAPPED_DMA,
|
||||||
LONG_OPTION_SINGLE_THREAD,
|
LONG_OPTION_SINGLE_THREAD,
|
||||||
|
LONG_OPTION_EXTERNAL_CLOCK,
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
LONG_OPTION_T_PORT,
|
LONG_OPTION_T_PORT,
|
||||||
LONG_OPTION_T_NOWAIT,
|
LONG_OPTION_T_NOWAIT,
|
||||||
@@ -718,6 +721,7 @@ static void get_options (int argc, char **argv)
|
|||||||
{"phy-test", no_argument, NULL, LONG_OPTION_PHYTEST},
|
{"phy-test", no_argument, NULL, LONG_OPTION_PHYTEST},
|
||||||
{"mmapped-dma", no_argument, NULL, LONG_OPTION_MMAPPED_DMA},
|
{"mmapped-dma", no_argument, NULL, LONG_OPTION_MMAPPED_DMA},
|
||||||
{"single-thread", no_argument, NULL, LONG_OPTION_SINGLE_THREAD},
|
{"single-thread", no_argument, NULL, LONG_OPTION_SINGLE_THREAD},
|
||||||
|
{"external-clock", no_argument, NULL, LONG_OPTION_EXTERNAL_CLOCK},
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
|
{"T_port", required_argument, 0, LONG_OPTION_T_PORT},
|
||||||
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
|
{"T_nowait", no_argument, 0, LONG_OPTION_T_NOWAIT},
|
||||||
@@ -818,7 +822,11 @@ static void get_options (int argc, char **argv)
|
|||||||
case LONG_OPTION_SINGLE_THREAD:
|
case LONG_OPTION_SINGLE_THREAD:
|
||||||
single_thread_flag = 1;
|
single_thread_flag = 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case LONG_OPTION_EXTERNAL_CLOCK:
|
||||||
|
clock_source = external;
|
||||||
|
break;
|
||||||
|
|
||||||
#if T_TRACER
|
#if T_TRACER
|
||||||
case LONG_OPTION_T_PORT: {
|
case LONG_OPTION_T_PORT: {
|
||||||
extern int T_port;
|
extern int T_port;
|
||||||
@@ -1325,6 +1333,7 @@ void init_openair0() {
|
|||||||
|
|
||||||
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
|
openair0_cfg[card].num_rb_dl=frame_parms[0]->N_RB_DL;
|
||||||
|
|
||||||
|
openair0_cfg[card].clock_source = clock_source;
|
||||||
|
|
||||||
openair0_cfg[card].tx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx));
|
openair0_cfg[card].tx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_tx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_tx));
|
||||||
openair0_cfg[card].rx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx));
|
openair0_cfg[card].rx_num_channels=min(2,((UE_flag==0) ? PHY_vars_eNB_g[0][0]->frame_parms.nb_antennas_rx : PHY_vars_UE_g[0][0]->frame_parms.nb_antennas_rx));
|
||||||
|
|||||||
Reference in New Issue
Block a user