mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-11-07 18:54:06 +00:00
Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into pps_lime
This commit is contained in:
@@ -129,6 +129,7 @@ typedef enum
|
||||
AMD_BULLDOZER, // K15
|
||||
AMD_JAGUAR, // K16
|
||||
AMD_ZEN, // K17
|
||||
AMD_ZEN3, // K19
|
||||
} X86Microarchitecture;
|
||||
|
||||
// Returns the underlying microarchitecture by looking at X86Info's vendor,
|
||||
|
||||
@@ -1581,6 +1581,8 @@ X86Microarchitecture GetX86Microarchitecture(const X86Info* info)
|
||||
return AMD_JAGUAR;
|
||||
case 0x17:
|
||||
return AMD_ZEN;
|
||||
case 0x19:
|
||||
return AMD_ZEN3;
|
||||
default:
|
||||
return X86_UNKNOWN;
|
||||
}
|
||||
@@ -1679,6 +1681,8 @@ const char* GetX86MicroarchitectureName(X86Microarchitecture uarch)
|
||||
return "AMD_JAGUAR";
|
||||
case AMD_ZEN:
|
||||
return "AMD_ZEN";
|
||||
case AMD_ZEN3:
|
||||
return "AMD_ZEN3";
|
||||
}
|
||||
return "unknown microarchitecture";
|
||||
}
|
||||
|
||||
@@ -194,8 +194,7 @@ if(ENABLE_UHD)
|
||||
target_link_libraries(signal_source_adapters
|
||||
PUBLIC
|
||||
Gnuradio::uhd
|
||||
PRIVATE
|
||||
Uhd::uhd
|
||||
Uhd::uhd # for uhd/config.hpp in gnuradio/uhd/usrp_source.h
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
filename1 = configuration->property(role + ".filename1", empty_string);
|
||||
}
|
||||
|
||||
samples_ = configuration->property(role + ".samples", static_cast<uint64_t>(0));
|
||||
samples_ = configuration->property(role + ".samples", static_cast<int64_t>(0));
|
||||
|
||||
const double seconds_to_skip = configuration->property(role + ".seconds_to_skip", default_seconds_to_skip);
|
||||
const size_t header_size = configuration->property(role + ".header_size", 0);
|
||||
@@ -148,9 +148,10 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
item_size_ = sizeof(int8_t);
|
||||
repeat_ = configuration->property(role + ".repeat", false);
|
||||
|
||||
samples_to_skip_ = 0;
|
||||
if (seconds_to_skip > 0)
|
||||
{
|
||||
samples_to_skip_ = static_cast<int64_t>(seconds_to_skip * sample_rate_) * 2;
|
||||
samples_to_skip_ = static_cast<uint64_t>(seconds_to_skip * sample_rate_) * 2;
|
||||
}
|
||||
if (header_size > 0)
|
||||
{
|
||||
@@ -212,8 +213,8 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
const int64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const int64_t bytes_to_process = static_cast<int64_t>(size) - bytes_to_skip;
|
||||
const uint64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const uint64_t bytes_to_process = static_cast<uint64_t>(size) - bytes_to_skip;
|
||||
samples_ = floor(static_cast<double>(bytes_to_process) / static_cast<double>(item_size_) - ceil(0.002 * static_cast<double>(sample_rate_))); // process all the samples available in the file excluding at least the last 1 ms
|
||||
}
|
||||
|
||||
@@ -238,11 +239,11 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
std::cout << "Processing file " << filename1 << ", which contains " << static_cast<double>(size) << " [bytes]\n";
|
||||
std::cout.precision(ss);
|
||||
|
||||
uint64_t samples_rx2 = 0;
|
||||
int64_t samples_rx2 = 0;
|
||||
if (size > 0)
|
||||
{
|
||||
const int64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const int64_t bytes_to_process = static_cast<int64_t>(size) - bytes_to_skip;
|
||||
const uint64_t bytes_to_skip = samples_to_skip_ * item_size_;
|
||||
const uint64_t bytes_to_process = static_cast<uint64_t>(size) - bytes_to_skip;
|
||||
samples_rx2 = floor(static_cast<double>(bytes_to_process) / static_cast<double>(item_size_) - ceil(0.002 * static_cast<double>(sample_rate_))); // process all the samples available in the file excluding at least the last 1 ms
|
||||
}
|
||||
samples_ = std::min(samples_, samples_rx2);
|
||||
@@ -442,7 +443,8 @@ Ad9361FpgaSignalSource::Ad9361FpgaSignalSource(const ConfigurationInterface *con
|
||||
enable_dynamic_bit_selection_ = configuration->property(role + ".enable_dynamic_bit_selection", true);
|
||||
if (enable_dynamic_bit_selection_)
|
||||
{
|
||||
std::string device_io_name_dyn_bit_sel_0, device_io_name_dyn_bit_sel_1;
|
||||
std::string device_io_name_dyn_bit_sel_0;
|
||||
std::string device_io_name_dyn_bit_sel_1;
|
||||
|
||||
// find the uio device file corresponding to the dynamic bit selector 0 module.
|
||||
if (find_uio_dev_file_name(device_io_name_dyn_bit_sel_0, dyn_bit_sel_device_name, 0) < 0)
|
||||
@@ -545,7 +547,7 @@ void Ad9361FpgaSignalSource::start()
|
||||
}
|
||||
|
||||
|
||||
void Ad9361FpgaSignalSource::run_DMA_process(const std::string &filename0, const std::string &filename1, uint64_t &samples_to_skip, size_t &item_size, uint64_t &samples, bool &repeat, uint32_t &dma_buff_offset_pos, Concurrent_Queue<pmt::pmt_t> *queue)
|
||||
void Ad9361FpgaSignalSource::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<pmt::pmt_t> *queue)
|
||||
{
|
||||
std::ifstream infile1;
|
||||
infile1.exceptions(std::ifstream::failbit | std::ifstream::badbit);
|
||||
|
||||
@@ -75,11 +75,11 @@ private:
|
||||
// sample block size when running in post-processing mode
|
||||
const int sample_block_size = 16384;
|
||||
|
||||
void run_DMA_process(const std::string &Filename1,
|
||||
const std::string &Filename2,
|
||||
void run_DMA_process(const std::string &filename0,
|
||||
const std::string &filename1,
|
||||
uint64_t &samples_to_skip,
|
||||
size_t &item_size,
|
||||
uint64_t &samples,
|
||||
int64_t &samples,
|
||||
bool &repeat,
|
||||
uint32_t &dma_buff_offset_pos,
|
||||
Concurrent_Queue<pmt::pmt_t> *queue);
|
||||
@@ -143,7 +143,7 @@ private:
|
||||
bool rf_shutdown_;
|
||||
|
||||
// post-processing mode
|
||||
uint64_t samples_;
|
||||
int64_t samples_;
|
||||
uint64_t samples_to_skip_;
|
||||
bool repeat_;
|
||||
uint32_t num_freq_bands_;
|
||||
|
||||
@@ -500,7 +500,7 @@ void FileSourceBase::create_sink_hook() {}
|
||||
|
||||
|
||||
// Subclass hooks for connection/disconnectino
|
||||
void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::post_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::pre_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::post_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {}
|
||||
void FileSourceBase::pre_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::post_connect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::pre_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
void FileSourceBase::post_disconnect_hook(gr::top_block_sptr top_block [[maybe_unused]]) {} // NOLINT(performance-unnecessary-value-param)
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
*/
|
||||
|
||||
#include "rtl_tcp_dongle_info.h"
|
||||
#include <boost/foreach.hpp>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -115,7 +114,7 @@ double Rtl_Tcp_Dongle_Info::clip_gain(int gain) const
|
||||
}
|
||||
|
||||
double last_stop = gains.front();
|
||||
BOOST_FOREACH (double g, gains)
|
||||
for (auto g : gains)
|
||||
{
|
||||
g /= 10.0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user