Commit graph

34 commits

Author SHA1 Message Date
Martin Braun
ee520a9df5 uhd: Apply clang-format against all .cpp and .hpp files in host/
Note: template_lvbitx.{cpp,hpp} need to be excluded from the
list of files that clang-format gets applied against.
host/lib/dep is also excluded from this change.
2020-04-17 15:02:40 -07:00
Martin Braun
46c0e95a86 rfnoc: Read cmd FIFO size from blocks & configure ctrl_iface
This requires noc_shell compat number 6.0. It will allow sending as many
command packets, but no more, than there is space.

Updated FPGA images for devices:
- X310/X300
- N300/N310/N320
- E310/E320
2019-09-04 20:28:04 -07:00
Sugandha Gupta
fe3fa1dd31 device3: Constraint send/recv_frame_size based on down/upstream MTU
We need to properly contraint the send/recv_frame_size based on the
minimum MTU of all the down/upstream blocks. This fixes the issue with
E310 tx/rx streaming as it has smaller MTU sizes than the other usrps.
2019-05-01 15:17:23 -07:00
michael-west
324c6d37da fixup! RFNoC: More graph traversal fixes 2019-01-31 13:47:31 -08:00
michael-west
13663f459d RFNoC: More graph traversal fixes
- Store number of input and ouptput ports from block definition.
- Use number of input and ouptut ports for graph traversal rather
  than number of connected blocks.
- Fixes DAC synchronization failure errors when using only one TX
  channel on X300.

Signed-off-by: michael-west <michael.west@ettus.com>
2019-01-31 13:47:31 -08:00
Martin Braun
6bd47c9692 lib: rfnoc: apply clang-format
This is a continuation of 967be2a4.

