1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-18 07:44:57 +00:00

fix the control of the FPGA acquisition HW accelerator

This commit is contained in:
Marc Majoral 2022-06-01 15:56:51 +02:00 committed by Carles Fernandez
parent 8aeb4bf3ea
commit 918477d61f

View File

@ -481,7 +481,20 @@ int GNSSFlowgraph::connect_desktop_flowgraph()
LOG(INFO) << "Channel " << i << " assigned to " << channels_.at(i)->get_signal(); LOG(INFO) << "Channel " << i << " assigned to " << channels_.at(i)->get_signal();
if (channels_state_[i] == 1) if (channels_state_[i] == 1)
{ {
#if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[i]);
tmp_thread.detach();
}
else
{
channels_.at(i)->start_acquisition(); channels_.at(i)->start_acquisition();
}
#else
channels_.at(i)->start_acquisition();
#endif
LOG(INFO) << "Channel " << i << " connected to observables and ready for acquisition"; LOG(INFO) << "Channel " << i << " connected to observables and ready for acquisition";
} }
else else
@ -1785,9 +1798,16 @@ void GNSSFlowgraph::acquisition_manager(unsigned int who)
channels_[current_channel]->assist_acquisition_doppler(0); channels_[current_channel]->assist_acquisition_doppler(0);
} }
#if ENABLE_FPGA #if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow // create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[current_channel]); std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[current_channel]);
tmp_thread.detach(); tmp_thread.detach();
}
else
{
channels_[current_channel]->start_acquisition();
}
#else #else
channels_[current_channel]->start_acquisition(); channels_[current_channel]->start_acquisition();
#endif #endif
@ -1891,9 +1911,16 @@ void GNSSFlowgraph::apply_action(unsigned int who, unsigned int what)
channels_[who]->set_signal(channels_[who]->get_signal()); channels_[who]->set_signal(channels_[who]->get_signal());
#if ENABLE_FPGA #if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow // create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[who]); std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[who]);
tmp_thread.detach(); tmp_thread.detach();
}
else
{
channels_[who]->start_acquisition();
}
#else #else
channels_[who]->start_acquisition(); channels_[who]->start_acquisition();
#endif #endif
@ -2021,8 +2048,21 @@ void GNSSFlowgraph::start_acquisition_helper()
{ {
if (channels_state_[i] == 1) if (channels_state_[i] == 1)
{ {
#if ENABLE_FPGA
if (enable_fpga_offloading_)
{
// create a task for the FPGA such that it doesn't stop the flow
std::thread tmp_thread(&ChannelInterface::start_acquisition, channels_[i]);
tmp_thread.detach();
}
else
{
channels_.at(i)->start_acquisition(); channels_.at(i)->start_acquisition();
} }
#else
channels_.at(i)->start_acquisition();
#endif
}
} }
} }