|
MLIR-AIE 1.4.5.dev
|
The streams a device asks for or already routes, and which pairs of them must not share an arbiter or a link. More...
#include "aie/Dialect/AIE/Transforms/AIEStreamDependencyAnalysis.h"
Public Member Functions | |
| StreamConflicts (DeviceOp device) | |
| StreamConflicts (const StreamConflicts &)=delete | |
| StreamConflicts & | operator= (const StreamConflicts &)=delete |
| llvm::ArrayRef< RoutedStream > | getStreams () const |
| llvm::ArrayRef< RoutedStream > | getRequestedStreams () const |
| The streams the flow ops ask for, which come first in getStreams(). | |
| bool | conflict (size_t s, size_t t) const |
| Whether s and t can deadlock if they share an arbiter or a link. | |
| bool | mustSeparate (size_t s, size_t t) const |
| Whether a routing that puts packet streams s and t on one arbiter anywhere has a hold cycle: they conflict, or the tree of one, stuck at a receiver, waits on the other through trees that each block the next. | |
| std::string | explain (size_t s, size_t t) const |
| Why s and t conflict. | |
| llvm::SmallVector< std::pair< size_t, size_t > > | unavoidable () const |
| The requested streams where the first can hold up the second however they are routed, as one source or receiver already orders them. | |
| std::optional< HoldCycle > | holdCycle (llvm::ArrayRef< llvm::SmallVector< StreamHop, 8 > > routes, bool forcedWaits=false, bool definite=false) const |
| A cycle of waits the packet streams can deadlock in when routed along routes, indexed like getStreams(), that the routing of some requested stream takes part in; nullopt when there is none. | |
| std::string | explain (const HoldCycle &cycle) const |
| The waits of cycle, one sentence each. | |
The streams a device asks for or already routes, and which pairs of them must not share an arbiter or a link.
The analysis runs on the first query.
Definition at line 326 of file AIEStreamDependencyAnalysis.h.
|
explicit |
Definition at line 1326 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::requestedStreams(), and xilinx::AIE::traceRoutedStreams().
Referenced by operator=(), and StreamConflicts().
|
delete |
References StreamConflicts().
| bool StreamConflicts::conflict | ( | size_t | s, |
| size_t | t ) const |
Whether s and t can deadlock if they share an arbiter or a link.
Streams from one source are serialized there anyway, and streams into one destination already wait on each other there, so neither conflicts. The packets one source sends with one id move down every branch as one, so the same holds for any two streams of such trees.
Definition at line 1378 of file AIEStreamDependencyAnalysis.cpp.
| std::string StreamConflicts::explain | ( | const HoldCycle & | cycle | ) | const |
The waits of cycle, one sentence each.
Definition at line 1843 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::HoldCycle::Arbiter, xilinx::AIE::describePort(), xilinx::AIE::describeStream(), xilinx::AIE::HoldCycle::Drain, xilinx::AIE::HoldCycle::Link, and xilinx::AIE::HoldCycle::steps.
| std::string StreamConflicts::explain | ( | size_t | s, |
| size_t | t ) const |
Why s and t conflict.
Requires mustSeparate(s, t), or (s, t) from unavoidable().
Definition at line 1422 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::StreamDeadlockAnalysis::canBlock(), and xilinx::AIE::StreamDeadlockAnalysis::explainBlock().
|
inline |
The streams the flow ops ask for, which come first in getStreams().
Definition at line 335 of file AIEStreamDependencyAnalysis.h.
|
inline |
Definition at line 332 of file AIEStreamDependencyAnalysis.h.
| std::optional< HoldCycle > StreamConflicts::holdCycle | ( | llvm::ArrayRef< llvm::SmallVector< StreamHop, 8 > > | routes, |
| bool | forcedWaits = false, | ||
| bool | definite = false ) const |
A cycle of waits the packet streams can deadlock in when routed along routes, indexed like getStreams(), that the routing of some requested stream takes part in; nullopt when there is none.
Waits between trees at the master port of a receiver they share hold however they are routed, so they count only with forcedWaits. With definite, drains that need StreamDeadlockAnalysis::assumptions do not count.
Definition at line 1496 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::HoldCycle::Arbiter, xilinx::AIE::HoldCycle::Drain, xilinx::AIE::HoldCycle::Link, and xilinx::AIE::HoldCycle::steps.
| bool StreamConflicts::mustSeparate | ( | size_t | s, |
| size_t | t ) const |
Whether a routing that puts packet streams s and t on one arbiter anywhere has a hold cycle: they conflict, or the tree of one, stuck at a receiver, waits on the other through trees that each block the next.
Definition at line 1414 of file AIEStreamDependencyAnalysis.cpp.
|
delete |
References StreamConflicts().
| SmallVector< std::pair< size_t, size_t > > StreamConflicts::unavoidable | ( | ) | const |
The requested streams where the first can hold up the second however they are routed, as one source or receiver already orders them.
Only pairs with a packet stream count: circuits take no arbiter, so a wait between two of them is the design's, not a hazard of any routing. Nor do pairs that need StreamDeadlockAnalysis::assumptions: the routing cannot help those either, and the design may well not do what is assumed.
Definition at line 1440 of file AIEStreamDependencyAnalysis.cpp.
References xilinx::AIE::StreamDeadlockAnalysis::assumptions(), xilinx::AIE::StreamDeadlockAnalysis::canBlock(), and xilinx::AIE::StreamDeadlockAnalysis::explainBlock().