Commit graph

8 commits

Author SHA1 Message Date
Martin Braun
ebd5dd03cf Apply clang-formatting to all C/C++ files
- Used clang-format version 14
- Ran ./tools/clang-formatter.sh apply
2023-08-07 15:35:56 -05:00
Martin Braun
0f15704cb9 rfnoc: graph_utils: Add ability to declare back-edges
rfnoc::connect_through_blocks(), unlike rfnoc_graph::connect(), did not
have an argument to declare a back-edge. This patch remedies this
situation by adding a skip_property_propagation argument that works
exactly as with rfnoc_graph::connect().
2022-02-24 13:39:41 -06:00
Martin Braun
c1e26b4a26 uhd: rfnoc: Let connect_through_blocks() return edge list
This changes the return value of connect_through_blocks() from void to
a list of edges. If the connection can be made, then it will now return
the list of connections between the source block and port.
2022-02-04 13:13:59 -06:00
Martin Braun
bc6b453963 rfnoc: Fix issue in uhd::rfnoc::connect_through_blocks()
When connect_through_blocks() was called on blocks within a single
chain, there was a bug where the chain was incorrectly cropped. In
a standard FPGA image, say one was to use this API call to connect the
radio to the DDC. It would generate a chain of blocks hanging off the
radio as such:

Radio -> DDC -> SEP

What the code should do, and what this fix provides, is that the chain
gets cropped after the DDC, to look like this:

Radio -> DDC

With the current bug, it would assume the chain has a dangling edge, and
incorrectly throw an exception.
Note that this bug would not appear when source and destination block
are on separate chains (i.e., both have an SEP in their chain).

This patch includes minor logging and comment improvements around the
offending lines of code.
2021-12-01 13:34:35 -08:00
Steven Koo
b975885de2 lib: graph_utils: Error on single SEP edge
It could be possible that we only find one SEP connected edge, which
should be invalid.
2020-09-25 11:21:10 -05:00
Martin Braun
05a6b351d7 lib: graph_utils: Fix formatting and compiler warnings
The conditional setting of some variables lead the compiler to assume
they might be used uninitialized. Circumventing compiler warning by
initializing variables to a default value, even if that's not the right
value (they will get set later).

Also applied clang-format to the same code section.

This fixes da1aeaeccc.
2020-09-25 11:21:10 -05:00
Steven Koo
da1aeaeccc rfnoc: enable SEPs with connect_through_blocks
Calling on connect with SEPs in the path is not supported. This change
enables connect_through_blocks to find SEPs in the connection chain
and link the src and dest blocks directly.

Signed-off-by: Steven Koo <steven.koo@ni.com>
2020-08-28 12:28:08 -05:00
Brent Stapleton
2da99fad97 rfnoc: Adding rfnoc_graph utilities
Adding graph_utils to keep rfnoc_graph utilities to contain helper
function and commonly used algorithms for the rfnoc_graph. These
functions aren't core to the rfnoc_graph's functionality, so we'll keep
them out of its API.
2019-11-26 12:21:32 -08:00