clock source / timing source split.

MTU tuning removed for now.
This commit is contained in:
Younes
2018-01-26 16:06:15 +01:00
parent 22638ba012
commit ba5e3e7463
4 changed files with 24 additions and 3 deletions
+2
View File
@@ -199,6 +199,8 @@ typedef struct {
double tx_bw;
//! clock source
clock_source_t clock_source;
//! timing_source
clock_source_t timing_source;
//! Auto calibration flag
int autocal[4];
//! rf devices work with x bits iqs when oai have its own iq format
@@ -116,7 +116,7 @@ int trx_eth_start(openair0_device *device) {
*/
/* adjust MTU wrt number of samples per packet */
if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
//if(ethernet_tune (device,MTU_SIZE,UDP_IF4p5_PRACH_SIZE_BYTES)!=0) return -1;
+20 -1
View File
@@ -1004,6 +1004,15 @@ extern "C" {
else
s->usrp->set_clock_source("external");
if (openair0_cfg[0].time_source == internal){
LOG_I(PHY,"Setting time source to internal\n");
s->usrp->set_time_source("internal");
}
else{
LOG_I(PHY,"Setting time source to external\n");
s->usrp->set_time_source("external");
}
//Setting device type to USRP X300/X310
device->type=USRP_X300_DEV;
@@ -1062,12 +1071,22 @@ extern "C" {
// lock mboard clocks
if (openair0_cfg[0].clock_source == internal){
LOG_I(PHY,"Setting clock source to internal\n");
s->usrp->set_clock_source("internal");
}
else{
LOG_I(PHY,"Setting clock source to external\n");
s->usrp->set_clock_source("external");
s->usrp->set_time_source("external");
}
if (openair0_cfg[0].time_source == internal){
LOG_I(PHY,"Setting time source to internal\n");
s->usrp->set_time_source("internal");
}
else{
LOG_I(PHY,"Setting time source to external\n");
s->usrp->set_time_source("external");
}
device->type = USRP_B200_DEV;
if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) {
+1 -1
View File
@@ -1880,7 +1880,7 @@ void *ru_thread_synch(void *arg) {
ru->state = RU_RUN;
} // symc_pos > 0
else {
if (cnt>50) {
if (cnt>1000) {
write_output("ru_sync.m","sync",(void*)&sync_corr[0],fp->samples_per_tti*5,1,2);
write_output("ru_rx.m","rxs",(void*)ru->common.rxdata[0],fp->samples_per_tti*10,1,1);
exit(1);