mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 12:40:35 +00:00
In order to reduce the CPU workload, the FPGA acquisition does not close and open the device driver in between the first and the second acquisition anymore.
This commit is contained in:
parent
cbc8131677
commit
63cee0e63b
@ -266,6 +266,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
<< ", use_CFAR_algorithm_flag: false";
|
||||
|
||||
|
||||
acquisition_fpga->open_device();
|
||||
acquisition_fpga->configure_acquisition();
|
||||
acquisition_fpga->write_local_code();
|
||||
acquisition_fpga->set_block_exp(d_total_block_exp);
|
||||
@ -273,6 +274,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
acquisition_core(d_num_doppler_bins, d_doppler_step, -d_doppler_max);
|
||||
if (!d_make_2_steps)
|
||||
{
|
||||
acquisition_fpga->close_device();
|
||||
if (d_test_statistics > d_threshold)
|
||||
{
|
||||
d_active = false;
|
||||
@ -296,6 +298,8 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
|
||||
acquisition_core(d_num_doppler_bins_step2, d_doppler_step2, d_doppler_center_step_two - static_cast<float>(floor(d_num_doppler_bins_step2 / 2.0)) * d_doppler_step2);
|
||||
|
||||
acquisition_fpga->close_device();
|
||||
|
||||
if (d_test_statistics > d_threshold)
|
||||
{
|
||||
d_active = false;
|
||||
@ -325,7 +329,9 @@ void pcps_acquisition_fpga::set_active(bool active)
|
||||
void pcps_acquisition_fpga::reset_acquisition(void)
|
||||
{
|
||||
// this function triggers a HW reset of the FPGA PL.
|
||||
acquisition_fpga->open_device();
|
||||
acquisition_fpga->reset_acquisition();
|
||||
acquisition_fpga->close_device();
|
||||
}
|
||||
|
||||
|
||||
|
@ -100,8 +100,10 @@ Fpga_Acquisition::Fpga_Acquisition(std::string device_name,
|
||||
d_fd = 0; // driver descriptor
|
||||
d_map_base = nullptr; // driver memory map
|
||||
d_all_fft_codes = all_fft_codes;
|
||||
Fpga_Acquisition::open_device();
|
||||
Fpga_Acquisition::reset_acquisition();
|
||||
Fpga_Acquisition::fpga_acquisition_test_register();
|
||||
Fpga_Acquisition::close_device();
|
||||
d_PRN = 0;
|
||||
DLOG(INFO) << "Acquisition FPGA class created";
|
||||
//printf("d_excludelimit = %d\n", d_excludelimit);
|
||||
@ -173,7 +175,7 @@ void Fpga_Acquisition::fpga_acquisition_test_register()
|
||||
uint32_t writeval = TEST_REG_SANITY_CHECK;
|
||||
uint32_t readval;
|
||||
|
||||
Fpga_Acquisition::open_device();
|
||||
//Fpga_Acquisition::open_device();
|
||||
|
||||
// write value to test register
|
||||
d_map_base[15] = writeval;
|
||||
@ -189,7 +191,7 @@ void Fpga_Acquisition::fpga_acquisition_test_register()
|
||||
LOG(INFO) << "Acquisition test register sanity check success!";
|
||||
}
|
||||
|
||||
Fpga_Acquisition::close_device();
|
||||
//Fpga_Acquisition::close_device();
|
||||
}
|
||||
|
||||
|
||||
@ -254,7 +256,7 @@ void Fpga_Acquisition::set_doppler_sweep(uint32_t num_sweeps, uint32_t doppler_s
|
||||
|
||||
void Fpga_Acquisition::configure_acquisition()
|
||||
{
|
||||
Fpga_Acquisition::open_device();
|
||||
//Fpga_Acquisition::open_device();
|
||||
|
||||
d_map_base[0] = d_select_queue;
|
||||
d_map_base[1] = d_vector_length;
|
||||
@ -300,7 +302,7 @@ void Fpga_Acquisition::read_acquisition_results(uint32_t *max_index,
|
||||
|
||||
readval = d_map_base[15]; // read dummy
|
||||
|
||||
Fpga_Acquisition::close_device();
|
||||
//Fpga_Acquisition::close_device();
|
||||
}
|
||||
|
||||
|
||||
@ -329,9 +331,9 @@ void Fpga_Acquisition::close_device()
|
||||
|
||||
void Fpga_Acquisition::reset_acquisition(void)
|
||||
{
|
||||
Fpga_Acquisition::open_device();
|
||||
//Fpga_Acquisition::open_device();
|
||||
d_map_base[8] = RESET_ACQUISITION; // writing a 2 to d_map_base[8] resets the multicorrelator
|
||||
Fpga_Acquisition::close_device();
|
||||
//Fpga_Acquisition::close_device();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user