aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
Commit message (Collapse)AuthorAgeFilesLines
* Python API: Add bindings for disconnect APIsmichael-west2020-08-071-0/+7
| | | | | | | Add Python bindings for recently added rfnoc_graph::disconnect() methods. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Revert change in streamer initializationmichael-west2020-08-072-2/+2
| | | | | | | Reverting inadvertent change in num_chans argument during tx/rx_streamer_impl construction. Signed-off-by: michael-west <michael.west@ettus.com>
* mpmd: Clean out link_if_mgrMartin Braun2020-08-072-7/+4
| | | | | | | | | The link_if_mgr used to be a factory for Liberio, UDP, and DPDK. Now, Liberio is gone and DPDK is handled by UDP. This makes the class superfluous. Instead of removing the class, we comment on this, and remove any DPDK references from the file.
* rfnoc: Remove M_PI usage to fix Windows buildsSteven Koo2020-08-071-4/+3
| | | | | | M_PI may not exist if _USE_MATH_DEFINES isn't defined before the first include of math.h or cmath on Windows. This changes avoids the issue all together by defining our own PI.
* python: Add Keep One in N block controller bindingsAaron Rossetto2020-08-051-0/+31
|
* rfnoc: Add Keep One in N block supportAaron Rossetto2020-08-052-0/+121
|
* mpmd: Assume mgmt interface can route CHDR packetsSteven Koo2020-08-041-1/+15
| | | | | | | | | The e31x devices don't advertise CHDR interface availability when the low power FPGA is loaded. Since the e3xx and n3xx all route CHDR packets with Virtual NIC forwarding, it's safe to assume that if we can communicate with the mgmt_addr, we can communicate via CHDR too. We can then correctly set the reachability for the e31x from this assumption.
* X300: fix for incorrect PCIe buffer size valuesMatthew Crymble2020-08-043-5/+12
| | | | added extra args to get PCIe buffer sizes from factory method
* x300: change default dboard clock rate from 50 to 100 MHzmattprost2020-08-045-42/+153
| | | | | | | | | | | | | | This sets the reference clock for X300 daughterboards (other than UBX) to 100 MHz by default to improve RF performance. Note: The UBX daughterboard requires a clock rate of no more than the max pfd frequency (50 or 25 MHz depending on the hardware rev) in order to maintain phase synchronization. If a UBX daughterboard is present on the X300, the clock rate for all daughterboards will be set to the pfd frequency by default. This is because of the limitation on X300 that requires the daughterboards to use the same clock rate. Signed-off-by: mattprost <matt.prost@ni.com>
* MPMD: Fix typomichael-west2020-08-041-1/+1
| | | | | | | Fix typo in warning message when DPDK is specified at run time but not enabled at compile time. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Demote MTU message in radio controlmichael-west2020-08-041-1/+1
| | | | | | Change message from warning to debug when spp is greater than MTU. Signed-off-by: michael-west <michael.west@ettus.com>
* multi_usrp: Fix connect/disconnect of RFNoC chainsmichael-west2020-08-041-80/+202
| | | | | | | | | - Added helper methods to connect and disconnect TX and RX chains. - Directly create streamer objects and register local disconnect methods to make sure chains are disconnected and the streamer is removed from the graph when streamers are destroyed. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Added support for destruction of streamersmichael-west2020-08-044-8/+52
| | | | | | | | | | | - Added rfnoc_graph method to disconnect a connection. - Added rfnoc_graph method to disconnect a streamer. - Added rfnoc_graph method to disconnect a port on a streamer. - Added disconnect callback to rfnoc_rx_streamer and rfnoc_tx_streamer. - Registered disconnect callback functions to streamers returned by get_rx_streamer and get_tx_streamer methods. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Add disconnect methods to graphmichael-west2020-08-043-100/+325
| | | | | | | | | | - Added method to disconnect an edge - Added method to remove a node - Fixed algorithm to check edges during connect. Previous code was checking some edges twice and allowing duplicate edges to be created for existing edges. Signed-off-by: michael-west <michael.west@ettus.com>
* RFNoC: Add xport disconnect callbacksmichael-west2020-08-049-41/+112
| | | | | | | | | | | | Transports were not disconnecting their links from the I/O service upon destruction, leaving behind inaccessible send and recv links used by nothing. This led to I/O errors after creating several transports. Added callbacks to transports to automatically disconnect their links from the I/O service when the transport is destroyed. Updated all callers to supply a disconnect callback. Signed-off-by: michael-west <michael.west@ettus.com>
* python: Add replay RFNoC block controller bindingsmattprost2020-08-041-0/+42
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: Add RFNoC replay blockmattprost2020-08-043-201/+529
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: Fix compilation error when tracing enabledAaron Rossetto2020-07-311-2/+2
|
* python: Add siggen RFNoC block controller bindingsAaron Rossetto2020-07-301-0/+38
|
* rfnoc: Add siggen RFNoC block controller supportAaron Rossetto2020-07-302-0/+344
|
* python: Add Switchboard block python bindingsJesse Zhang2020-07-301-0/+21
|
* rfnoc: Add Switchboard block supportJesse Zhang2020-07-302-0/+131
|
* mpm: Default virtual NIC CHDR IP selectionSteven Koo2020-07-302-12/+28
| | | | | This change adds detection for setting the correct internal fpga CHDR IP address when using embedded mode.
* x300: Update maximum bitstream sizeWade Fife2020-07-281-1/+1
| | | | | | Add 2 bytes to account for Vivado update number, in addition to major, minor, and AR. For example the current Vivado version string might be 2019.1.1_AR73068 whereas the previous string was 2018.3_AR71898.
* mpm, mpmd: Bump MPM compat numberAaron Rossetto2020-07-241-1/+1
|
* rfnoc: Support instance overrides in set_properties()Aaron Rossetto2020-07-241-2/+19
| | | | | | | | | | | | | | | | | | | | | | | This commit adds an enhancement to node_t::set_properties() in which the instance argument provided to the function (which normally applies to all properties in the key/value list) can be overridden on a per-property basis using a special syntax. If the key consists of the property name followed by a colon (':') and then a number, the number following the colon is used to determine which instance of the property this set pertains to, and the value passed via the instance parameter is ignored for that property. For example, in the following call: node->set_properties("dog=10,cat:2=5,bird:0=0.5", 1) instance 1 of node's 'dog' property is set to 10, the 1 coming from the instance parameter, instance 2 of the node's 'cat' property is set to 5 due to the override syntax provided in the string, and instance 0 of the node's 'bird' property is set to 0.5 due to its override. If the name/instance pair is malformed, e.g. 'value:=10' or 'value:foobar=10', a runtime error is thrown.
* cmakerc: Remove patch to CMakeRC.cmake (and move it one level up)Martin Braun2020-07-201-0/+1
| | | | | | | UHD's version of CMakeRC.cmake was patched from the upstream (see also 933eca1) to enable -fPIC for the RC targets. This can also be done outside of said file, avoiding us having to carry a patched version of CMakeRC, and using the vanilla upstream version instead.
* uhd: remove liberioRobertWalstab2020-07-205-342/+1
|
* mpmd: remove liberioRobertWalstab2020-07-204-213/+0
|
* filter API: Fix multi_usrp tx callsSteven Koo2020-07-171-4/+2
| | | | | Adding the fix to use fs_path instead of tx_rf_fe_root. This was done to the rx methods and should have been done for the tx ones as well.
* multi_usrp: Add get_radio_control() API callMartin Braun2020-07-163-0/+12
| | | | | This is an advanced API call that allows direct underlying access to the radio_control object for RFNoC devices.
* python: Add moving average RFNoC block controller bindingsmattprost2020-07-161-0/+24
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: Add Moving Average block controllermattprost2020-07-162-0/+107
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* mpm,mpmd: Add iface type and mtu info for UDP linksAlex Williams2020-07-162-2/+15
| | | | | | This changes MTU handling for the "internal" UDP type. Because MPM echo packets will not be returned for internal NICs, use the iface's programmed MTU instead.
* python: Add bindings for C++ CHDR ParserSamuel O'Brien2020-07-162-19/+372
| | | | | | | | | | | | | This commit adds pybind11 glue code for the userland chdr parsing code introduced in the uhd::utils::chdr namespace. Additionally, it moves some pybind11 adapter code to a common pybind_adaptors.hpp file which originally existed in the cal_python.hpp file. This commit also adds unit tests for the python bindings using a captured wireshark trace which is located in rfnoc_packets_*.py and some handwritten packets in hardcoded_packets.py Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* chdr: Assert Ctrl Packet Size Before SerializingSamuel O'Brien2020-07-161-3/+4
| | | | | | | | | | | | | | This commit alters the ctrl_payload#serialize function to assert the serialized length of the packet fits inside the buffer before writing. Originally, the function writes the data and then asserts that the final pointer position isn't further than the end of the buffer. While this works, if it were to fail, that means we have already caused undefined behavior by writing to some random memory location, which isn't good practice. This commit is possible now that the get_length method exists. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* utils: Expose CHDR Parsing APISamuel O'Brien2020-07-134-0/+303
| | | | | | | | | | | | This commit introduces a new public api in uhd::utils which allows serializing and deserializing chdr packets. As far as testing, this commit adds the chdr_parse_test test. It uses a wireshark trace located in rfnoc_packets_*.cpp as well as hand coded packets from hardcoded_packets.cpp to test the serialization and deserialization process Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* utils: Expose CHDR Types in Public APIrobot-rover2020-07-1317-893/+27
| | | | | | | | | | This commit exposes uhdlib/rfnoc/chdr_types.hpp in the public includes. Additionally, it takes some types from uhdlib/rfnoc/rfnoc_common.hpp and exposes them publicly in uhd/rfnoc/rfnoc_types.hpp. Finally, one constant is moved from uhdlib/rfnoc/rfnoc_common.hpp to uhd/rfnoc/constants.hpp Signed-off-by: robot-rover <sam.obrien@ni.com>
* rfnoc: Rename chdr_packet to chdr_packet_writerSamuel O'Brien2020-07-1316-56/+57
| | | | | | | | | It would be confusing to have two classes named chdr_packet. As it makes more sense to name the new public chdr parser class chdr_packet, the internal uhd::rfnoc::chdr::chdr_packet class is being renamed to chdr_packet_writer to better represent its functionality. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* utils: Fix prefix determination in get_lib_path()Ryan Volz2020-07-131-1/+3
| | | | | | | | | | | | | | | | | | | | get_lib_path() uses the libuhd location on disk to dynamically determine the installation prefix at runtime. This fix normalizes the libuhd path before any path operations are done to extract the library directory and then prefix directory. Previously, using a non-normalized library path, the returned prefix directory would be incorrect in some cases (e.g. when loaded through GNU Radio). In these error cases, the libuhd path would be $PREFIX/lib/./libuhd.so (with a no-op /. inserted) which would result in a technically correct library directory of `$PREFIX/lib/.` but an incorrect prefix directory of `$PREFIX/lib`. With the normalization fix, the libuhd path is corrected to $PREFIX/lib/libuhd.so and the subsequent path manipulation to get the library and prefix directories will work as intended.
* ad9361: Fix mask for product ID checkBrian Padalino2020-07-091-1/+1
| | | | | | | | The product ID check should be masked with 0xF8 and checked to be 0x08. With a device off and weak pull-ups, the readback would always read 0xFF, passing the ID check when it obviously wasn't there. Extending the mask to be 0xF8 shows that both 0's and 1's are read back from the device.
* uhd: Make sure generated file is closedRyan Volz2020-07-091-1/+2
| | | | | | Letting garbage collection close the file works when using CPython, but it fails with PyPy which uses a different garbage collection strategy. This makes sure that the file is closed by using a file context manager.
* cores: Remove shutdown function from spi_core_3000Martin Braun2020-07-082-21/+0
| | | | | | | | This effectively reverts 0433e74. The set_shutdown() and get_shutdown() API calls do not have a counterpart in simple_spi_core.v, which is typically the HDL endpoint for this core driver, and thus could write to a non-existent register. They are also never used in UHD, nor are they part of the spi_iface interface.
* e3xx: Remove superfluous commentsMartin Braun2020-07-081-11/+0
| | | | This removes some comment that include code that still gets executed.
* rfnoc: Add Log Power RFNoC block supportAaron Rossetto2020-06-292-0/+59
|
* python: Add window RFNoC block controller bindingsAaron Rossetto2020-06-291-0/+22
|
* rfnoc: Add window RFNoC block controllerAaron Rossetto2020-06-292-0/+144
|
* CHDR: support multiple CHDR widthsAndrew Lynch2020-06-267-28/+86
| | | | | Support management payloads on busses over 64 bits Automatically set CHDR width for mpmd_link_if_ctrl_udp
* uhd: improved handling of empty serial number hintsMatthew Crymble2020-06-261-0/+2
| | | | | This allows device::find() calls to proceed even when encountering an empty/invalid serial number or serial number device argument hint.
* uhd: Implement discoverable_features for radio_controlLane Kolbly2020-06-251-1/+3
| | | | | radio_control doesn't implement any discoverable_features in particular, but this gives it the API to do so.