$ clang-format -i -style=file host/lib/rfnoc/*.cpp
2019-01-17 18:03:42 -08:00
Brent Stapleton
3d9ff5b34c Device3: Fix block control flushing
- Factor out the _start_drain helper function, which starts flushing
data out of the block. We should always be disabling flow control after
we write to the flushing registers.
- Always attempt to flush when calling the _flush function. Previously,
we would check if data appeared to be moving when _flush was called,
and only write to the flush registers if data was moving. However, if
data is stuck for some reason (for example, the block ran out of flow
control credits), this check will give us a false positive, and we
won't flush. Instead, we need to always begin the flushing process,
then check those counters, and return once the counters stop changing.

Note: we need to start flushing before disabling flow control so that
the flushed data isn't flooded onto the crossbar.

Co-authored-by: michael-west <michael.west@ettus.com>
Co-authored-by: Sugandha Gupta <sugandha.gupta@ettus.com>
2018-12-17 16:57:10 -08:00
Brent Stapleton
ee369f5f55 Device3: Set default block control response SIDs
In the block controllers, set the default response SIDs for input and
output ports. If we don't do this, the blocks may send their responses
to other blocks' responses ports.

For example, without this change, the DDC may send an error packet to
port 0x0000, which is assigned to the DmaFIFO. With this change, the
DDC would send that packet to 0xFFFF, which isn't assigned to any other
block.
2018-12-17 16:57:10 -08:00
Trung Tran
12dd0939fc block_ctrl_base: add UHD_SAFE_CALL to destructor
This will stop the exception throw during destructor of E310 where
new FPGA image(idle image) is load.
2018-10-24 15:21:21 -07:00
Trung N Tran
d5c6e34bd3 RFNoC: Convert SR_READBACK_REG_FIFOSIZE to bytes
Change the RB_FIFOSIZE register to store the FIFO size in bytes
instead of log2 of bytes.
2018-08-22 14:31:34 -07:00
Ashish Chaudhari
8b16ab706f rfnoc: Enabled SW flush mechanism impl'd in noc_shell
- UHD will now "disconnect" the noc_block data-path from
  the crossbar when the block's dtor is invoked. This allows
  long running or slow blocks to empty out rapidly during
  teardown.
- UHD will also attempt to flush at init time in case a block
  is destroyed abnormally. The goal of the flush mechanism is
  to not lock up the FPGA
- noc_shell compat number is now 3
2018-07-24 14:39:08 -07:00
Martin Braun
c093665042 UHD: Update copyright dates 2018-06-22 18:42:11 -07:00
Michael West
9085644bd1 X300: Temporary suppression of warning regarding number of input buffers 2018-05-15 11:35:56 -07:00
Trung N Tran
6038a7af68 fixup! rfnoc: Update logging in some blocks 2018-03-30 18:08:57 -07:00
Martin Braun
9dddec48e7 rfnoc: Update logging in some blocks
Updated the following blocks and components: Radio, DmaFIFO,
block_ctrl_base and node_ctrl_base, blockdef_xml_impl, device3_impl.
No functional changes.

- Demoted some log messages
- Consistent log style (use unique_id())
- Some adaptation of coding style where close to log statements
2018-03-30 14:22:33 -07:00
Martin Braun
49520bfecb rfnoc: ctrl_iface cleanup
- ctrl_iface is now longer a wb_iface. All it can do now is send command
  packets, and receive responses to those.
- ctrl_iface does not store command time or tick rate
- wb_iface_adapter is no longer a set of functors, but a wrapper around
  ctrl_iface. Command times are stored once, in the block.
- DMA FIFO and radio block controllers have an easier time getting
  access to a timed_wb_iface
2018-03-16 10:48:46 -07:00
Martin Braun
6652eb4a03 uhd: Move internal headers to uhdlib/
To avoid the proliferation of additional include directories and
multiple ways of including project-local headers, we now default to
moving all headers that are used across UHD into the uhdlib/
subdirectory.

Some #include statements were also reordered as they were modified for
closer compliance with the coding guidelines.

Internal cpp source files should now include files like this:

    #include <uhdlib/rfnoc/ctrl_iface.hpp>

Reviewed-by: Ashish Chaudhari <ashish.chaudhari@ettus.com>
2018-03-14 15:17:44 -07:00
Andrej Rode
3645139e7d uhd: Fix some log statements
Some log statements were incorrectly using multi-line log statements.
2018-03-07 16:16:42 -08:00
Martin Braun
ae5211d71d uhd: Update license headers
All copyright is now attributed to "Ettus Research, a National
Instruments company".

SPDX headers were also updated to latest version 3.0.
2018-02-19 16:54:52 -08:00
Martin Braun
f15dbc0484 rfnoc: Check noc_shell compat number at runtime 2018-02-19 14:51:47 -08:00
Martin Braun
6f8acc07c6 rfnoc: Fix named readback of user_reg_read32()
Thanks to github user mdmikh for pointing out problem and fix.
2018-01-05 14:30:31 -08:00
Martin Braun
4f948e2c8b Move all license headers to SPDX format. 2017-12-22 10:45:51 -08:00
Martin Braun
47cdd6319c uhd: Replaced many lexical_cast with appropriate C++11 equivalents 2017-06-29 13:40:07 -07:00
Martin Braun
2790b51f30 Merge branch 'maint' 2017-04-13 15:33:03 -07:00
Derek Kozel
d1596dc40b rfnoc: Add set_command_time hook to radio block 2017-04-13 15:30:13 -07:00
Andrej Rode
21aad77c9c utils: introduce new logging API and remove msg API 2017-02-20 17:13:15 -08:00
Andrej Rode
26cc20847c uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based
for-loops are now usable for UHD development.
2017-02-10 16:44:33 -08:00
Martin Braun
52ca2e0b80 Merge branch 'maint' 2017-01-17 10:00:47 -08:00
Andrej Rode
6e3939f4a5 lib: remove statements after throw 2017-01-12 15:15:37 -08:00
Martin Braun
fc54c27b48 Merge branch 'maint' 2016-11-28 12:17:39 -08:00
Martin Braun
f00463d2c3 rfnoc: Matched signatures for clear() 2016-11-28 12:17:12 -08:00
Martin Braun
1bd5f44de5 rfnoc: Removed transport endianness as make arg
This is only confusing, since the blocks do not have to care about
endianness. The control interface needs to know (and takes care of it
internally), and the streaming transport does the same (and does not
directly connect to blocks).

Reviewed-By: Michael West <michael.west@ettus.com>
2016-11-09 14:59:14 -08:00
Martin Braun
99c2730bc9 Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
  stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
  compilers support that).
2016-11-08 08:02:22 -08:00
Martin Braun
3bf4b000f7 Merging RFNoC support for X310 2016-08-09 12:42:52 -07:00