Commit 263aef27 authored by laurent's avatar laurent Committed by frtabu

tests in tdd, still sync failures (random cases)

parent f2ee63e9
...@@ -188,7 +188,7 @@ static int sync_to_gps(openair0_device *device) { ...@@ -188,7 +188,7 @@ static int sync_to_gps(openair0_device *device) {
num_gps_locked++; num_gps_locked++;
std::cout << boost::format("GPS Locked\n"); std::cout << boost::format("GPS Locked\n");
} else { } else {
LOG_W(HW,"WARNING: GPS not locked - time will not be accurate until locked\n"); LOG_W(HW,"GPS not locked - time will not be accurate until locked" << std::endl;
} }
//Set to GPS time //Set to GPS time
......
This diff is collapsed.
...@@ -545,7 +545,7 @@ static void *UE_thread_synch(void *arg) ...@@ -545,7 +545,7 @@ static void *UE_thread_synch(void *arg)
// the thread waits here most of the time // the thread waits here most of the time
pthread_cond_wait( &UE->proc.cond_synch, &UE->proc.mutex_synch ); pthread_cond_wait( &UE->proc.cond_synch, &UE->proc.mutex_synch );
AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), ""); AssertFatal ( 0== pthread_mutex_unlock(&UE->proc.mutex_synch), "");
LOG_I(PHY,"Starting a sync process\n");
switch (sync_mode) { switch (sync_mode) {
case pss: case pss:
LOG_I(PHY,"[SCHED][UE] Scanning band %d (%d), freq %u\n",bands_to_scan.band_info[current_band].band, current_band,bands_to_scan.band_info[current_band].dl_min+current_offset); LOG_I(PHY,"[SCHED][UE] Scanning band %d (%d), freq %u\n",bands_to_scan.band_info[current_band].band, current_band,bands_to_scan.band_info[current_band].dl_min+current_offset);
...@@ -578,11 +578,7 @@ static void *UE_thread_synch(void *arg) ...@@ -578,11 +578,7 @@ static void *UE_thread_synch(void *arg)
case pbch: case pbch:
#if DISABLE_LOG_X
printf("[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
#else
LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode); LOG_I(PHY, "[UE thread Synch] Running Initial Synch (mode %d)\n",UE->mode);
#endif
if (initial_sync( UE, UE->mode ) == 0) { if (initial_sync( UE, UE->mode ) == 0) {
LOG_I( HW, "Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d\n", LOG_I( HW, "Got synch: hw_slot_offset %d, carrier off %d Hz, rxgain %d (DL %u, UL %u), UE_scan_carrier %d\n",
...@@ -702,19 +698,11 @@ static void *UE_thread_synch(void *arg) ...@@ -702,19 +698,11 @@ static void *UE_thread_synch(void *arg)
return &UE_thread_synch_retval; // not reached return &UE_thread_synch_retval; // not reached
} }
} }
#if DISABLE_LOG_X
printf("[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n",
freq_offset,
UE->rx_total_gain_dB,
downlink_frequency[0][0]+freq_offset,
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset );
#else
LOG_I(PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n", LOG_I(PHY, "[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)\n",
freq_offset, freq_offset,
UE->rx_total_gain_dB, UE->rx_total_gain_dB,
downlink_frequency[0][0]+freq_offset, downlink_frequency[0][0]+freq_offset,
downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset ); downlink_frequency[0][0]+uplink_frequency_offset[0][0]+freq_offset );
#endif
for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) { for (i=0; i<openair0_cfg[UE->rf_map.card].rx_num_channels; i++) {
openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+freq_offset; openair0_cfg[UE->rf_map.card].rx_freq[UE->rf_map.chain+i] = downlink_frequency[CC_id][i]+freq_offset;
...@@ -1532,7 +1520,7 @@ void *UE_thread(void *arg) { ...@@ -1532,7 +1520,7 @@ void *UE_thread(void *arg) {
PHY_VARS_UE *UE = (PHY_VARS_UE *) arg; PHY_VARS_UE *UE = (PHY_VARS_UE *) arg;
// int tx_enabled = 0; // int tx_enabled = 0;
openair0_timestamp timestamp,timestamp1; openair0_timestamp timestamp;
void* rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX]; void* rxp[NB_ANTENNAS_RX], *txp[NB_ANTENNAS_TX];
int start_rx_stream = 0; int start_rx_stream = 0;
int i; int i;
...@@ -1781,13 +1769,15 @@ void *UE_thread(void *arg) { ...@@ -1781,13 +1769,15 @@ void *UE_thread(void *arg) {
if( sub_frame==9) { if( sub_frame==9) {
// read in first symbol of next frame and adjust for timing drift // read in first symbol of next frame and adjust for timing drift
int first_symbols=writeBlockSize-readBlockSize; int first_symbols=writeBlockSize-readBlockSize;
if ( first_symbols > 0 ) if ( first_symbols > 0 ) {
AssertFatal(first_symbols == openair0_timestamp timestamp1;
UE->rfdevice.trx_read_func(&UE->rfdevice, AssertFatal(first_symbols ==
&timestamp1, UE->rfdevice.trx_read_func(&UE->rfdevice,
(void**)UE->common_vars.rxdata, &timestamp1,
first_symbols, (void**)UE->common_vars.rxdata,
UE->frame_parms.nb_antennas_rx),""); first_symbols,
UE->frame_parms.nb_antennas_rx),"");
}
if ( first_symbols <0 ) if ( first_symbols <0 )
LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols); LOG_E(PHY,"can't compensate: diff =%d\n", first_symbols);
} }
......
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