mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 20:20:35 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into vtl_experimental
This commit is contained in:
commit
856859af01
@ -326,7 +326,7 @@ set(GNSSSDR_ARMADILLO_LOCAL_VERSION "9.900.x")
|
|||||||
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.0")
|
set(GNSSSDR_GTEST_LOCAL_VERSION "1.10.0")
|
||||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "3.0.0")
|
set(GNSSSDR_GPSTK_LOCAL_VERSION "3.0.0")
|
||||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.17")
|
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.18")
|
||||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.10")
|
||||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.13.0")
|
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.13.0")
|
||||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.5.1")
|
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.5.1")
|
||||||
@ -2091,7 +2091,7 @@ if(NOT MATIO_FOUND OR MATIO_VERSION_STRING VERSION_LESS ${GNSSSDR_MATIO_MIN_VERS
|
|||||||
ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
ExternalProject_Add(matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
PREFIX ${CMAKE_BINARY_DIR}/matio
|
PREFIX ${CMAKE_BINARY_DIR}/matio
|
||||||
GIT_REPOSITORY https://github.com/tbeu/matio
|
GIT_REPOSITORY https://github.com/tbeu/matio
|
||||||
GIT_TAG 596cb3ce71038958812bd6cf9b141f12ce155ac6 # Workaround until Matio 1.5.18 v${GNSSSDR_MATIO_LOCAL_VERSION}
|
GIT_TAG v${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
SOURCE_DIR ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}
|
||||||
UPDATE_COMMAND ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh
|
UPDATE_COMMAND ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/autogen.sh
|
||||||
CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix=<INSTALL_DIR>
|
CONFIGURE_COMMAND ${CMAKE_BINARY_DIR}/thirdparty/matio/matio-${GNSSSDR_MATIO_LOCAL_VERSION}/configure --with-hdf5=${HDF5_BASE_DIR} --with-zlib=${ZLIB_BASE_DIR} --with-default-file-ver=7.3 --enable-mat73=yes --prefix=<INSTALL_DIR>
|
||||||
@ -2672,16 +2672,14 @@ if(DEFINED ENV{CUDA_GPU_ACCEL})
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
|
set(CMAKE_CUDA_STANDARD 14)
|
||||||
|
set(CMAKE_CUDA_EXTENSIONS ON)
|
||||||
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
include(CheckLanguage)
|
include(CheckLanguage)
|
||||||
check_language(CUDA)
|
check_language(CUDA)
|
||||||
if(CMAKE_CUDA_COMPILER)
|
if(CMAKE_CUDA_COMPILER)
|
||||||
enable_language(CUDA)
|
enable_language(CUDA)
|
||||||
set(CUDA_FOUND TRUE)
|
set(CUDA_FOUND TRUE)
|
||||||
if(NOT DEFINED CMAKE_CUDA_STANDARD)
|
|
||||||
set(CMAKE_CUDA_STANDARD 11)
|
|
||||||
set(CMAKE_CUDA_STANDARD_REQUIRED ON)
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
set(ENABLE_CUDA OFF)
|
set(ENABLE_CUDA OFF)
|
||||||
endif()
|
endif()
|
||||||
@ -2689,11 +2687,19 @@ if(ENABLE_CUDA)
|
|||||||
find_package(CUDA REQUIRED)
|
find_package(CUDA REQUIRED)
|
||||||
set_package_properties(CUDA PROPERTIES
|
set_package_properties(CUDA PROPERTIES
|
||||||
URL "https://developer.nvidia.com/cuda-downloads"
|
URL "https://developer.nvidia.com/cuda-downloads"
|
||||||
DESCRIPTION "Library for parallel programming in Nvidia GPUs"
|
|
||||||
PURPOSE "Used in some processing block implementations."
|
PURPOSE "Used in some processing block implementations."
|
||||||
TYPE REQUIRED
|
TYPE REQUIRED
|
||||||
)
|
)
|
||||||
if(NOT CUDA_FOUND)
|
if(CUDA_FOUND)
|
||||||
|
set_package_properties(CUDA PROPERTIES
|
||||||
|
DESCRIPTION "Library for parallel programming in Nvidia GPUs (found: v${CUDA_VERSION_STRING})"
|
||||||
|
)
|
||||||
|
set(CMAKE_CUDA_COMPILER_ID "NVIDIA") # only for reporting purposes
|
||||||
|
set(CMAKE_CUDA_COMPILER_VERSION ${CUDA_VERSION_STRING}) # only for reporting purposes
|
||||||
|
else()
|
||||||
|
set_package_properties(CUDA PROPERTIES
|
||||||
|
DESCRIPTION "Library for parallel programming in Nvidia GPUs"
|
||||||
|
)
|
||||||
set(ENABLE_CUDA OFF)
|
set(ENABLE_CUDA OFF)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
@ -2703,7 +2709,6 @@ if(ENABLE_CUDA)
|
|||||||
message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'")
|
message(STATUS " You can disable it with 'cmake -DENABLE_CUDA=OFF ..'")
|
||||||
else()
|
else()
|
||||||
message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.")
|
message(STATUS "NVIDIA CUDA GPU Acceleration will be not enabled.")
|
||||||
message(STATUS " Enable it with 'cmake -DENABLE_CUDA=ON ..' to add support for GPU-based acceleration using CUDA.")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
@ -2991,8 +2996,10 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
|||||||
add_compile_options(-Wno-missing-field-initializers)
|
add_compile_options(-Wno-missing-field-initializers)
|
||||||
endif()
|
endif()
|
||||||
if(CMAKE_CROSSCOMPILING OR NOT ENABLE_PACKAGING)
|
if(CMAKE_CROSSCOMPILING OR NOT ENABLE_PACKAGING)
|
||||||
|
if(NOT ENABLE_CUDA)
|
||||||
add_compile_options(-Wno-psabi)
|
add_compile_options(-Wno-psabi)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(IS_ARM)
|
if(IS_ARM)
|
||||||
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.1.0") AND (CMAKE_VERSION VERSION_GREATER "3.1"))
|
if((CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "7.1.0") AND (CMAKE_VERSION VERSION_GREATER "3.1"))
|
||||||
if(CMAKE_CXX_STANDARD VERSION_LESS 17)
|
if(CMAKE_CXX_STANDARD VERSION_LESS 17)
|
||||||
@ -3025,10 +3032,12 @@ if((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND NOT WIN32)
|
|||||||
add_compile_options(-mtune=native)
|
add_compile_options(-mtune=native)
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
|
if(NOT ENABLE_CUDA)
|
||||||
add_compile_options(-march=native)
|
add_compile_options(-march=native)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
if(NOT ENABLE_GENERIC_ARCH)
|
if(NOT ENABLE_GENERIC_ARCH)
|
||||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||||
@ -3151,6 +3160,9 @@ endif()
|
|||||||
message(STATUS "CMake version: ${CMAKE_VERSION}")
|
message(STATUS "CMake version: ${CMAKE_VERSION}")
|
||||||
message(STATUS "The CXX compiler identification is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}. Standard: C++${CMAKE_CXX_STANDARD}.")
|
message(STATUS "The CXX compiler identification is ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}. Standard: C++${CMAKE_CXX_STANDARD}.")
|
||||||
message(STATUS "The C compiler identification is ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}. Standard: C${CMAKE_C_STANDARD}.")
|
message(STATUS "The C compiler identification is ${CMAKE_C_COMPILER_ID} ${CMAKE_C_COMPILER_VERSION}. Standard: C${CMAKE_C_STANDARD}.")
|
||||||
|
if(CUDA_FOUND)
|
||||||
|
message(STATUS "The CUDA compiler identification is ${CMAKE_CUDA_COMPILER_ID} ${CMAKE_CUDA_COMPILER_VERSION}. Standard: C++${CMAKE_CUDA_STANDARD}.")
|
||||||
|
endif()
|
||||||
message(STATUS "")
|
message(STATUS "")
|
||||||
file(REMOVE ${CMAKE_BINARY_DIR}/features.log)
|
file(REMOVE ${CMAKE_BINARY_DIR}/features.log)
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/features.log "**********************************\n")
|
file(WRITE ${CMAKE_BINARY_DIR}/features.log "**********************************\n")
|
||||||
|
@ -49,7 +49,7 @@ endmacro()
|
|||||||
# or finds the interpreter via the built-in cmake module.
|
# or finds the interpreter via the built-in cmake module.
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
|
string(FIND "${PYTHON_EXECUTABLE}" "python3" IS_PYTHON3)
|
||||||
|
@ -31,6 +31,7 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
|||||||
- Replaced `git://` by `https://` as the used protocol when downloading Gflags,
|
- Replaced `git://` by `https://` as the used protocol when downloading Gflags,
|
||||||
so it can work through firewalls requiring authentication.
|
so it can work through firewalls requiring authentication.
|
||||||
- Fixed static linking of the matio library when downloaded and built by CMake.
|
- Fixed static linking of the matio library when downloaded and built by CMake.
|
||||||
|
- Fix building with `-DENABLE_CUDA=ON` for blocks implemented with CUDA.
|
||||||
|
|
||||||
### Improvements in Usability:
|
### Improvements in Usability:
|
||||||
|
|
||||||
@ -42,7 +43,14 @@ SPDX-FileCopyrightText: 2011-2020 Carles Fernandez-Prades <carles.fernandez@cttc
|
|||||||
v0.0.13. This change recovers the old behavior.
|
v0.0.13. This change recovers the old behavior.
|
||||||
- Fixed the termination of the receiver with `q` + `[Enter]` keys when using the
|
- Fixed the termination of the receiver with `q` + `[Enter]` keys when using the
|
||||||
`Osmosdr_Signal_Source` implementation of the `SignalSource` block.
|
`Osmosdr_Signal_Source` implementation of the `SignalSource` block.
|
||||||
|
- The `Labsat_Signal_Source` implementation of the `SignalSource` block now can
|
||||||
|
be throttled with the new parameters `SignalSource.enable_throttle_control`
|
||||||
|
and `SignalSource.throttle_frequency_sps`, thus allowing the emulation of
|
||||||
|
real-time operation.
|
||||||
- Improved General Block diagram, both in content and in image resolution.
|
- Improved General Block diagram, both in content and in image resolution.
|
||||||
|
- The `Custom_UDP_Signal_Source` implementation now accepts
|
||||||
|
`SignalSource.sample_type=cfloat`, in addition to the existing 4 and 8-bit
|
||||||
|
length sample types.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ void pcps_acquisition_fpga::acquisition_core(uint32_t num_doppler_bins, uint32_t
|
|||||||
&d_doppler_index,
|
&d_doppler_index,
|
||||||
&total_block_exp);
|
&total_block_exp);
|
||||||
|
|
||||||
const auto doppler = static_cast<int32_t>(doppler_min) + doppler_step * (d_doppler_index - 1);
|
const int32_t doppler = static_cast<int32_t>(doppler_min) + doppler_step * (d_doppler_index - 1);
|
||||||
|
|
||||||
if (total_block_exp > d_total_block_exp)
|
if (total_block_exp > d_total_block_exp)
|
||||||
{
|
{
|
||||||
@ -268,7 +268,7 @@ void pcps_acquisition_fpga::set_active(bool active)
|
|||||||
|
|
||||||
while (num_second_acq < d_max_num_acqs)
|
while (num_second_acq < d_max_num_acqs)
|
||||||
{
|
{
|
||||||
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 + d_doppler_center);
|
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);
|
||||||
if (d_test_statistics > d_threshold)
|
if (d_test_statistics > d_threshold)
|
||||||
{
|
{
|
||||||
d_active = false;
|
d_active = false;
|
||||||
|
@ -55,7 +55,7 @@ endmacro()
|
|||||||
set(VOLK_PYTHON_MIN_VERSION "2.7")
|
set(VOLK_PYTHON_MIN_VERSION "2.7")
|
||||||
set(VOLK_PYTHON3_MIN_VERSION "3.4")
|
set(VOLK_PYTHON3_MIN_VERSION "3.4")
|
||||||
|
|
||||||
if(CMAKE_VERSION VERSION_LESS 3.12)
|
if(CMAKE_VERSION VERSION_LESS 3.12 OR CMAKE_CROSSCOMPILING)
|
||||||
if(PYTHON_EXECUTABLE)
|
if(PYTHON_EXECUTABLE)
|
||||||
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
message(STATUS "User set python executable ${PYTHON_EXECUTABLE}")
|
||||||
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
find_package(PythonInterp ${VOLK_PYTHON_MIN_VERSION} REQUIRED)
|
||||||
|
@ -148,8 +148,6 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
|||||||
{
|
{
|
||||||
freq_band = "L1L2";
|
freq_band = "L1L2";
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_file_to_dma = std::thread([&] { run_DMA_process(freq_band, filename_rx1, filename_rx2); });
|
|
||||||
}
|
}
|
||||||
if (switch_position == 2) // Real-time via AD9361
|
if (switch_position == 2) // Real-time via AD9361
|
||||||
{
|
{
|
||||||
@ -368,6 +366,11 @@ Ad9361FpgaSignalSource::~Ad9361FpgaSignalSource()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Ad9361FpgaSignalSource::start()
|
||||||
|
{
|
||||||
|
thread_file_to_dma = std::thread([&] { run_DMA_process(freq_band, filename_rx1, filename_rx2); });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const std::string &Filename1, const std::string &Filename2)
|
void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const std::string &Filename1, const std::string &Filename2)
|
||||||
{
|
{
|
||||||
@ -589,6 +592,11 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
|
|||||||
lock.unlock();
|
lock.unlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (close(tx_fd) < 0)
|
||||||
|
{
|
||||||
|
std::cerr << "Error closing loop device " << '\n';
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
infile1.close();
|
infile1.close();
|
||||||
@ -604,7 +612,7 @@ void Ad9361FpgaSignalSource::run_DMA_process(const std::string &FreqBand, const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Ad9361FpgaSignalSource::run_dynamic_bit_selection_process(void)
|
void Ad9361FpgaSignalSource::run_dynamic_bit_selection_process()
|
||||||
{
|
{
|
||||||
bool dynamic_bit_selection_active = true;
|
bool dynamic_bit_selection_active = true;
|
||||||
|
|
||||||
|
@ -43,6 +43,8 @@ public:
|
|||||||
|
|
||||||
~Ad9361FpgaSignalSource();
|
~Ad9361FpgaSignalSource();
|
||||||
|
|
||||||
|
void start();
|
||||||
|
|
||||||
inline std::string role() override
|
inline std::string role() override
|
||||||
{
|
{
|
||||||
return role_;
|
return role_;
|
||||||
@ -74,7 +76,7 @@ private:
|
|||||||
const std::string &Filename1,
|
const std::string &Filename1,
|
||||||
const std::string &Filename2);
|
const std::string &Filename2);
|
||||||
|
|
||||||
void run_dynamic_bit_selection_process(void);
|
void run_dynamic_bit_selection_process();
|
||||||
|
|
||||||
std::thread thread_file_to_dma;
|
std::thread thread_file_to_dma;
|
||||||
std::thread thread_dynamic_bit_selection;
|
std::thread thread_dynamic_bit_selection;
|
||||||
@ -95,6 +97,9 @@ private:
|
|||||||
std::string filename_rx2;
|
std::string filename_rx2;
|
||||||
std::string freq_band;
|
std::string freq_band;
|
||||||
|
|
||||||
|
std::mutex dma_mutex;
|
||||||
|
std::mutex dynamic_bit_selection_mutex;
|
||||||
|
|
||||||
double rf_gain_rx1_;
|
double rf_gain_rx1_;
|
||||||
double rf_gain_rx2_;
|
double rf_gain_rx2_;
|
||||||
uint64_t freq_; // frequency of local oscillator
|
uint64_t freq_; // frequency of local oscillator
|
||||||
@ -125,9 +130,6 @@ private:
|
|||||||
bool enable_DMA_;
|
bool enable_DMA_;
|
||||||
bool enable_dynamic_bit_selection_;
|
bool enable_dynamic_bit_selection_;
|
||||||
bool rf_shutdown_;
|
bool rf_shutdown_;
|
||||||
|
|
||||||
std::mutex dma_mutex;
|
|
||||||
std::mutex dynamic_bit_selection_mutex;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H
|
#endif // GNSS_SDR_AD9361_FPGA_SIGNAL_SOURCE_H
|
||||||
|
@ -34,9 +34,11 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
|
|||||||
dump_ = configuration->property(role + ".dump", false);
|
dump_ = configuration->property(role + ".dump", false);
|
||||||
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_file);
|
||||||
|
|
||||||
sampling_frequency_ = configuration->property(role + ".sampling_frequency", static_cast<int64_t>(0));
|
|
||||||
enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false);
|
enable_throttle_control_ = configuration->property(role + ".enable_throttle_control", false);
|
||||||
|
|
||||||
|
const int64_t sampling_frequency_deprecated = configuration->property(role + ".sampling_frequency", static_cast<int64_t>(16368000));
|
||||||
|
const int64_t throttle_frequency_sps = configuration->property(role + ".throttle_frequency_sps", static_cast<int64_t>(sampling_frequency_deprecated));
|
||||||
|
|
||||||
const int channel_selector = configuration->property(role + ".selected_channel", 1);
|
const int channel_selector = configuration->property(role + ".selected_channel", 1);
|
||||||
|
|
||||||
const std::string default_filename("./example_capture.LS3");
|
const std::string default_filename("./example_capture.LS3");
|
||||||
@ -63,7 +65,7 @@ LabsatSignalSource::LabsatSignalSource(const ConfigurationInterface* configurati
|
|||||||
|
|
||||||
if (enable_throttle_control_)
|
if (enable_throttle_control_)
|
||||||
{
|
{
|
||||||
throttle_ = gr::blocks::throttle::make(item_size_, sampling_frequency_);
|
throttle_ = gr::blocks::throttle::make(item_size_, throttle_frequency_sps);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_stream_ > 0)
|
if (in_stream_ > 0)
|
||||||
|
@ -70,19 +70,19 @@ public:
|
|||||||
private:
|
private:
|
||||||
gr::block_sptr labsat23_source_;
|
gr::block_sptr labsat23_source_;
|
||||||
gr::blocks::file_sink::sptr file_sink_;
|
gr::blocks::file_sink::sptr file_sink_;
|
||||||
|
gr::blocks::throttle::sptr throttle_;
|
||||||
|
|
||||||
std::string role_;
|
std::string role_;
|
||||||
std::string item_type_;
|
std::string item_type_;
|
||||||
std::string filename_;
|
std::string filename_;
|
||||||
std::string dump_filename_;
|
std::string dump_filename_;
|
||||||
|
|
||||||
|
size_t item_size_;
|
||||||
int64_t sampling_frequency_;
|
|
||||||
bool enable_throttle_control_;
|
|
||||||
gr::blocks::throttle::sptr throttle_;
|
|
||||||
|
|
||||||
unsigned int in_stream_;
|
unsigned int in_stream_;
|
||||||
unsigned int out_stream_;
|
unsigned int out_stream_;
|
||||||
size_t item_size_;
|
|
||||||
|
bool enable_throttle_control_;
|
||||||
bool dump_;
|
bool dump_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -118,6 +118,11 @@ Gr_Complex_Ip_Packet_Source::Gr_Complex_Ip_Packet_Source(std::string src_device,
|
|||||||
d_wire_sample_type = 2;
|
d_wire_sample_type = 2;
|
||||||
d_bytes_per_sample = d_n_baseband_channels;
|
d_bytes_per_sample = d_n_baseband_channels;
|
||||||
}
|
}
|
||||||
|
else if (wire_sample_type == "cfloat")
|
||||||
|
{
|
||||||
|
d_wire_sample_type = 3;
|
||||||
|
d_bytes_per_sample = d_n_baseband_channels * 8;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Unknown wire sample type\n";
|
std::cout << "Unknown wire sample type\n";
|
||||||
@ -319,9 +324,6 @@ void Gr_Complex_Ip_Packet_Source::my_pcap_loop_thread(pcap_t *pcap_handle)
|
|||||||
|
|
||||||
void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &output_items, int num_samples_readed)
|
void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &output_items, int num_samples_readed)
|
||||||
{
|
{
|
||||||
int8_t real;
|
|
||||||
int8_t imag;
|
|
||||||
uint8_t tmp_char2;
|
|
||||||
for (int n = 0; n < num_samples_readed; n++)
|
for (int n = 0; n < num_samples_readed; n++)
|
||||||
{
|
{
|
||||||
switch (d_wire_sample_type)
|
switch (d_wire_sample_type)
|
||||||
@ -329,6 +331,8 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
|||||||
case 1: // interleaved byte samples
|
case 1: // interleaved byte samples
|
||||||
for (auto &output_item : output_items)
|
for (auto &output_item : output_items)
|
||||||
{
|
{
|
||||||
|
int8_t real;
|
||||||
|
int8_t imag;
|
||||||
real = fifo_buff[fifo_read_ptr++];
|
real = fifo_buff[fifo_read_ptr++];
|
||||||
imag = fifo_buff[fifo_read_ptr++];
|
imag = fifo_buff[fifo_read_ptr++];
|
||||||
if (d_IQ_swap)
|
if (d_IQ_swap)
|
||||||
@ -344,6 +348,9 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
|||||||
case 2: // 4-bit samples
|
case 2: // 4-bit samples
|
||||||
for (auto &output_item : output_items)
|
for (auto &output_item : output_items)
|
||||||
{
|
{
|
||||||
|
int8_t real;
|
||||||
|
int8_t imag;
|
||||||
|
uint8_t tmp_char2;
|
||||||
tmp_char2 = fifo_buff[fifo_read_ptr] & 0x0F;
|
tmp_char2 = fifo_buff[fifo_read_ptr] & 0x0F;
|
||||||
if (tmp_char2 >= 8)
|
if (tmp_char2 >= 8)
|
||||||
{
|
{
|
||||||
@ -373,6 +380,25 @@ void Gr_Complex_Ip_Packet_Source::demux_samples(const gr_vector_void_star &outpu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case 3: // interleaved float samples
|
||||||
|
for (auto &output_item : output_items)
|
||||||
|
{
|
||||||
|
float real;
|
||||||
|
float imag;
|
||||||
|
memcpy(&real, &fifo_buff[fifo_read_ptr], sizeof(real));
|
||||||
|
fifo_read_ptr += 4; // Four bytes in float
|
||||||
|
memcpy(&imag, &fifo_buff[fifo_read_ptr], sizeof(imag));
|
||||||
|
fifo_read_ptr += 4; // Four bytes in float
|
||||||
|
if (d_IQ_swap)
|
||||||
|
{
|
||||||
|
static_cast<gr_complex *>(output_item)[n] = gr_complex(real, imag);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static_cast<gr_complex *>(output_item)[n] = gr_complex(imag, real);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
std::cout << "Unknown wire sample type\n";
|
std::cout << "Unknown wire sample type\n";
|
||||||
exit(0);
|
exit(0);
|
||||||
@ -407,6 +433,7 @@ int Gr_Complex_Ip_Packet_Source::work(int noutput_items,
|
|||||||
{
|
{
|
||||||
case 1: // complex byte samples
|
case 1: // complex byte samples
|
||||||
case 2: // complex 4 bits samples
|
case 2: // complex 4 bits samples
|
||||||
|
case 3: // complex float samples
|
||||||
bytes_requested = noutput_items * d_bytes_per_sample;
|
bytes_requested = noutput_items * d_bytes_per_sample;
|
||||||
if (bytes_requested < fifo_items)
|
if (bytes_requested < fifo_items)
|
||||||
{
|
{
|
||||||
|
@ -62,8 +62,8 @@ private:
|
|||||||
static const uint32_t shift_out_bit_max = Num_bits_ADC - Num_bits_FPGA; // maximum possible value for the bit selection
|
static const uint32_t shift_out_bit_max = Num_bits_ADC - Num_bits_FPGA; // maximum possible value for the bit selection
|
||||||
// received signal power thresholds for the bit selection
|
// received signal power thresholds for the bit selection
|
||||||
// the received signal power is estimated as the averaged squared absolute value of the received signal samples
|
// the received signal power is estimated as the averaged squared absolute value of the received signal samples
|
||||||
static const uint32_t Power_Threshold_High = 15000;
|
static const uint32_t Power_Threshold_High = 9000;
|
||||||
static const uint32_t Power_Threshold_Low = 6000;
|
static const uint32_t Power_Threshold_Low = 3000;
|
||||||
|
|
||||||
void close_devices(void);
|
void close_devices(void);
|
||||||
|
|
||||||
|
@ -109,14 +109,22 @@ target_include_directories(tracking_adapters
|
|||||||
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
${CMAKE_SOURCE_DIR}/src/core/interfaces
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ENABLE_CUDA AND NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
if(ENABLE_CUDA)
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
|
target_include_directories(tracking_adapters
|
||||||
|
PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
|
)
|
||||||
|
else()
|
||||||
target_link_libraries(tracking_adapters
|
target_link_libraries(tracking_adapters
|
||||||
PUBLIC
|
PUBLIC ${CUDA_LIBRARIES}
|
||||||
${CUDA_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
target_include_directories(tracking_adapters
|
target_include_directories(tracking_adapters
|
||||||
PUBLIC
|
PUBLIC ${CUDA_INCLUDE_DIRS}
|
||||||
${CUDA_INCLUDE_DIRS}
|
)
|
||||||
|
endif()
|
||||||
|
set_target_properties(tracking_adapters PROPERTIES
|
||||||
|
CUDA_SEPARABLE_COMPILATION ON
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -105,14 +105,22 @@ if(GNURADIO_USES_STD_POINTERS)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA AND NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
if(ENABLE_CUDA)
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
|
target_include_directories(tracking_gr_blocks
|
||||||
|
PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
|
)
|
||||||
|
else()
|
||||||
target_link_libraries(tracking_gr_blocks
|
target_link_libraries(tracking_gr_blocks
|
||||||
PUBLIC
|
PUBLIC cuda_correlator_lib
|
||||||
${CUDA_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
target_include_directories(tracking_gr_blocks
|
target_include_directories(tracking_gr_blocks
|
||||||
PUBLIC
|
PUBLIC ${CUDA_INCLUDE_DIRS}
|
||||||
${CUDA_INCLUDE_DIRS}
|
)
|
||||||
|
endif()
|
||||||
|
set_target_properties(tracking_gr_blocks PROPERTIES
|
||||||
|
CUDA_SEPARABLE_COMPILATION ON
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -177,7 +177,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
|||||||
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
d_code_phase_step_chips = static_cast<double>(d_code_freq_chips) / static_cast<double>(d_fs_in);
|
||||||
const double T_chip_mod_seconds = 1 / d_code_freq_chips;
|
const double T_chip_mod_seconds = 1 / d_code_freq_chips;
|
||||||
const double T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
const double T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||||
T_prn_mod_samples T_prn_mod_samples = T_prn_mod_seconds * static_cast<double>(d_fs_in);
|
const double T_prn_mod_samples = T_prn_mod_seconds * static_cast<double>(d_fs_in);
|
||||||
|
|
||||||
d_correlation_length_samples = round(T_prn_mod_samples);
|
d_correlation_length_samples = round(T_prn_mod_samples);
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ typedef std::shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc>
|
|||||||
#else
|
#else
|
||||||
typedef boost::shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc>
|
typedef boost::shared_ptr<Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc>
|
||||||
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr;
|
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr;
|
||||||
#end
|
#endif
|
||||||
|
|
||||||
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
|
gps_l1_ca_dll_pll_tracking_gpu_cc_sptr
|
||||||
gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
gps_l1_ca_dll_pll_make_tracking_gpu_cc(
|
||||||
|
@ -44,20 +44,14 @@ set(TRACKING_LIB_HEADERS
|
|||||||
exponential_smoother.h
|
exponential_smoother.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(OPT_TRACKING_LIBRARIES "")
|
|
||||||
set(OPT_TRACKING_INCLUDES "")
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
|
list(APPEND CUDA_NVCC_FLAGS "-gencode arch=compute_30,code=sm_30; -O3; -use_fast_math -default-stream per-thread")
|
||||||
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} cuda_multicorrelator.cu)
|
set(TRACKING_LIB_SOURCES ${TRACKING_LIB_SOURCES} cuda_multicorrelator.cu)
|
||||||
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} cuda_multicorrelator.h)
|
set(TRACKING_LIB_HEADERS ${TRACKING_LIB_HEADERS} cuda_multicorrelator.h)
|
||||||
else()
|
else()
|
||||||
list(APPEND CUDA_NVCC_FLAGS "-gencode arch=compute_30,code=sm_30; -std=c++11;-O3; -use_fast_math -default-stream per-thread")
|
|
||||||
set(CUDA_PROPAGATE_HOST_FLAGS OFF)
|
|
||||||
cuda_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
cuda_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
set(LIB_TYPE STATIC) #set the lib type
|
cuda_add_library(cuda_correlator_lib STATIC cuda_multicorrelator.h cuda_multicorrelator.cu)
|
||||||
cuda_add_library(CUDA_CORRELATOR_LIB ${LIB_TYPE} cuda_multicorrelator.h cuda_multicorrelator.cu)
|
|
||||||
set(OPT_TRACKING_LIBRARIES ${OPT_TRACKING_LIBRARIES} CUDA_CORRELATOR_LIB)
|
|
||||||
set(OPT_TRACKING_INCLUDES ${OPT_TRACKING_INCLUDES} ${CUDA_INCLUDE_DIRS})
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -96,20 +90,28 @@ target_link_libraries(tracking_libs
|
|||||||
Volkgnsssdr::volkgnsssdr
|
Volkgnsssdr::volkgnsssdr
|
||||||
core_system_parameters
|
core_system_parameters
|
||||||
algorithms_libs
|
algorithms_libs
|
||||||
${OPT_TRACKING_LIBRARIES}
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
gnss_sdr_flags
|
gnss_sdr_flags
|
||||||
Glog::glog
|
Glog::glog
|
||||||
)
|
)
|
||||||
|
|
||||||
if(NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
if(ENABLE_CUDA)
|
||||||
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
|
target_include_directories(tracking_libs
|
||||||
|
PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
|
)
|
||||||
|
else()
|
||||||
target_link_libraries(tracking_libs
|
target_link_libraries(tracking_libs
|
||||||
PUBLIC
|
PUBLIC ${CUDA_LIBRARIES}
|
||||||
${OPT_TRACKING_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
target_include_directories(tracking_libs
|
target_include_directories(tracking_libs
|
||||||
PUBLIC
|
PUBLIC ${CUDA_INCLUDE_DIRS}
|
||||||
${OPT_TRACKING_INCLUDES}
|
)
|
||||||
|
endif()
|
||||||
|
set_target_properties(tracking_libs PROPERTIES
|
||||||
|
CUDA_SEPARABLE_COMPILATION ON
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
CUDA_RESOLVE_DEVICE_SYMBOLS ON
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -68,6 +68,11 @@ public:
|
|||||||
}; // avoid unused param warning
|
}; // avoid unused param warning
|
||||||
return nullptr; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
|
return nullptr; // added to support raw array access (non pure virtual to allow left unimplemented)= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Start the flow of samples if needed.
|
||||||
|
*/
|
||||||
|
virtual void start(){};
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // GNSS_SDR_GNSS_BLOCK_INTERFACE_H
|
#endif // GNSS_SDR_GNSS_BLOCK_INTERFACE_H
|
||||||
|
@ -120,9 +120,22 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
if(NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
target_include_directories(core_receiver PUBLIC ${CUDA_INCLUDE_DIRS})
|
target_include_directories(core_receiver
|
||||||
|
PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
|
)
|
||||||
|
else()
|
||||||
|
target_link_libraries(core_receiver
|
||||||
|
PUBLIC ${CUDA_LIBRARIES}
|
||||||
|
)
|
||||||
|
target_include_directories(core_receiver
|
||||||
|
PUBLIC ${CUDA_INCLUDE_DIRS}
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
set_target_properties(core_receiver PROPERTIES
|
||||||
|
CUDA_SEPARABLE_COMPILATION ON
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
)
|
||||||
target_compile_definitions(core_receiver PRIVATE -DCUDA_GPU_ACCEL=1)
|
target_compile_definitions(core_receiver PRIVATE -DCUDA_GPU_ACCEL=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -110,6 +110,14 @@ void GNSSFlowgraph::start()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef ENABLE_FPGA
|
||||||
|
// start the DMA if the receiver is in post-processing mode
|
||||||
|
if (configuration_->property(sig_source_.at(0)->role() + ".switch_position", 0) == 0)
|
||||||
|
{
|
||||||
|
sig_source_.at(0)->start();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
running_ = true;
|
running_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,16 +39,22 @@ target_link_libraries(gnss-sdr
|
|||||||
target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
target_compile_definitions(gnss-sdr PRIVATE -DGNSS_SDR_VERSION="${VERSION}")
|
||||||
|
|
||||||
if(ENABLE_CUDA)
|
if(ENABLE_CUDA)
|
||||||
if(NOT CMAKE_VERSION VERSION_GREATER 3.11)
|
if(CMAKE_VERSION VERSION_GREATER 3.11)
|
||||||
|
target_include_directories(gnss-sdr
|
||||||
|
PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES}
|
||||||
|
)
|
||||||
|
else()
|
||||||
target_link_libraries(gnss-sdr
|
target_link_libraries(gnss-sdr
|
||||||
PRIVATE
|
PUBLIC ${CUDA_LIBRARIES}
|
||||||
${CUDA_LIBRARIES}
|
|
||||||
)
|
)
|
||||||
target_include_directories(gnss-sdr
|
target_include_directories(gnss-sdr
|
||||||
PRIVATE
|
PUBLIC ${CUDA_INCLUDE_DIRS}
|
||||||
${CUDA_INCLUDE_DIRS}
|
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
set_target_properties(gnss-sdr PROPERTIES
|
||||||
|
CUDA_SEPARABLE_COMPILATION ON
|
||||||
|
POSITION_INDEPENDENT_CODE ON
|
||||||
|
)
|
||||||
target_compile_definitions(gnss-sdr PRIVATE -DCUDA_GPU_ACCEL=1)
|
target_compile_definitions(gnss-sdr PRIVATE -DCUDA_GPU_ACCEL=1)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user