1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 20:50:33 +00:00

now the FPGA tracking pull-in tests can use the generic acquisition class interface

This commit is contained in:
Marc Majoral 2019-02-14 18:02:18 +01:00
parent fd3eb2a80e
commit 28959c1542

View File

@ -601,36 +601,16 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
tmp_gnss_synchro.Channel_ID = 0; tmp_gnss_synchro.Channel_ID = 0;
config = std::make_shared<InMemoryConfiguration>(); config = std::make_shared<InMemoryConfiguration>();
config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq)); config->set_property("GNSS-SDR.internal_fs_sps", std::to_string(baseband_sampling_freq));
//config->set_property("Acquisition.blocking_on_standby", "true");
//config->set_property("Acquisition.blocking", "true");
//config->set_property("Acquisition.dump", "false");
//config->set_property("Acquisition.dump_filename", "./data/acquisition.dat");
//config->set_property("Acquisition.use_CFAR_algorithm", "false");
//config->set_property("Acquisition.item_type", "cshort");
//config->set_property("Acquisition.if", "0");
//config->set_property("Acquisition.sampled_ms", "4");
//config->set_property("Acquisition.select_queue_Fpga", "0");
//config->set_property("Acquisition.devicename", "/dev/uio0");
//config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells)); std::shared_ptr<AcquisitionInterface> acquisition;
//if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
//{
// config->set_property("Acquisition.acquire_pilot", "false");
//}
std::shared_ptr<GpsL1CaPcpsAcquisitionFpga> acquisition_GpsL1Ca_Fpga;
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionFpga> acquisition_GpsE1_Fpga;
std::shared_ptr<GalileoE5aPcpsAcquisitionFpga> acquisition_GpsE5a_Fpga;
std::shared_ptr<GpsL5iPcpsAcquisitionFpga> acquisition_GpsL5_Fpga;
std::string System_and_Signal; std::string System_and_Signal;
struct DMA_handler_args args;
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0) if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{ {
//config->set_property("Acquisition.sampled_ms", "1");
//config->set_property("Acquisition.select_queue_Fpga", "0");
tmp_gnss_synchro.System = 'G'; tmp_gnss_synchro.System = 'G';
std::string signal = "1C"; std::string signal = "1C";
@ -638,19 +618,16 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null
tmp_gnss_synchro.PRN = SV_ID; tmp_gnss_synchro.PRN = SV_ID;
System_and_Signal = "GPS L1 CA"; System_and_Signal = "GPS L1 CA";
acquisition_GpsL1Ca_Fpga = std::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
acquisition_GpsL1Ca_Fpga->set_channel(0); args.freq_band = 0;
acquisition_GpsL1Ca_Fpga->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold));
acquisition_GpsL1Ca_Fpga->connect(top_block); acquisition = std::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
} }
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{ {
//config->set_property("Acquisition.sampled_ms", "4");
//config->set_property("Acquisition.select_queue_Fpga", "0");
tmp_gnss_synchro.System = 'E'; tmp_gnss_synchro.System = 'E';
std::string signal = "1B"; std::string signal = "1B";
@ -658,14 +635,11 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null
tmp_gnss_synchro.PRN = SV_ID; tmp_gnss_synchro.PRN = SV_ID;
System_and_Signal = "Galileo E1B"; System_and_Signal = "Galileo E1B";
//config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells));
//acquisition = std::make_shared<GalileoE1PcpsAmbiguousAcquisition>(config.get(), "Acquisition", 1, 0);
//std::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionFpga> acquisition_Fpga;
acquisition_GpsE1_Fpga = std::make_shared<GalileoE1PcpsAmbiguousAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
acquisition_GpsE1_Fpga->set_channel(0); args.freq_band = 0;
acquisition_GpsE1_Fpga->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold));
acquisition_GpsE1_Fpga->connect(top_block); acquisition = std::make_shared<GalileoE1PcpsAmbiguousAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
} }
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{ {
@ -677,33 +651,25 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null
tmp_gnss_synchro.PRN = SV_ID; tmp_gnss_synchro.PRN = SV_ID;
System_and_Signal = "Galileo E5a"; System_and_Signal = "Galileo E5a";
//config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells));
//acquisition = std::make_shared<GalileoE5aPcpsAcquisition>(config.get(), "Acquisition", 1, 0);
//std::shared_ptr<GalileoE5aPcpsAcquisitionFpga> acquisition_Fpga;
acquisition_GpsE5a_Fpga = std::make_shared<GalileoE5aPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
acquisition_GpsE5a_Fpga->set_channel(0); args.freq_band = 1;
acquisition_GpsE5a_Fpga->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold));
acquisition_GpsE5a_Fpga->connect(top_block); acquisition = std::make_shared<GalileoE5aPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
} }
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{ {
//config->set_property("Acquisition.sampled_ms", "1");
//config->set_property("Acquisition.select_queue_Fpga", "1");
tmp_gnss_synchro.System = 'G'; tmp_gnss_synchro.System = 'G';
std::string signal = "L5"; std::string signal = "L5";
const char* str = signal.c_str(); // get a C style null terminated string const char* str = signal.c_str(); // get a C style null terminated string
std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null std::memcpy(static_cast<void*>(tmp_gnss_synchro.Signal), str, 3); // copy string into synchro char array: 2 char + null
tmp_gnss_synchro.PRN = SV_ID; tmp_gnss_synchro.PRN = SV_ID;
System_and_Signal = "GPS L5I"; System_and_Signal = "GPS L5I";
//config->set_property("Acquisition.max_dwells", std::to_string(FLAGS_external_signal_acquisition_dwells));
//acquisition = std::make_shared<GpsL5iPcpsAcquisition>(config.get(), "Acquisition", 1, 0);
//std::shared_ptr<GpsL5iPcpsAcquisitionFpga> acquisition_Fpga;
acquisition_GpsL5_Fpga = std::make_shared<GpsL5iPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
acquisition_GpsL5_Fpga->set_channel(0); args.freq_band = 1;
acquisition_GpsL5_Fpga->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold)); acquisition = std::make_shared<GpsL5iPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
acquisition_GpsL5_Fpga->connect(top_block);
} }
else else
{ {
@ -711,9 +677,14 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
throw(std::exception()); throw(std::exception());
} }
acquisition->set_channel(0);
acquisition->set_threshold(config->property("Acquisition.threshold", FLAGS_external_signal_acquisition_threshold));
acquisition->connect(top_block);
std::string file = FLAGS_signal_file; std::string file = FLAGS_signal_file;
struct DMA_handler_args args; //struct DMA_handler_args args;
const char* file_name = file.c_str(); const char* file_name = file.c_str();
@ -730,22 +701,9 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
msg_rx->top_block = top_block; msg_rx->top_block = top_block;
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{ top_block->msg_connect(acquisition->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
top_block->msg_connect(acquisition_GpsL1Ca_Fpga->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
top_block->msg_connect(acquisition_GpsE1_Fpga->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{
top_block->msg_connect(acquisition_GpsE5a_Fpga->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{
top_block->msg_connect(acquisition_GpsL5_Fpga->get_right_block(), pmt::mp("events"), msg_rx, pmt::mp("events"));
}
// 5. Run the flowgraph // 5. Run the flowgraph
// Get visible GPS satellites (positive acquisitions with Doppler measurements) // Get visible GPS satellites (positive acquisitions with Doppler measurements)
@ -774,9 +732,6 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
MAX_PRN_IDX = 33; MAX_PRN_IDX = 33;
} }
// debug
//MAX_PRN_IDX = 10;
setup_fpga_switch(); setup_fpga_switch();
unsigned int code_length; unsigned int code_length;
@ -1169,7 +1124,6 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
{ {
*/ */
for (unsigned int PRN = 1; PRN < MAX_PRN_IDX; PRN++) for (unsigned int PRN = 1; PRN < MAX_PRN_IDX; PRN++)
//for (unsigned int PRN = 0; PRN < 17; PRN++)
{ {
uint32_t max_index = 0; uint32_t max_index = 0;
@ -1192,48 +1146,27 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
tmp_gnss_synchro.PRN = PRN; tmp_gnss_synchro.PRN = PRN;
acquisition->stop_acquisition(); // reset the whole system including the sample counters
acquisition->set_doppler_max(acq_doppler_max);
acquisition->set_doppler_step(acq_doppler_step);
acquisition->set_gnss_synchro(&tmp_gnss_synchro);
acquisition->init();
acquisition->set_local_code();
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0) if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsL1Ca_Fpga->reset_acquisition(); // reset the whole system including the sample counters
acquisition_GpsL1Ca_Fpga->set_doppler_max(acq_doppler_max);
acquisition_GpsL1Ca_Fpga->set_doppler_step(acq_doppler_step);
acquisition_GpsL1Ca_Fpga->set_gnss_synchro(&tmp_gnss_synchro);
acquisition_GpsL1Ca_Fpga->init();
acquisition_GpsL1Ca_Fpga->set_local_code();
args.freq_band = 0; args.freq_band = 0;
} }
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{ {
acquisition_GpsE1_Fpga->reset_acquisition(); // reset the whole system including the sample counters
acquisition_GpsE1_Fpga->set_doppler_max(acq_doppler_max);
acquisition_GpsE1_Fpga->set_doppler_step(acq_doppler_step);
acquisition_GpsE1_Fpga->set_gnss_synchro(&tmp_gnss_synchro);
acquisition_GpsE1_Fpga->init();
acquisition_GpsE1_Fpga->set_local_code();
args.freq_band = 0; args.freq_band = 0;
} }
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsE5a_Fpga->reset_acquisition(); // reset the whole system including the sample counters
acquisition_GpsE5a_Fpga->set_doppler_max(acq_doppler_max);
acquisition_GpsE5a_Fpga->set_doppler_step(acq_doppler_step);
acquisition_GpsE5a_Fpga->set_gnss_synchro(&tmp_gnss_synchro);
acquisition_GpsE5a_Fpga->init();
acquisition_GpsE5a_Fpga->set_local_code();
args.freq_band = 1; args.freq_band = 1;
} }
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsL5_Fpga->reset_acquisition(); // reset the whole system including the sample counters
acquisition_GpsL5_Fpga->set_doppler_max(acq_doppler_max);
acquisition_GpsL5_Fpga->set_doppler_step(acq_doppler_step);
acquisition_GpsL5_Fpga->set_gnss_synchro(&tmp_gnss_synchro);
acquisition_GpsL5_Fpga->init();
acquisition_GpsL5_Fpga->set_local_code();
args.freq_band = 1; args.freq_band = 1;
} }
@ -1291,23 +1224,8 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
send_samples_start = 1; send_samples_start = 1;
pthread_mutex_unlock(&mutex); pthread_mutex_unlock(&mutex);
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsL1Ca_Fpga->reset(); // set active
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
acquisition_GpsE1_Fpga->reset(); // set active
}
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsE5a_Fpga->reset(); // set active
}
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsL5_Fpga->reset(); // set active
}
acquisition->reset(); // set active
if (start_msg == true) if (start_msg == true)
{ {
@ -1324,11 +1242,6 @@ bool TrackingPullInTestFpga::acquire_signal(int SV_ID)
send_samples_start = 0; send_samples_start = 0;
pthread_mutex_unlock(&mutex); pthread_mutex_unlock(&mutex);
// while (msg_rx->rx_message == 0)
// {
// usleep(100000);
// }
// the DMA sends the exact number of samples needed for the acquisition. // the DMA sends the exact number of samples needed for the acquisition.
// however because of the LPF in the GPS L1/Gal E1 acquisition, this calculation is approximate // however because of the LPF in the GPS L1/Gal E1 acquisition, this calculation is approximate
// and some extra samples might be sent. Wait at least once to give time the HW to consume any extra // and some extra samples might be sent. Wait at least once to give time the HW to consume any extra
@ -1388,20 +1301,6 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
struct DMA_handler_args args; struct DMA_handler_args args;
/*
int interpolation_factor;
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{
interpolation_factor = 4; // downsampling filter in L1/E1
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
interpolation_factor = 4; // downsampling filter in L1/E1
}
*/
//************************************************* //*************************************************
@ -1551,25 +1450,34 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
// instantiate the acquisition modules in order to use them to reset the HW. // instantiate the acquisition modules in order to use them to reset the HW.
// (note that the constructor of the acquisition modules resets the HW too) // (note that the constructor of the acquisition modules resets the HW too)
std::shared_ptr<GpsL1CaPcpsAcquisitionFpga> acquisition_GpsL1Ca_Fpga;
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionFpga> acquisition_GpsE1_Fpga; std::shared_ptr<AcquisitionInterface> acquisition;
std::shared_ptr<GalileoE5aPcpsAcquisitionFpga> acquisition_GpsE5a_Fpga;
std::shared_ptr<GpsL5iPcpsAcquisitionFpga> acquisition_GpsL5_Fpga;
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0) if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsL1Ca_Fpga = std::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0); acquisition = std::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 0;
} }
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{ {
acquisition_GpsE1_Fpga = std::make_shared<GalileoE1PcpsAmbiguousAcquisitionFpga>(config.get(), "Acquisition", 0, 0); acquisition = std::make_shared<GalileoE1PcpsAmbiguousAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 0;
} }
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsE5a_Fpga = std::make_shared<GalileoE5aPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0); acquisition = std::make_shared<GalileoE5aPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 1;
} }
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0) else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{ {
acquisition_GpsL5_Fpga = std::make_shared<GpsL5iPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0); acquisition = std::make_shared<GpsL5iPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 1;
}
else
{
std::cout << "The test can not run with the selected tracking implementation\n ";
throw(std::exception());
} }
for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values.size(); current_cn0_idx++) for (unsigned int current_cn0_idx = 0; current_cn0_idx < generator_CN0_values.size(); current_cn0_idx++)
@ -1581,24 +1489,7 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
{ {
// reset the HW to clear the sample counters // reset the HW to clear the sample counters
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0) acquisition->stop_acquisition();
{
acquisition_GpsL1Ca_Fpga->reset_acquisition();
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
acquisition_GpsE1_Fpga->reset_acquisition();
}
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsE5a_Fpga->reset_acquisition();
}
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsL5_Fpga->reset_acquisition();
}
gnss_synchro.Acq_samplestamp_samples = acq_samplestamp_samples; gnss_synchro.Acq_samplestamp_samples = acq_samplestamp_samples;
//simulate a Doppler error in acquisition //simulate a Doppler error in acquisition
@ -1612,36 +1503,6 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
std::shared_ptr<TrackingInterface> tracking = std::dynamic_pointer_cast<TrackingInterface>(trk_); std::shared_ptr<TrackingInterface> tracking = std::dynamic_pointer_cast<TrackingInterface>(trk_);
boost::shared_ptr<TrackingPullInTestFpga_msg_rx> msg_rx = TrackingPullInTestFpga_msg_rx_make(); boost::shared_ptr<TrackingPullInTestFpga_msg_rx> msg_rx = TrackingPullInTestFpga_msg_rx_make();
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0)
{
std::shared_ptr<GpsL1CaPcpsAcquisitionFpga> acquisition_Fpga;
acquisition_Fpga = std::make_shared<GpsL1CaPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 0;
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
std::shared_ptr<GalileoE1PcpsAmbiguousAcquisitionFpga> acquisition_Fpga;
acquisition_Fpga = std::make_shared<GalileoE1PcpsAmbiguousAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 0;
}
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{
std::shared_ptr<GalileoE5aPcpsAcquisitionFpga> acquisition_Fpga;
acquisition_Fpga = std::make_shared<GalileoE5aPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 1;
}
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{
std::shared_ptr<GpsL5iPcpsAcquisitionFpga> acquisition_Fpga;
acquisition_Fpga = std::make_shared<GpsL5iPcpsAcquisitionFpga>(config.get(), "Acquisition", 0, 0);
args.freq_band = 1;
}
else
{
std::cout << "The test can not run with the selected tracking implementation\n ";
throw(std::exception());
}
ASSERT_NO_THROW({ ASSERT_NO_THROW({
tracking->set_channel(gnss_synchro.Channel_ID); tracking->set_channel(gnss_synchro.Channel_ID);
}) << "Failure setting channel."; }) << "Failure setting channel.";
@ -1704,54 +1565,9 @@ TEST_F(TrackingPullInTestFpga, ValidationOfResults)
pthread_join(thread_DMA, NULL); pthread_join(thread_DMA, NULL);
top_block->stop(); top_block->stop();
/*
// send more samples to unblock the tracking process in case it was waiting for samples
// In this case the DMA may finish sending the current file while the signal is being
// tracked by the HW accelerators. Some tracking HW accelerators may be left in a state
// where they are waiting for more samples. In this case we can not bring them back to their
// default state using a HW reset because the SW would be waiting forever to receive the
// HW interrupt from those accelerators. The correct way to bring the system back to the default state
// is to send some extra samples that will ensure that all the aforementioned accelerators
// trigger an interrupt to the SW. After this last interrupt all the HW accelerators go back to their
// default state.
args.file = file;
if (skip_samples_already_used == 1)
{
// skip the samples that have already been used
args.skip_used_samples = (gnss_synchro.PRN - 1)*fft_size + args.nsamples_tx;
}
else
{
args.skip_used_samples = 0;
}
args.nsamples_tx = NSAMPLES_FINAL;
if (pthread_create(&thread_DMA, NULL, handler_DMA, (void *)&args) < 0)
{
std::cout << "ERROR cannot create DMA Process" << std::endl;
}
pthread_join(thread_DMA, NULL);
*/
// reset the HW to launch the pending interrupts // reset the HW to launch the pending interrupts
if (implementation.compare("GPS_L1_CA_DLL_PLL_Tracking_Fpga") == 0) acquisition->stop_acquisition();
{
acquisition_GpsL1Ca_Fpga->reset_acquisition();
}
else if (implementation.compare("Galileo_E1_DLL_PLL_VEML_Tracking_Fpga") == 0)
{
acquisition_GpsE1_Fpga->reset_acquisition();
}
else if (implementation.compare("Galileo_E5a_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsE5a_Fpga->reset_acquisition();
}
else if (implementation.compare("GPS_L5_DLL_PLL_Tracking_Fpga") == 0)
{
acquisition_GpsL5_Fpga->reset_acquisition();
}
pthread_mutex_lock(&mutex); pthread_mutex_lock(&mutex);
send_samples_start = 0; send_samples_start = 0;