aboutsummaryrefslogtreecommitdiffstats
path: root/host
Commit message (Collapse)AuthorAgeFilesLines
* mpmd: Name the claimer task threadMartin Braun2019-11-261-13/+15
| | | | | We call set_thread_name() on the claimer loop so the thread can be identified using OS utilities.
* x300: pcie manager updatesVirendra Kakade2019-11-262-129/+93
| | | | Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* rfnoc: fix packet swapping from U32 to U64Virendra Kakade2019-11-261-5/+8
| | | | Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* rfnoc: fix incorrect long fifo wait timeoutsVirendra Kakade2019-11-261-2/+2
| | | | | | | This fixes behavior where we would get long 100 sec timeouts on fifo waits instead of 100 ms timeouts. Signed-off-by: Virendra Kakade <virendra.kakade@ni.com>
* mg: Turn the set-lock into a recursive mutexMartin Braun2019-11-262-15/+15
| | | | | Individual API calls might have to call each other (e.g., like set_rate() will call set_rx_frequency()), which would cause a deadlock.
* mg: Always set MCR on both daughterboardsMartin Braun2019-11-263-12/+33
| | | | | | | | | | | | | | | | | The N310 cannot set the MCR for its daughterboards separately. This patch modifies the radio block controller such that any block controller, when requested to change the master clock rate, will first change Radio 0, and then Radio 1. This fixes the following issues: - In multi_usrp, calling set_master_clock_rate() will not necessarily call set_rate() on the radios in any particular order, which will break when calling Radio 1 first - In RFNoC apps, it wasn't possible to run off of slot B alone without this change. Note: When calling set_rate() on one radio, the other radio is in an invalid state until its set_rate() is also called.
* lib: Add DPDK service queueAlex Williams2019-11-262-0/+302
| | | | | | | This is a data structure intended for use by the DPDK I/O service. It uses DPDK's lockless ring in multi-producer, single-consumer mode to allow clients to submit requests to the DPDK I/O service's worker thread. Clients can specify a timeout for the requests to be fulfilled.
* rfnoc: fix invalid access when sending packet with no samplesCiro Nishiguchi2019-11-261-1/+3
|
* mpmd: Fix get_mboard_name()Martin Braun2019-11-261-1/+1
| | | | | It used to produce the individual name of the USRP, but it should return a product name.
* rfnoc: Fix RAM port direction in YAMLWade Fife2019-11-269-98/+98
|
* examples: gpio: Replace get_time_now() with steady_clock::now()Martin Braun2019-11-261-12/+17
| | | | | | | | | | The gpio example would continously call get_time_now() to time a loop. There is no need to query a device here, so we query the system timer instead. This fixes an issue where the large amounts of control traffic could slow down TX, causing the TX and FDX tests to fail. This was only ever seen on the X300_HG over 1GigE.
* examples: gpio: Fix minor issuesMartin Braun2019-11-261-3/+3
| | | | | - Use GPIO_BIT(x) instead of 1<<x where appropriate - Correctly use rx_buff/tx_buff in recv/send, respectively
* n310: Fix GPIO registersMartin Braun2019-11-261-3/+6
| | | | | This enables the use of the dboard and FP GPIOs. The problem was that the register offset of 8 was not encoded.
* mg/rh/rfnoc: Harmonize peripheral registersMartin Braun2019-11-264-21/+29
| | | | | - Move the SPI addresses out of radio_control_impl - Fix the GPIO address spaces for N310/N300
* gpio_atr_3000: Fix return value for pin control registerMartin Braun2019-11-261-1/+3
| | | | | | | | | | | | | | | This fixes a bug where get_gpio_attr(bank, "CTRL") would return the inverted value of what was written. Reason is that the underlying register was an ATR disable register. The fix is to invert the cached values of the register. Now, the following Python code will work: >>> U = uhd.usrp.MultiUSRP("type=x300") >>> atr_enable = 0xF # Enable ATR on lower 4 pins, rest is GPIO >>> U.set_gpio_attr("FP0A", "CTRL", atr_enable) >>> U.get_gpio_attr("FP0A", "CTRL") == atr_enable True
* examples: benchmark_rate.py: Add ?x_stream_args argsMartin Braun2019-11-261-2/+9
| | | | | | | | | | | | | This allows adding stream args to the Python version of benchmark_rate in the same way as for the C++ version, e.g.: python3 ./benchmark_rate.py \ --args addr=192.168.40.2,num_poll_offload_threads=4 \ --rx_stream_args \ recv_offload=1,num_recv_frames=32,recv_offload_wait_mode=poll \ --tx_stream_args \ send_offload=1,num_send_frames=32,send_offload_wait_mode=poll \ [... other arguments ...]
* detail::graph: Add shutdown capabilityMartin Braun2019-11-263-14/+35
| | | | | | | | | | | | In the existing graph, when the shutdown was simply a release. However, any outstanding actions would trigger warnings (because released graphs aren't supposed to still have actions being passed around), which would sometimes be visible at the end of an application. This is a safer solution than simply releasing, because it explicitly sets a shutdown flag that all graph-affecting functions (property propagation and action handling) respect. Once the flag is set, the graph can no longer be booted up again.
* examples: gpio: Add note on which bank is being usedMartin Braun2019-11-261-0/+1
| | | | | This will print the currently-used GPIO bank's name before starting the test.
* devtest: Add test_messages_test to X310Martin Braun2019-11-263-12/+14
| | | | | | - Fixes issues with test_messages_test (it had inverted the pass/fail condition) - Improve Pylint scores in affected files
* devtest: Use with() statement to open filesMartin Braun2019-11-261-5/+9
| | | | | | | | | | | | | | This fixes warnings such as this during devtest: /home/mbr0wn/src/uhddev/host/tests/devtest/uhd_test_base.py:112: ResourceWarning: unclosed file <_io.TextIOWrapper name='./results_x300_F457AD.log' mode='r' encoding='UTF-8'> self.results = yaml.safe_load(open(self.results_file).read()) or {} /path/to/uhd/host/tests/devtest/uhd_test_base.py:150: ResourceWarning: unclosed file <_io.TextIOWrapper name='./results_x300_F457AD.log' mode='w' encoding='UTF-8'> yaml.dump(self.results, default_flow_style=False)) ok
* examples: Send only single packets in test_messagesMartin Braun2019-11-261-3/+3
| | | | | | | | | | | | | | | | For the burst ACK test, test_messages would send 3 packets. However, that assumes that the underlying link is fast enough to send three packets in time, and some devices are hard to operate without underruns without also specifying a start-of burst timestamp. Often, test_messages would report that no ACK was received, but instead, an underrun was received. test_messages also doesn't need to send three packets. The three packets came from the "start of burst" flag, which no device in UHD supports. The change is thus to send a single packet with an EOB marker for the burst ACK test. This will work regardless of the link speed and CPU power.
* e310: Fix issues in MPM and UHDMartin Braun2019-11-261-7/+3
| | | | | | | | | | | - Remove superfluous INFO logging - Improve formatting in many places - Improve Pylint score in various places - Add tear_down to DB object - Simplify custom EEPROM code for E310 - Fix time source selection code - Remove references to GPS_CTRL and GPS_STATUS (are E320 only) - Move clock source control out of MboardRegs object
* mpm/mpmd: Remove token requirement for device infoMartin Braun2019-11-261-2/+2
| | | | | This removes the token requirement for get_proto_ver() and get_chdr_width().
* examples: Update x310_rfnoc_image_core.yml exampleWade Fife2019-11-261-82/+99
|
* rfnoc: Update YAML to expose memory clock to blocksWade Fife2019-11-268-71/+71
|
* rfnoc: Replace DDC/DUC YAML variants with single versionWade Fife2019-11-264-144/+10
|
* rfnoc: Fix YAML block settingsWade Fife2019-11-2611-278/+199
|
* rfnoc: Add FIR block YAMLWade Fife2019-11-261-0/+61
|
* rfnoc: Rename thread affinity argsCiro Nishiguchi2019-11-263-73/+73
| | | | | | Rename thread affinity args such that they do not end with an integer. Arg names ending with an integer are interpreted as being targeted at a specific motherboard index in device_addr methods.
* uhd: Allow device args that have an integer in the nameCiro Nishiguchi2019-11-261-1/+5
| | | | | | Allow device args that contain an integer within the name, such as recv_offload_thread_0_cpu. Previously this would cause an invalid format exception.
* tests: Add check for life on DPDK portAlex Williams2019-11-262-0/+62
|
* lib,tests: Remove old DPDK files from buildAlex Williams2019-11-264-40/+8
| | | | The DPDK files are left behind as a reference, for now.
* transport: Add new base for DPDK links, based on 18.11Alex Williams2019-11-263-0/+956
| | | | | | | | | | | | dpdk_ctx represents the central context and manager of all memory and threads allocated via the DPDK EAL. In this commit, it parses the user's arguments, configures all the ports, and brings them up. dpdk_port represents each DPDK NIC port's configuration, and it manages the allocation of individual queues and their flow rules. It also would provide access to an ARP table and functions for handling ARP requests and responses. The flow rules and ARP functions are not yet implemented.
* docs: Change DPDK version to 18.11 and make args use underscoresAlex Williams2019-11-264-33/+52
| | | | | Swap out hyphens for underscores in the DPDK args. Also update list of distributions with the correct DPDK version in the repos.
* rfnoc_graph: Modify find_blocks() to sort return valueMartin Braun2019-11-263-38/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch, the elements of of the return value of find_blocks() are sorted lexicographically (specifically, using uhd::rfnoc::block_id_it::operator<()). The underlying block_container class stores the blocks in an unordered set, so the return value for find_blocks() was always sorted randomly. multi_usrp_rfnoc had to sort the return values every time find_blocks() was used to get a useful return value. Because find_blocks() had no contract for the order of returned blocks, this change simply sorts the return value before returning it. multi_usrp_rfnoc is modified to remove all the sorts that are now superfluous. A good way to see the change is to run uhd_usrp_probe, which will now contain content like this: | _____________________________________________________ | / | | RFNoC blocks on this device: | | | | * 0/DDC#0 | | * 0/DDC#1 | | * 0/DUC#0 | | * 0/DUC#1 | | * 0/DmaFIFO#0 | | * 0/Radio#0 | | * 0/Radio#1 Assuming the blocks don't change, the order of this list will always be the same following this patch. Note that the order is unrelated to the order on the control crossbar, which it never was.
* multi_usrp: Fix GPIO bank selectionMartin Braun2019-11-261-11/+68
| | | | | | | | | | When calling a multi_usrp object like this: usrp->set_gpio_attr("TXB", "CTRL", 0xFFFF); Previously, it would only be able to address daughterboard A. Now, there is a full backward-compatible solution (compatible with 3.15), that will address either daughterboard's GPIOs.
* examples: gpio: Add --list-banks optionMartin Braun2019-11-261-0/+9
| | | | | | | The gpio example can now list all available banks before running tests. Use like this: gpio --args $args --list-banks
* image builder: Add ability to pick up extra Makefile.srcs from YAMLSMartin Braun2019-11-263-1/+24
| | | | | | | | | | | | | | The blocks that are neither OOT, nor core blocks (like the DDC/DUC, etc.) require additional info to find their appropriate Makefile.srcs files. We don't include them in every build, to avoid building IP for the FFT, FIR, and other blocks when they're not needed. However, those blocks are in-tree, and don't follow the same directory structure as out-of-tree modules, either. We therefore allow the YAML files for those blocks (which are shipped with UHD) to contain a path hint to their appropriate Makefile.srcs. The image builder uses those paths to amend the `make` command appropriately.
* utils: image builder: Factor out some data to top of image_builder.pyMartin Braun2019-11-261-31/+41
| | | | | For easier maintenance, some constants like paths and maps were moved to the top of the Python file.
* liberio: porting to I/O servicesBrent Stapleton2019-11-261-11/+2
| | | | Fixes 85f0551 ("rfnoc: Add I/O service manager to X300 and MPMD")
* rfnoc: Make polling I/O service not block on flow controlCiro Nishiguchi2019-11-2611-86/+193
| | | | | | Add a new method to io_service::send_io to check whether the destination is ready for data, to make it possible to poll send_io rather than block waiting for flow control credits.
* rfnoc: Make I/O services relinquish CPU while waitingCiro Nishiguchi2019-11-264-25/+140
|
* rfnoc: image builder: Fix include pathsMartin Braun2019-11-262-6/+16
| | | | | | The -I option was broken in multiple ways: - Multiple -I options would only keep the last one - The call to make did not actually append RFNOC_OOT_MAKEFILE_SRCS
* utils: blocktool: Fix blocktoolWade Fife2019-11-2625-585/+1402
| | | | | | | | | | - Fix mako paths to run from anywhere - Correct code errors and clean up generated code - Add support for port parameters - Add support for axis_data interface - Fix NoC shell reset handling - Replace Python functions with Verilog $clog2 - Allow input and output to share port name
* examples: benchmark_rate: Add --rx_spp and --tx_sppMartin Braun2019-11-261-5/+23
| | | | These command line arguments control the spp values used for streaming.
* multi_usrp: Add set_rx_spp() callMartin Braun2019-11-263-2/+45
| | | | | | | | This API call is a more explicit way of setting the spp than passing in an spp value in the args of the stream args when creating streamers. For pre-RFNoC devices, this is done by injecting the spp arg back into the stream args. For RFNoC devices, the set_property() call on the radio is called.
* utils: image_builder: Support parameterized number of ports on blocksWade Fife2019-11-265-47/+144
|
* rfnoc: xports: Count FC bytes as multiples of CHDR widthMartin Braun2019-11-266-17/+43
| | | | | | | | SEPs on the FPGA can only occupy multiples of the CHDR width in their FIFOs, unlike SW, where buffers are stored in RAM and can be aligned anyhow. Therefore, we align the counting of bytes for FC purpose and count multiples of CHDR width instead of the true number of bytes per packet.
* rfnoc: Restrict to inline I/O service based on link restrictionsCiro Nishiguchi2019-11-263-1/+69
| | | | | For links that do not support releasing buffers out of order, restrict the I/O service manager to always select the inline I/O service.
* rfnoc: Use graph_utils in multi_usrp chan generationBrent Stapleton2019-11-261-113/+142
|