aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/rfnoc_propprop_test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* tests: rfnoc: Add another loop graph testMartin Braun2022-04-071-0/+110
| | | | | | This test mimics the Radio <-> Replay loop graph. Because we need one back-edge in this graph, this test makes sure the atomic item sizes still resolve.
* rfnoc: Modify prop. propagation algorithm (back-edge resolution)Martin Braun2022-04-071-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the property propagation algorithm would first forward and resolve properties only along forward edges. Then, we would check that properties also align across back-edges. The assumption is that graphs are always structured in a way such that back-edges would align when the resolution is done. However, for the following graph, this would fail: Radio ---> Replay ^ | +---------+ The reason is that the radio block and the replay block both have an "atomic_item_size" property, which needs to be resolved both ways. If the default atomic_item_size is 4 for the radio, and 8 for the replay block, then the input atomic_item_size on the radio will never be aligned with the output atomic_item_size of the replay block, and there is no other mechanism to align those. The solution is to run the edge property propagation and resolution twice, first for the forward edges, then for the back-edges. For graphs that would previously work, this makes no difference: The additional step of propagation properties across the back-edges will not dirty any properties. However, for graphs like the one above, it will provide an additional resolution path for properties that are otherwise not connected.
* rfnoc: Add CHDR width to make argsMartin Braun2021-11-121-0/+2
| | | | | | | This provides every block controller with a copy of its CHDR width. Note: mock blocks always get configured with a 64-bit CHDR width, to retain API compatibility.
* tests: Add MTU forwarding policy restriction unit testAaron Rossetto2021-05-181-0/+58
|
* host: Update code base using clang-tidyMartin Braun2021-03-041-9/+9
| | | | | | | | | The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
* tests: Add UT for node removal prop resol'n restorationAaron Rossetto2020-11-201-0/+53
|
* tests: Add unit test for USE_MAP prop forwarding policyAaron Rossetto2020-05-281-1/+111
| | | | | | | | | | | | | | | This commit adds a unit test for the USE_MAP property forwarding policy. It also adds a pair of new mock RFNoC nodes for use in unit testing: - mock_edge_node_t is a node with a configurable number of input and output ports each having an edge property named 'prop' associated with each. The node is also able to source actions from any of its edges and records incoming actions in a map. - mock_routing_node_t is a do-nothing node specifically for testing property and action forwarding between edges with the USE_MAP forwarding strategy. The node has functions to configure the property and action forwarding maps.
* rfnoc: graph: Optimize property propagation algorithmMartin Braun2019-11-261-3/+2
| | | | | | | | | | | | | | | | | | | | | This introduces the concept of a resolution context, because the property propagation algorithm needs to behave differently when called during an initialization step (e.g. when the graph is committed), or when the user changes a property on one of the nodes after it was committed. The algorithm is modified as follows: - When called during an initialization step, then all nodes get resolved at least once. If nodes added new properties, then all nodes get touched again until the max number of iterations is reached. - When called because a node modified one of its properties, then that node is always resolved first. From there, all other nodes are resolved in topological order. However, the algorithm immediately terminates as soon as there are no more dirty nodes. - When called because a node modified one of its properties, but the graph is currently not in a committed state, then that node will do a local property resolution.
* rfnoc: graph: Add commit/release APIMartin Braun2019-11-261-4/+11
|
* rfnoc: node: Fix resolution of properties with circular dependenciesMartin Braun2019-11-261-0/+60
| | | | | | | When a node has multiple properties that depend on each other (and possible have circular dependencies), the previous version of property propagation would not correctly resolve properties that got flagged dirty during the execution of other resolvers.
* rfnoc: Add property propagation, Boost.Graph storageMartin Braun2019-11-261-0/+366
- Adds a detail::graph_t class, which handles the propagation - Adds methods to node_t to aid with propagation - Adds unit tests - Adds dynamic property forwarding: Nodes are now able to forward properties they don't know about by providing a forwarding policy. A good example is the FIFO block which simply forwards most properties verbatim. - node: Temporarily disabling consistency check at init