CIRCT
|
This class models the accumulation of physical propagation delays on combinational paths along SSA dependences. More...
#include <Problems.h>
Public Member Functions | |
std::optional< float > | getIncomingDelay (OperatorType opr) |
The incoming delay denotes the propagation time from the operand inputs to either the result outputs (combinational operators) or the first internal register stage. More... | |
void | setIncomingDelay (OperatorType opr, float delay) |
std::optional< float > | getOutgoingDelay (OperatorType opr) |
The outgoing delay denotes the propagation time from either the operand inputs (combinational operators) or the last internal register stage to the result outputs. More... | |
void | setOutgoingDelay (OperatorType opr, float delay) |
std::optional< float > | getStartTimeInCycle (Operation *op) |
Computed by the scheduler, this start time is relative to the beginning of the cycle that op starts in. More... | |
void | setStartTimeInCycle (Operation *op, float time) |
virtual PropertyStringVector | getProperties (Operation *op) override |
virtual PropertyStringVector | getProperties (OperatorType opr) override |
virtual LogicalResult | check () override |
Return success if the constructed scheduling problem is valid. More... | |
virtual LogicalResult | verify () override |
Return success if the computed solution is valid. More... | |
![]() | |
virtual | ~Problem ()=default |
void | insertOperation (Operation *op) |
Include op in this scheduling problem. More... | |
LogicalResult | insertDependence (Dependence dep) |
Include dep in the scheduling problem. More... | |
void | insertOperatorType (OperatorType opr) |
Include opr in this scheduling problem. More... | |
OperatorType | getOrInsertOperatorType (StringRef name) |
Retrieves the operator type identified by the client-specific name . More... | |
Operation * | getContainingOp () |
Return the operation containing this problem, e.g. to emit diagnostics. More... | |
void | setContainingOp (Operation *op) |
Set the operation containing this problem, e.g. to emit diagnostics. More... | |
bool | hasOperation (Operation *op) |
Return true if op is part of this problem. More... | |
const OperationSet & | getOperations () |
Return the set of operations. More... | |
DependenceRange | getDependences (Operation *op) |
Return a range object to transparently iterate over op's incoming 1) implicit def-use dependences (backed by the SSA graph), and then 2) explictly added auxiliary dependences. More... | |
bool | hasOperatorType (OperatorType opr) |
Return true if opr is part of this problem. More... | |
const OperatorTypeSet & | getOperatorTypes () |
Return the set of operator types. More... | |
std::optional< OperatorType > | getLinkedOperatorType (Operation *op) |
The linked operator type provides the runtime characteristics for op . More... | |
void | setLinkedOperatorType (Operation *op, OperatorType opr) |
std::optional< unsigned > | getLatency (OperatorType opr) |
The latency is the number of cycles opr needs to compute its result. More... | |
void | setLatency (OperatorType opr, unsigned val) |
std::optional< unsigned > | getStartTime (Operation *op) |
Return the start time for op , as computed by the scheduler. More... | |
void | setStartTime (Operation *op, unsigned val) |
std::optional< unsigned > | getEndTime (Operation *op) |
Returns the end time for op , as computed by the scheduler. More... | |
StringAttr | getInstanceName () |
void | setInstanceName (StringAttr name) |
StringAttr | getLibraryName () |
void | setLibraryName (StringAttr name) |
StringAttr | getOperationName (Operation *op) |
void | setOperationName (Operation *op, StringAttr name) |
virtual PropertyStringVector | getProperties (Dependence dep) |
virtual PropertyStringVector | getProperties () |
Protected Member Functions | |
virtual LogicalResult | checkDelays (OperatorType opr) |
Incoming/outgoing delays are set for opr and non-negative. More... | |
virtual LogicalResult | verifyStartTimeInCycle (Operation *op) |
op has a non-negative start time in its cycle. More... | |
virtual LogicalResult | verifyPrecedenceInCycle (Dependence dep) |
If dep is an SSA edge and its source operation finishes in the same time step as the destination operation, the source's result is available before the destination starts in that cycle. More... | |
![]() | |
virtual LogicalResult | checkLinkedOperatorType (Operation *op) |
op is linked to a registered operator type. More... | |
virtual LogicalResult | checkLatency (OperatorType opr) |
opr has a latency. More... | |
virtual LogicalResult | verifyStartTime (Operation *op) |
op has a start time. More... | |
virtual LogicalResult | verifyPrecedence (Dependence dep) |
dep's source operation is available before dep's destination operation starts. More... | |
Private Attributes | |
OperatorTypeProperty< float > | incomingDelay |
OperatorTypeProperty< float > | outgoingDelay |
OperationProperty< float > | startTimeInCycle |
Additional Inherited Members | |
![]() | |
using | Dependence = detail::Dependence |
A thin wrapper to allow a uniform handling of def-use and auxiliary dependences. More... | |
using | OperatorType = mlir::StringAttr |
Operator types are distinguished by name (chosen by the client). More... | |
using | OperationSet = llvm::SetVector< Operation * > |
using | DependenceRange = llvm::iterator_range< detail::DependenceIterator > |
using | OperatorTypeSet = llvm::SetVector< OperatorType > |
using | PropertyStringVector = llvm::SmallVector< std::pair< std::string, std::string >, 2 > |
![]() | |
using | AuxDependenceMap = llvm::DenseMap< Operation *, llvm::SmallSetVector< Operation *, 4 > > |
template<typename T > | |
using | OperationProperty = llvm::DenseMap< Operation *, std::optional< T > > |
template<typename T > | |
using | DependenceProperty = llvm::DenseMap< Dependence, std::optional< T > > |
template<typename T > | |
using | OperatorTypeProperty = llvm::DenseMap< OperatorType, std::optional< T > > |
template<typename T > | |
using | InstanceProperty = std::optional< T > |
This class models the accumulation of physical propagation delays on combinational paths along SSA dependences.
Each operator type is annotated with estimated values for incoming and outgoing delays. Combinational operators (zero-latency, no internal registers) have only a single delay; this important special case is modeled by setting the incoming and outgoing delays to the same value.
A solution to this problem comprises per-operation start times in a continuous unit, e.g. in nanoseconds, inside the discrete time steps/cycles determined by the underlying scheduling problem.
Definition at line 340 of file Problems.h.
|
overridevirtual |
Return success if the constructed scheduling problem is valid.
Reimplemented from circt::scheduling::Problem.
Definition at line 290 of file Problems.cpp.
References circt::scheduling::Problem::check().
|
protectedvirtual |
Incoming/outgoing delays are set for opr
and non-negative.
The delays are equal if opr
is a zero-latency operator type.
Definition at line 224 of file Problems.cpp.
|
inline |
The incoming delay denotes the propagation time from the operand inputs to either the result outputs (combinational operators) or the first internal register stage.
Definition at line 351 of file Problems.h.
References incomingDelay.
|
inline |
The outgoing delay denotes the propagation time from either the operand inputs (combinational operators) or the last internal register stage to the result outputs.
Definition at line 361 of file Problems.h.
References outgoingDelay.
|
overridevirtual |
Reimplemented from circt::scheduling::Problem.
Definition at line 208 of file Problems.cpp.
References circt::scheduling::Problem::getProperties().
|
overridevirtual |
Reimplemented from circt::scheduling::Problem.
Definition at line 215 of file Problems.cpp.
References circt::scheduling::Problem::getProperties().
|
inline |
Computed by the scheduler, this start time is relative to the beginning of the cycle that op
starts in.
Definition at line 370 of file Problems.h.
References startTimeInCycle.
|
inline |
Definition at line 354 of file Problems.h.
References incomingDelay.
|
inline |
Definition at line 364 of file Problems.h.
References outgoingDelay.
|
inline |
Definition at line 373 of file Problems.h.
References startTimeInCycle.
Referenced by circt::scheduling::computeStartTimesInCycle().
|
overridevirtual |
Return success if the computed solution is valid.
Reimplemented from circt::scheduling::Problem.
Definition at line 301 of file Problems.cpp.
References circt::scheduling::Problem::verify().
|
protectedvirtual |
If dep
is an SSA edge and its source operation finishes in the same time step as the destination operation, the source's result is available before the destination starts in that cycle.
Definition at line 255 of file Problems.cpp.
References circt::scheduling::detail::Dependence::getDestination(), circt::scheduling::detail::Dependence::getSource(), and circt::scheduling::detail::Dependence::isAuxiliary().
|
protectedvirtual |
op
has a non-negative start time in its cycle.
Definition at line 248 of file Problems.cpp.
|
private |
Definition at line 344 of file Problems.h.
Referenced by getIncomingDelay(), and setIncomingDelay().
|
private |
Definition at line 344 of file Problems.h.
Referenced by getOutgoingDelay(), and setOutgoingDelay().
|
private |
Definition at line 345 of file Problems.h.
Referenced by getStartTimeInCycle(), and setStartTimeInCycle().