aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Add check for libatomic linking requirementMartin Braun2021-08-271-0/+15
| | | | | | | | | | Some archs require linking against libatomic, others don't. We add some CMake code that checks for libatomic.so requirement if: - We are not on MSVC, AND - Compiling std::atomics code would cause a linker error. We then check for the existence of libatomic.so, and fail if we can't find it.
* uhd: Remove Boost version checks for Boost 1.61Martin Braun2021-08-241-19/+4
| | | | | UHD requires Boost 1.65, so checks for Boost 1.61 will always be satisfied.
* cmake: remove duplicate entry in LIBUHD_PYTHON_GEN_SOURCEMichael Dickens2021-08-201-5/+0
| | | | Closes: https://github.com/EttusResearch/uhd/issues/478
* uhd: streamer: Restore original recv(0) semanticsAaron Rossetto2021-08-201-0/+32
| | | | | | | | | A recv() of zero samples on an RX stream should return immediately (i.e., without respect to the timeout and regardless of the availability of samples), surfacing any stream error conditions via metadata. This convention was broken in a2f10ee9, causing a recv() of zero samples to wait for the entire timeout period and then return ERROR_CODE_TIMEOUT if no samples are available. This commit restores the desired semantics.
* X300: Initialize struct variable before using itMartin Anderseck2021-08-201-1/+1
| | | | | | | In x300_eth_mgr.cpp the variable init is created but not initialized. Only some of the variables within the struct are then set before init is assigned to a different variable. Initialize the variable to prevent unexpected values.
* lib: transport: Mark typecast as intendedMartin Anderseck2021-08-171-1/+2
| | | | | Remove warning about potential data loss in VS due to typecast by marking it as intended.
* lib: transport: Initialize _hshake_args_serverMartin Anderseck2021-08-171-1/+1
| | | | | Initialize _hshake_args_server to safely use this struct and its contents in line 70.
* B200: Fix overflow handlingmichael-west2021-08-161-14/+9
| | | | | | | - Use FPGA images with fixed sc12 converter. - Properly flush channels and restart streaming in the case of an overrun. Signed-off-by: michael-west <michael.west@ettus.com>
* lib: rfnoc: Make implicit typecasts explicitMartin Anderseck2021-08-101-4/+5
| | | | | | Fix implicit typecasts that could potentially lose data. Doing this to show that these typecasts are done on purpose (and to resolve warnings from VS).
* lib: rfnoc: Change enum node_type to enum classMartin Anderseck2021-08-101-23/+25
| | | | | | Fix the "Enum.3: Prefer class enums over "plain" enums" warning for the node_type enum and update the calls to the enumerators as proposed by the C++ Core Guidelines.
* n3x0/e3x0: Remove reference to "master FP-GPIO radio"Martin Braun2021-07-302-2/+0
| | | | | | | | | In days of yore, before we had evolved RFNoC to the UHD 4.0 state, only one radio on N310 was able to drive the front-panel GPIOs. With the introduction of the UHD 4.0 GPIO API, we have fine-grained control for every pin who may drive it. This makes this constant obsolete, and we remove it to avoid confusion. Besides, these two `constexpr` values where being used nowhere.
* python: rfnoc: Change reference type for noc_block_base exportMartin Braun2021-07-231-54/+64
| | | | | | | | | | | | | By changing the type for accesses to noc_block_base calls in the Python from sptr& to a simple reference (&), we fix the "holder type" issues that crop up when trying to use radio_control from multi_usrp, which returns access to the block as a reference rather than a `sptr`. The error message seen without this fix always contains this string: Unable to cast from non-held to held instance (T& to Holder<T>) (The exact message depends on the API call made).
* uhd: Fix usage of std::abs with template parametersMartin Braun2021-07-231-1/+1
| | | | | | | | | `std::abs` is only a templated function, when dealing with complex numbers. For real values, it is an overload. There is no documented standard way to use `std::abs<double>()` for real-valued arguments. We therefore remove all usages of `std::abs<>()` and replace them with `std::abs()` where they were taking a real-valued argument.
* b200: Move the B200 radio control core into usrp/b200/Martin Braun2021-07-207-25/+24
| | | | | | | | | | | | This serves two purposes: - This file no longer goes into the compiled DLL if B200 is disabled - Discourage use of this file for new devices, making it clear that this architecture is no longer used The file itself is left untouched, only the class is renamed from radio_ctrl_core_3000 to b200_radio_ctrl_core. Note: In UHD 3, this file was also used by N230.
* dbsrx: Fix issue with loop variableMartin Braun2021-07-201-3/+4
| | | | | | In 26cc208, we accidentally added an `auto` into a loop, making the loop variable's scope local. However, this variable lives outside this for loop.
* rfnoc: allow find_blocks to search by device number or block count.Lars Amsel2021-07-201-3/+3
| | | | | | | | | | | | | In current implementation it is not possible to find all blocks of a device by calling find_blocks("0/"). The same is true for the block count. This is caused by the valid block id regex which requires a block name. This regex is used to validate the block name as well as to match block ids in search. This fix looses the requirement for the block name to allow searches by device number and block count and also extends the is_valid_block_id method to require the block name match to be non empty (which restores the previous behaviour at this point).
* host: Add static_assert to prevent meta_range_t(0,0)Lane Kolbly2021-07-144-8/+8
| | | | | | | meta_range_t(0,0) actually calls the iterator-based constructor for meta_range_t, which is almost certainly not the intended constructor for that call syntax. Therefore, we add a static_assert to prevent such usage, and fix all failing instances.
* lib: Add various missing includesMartin Braun2021-07-142-0/+3
|
* uhd: Replace boost::thread::id with std::thread::idMartin Braun2021-07-143-4/+5
| | | | | | | | The Boost version is identical to the std:: version (which is available since C++11) and thus is no longer needed. Because of implicit includes, this breaks compilation in other parts. Appropriate includes were added there also.
* core: remove boost::math in favor of std cmathMichael Dickens2021-07-062-13/+16
| | | | | | | | | | | | | | | | | | | | | | YA Boost removal!!! Justification --- const int if_freq_sign = boost::math::sign(fe_conn.get_if_freq()); _dsp_freq_offset = if_freq * (-if_freq_sign); // boost::math::sign : 1 if x > 0, -1 if x < 0, and 0 if x is zero. // ==> if if_freq_sign > 0 then * by -1 else +1 (effectively) // std::signbit : true if arg is negative, false otherwise // ==> need 'not' of input argument to invert for same result as prior algorithm double fe_if_freq = fe_conn.get_if_freq(); if (!std::signbit(fe_if_freq)) { if_freq *= -1.0; } --- The above should result in the same algorithm except possibly if fe_if_freq is exactly 0.0 in which case the results might be off by the sign (+0.0 versus -0.0).
* cmake: remove redundant includeMichael Dickens2021-07-061-1/+0
|
* cmake: correctly set and unset any CMAKE_REQUIRED variablesMichael Dickens2021-07-062-7/+7
|
* x3xx: Fix x3xx fpga image namemattprost2021-06-251-1/+1
|
* mpm: Bump MPM compat version to 4.0Lane Kolbly2021-06-241-1/+1
|
* uhd: Remove includes of list_of.hpp where appropriateMartin Braun2021-06-249-9/+0
| | | | This Boost header is included in some places, despite not being used.
* uhd: Remove all occurences of boost::math::*round()Martin Braun2021-06-2432-101/+104
| | | | | | | Its behaviour is almost identical to std::lround, which we use instead. The only downside of std::lround is that it always returns a long, which we don't always need. We thus add some casts for those cases to make the compiler happy.
* b200: flush receive buffer after getting an overflowMatthew Crymble2021-06-241-1/+3
|
* b200: temporary change to remove stream restart after overflowMatthew Crymble2021-06-241-3/+8
|
* uhd: Use chain's block channel to get power ref keysGrant Meyerhoff2021-06-231-2/+2
|
* fixup! zbx: Fix clang compiler warningsMartin Braun2021-06-231-4/+0
| | | | | The TRACE message is repeated in the zbx_lo_ctrl object and is thus not worth carrying the _chan and _trx attributes.
* lib: deps: Upgrade vendor version of Pybind11 to 2.6.1Martin Braun2021-06-2326-751/+1743
| | | | | | | | | | | | | | | | | | | | | | - Copied include/pybind11 directory over from source repo - Also re-ran remove_comments.py as before This fixes this warning on newer Python libraries: .../internals.h: 200:9: warning: 'PyEval_InitThreads' is deprecated [-Wdeprecated-declarations] PyEval_InitThreads(); ^ /usr/include/python3.9/ceval.h:130:1: note: 'PyEval_InitThreads' has been explicitly marked deprecated here Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void); ^ /usr/include/python3.9/pyport.h:508:54: note: expanded from macro 'Py_DEPRECATED' #define Py_DEPRECATED(VERSION_UNUSED) __attribute__((__deprecated__)) It also obviates the need for patches to Pybind11 to silence clang warnings.
* transport: Fix compiler warning in nirio_linkMartin Braun2021-06-221-2/+0
| | | | | | Remove unused variables. These variables were doubly problematic: They referenced the boost:: namespace, but this file had no more boost includes.
* lmx2572: Fix compiler warningMartin Braun2021-06-221-3/+2
| | | | Unused private field _mux_state.
* debug_dboard: Fix compiler warningMartin Braun2021-06-221-1/+1
| | | | Superfluous 'this' capture.
* zbx: Fix clang compiler warningsMartin Braun2021-06-226-44/+19
| | | | | | | | - Missing override - Superfluous 'this' lambda capture - Register state in zbx_cpld_ctrl was being initialized too late (this is actually a bug depending on compiler version) - Remove lots of unused fields from experts
* zbx: Fix compilation on clang-10Martin Braun2021-06-223-8/+5
| | | | | | The ostream<< overloads where in the wrong namespace to be found by the expert framework. Other compilers are more forgiving; not so clang 10. This enables compilation on that compiler.
* x3xx: Improve image loaderMartin Braun2021-06-221-27/+44
| | | | | | | - When specifying a file path, no longer infer the FPGA type for the logging from the image that is currently loaded. - Use sanitize product names for ni-2974 everywhere were appropriate - Remove some usages of boost::format that weren't doing anything useful
* usrp2: Use explicit template type for std::min<T>StefanBruens2021-06-221-1/+1
| | | | Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
* usrp2: Replace boost::math::iround/math::sign with std::lroundStefanBruens2021-06-221-5/+5
| | | | | | | | | Instead of multiplying zone with the sign repeatedly just make the zone a signed value. See #437, #438 Signed-off-by: Aaron Rossetto <aaron.rossetto@ni.com>
* usrp2: Apply minor cleanups to Boost usage in usrp2Martin Braun2021-06-181-9/+8
| | | | | | | - Inconsistent usage of asio:: or boost::asio:: (now uses the latter consistently) - Removed some usage of boost::format() where it really didn't add any value
* uhd: Add missing channel parameter when reading power ref keysLars Amsel2021-06-181-2/+2
|
* uhd: Add callback for setting sync_sourcesGrant Meyerhoff2021-06-173-0/+35
|
* usrp2: Fix Boost headersMartin Braun2021-06-171-2/+2
| | | | | | | | | On Boost 1.76, this would otherwise fail with an error: [...] .../usrp2_impl.cpp:920:37: error: ‘boost::math’ has not been declared 920 | const int sign = boost::math::sign(new_freq); [...]
* uhd: x400: Honor ENABLE_X400 component flagAaron Rossetto2021-06-151-9/+14
| | | | Don't add X400-related sources to libuhd if they are not requested.
* uhd: Add support for the USRP X410Lars Amsel2021-06-1056-18/+12966
| | | | | | | | | | | | | | | | Co-authored-by: Lars Amsel <lars.amsel@ni.com> Co-authored-by: Michael Auchter <michael.auchter@ni.com> Co-authored-by: Martin Braun <martin.braun@ettus.com> Co-authored-by: Paul Butler <paul.butler@ni.com> Co-authored-by: Cristina Fuentes <cristina.fuentes-curiel@ni.com> Co-authored-by: Humberto Jimenez <humberto.jimenez@ni.com> Co-authored-by: Virendra Kakade <virendra.kakade@ni.com> Co-authored-by: Lane Kolbly <lane.kolbly@ni.com> Co-authored-by: Max Köhler <max.koehler@ni.com> Co-authored-by: Andrew Lynch <andrew.lynch@ni.com> Co-authored-by: Grant Meyerhoff <grant.meyerhoff@ni.com> Co-authored-by: Ciro Nishiguchi <ciro.nishiguchi@ni.com> Co-authored-by: Thomas Vogel <thomas.vogel@ni.com>
* multi_usrp: Factor out make_overall_tune_range() and fix limitsMartin Braun2021-06-093-42/+39
| | | | | | | | | This function had an issue where it might return negative frequency values. A quick fix was to limit it to positive frequencies. Since this function was duplicated between multi_usrp and multi_usrp_rfnoc, this patch also moves it to a common location to not have to fix it twice.
* mpmd: support four linksAndrew Lynch2021-06-082-0/+10
|
* dboard_iface: Fix sleep()michael-west2021-06-031-1/+1
| | | | | | Sleep was incorrectly in nanosecond counts instead of microsecond counts. Signed-off-by: michael-west <michael.west@ettus.com>
* rfnoc: Fix post action behavior of nodesLars Amsel2021-06-031-0/+4
| | | | | | | | | | | When a node has an action callback assigned this must be cleared along with the block removal. Otherwise a post action callback might try to modify node that are already removed which results in an undefined behavior. In particular this one fixes the Unexpected error [ERROR] [CTRLEP] Caught exception during async message handling: map::at when running the multi_usrp_test.py
* rfnoc: Fix MTU prop resolver refactoringAaron Rossetto2021-06-011-8/+70
| | | | | | | | | | | | | | | | | | | | | | | | In 073574e24, the MTU property resolver in `noc_block_base` was refactored to make the resolver's output sensitivity list less broad. The broadness was intentional as a consequence of allowing the MTU forwarding policy to be changed at will, but had the unintended side effect of being incompatible with certain RFNoC graph use cases. The refactoring solved the issues, but added a new restriction that the MTU forwarding policy could only be called once per instance of a NoC block. Unfortunately, that refactoring introduced a bug. By moving the registration of MTU resolvers to `set_mtu_forwarding_policy()`, no resolvers would be added if the MTU forwarding policy was never changed from the default of `DROP` (which is the case for the vast majority of NoC blocks). However, the resolver had code that would run in the `DROP` case to coerce the incoming MTU edge property to be the smaller of the new value or the existing MTU value on that edge. With the resolvers only getting added when the MTU forwarding policy is changed, this coercion behavior would never execute, thus breaking a number of devtests. This commit ensures that the default coercion behavior is always present regardless of whether the MTU forwarding policy is changed or not.