Compare commits

...

5 Commits

Author SHA1 Message Date
Lars Amsel
ea137aa3f0 uhd: Replaced deprecated usage of boost timer with std::chrono
replaced boost::timer by std::chrono::steady_timer to
measure time interval
2025-11-07 14:40:35 +01:00
Martin Braun
91cd945c3e uhd: Add missing includes
Some files were missing <cstdint>, others were missing Boost includes.
2025-11-07 14:40:02 +01:00
Martin Braun
d881b21398 rfnoc: dma_fifo_core_3000: Fix exponential notation 2025-11-07 14:38:52 +01:00
Martin Braun
0c00db1c45 ic_reg_maps: Use r-strings for regex patterns 2025-11-07 14:38:19 +01:00
Martin Braun
addf11d743 cmake: Use LooseVersion for Python version comparison 2025-11-07 14:37:56 +01:00
13 changed files with 19 additions and 7 deletions

View File

@ -313,7 +313,7 @@ include(UHDPython)
PYTHON_CHECK_MODULE(
"Python version ${PYTHON_MIN_VERSION} or greater"
"platform" "platform.python_version() >= '${PYTHON_MIN_VERSION}'"
"platform" "LooseVersion(platform.python_version()) >= LooseVersion('${PYTHON_MIN_VERSION}')"
HAVE_PYTHON_PLAT_MIN_VERSION
)

View File

@ -103,7 +103,7 @@ class reg:
raise Exception('Error parsing register description: "%s"\nWhat: %s'%(reg_des, e))
def parse(self, reg_des):
x = re.match('^(\w*)\s*(\w*)\[(.*)\]\s*(\w*)\s*(.*)$', reg_des)
x = re.match(r'^(\w*)\s*(\w*)\[(.*)\]\s*(\w*)\s*(.*)$', reg_des)
name, addr, bit_range, default, enums = x.groups()
#store variables
@ -147,7 +147,7 @@ class mreg:
raise Exception('Error parsing meta register description: "%s"\nWhat: %s'%(mreg_des, e))
def parse(self, mreg_des, regs):
x = re.match('^~(\w*)\s+(.*)\s*$', mreg_des)
x = re.match(r'^~(\w*)\s+(.*)\s*$', mreg_des)
self._name, reg_names = x.groups()
regs_dict = dict([(reg.get_name(), reg) for reg in regs])
self._regs = [regs_dict[reg_name.strip()] for reg_name in reg_names.split(',')]

View File

@ -7,6 +7,7 @@
#include "lmx2592_regs.hpp"
#include <uhdlib/usrp/common/lmx2592.hpp>
#include <uhdlib/utils/narrow.hpp>
#include <array>
#include <chrono>
#include <iomanip>

View File

@ -328,7 +328,7 @@ public:
_fifo_ctrl_reg.write(fifo_ctrl_reg_t::CLEAR_FIFO, 1);
_fifo_ctrl_reg.write(fifo_ctrl_reg_t::CLEAR_FIFO, 0);
_bist_cfg_reg.set(bist_cfg_reg_t::MAX_PKTS, (2 ^ 18) - 1);
_bist_cfg_reg.set(bist_cfg_reg_t::MAX_PKTS, (1 << 18) - 1);
_bist_cfg_reg.set(bist_cfg_reg_t::MAX_PKT_SIZE, 8000);
_bist_cfg_reg.set(bist_cfg_reg_t::PKT_SIZE_RAMP, 0);
_bist_cfg_reg.flush();

View File

@ -15,6 +15,7 @@
#include <boost/assign/list_of.hpp>
#include <boost/bind.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/sign.hpp>
#include <boost/thread/thread.hpp> //thread sleep
#include <algorithm>
#include <cmath>

View File

@ -13,6 +13,7 @@
#include <boost/assign/list_of.hpp>
#include <boost/bind.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/sign.hpp>
using namespace uhd;

View File

@ -7,6 +7,7 @@
#include "rhodium_constants.hpp"
#include "rhodium_radio_ctrl_impl.hpp"
#include <uhd/utils/math.hpp>
#include <cstdint>
using namespace uhd;
using namespace uhd::usrp;

View File

@ -9,6 +9,7 @@
#include <array>
#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

View File

@ -8,6 +8,7 @@
#include "rhodium_cpld_ctrl.hpp"
#include "rhodium_radio_ctrl_impl.hpp"
#include <uhd/utils/log.hpp>
#include <cstdint>
using namespace uhd;
using namespace uhd::usrp;

View File

@ -16,6 +16,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/algorithm/string/case_conv.hpp>
#include <boost/algorithm/string/split.hpp>
#include <cstdint>
#include <string>
#include <vector>

View File

@ -12,6 +12,7 @@
#include <uhd/utils/log.hpp>
#include <uhdlib/utils/narrow.hpp>
#include <boost/format.hpp>
#include <cstdint>
using namespace uhd;
using namespace uhd::usrp;

View File

@ -19,6 +19,8 @@
#include <boost/asio/ip/address_v4.hpp>
#include <boost/bind.hpp>
#include <boost/format.hpp>
#include <boost/math/special_functions/round.hpp>
#include <boost/math/special_functions/sign.hpp>
#include <boost/thread.hpp>
using namespace uhd;

View File

@ -14,7 +14,7 @@
#include <boost/format.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/program_options.hpp>
#include <boost/timer.hpp>
#include <chrono>
#include <complex>
#include <iomanip>
#include <iostream>
@ -200,11 +200,13 @@ double run_benchmark(converter::sptr conv,
size_t n_items,
size_t iterations)
{
boost::timer benchmark_timer;
auto start = std::chrono::steady_clock::now();
for (size_t i = 0; i < iterations; i++) {
conv->conv(input_buf_refs, output_buf_refs, n_items);
}
return benchmark_timer.elapsed();
auto stop = std::chrono::steady_clock::now();
std::chrono::duration<double> duration = stop - start;
return duration.count();
}
template <typename T>