diff --git a/src/algorithms/signal_source/adapters/CMakeLists.txt b/src/algorithms/signal_source/adapters/CMakeLists.txt index 4b246c7b1..c26446e0e 100644 --- a/src/algorithms/signal_source/adapters/CMakeLists.txt +++ b/src/algorithms/signal_source/adapters/CMakeLists.txt @@ -45,16 +45,16 @@ if(ENABLE_FPGA_MAX2771_EVKIT) ############################################### # MAX2771 EVKIT DIRECT TO FPGA Hardware ############################################### - list(APPEND OPT_DRIVER_SOURCES max2771_evkit_fpga_signal_source.cc) - list(APPEND OPT_DRIVER_HEADERS max2771_evkit_fpga_signal_source.h) + list(APPEND OPT_DRIVER_SOURCES fpga_max2771_evkit_signal_source.cc) + list(APPEND OPT_DRIVER_HEADERS fpga_max2771_evkit_signal_source.h) endif() if(ENABLE_FPGA) ############################################### # FPGA DMA source ############################################### - list(APPEND OPT_DRIVER_SOURCES dma_fpga_signal_source.cc) - list(APPEND OPT_DRIVER_HEADERS dma_fpga_signal_source.h) + list(APPEND OPT_DRIVER_SOURCES fpga_dma_signal_source.cc) + list(APPEND OPT_DRIVER_HEADERS fpga_dma_signal_source.h) endif() if(ENABLE_FLEXIBAND AND TELEORBIT_FOUND) diff --git a/src/algorithms/signal_source/adapters/dma_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/fpga_dma_signal_source.cc similarity index 97% rename from src/algorithms/signal_source/adapters/dma_fpga_signal_source.cc rename to src/algorithms/signal_source/adapters/fpga_dma_signal_source.cc index 495543029..0f575ea16 100644 --- a/src/algorithms/signal_source/adapters/dma_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/fpga_dma_signal_source.cc @@ -1,5 +1,5 @@ /*! - * \file dma_fpga_signal_source.cc + * \file fpga_dma_signal_source.cc * \brief signal source for a DMA connected directly to FPGA accelerators. * This source implements only the DMA control. It is NOT compatible with * conventional SDR acquisition and tracking blocks. @@ -16,7 +16,7 @@ * ----------------------------------------------------------------------------- */ -#include "dma_fpga_signal_source.h" +#include "fpga_dma_signal_source.h" #include "command_event.h" #include "configuration_interface.h" #include "gnss_sdr_flags.h" @@ -37,10 +37,10 @@ using namespace std::string_literals; -DMAFpgaSignalSource::DMAFpgaSignalSource(const ConfigurationInterface *configuration, +FPGADMASignalSource::FPGADMASignalSource(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_stream, unsigned int out_stream, Concurrent_Queue *queue __attribute__((unused))) - : SignalSourceBase(configuration, role, "DMA_Fpga_Signal_Source"s), + : SignalSourceBase(configuration, role, "FPGA_DMA_Signal_Source"s), queue_(queue), filename0_(configuration->property(role + ".filename", empty_string)), sample_rate_(configuration->property(role + ".sampling_frequency", default_bandwidth)), @@ -223,7 +223,7 @@ DMAFpgaSignalSource::DMAFpgaSignalSource(const ConfigurationInterface *configura } -DMAFpgaSignalSource::~DMAFpgaSignalSource() +FPGADMASignalSource::~FPGADMASignalSource() { std::unique_lock lock_DMA(dma_mutex); enable_DMA_ = false; // disable the DMA @@ -251,13 +251,13 @@ DMAFpgaSignalSource::~DMAFpgaSignalSource() } -void DMAFpgaSignalSource::start() +void FPGADMASignalSource::start() { thread_file_to_dma = std::thread([&] { run_DMA_process(filename0_, filename1_, samples_to_skip_, item_size_, samples_, repeat_, dma_buff_offset_pos_, queue_); }); } -void DMAFpgaSignalSource::run_DMA_process(const std::string &filename0_, const std::string &filename1_, uint64_t &samples_to_skip, size_t &item_size, int64_t &samples, bool &repeat, uint32_t &dma_buff_offset_pos, Concurrent_Queue *queue) +void FPGADMASignalSource::run_DMA_process(const std::string &filename0_, const std::string &filename1_, uint64_t &samples_to_skip, size_t &item_size, int64_t &samples, bool &repeat, uint32_t &dma_buff_offset_pos, Concurrent_Queue *queue) { std::ifstream infile1; infile1.exceptions(std::ifstream::failbit | std::ifstream::badbit); @@ -535,7 +535,7 @@ void DMAFpgaSignalSource::run_DMA_process(const std::string &filename0_, const s } -void DMAFpgaSignalSource::run_dynamic_bit_selection_process() +void FPGADMASignalSource::run_dynamic_bit_selection_process() { bool dynamic_bit_selection_active = true; @@ -554,7 +554,7 @@ void DMAFpgaSignalSource::run_dynamic_bit_selection_process() } -void DMAFpgaSignalSource::connect(gr::top_block_sptr top_block) +void FPGADMASignalSource::connect(gr::top_block_sptr top_block) { if (top_block) { /* top_block is not null */ @@ -563,7 +563,7 @@ void DMAFpgaSignalSource::connect(gr::top_block_sptr top_block) } -void DMAFpgaSignalSource::disconnect(gr::top_block_sptr top_block) +void FPGADMASignalSource::disconnect(gr::top_block_sptr top_block) { if (top_block) { /* top_block is not null */ @@ -572,14 +572,14 @@ void DMAFpgaSignalSource::disconnect(gr::top_block_sptr top_block) } -gr::basic_block_sptr DMAFpgaSignalSource::get_left_block() +gr::basic_block_sptr FPGADMASignalSource::get_left_block() { LOG(WARNING) << "Trying to get signal source left block."; return {}; } -gr::basic_block_sptr DMAFpgaSignalSource::get_right_block() +gr::basic_block_sptr FPGADMASignalSource::get_right_block() { return {}; } diff --git a/src/algorithms/signal_source/adapters/dma_fpga_signal_source.h b/src/algorithms/signal_source/adapters/fpga_dma_signal_source.h similarity index 91% rename from src/algorithms/signal_source/adapters/dma_fpga_signal_source.h rename to src/algorithms/signal_source/adapters/fpga_dma_signal_source.h index b4781e0ae..8679aec12 100644 --- a/src/algorithms/signal_source/adapters/dma_fpga_signal_source.h +++ b/src/algorithms/signal_source/adapters/fpga_dma_signal_source.h @@ -1,5 +1,5 @@ /*! - * \file dma_fpga_signal_source.h + * \file fpga_dma_signal_source.h * \brief signal source for a DMA connected directly to FPGA accelerators. * This source implements only the DMA control. It is NOT compatible with * conventional SDR acquisition and tracking blocks. @@ -16,8 +16,8 @@ * ----------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_DMA_FPGA_SIGNAL_SOURCE_H -#define GNSS_SDR_DMA_FPGA_SIGNAL_SOURCE_H +#ifndef GNSS_SDR_FPGA_DMA_SIGNAL_SOURCE_H +#define GNSS_SDR_FPGA_DMA_SIGNAL_SOURCE_H #include "concurrent_queue.h" #include "fpga_dma-proxy.h" @@ -41,14 +41,14 @@ class ConfigurationInterface; -class DMAFpgaSignalSource : public SignalSourceBase +class FPGADMASignalSource : public SignalSourceBase { public: - DMAFpgaSignalSource(const ConfigurationInterface *configuration, + FPGADMASignalSource(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_stream, unsigned int out_stream, Concurrent_Queue *queue); - ~DMAFpgaSignalSource(); + ~FPGADMASignalSource(); void start() override; @@ -115,4 +115,4 @@ private: /** \} */ /** \} */ -#endif // GNSS_SDR_DMA_FPGA_SIGNAL_SOURCE_H +#endif // GNSS_SDR_FPGA_DMA_SIGNAL_SOURCE_H diff --git a/src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.cc b/src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.cc similarity index 95% rename from src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.cc rename to src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.cc index 65771233f..bb4b6b11e 100644 --- a/src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.cc +++ b/src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.cc @@ -1,5 +1,5 @@ /*! - * \file max2771_evkit_fpga_signal_source.cc + * \file fpga_max2771_evkit_signal_source.cc * \brief Signal source for the MAX2771EVKIT evaluation board connected directly * to FPGA accelerators. * This source implements only the MAX2771 control. It is NOT compatible with @@ -16,7 +16,7 @@ * ----------------------------------------------------------------------------- */ -#include "max2771_evkit_fpga_signal_source.h" +#include "fpga_max2771_evkit_signal_source.h" #include "GPS_L1_CA.h" #include "GPS_L2C.h" #include "GPS_L5.h" @@ -38,10 +38,10 @@ using namespace std::string_literals; -MAX2771EVKITFpgaSignalSource::MAX2771EVKITFpgaSignalSource(const ConfigurationInterface *configuration, +FPGAMAX2771EVKITSignalSource::FPGAMAX2771EVKITSignalSource(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_stream, unsigned int out_stream, Concurrent_Queue *queue __attribute__((unused))) - : SignalSourceBase(configuration, role, "Ad9361_Fpga_Signal_Source"s), + : SignalSourceBase(configuration, role, "FPGA_MAX2771_EVKIT_Signal_Source"s), freq_(configuration->property(role + ".freq", static_cast(GPS_L1_FREQ_HZ))), sample_rate_(configuration->property(role + ".sampling_frequency", default_sampling_rate)), in_stream_(in_stream), @@ -141,7 +141,7 @@ MAX2771EVKITFpgaSignalSource::MAX2771EVKITFpgaSignalSource(const ConfigurationIn } } -std::vector MAX2771EVKITFpgaSignalSource::setup_regs(void) +std::vector FPGAMAX2771EVKITSignalSource::setup_regs(void) { std::vector register_values = std::vector(MAX2771_NUM_REGS); @@ -338,7 +338,7 @@ std::vector MAX2771EVKITFpgaSignalSource::setup_regs(void) } -bool MAX2771EVKITFpgaSignalSource::configure(std::vector register_values) +bool FPGAMAX2771EVKITSignalSource::configure(std::vector register_values) { // write the registers std::cerr << "Configuring MAX2771 registers" << std::endl; @@ -377,7 +377,7 @@ bool MAX2771EVKITFpgaSignalSource::configure(std::vector register_valu return 0; } -MAX2771EVKITFpgaSignalSource::~MAX2771EVKITFpgaSignalSource() +FPGAMAX2771EVKITSignalSource::~FPGAMAX2771EVKITSignalSource() { /* cleanup and exit */ @@ -417,7 +417,7 @@ MAX2771EVKITFpgaSignalSource::~MAX2771EVKITFpgaSignalSource() } -void MAX2771EVKITFpgaSignalSource::run_buffer_monitor_process() +void FPGAMAX2771EVKITSignalSource::run_buffer_monitor_process() { bool enable_ovf_check_buffer_monitor_active = true; @@ -437,7 +437,7 @@ void MAX2771EVKITFpgaSignalSource::run_buffer_monitor_process() } -void MAX2771EVKITFpgaSignalSource::connect(gr::top_block_sptr top_block) +void FPGAMAX2771EVKITSignalSource::connect(gr::top_block_sptr top_block) { if (top_block) { /* top_block is not null */ @@ -446,7 +446,7 @@ void MAX2771EVKITFpgaSignalSource::connect(gr::top_block_sptr top_block) } -void MAX2771EVKITFpgaSignalSource::disconnect(gr::top_block_sptr top_block) +void FPGAMAX2771EVKITSignalSource::disconnect(gr::top_block_sptr top_block) { if (top_block) { /* top_block is not null */ @@ -455,14 +455,14 @@ void MAX2771EVKITFpgaSignalSource::disconnect(gr::top_block_sptr top_block) } -gr::basic_block_sptr MAX2771EVKITFpgaSignalSource::get_left_block() +gr::basic_block_sptr FPGAMAX2771EVKITSignalSource::get_left_block() { LOG(WARNING) << "Trying to get signal source left block."; return {}; } -gr::basic_block_sptr MAX2771EVKITFpgaSignalSource::get_right_block() +gr::basic_block_sptr FPGAMAX2771EVKITSignalSource::get_right_block() { return {}; } diff --git a/src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.h b/src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.h similarity index 95% rename from src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.h rename to src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.h index dc1e3c674..a7a44dd0c 100644 --- a/src/algorithms/signal_source/adapters/max2771_evkit_fpga_signal_source.h +++ b/src/algorithms/signal_source/adapters/fpga_max2771_evkit_signal_source.h @@ -1,5 +1,5 @@ /*! - * \file max2771_evkit_fpga_signal_source.h + * \file fpga_max2771_evkit_signal_source.h * \brief Signal source for the MAX2771EVKIT evaluation board connected directly * to FPGA accelerators. * This source implements only the MAX2771 control. It is NOT compatible with @@ -16,8 +16,8 @@ * ----------------------------------------------------------------------------- */ -#ifndef GNSS_SDR_MAX2771_EVKIT_FPGA_SIGNAL_SOURCE_H -#define GNSS_SDR_MAX2771_EVKIT_FPGA_SIGNAL_SOURCE_H +#ifndef GNSS_SDR_FPGA_MAX2771_EVKIT_SIGNAL_SOURCE_H +#define GNSS_SDR_FPGA_MAX2771_EVKIT_SIGNAL_SOURCE_H #include "command_event.h" #include "concurrent_queue.h" @@ -41,14 +41,14 @@ class ConfigurationInterface; -class MAX2771EVKITFpgaSignalSource : public SignalSourceBase +class FPGAMAX2771EVKITSignalSource : public SignalSourceBase { public: - MAX2771EVKITFpgaSignalSource(const ConfigurationInterface *configuration, + FPGAMAX2771EVKITSignalSource(const ConfigurationInterface *configuration, const std::string &role, unsigned int in_stream, unsigned int out_stream, Concurrent_Queue *queue); - ~MAX2771EVKITFpgaSignalSource(); + ~FPGAMAX2771EVKITSignalSource(); std::vector setup_regs(void); @@ -160,4 +160,4 @@ private: /** \} */ /** \} */ -#endif // GNSS_SDR_MAX2771_EVKIT_FPGA_SIGNAL_SOURCE_H +#endif // GNSS_SDR_FPGA_MAX2771_EVKIT_SIGNAL_SOURCE_H diff --git a/src/core/receiver/gnss_block_factory.cc b/src/core/receiver/gnss_block_factory.cc index 1ad7424eb..6aa49b761 100644 --- a/src/core/receiver/gnss_block_factory.cc +++ b/src/core/receiver/gnss_block_factory.cc @@ -128,7 +128,7 @@ #endif #if ENABLE_FPGA -#include "dma_fpga_signal_source.h" +#include "fpga_dma_signal_source.h" #include "galileo_e1_dll_pll_veml_tracking_fpga.h" #include "galileo_e1_pcps_ambiguous_acquisition_fpga.h" #include "galileo_e5a_dll_pll_tracking_fpga.h" @@ -172,7 +172,7 @@ #endif #if FPGA_MAX2771_EVKIT_DRIVER -#include "max2771_evkit_fpga_signal_source.h" +#include "fpga_max2771_evkit_signal_source.h" #endif #if LIMESDR_DRIVER @@ -826,18 +826,18 @@ std::unique_ptr GNSSBlockFactory::GetBlock( #endif #if ENABLE_FPGA and FPGA_MAX2771_EVKIT_DRIVER - else if (implementation == "MAX2771_evkit_Fpga_Signal_Source") + else if (implementation == "FPGA_MAX2771_EVKIT_Signal_Source") { - std::unique_ptr block_ = std::make_unique(configuration, role, in_streams, + std::unique_ptr block_ = std::make_unique(configuration, role, in_streams, out_streams, queue); block = std::move(block_); } #endif #if ENABLE_FPGA - else if (implementation == "DMA_Fpga_Signal_Source") + else if (implementation == "FPGA_DMA_Signal_Source") { - std::unique_ptr block_ = std::make_unique(configuration, role, in_streams, + std::unique_ptr block_ = std::make_unique(configuration, role, in_streams, out_streams, queue); block = std::move(block_); } diff --git a/src/core/receiver/gnss_flowgraph.cc b/src/core/receiver/gnss_flowgraph.cc index 6fc42b4bb..f17686b3d 100644 --- a/src/core/receiver/gnss_flowgraph.cc +++ b/src/core/receiver/gnss_flowgraph.cc @@ -547,7 +547,7 @@ int GNSSFlowgraph::connect_fpga_flowgraph() if (src == nullptr) { help_hint_ += " * Check implementation name for SignalSource block.\n"; - help_hint_ += " Signal Source block implementation for FPGA off-loading should be Ad9361_Fpga_Signal_Source or DMA_Fpga_Signal_Source\n"; + help_hint_ += " Signal Source block implementation for FPGA off-loading should be Ad9361_Fpga_Signal_Source or Fpga_DMA_2Signal_Source\n"; return 1; } if (src->item_size() == 0)