aboutsummaryrefslogtreecommitdiffstats
path: root/host
Commit message (Collapse)AuthorAgeFilesLines
* RFNoC: Add xport disconnect callbacksmichael-west2020-08-0410-43/+122
| | | | | | | | | | | | 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-043-0/+45
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* tests: Add Replay Block controller unit testmattprost2020-08-042-0/+764
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: Add RFNoC replay blockmattprost2020-08-045-202/+855
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* fpga: rfnoc: Add RFNoC Replay blockWade Fife2020-08-041-0/+63
|
* python: Fix pyuhd to include subpackagesSamuel O'Brien2020-08-041-2/+6
| | | | | | | | | | | | | | | | | Originally, the setup.py file for pyuhd listed only one package packages=['uhd'] the setuptools docs: https://setuptools.readthedocs.io/en/latest/setuptools.html#using-find-packages specify that this should also include subpackages, i.e uhd.dsp, uhd.usrp, etc. Currently, when packaging libpyuhd, we are not including the subpackages, and then when you run `import uhd`, it fails because uhd.usrp and uhd.dsp don't exist. This commit alleviates this issue by using setuptools.find_packages like the docs recommend. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* cmake: don't try to determine runtime python version when cross compilingJoerg Hofrichter2020-08-041-9/+22
| | | | | | When cross compiling, the architecture of the runtime python interpreter does not match the host architecture. Therefore, don't try to detect it and set it to the min. supported python version instead.
* cmake: find python in sysroot path firstJoerg Hofrichter2020-08-041-0/+8
| | | | | | Set CMP0094 policy to NEW to make sure Python3 is first found in the SDK's sysroot if both the sysroot and the native paths are included in the PATH variable.
* cmake: tests: Support qemu also for python based testsJoerg Hofrichter2020-08-042-35/+71
| | | | This requires python3 to be installed in the target sysroot
* rfnoc: Fix compilation error when tracing enabledAaron Rossetto2020-07-311-2/+2
|
* example: Check for failure in tx_samples_from_fileSamuel O'Brien2020-07-311-3/+9
| | | | | | | | | | | I was using this example for testing with the simulator. If there is a flow control failure, the original example would just silently finish, outputing the message "Done!" (Not even printing a timeout message). This commit asserts that the number of samples sent is equal to the number of samples provided. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* utils: Use absolute paths in image builder build()steviez2020-07-311-2/+2
| | | | | | | A segment of the build() function updates the working directory. This change converts several paths to absolute paths to avoid having a relative path (such as one containing up-level references) deviate from its' intended meaning after the directory change.
* tests: Add unit test for siggen RFNoC block controllerAaron Rossetto2020-07-302-0/+352
|
* python: Add siggen RFNoC block controller bindingsAaron Rossetto2020-07-303-0/+41
|
* rfnoc: Add siggen RFNoC block controller supportAaron Rossetto2020-07-305-0/+553
|
* fpga: rfnoc: Add Signal Generator RFNoC blockWade Fife2020-07-301-0/+55
|
* python: Add Switchboard block python bindingsJesse Zhang2020-07-303-0/+24
|
* rfnoc: Add Switchboard block unit testsJesse Zhang2020-07-302-0/+161
|
* rfnoc: Add Switchboard block supportJesse Zhang2020-07-305-0/+181
|
* fpga: Add Switchboard RFNoC blockJesse Zhang2020-07-301-0/+41
|
* 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.
* docs: Fix daughterboard page formattingMartin Braun2020-07-241-3/+3
|
* mpm, mpmd: Bump MPM compat numberAaron Rossetto2020-07-241-1/+1
|
* rfnoc: Support instance overrides in set_properties()Aaron Rossetto2020-07-246-5/+85
| | | | | | | | | | | | | | | | | | | | | | | 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.
* docs: Update PCIe xport instructions for NI ReposSteven Koo2020-07-201-46/+100
| | | | | This is an update to the documentation for installing the RIO PCIe transport infrastructure using the NI Linux Device Driver repository.
* cmakerc: Remove patch to CMakeRC.cmake (and move it one level up)Martin Braun2020-07-202-1/+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-207-378/+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-165-0/+33
| | | | | This is an advanced API call that allows direct underlying access to the radio_control object for RFNoC devices.
* multi_usrp: Fix some documentationMartin Braun2020-07-161-1/+3
|
* fpga: rfnoc: Add RFNoC Moving Average blockWade Fife2020-07-161-0/+55
|
* python: Add moving average RFNoC block controller bindingsmattprost2020-07-163-0/+27
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* tests: Add unit test for Moving Average RFNoC blockmattprost2020-07-162-0/+111
| | | | Signed-off-by: mattprost <matt.prost@ni.com>
* rfnoc: Add Moving Average block controllermattprost2020-07-165-11/+182
| | | | 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 payload agnostic methods to CHDR APISamuel O'Brien2020-07-163-1/+62
| | | | | | | | | | | | | | | | | | | | | | | | In the c++ api, methods like chdr_packet#set_payload() and chdr_packet#get_payload() are templated over the payload type (payload_t). For methods like set_payload, they are overloaded by the type of an argument, so in pybind we can just explicitly instaniate the template for each payload_t and register it with pybind under the same name. At runtime, pybind looks at the type of the argument and decides which to call. The problem arose with methods like get_payload, which are overloaded by return type. In C++, the compiler can infer the template type by the type of the target at the call site. In python, there is no way for the pybind to determine which variant of get_payload to call, and it would crash. Previously, the workaround for this was to declare get_payload_ctrl, get_payload_mgmt, etc, but this was rather anti-pythonic. This commit utilizes the fact that python methods don't have a constrained return type to resolve this. Now, get_payload will call a python method which looks at the chdr_packet#header#pkt_type field to determine which variant of get_payload to call and returns that type of payload_t. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* python: Document CHDR Test GenerationSamuel O'Brien2020-07-162-19/+44
| | | | | | | | | The script_test.py script is used to generate data .cpp files from a wireshark trace for the C++ CHDR Parser tests. This commit expands the script to also generate the data .py files for the Python CHDR Parser tests. Signed-off-by: Samuel O'Brien <sam.obrien@ni.com>
* python: Add bindings for C++ CHDR ParserSamuel O'Brien2020-07-1611-19/+47447
| | | | | | | | | | | | | 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-1317-13/+48472
| | | | | | | | | | | | 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-1322-55/+109
| | | | | | | | | | 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-1318-74/+76
| | | | | | | | | 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.
* utils: Make uhd_config_info print help by defaultDerek Kozel2020-07-091-1/+1
|
* 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.
* docs: n3xx: Include WX in table of N320 imagesSteve Czabaniuk2020-07-091-8/+8
|
* docs: Add comments on mpm.confMartin Braun2020-07-092-2/+65
| | | | | This adds some more details on mpm.conf, what it does, how it works, and which keys it accepts.