|
CIRCT 22.0.0git
|
Internal implementation for LongestPathAnalysis. More...

Public Member Functions | |
| Impl (Operation *module, mlir::AnalysisManager &am, const LongestPathAnalysisOptions &option) | |
| LogicalResult | initializeAndRun (mlir::ModuleOp module) |
| Initialize and run analysis for a full MLIR module (hierarchical). | |
| LogicalResult | initializeAndRun (hw::HWModuleOp module) |
| Initialize and run analysis for a single HW module (local scope). | |
| bool | isAnalysisAvailable (StringAttr moduleName) const |
| Return true if we have a LocalVisitor for the given HW module. | |
| LogicalResult | computeGlobalPaths (Value value, size_t bitPos, SmallVectorImpl< DataflowPath > &results) |
| Compute hierarchical timing paths to (value, bitPos) and append to results. | |
| template<bool elaborate> | |
| LogicalResult | collectClosedPaths (StringAttr moduleName, SmallVectorImpl< DataflowPath > &results) const |
| Collect register-to-register (closed) paths within the module. | |
| LogicalResult | collectInputToInternalPaths (StringAttr moduleName, SmallVectorImpl< DataflowPath > &results) const |
| Collect open paths from module input ports to internal sequential sinks. | |
| LogicalResult | collectInternalToOutputPaths (StringAttr moduleName, SmallVectorImpl< DataflowPath > &results) const |
| Collect open paths from internal sequential sources to module output ports. | |
| llvm::ArrayRef< hw::HWModuleOp > | getTopModules () const |
| Top modules inferred or specified for this analysis run. | |
| FailureOr< int64_t > | getAverageMaxDelay (Value value) |
| Return average of per-bit max delays for a value. | |
| FailureOr< int64_t > | getMaxDelay (Value value, int64_t bitPos) |
| Return the max delay for a value. | |
| FailureOr< ArrayRef< OpenPath > > | computeLocalPaths (Value value, size_t bitPos) |
| Compute local open paths to (value, bitPos). | |
Private Member Functions | |
| LogicalResult | computeGlobalPaths (const Object &originalObject, Value value, size_t bitPos, SmallVectorImpl< DataflowPath > &results) |
| Recursive helper for computeGlobalPaths. | |
Private Attributes | |
| Context | ctx |
| Analysis context. | |
| SmallVector< hw::HWModuleOp > | topModules |
| Top-level HW modules that seed hierarchical analysis. | |
Friends | |
| class | IncrementalLongestPathAnalysis |
Internal implementation for LongestPathAnalysis.
This class owns per-module LocalVisitors, orchestrates initialization over the instance graph, and provides the concrete implementations for the public LongestPathAnalysis API.
Definition at line 1516 of file LongestPathAnalysis.cpp.
| synth.LongestPathAnalysis::Impl::Impl | ( | Operation * | module, |
| mlir::AnalysisManager & | am, | ||
| const LongestPathAnalysisOptions & | option | ||
| ) |
Definition at line 1735 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::initializeAndRun().
| LogicalResult synth.LongestPathAnalysis::Impl::collectClosedPaths | ( | StringAttr | moduleName, |
| SmallVectorImpl< DataflowPath > & | results | ||
| ) | const |
Collect register-to-register (closed) paths within the module.
When 'elaborate' is true, paths are elaborated with instance paths from moduleName.
Definition at line 1644 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::collectClosedPaths(), LocalVisitor::getInstancePathCache(), Context::getLocalVisitorMutable(), circt::igraph::InstancePathCache::getRelativePaths(), Context::instanceGraph, and circt::igraph::InstanceGraph::lookup().
Referenced by synth.LongestPathAnalysis::Impl::collectClosedPaths().
| LogicalResult synth.LongestPathAnalysis::Impl::collectInputToInternalPaths | ( | StringAttr | moduleName, |
| SmallVectorImpl< DataflowPath > & | results | ||
| ) | const |
Collect open paths from module input ports to internal sequential sinks.
Definition at line 1694 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::collectInputToInternalPaths(), and Context::getLocalVisitor().
Referenced by synth.LongestPathAnalysis::Impl::collectInputToInternalPaths().
| LogicalResult synth.LongestPathAnalysis::Impl::collectInternalToOutputPaths | ( | StringAttr | moduleName, |
| SmallVectorImpl< DataflowPath > & | results | ||
| ) | const |
Collect open paths from internal sequential sources to module output ports.
Definition at line 1714 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::collectInternalToOutputPaths(), and Context::getLocalVisitor().
Referenced by synth.LongestPathAnalysis::Impl::collectInternalToOutputPaths().
|
private |
Recursive helper for computeGlobalPaths.
Definition at line 1585 of file LongestPathAnalysis.cpp.
References assert(), synth.LongestPathAnalysis::Impl::computeGlobalPaths(), filterPaths(), Context::getLocalVisitorMutable(), Context::instanceGraph, and circt::igraph::InstanceGraph::lookup().
| LogicalResult synth.LongestPathAnalysis::Impl::computeGlobalPaths | ( | Value | value, |
| size_t | bitPos, | ||
| SmallVectorImpl< DataflowPath > & | results | ||
| ) |
Compute hierarchical timing paths to (value, bitPos) and append to results.
Definition at line 1580 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::computeGlobalPaths().
Referenced by synth.LongestPathAnalysis::Impl::computeGlobalPaths(), and synth.LongestPathAnalysis::Impl::computeGlobalPaths().
| FailureOr< ArrayRef< OpenPath > > synth.LongestPathAnalysis::Impl::computeLocalPaths | ( | Value | value, |
| size_t | bitPos | ||
| ) |
Compute local open paths to (value, bitPos).
Definition at line 1885 of file LongestPathAnalysis.cpp.
References assert(), synth.LongestPathAnalysis::Impl::computeLocalPaths(), Context::getLocalVisitorMutable(), LocalVisitor::getOrComputePaths(), and Context::localVisitors.
Referenced by synth.LongestPathAnalysis::Impl::computeLocalPaths().
| FailureOr< int64_t > synth.LongestPathAnalysis::Impl::getAverageMaxDelay | ( | Value | value | ) |
Return average of per-bit max delays for a value.
Definition at line 1838 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::getAverageMaxDelay(), circt::hw::getBitWidth(), and getMaxDelayInPaths().
Referenced by synth.LongestPathAnalysis::Impl::getAverageMaxDelay().
| FailureOr< int64_t > synth.LongestPathAnalysis::Impl::getMaxDelay | ( | Value | value, |
| int64_t | bitPos | ||
| ) |
Return the max delay for a value.
Definition at line 1857 of file LongestPathAnalysis.cpp.
References circt::hw::getBitWidth(), synth.LongestPathAnalysis::Impl::getMaxDelay(), and getMaxDelayInPaths().
Referenced by synth.LongestPathAnalysis::Impl::getMaxDelay().
|
inline |
Top modules inferred or specified for this analysis run.
Definition at line 1554 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::topModules.
| LogicalResult synth.LongestPathAnalysis::Impl::initializeAndRun | ( | hw::HWModuleOp | module | ) |
Initialize and run analysis for a single HW module (local scope).
Definition at line 1753 of file LongestPathAnalysis.cpp.
References assert(), synth.LongestPathAnalysis::Impl::initializeAndRun(), and Context::localVisitors.
| LogicalResult synth.LongestPathAnalysis::Impl::initializeAndRun | ( | mlir::ModuleOp | module | ) |
Initialize and run analysis for a full MLIR module (hierarchical).
Definition at line 1763 of file LongestPathAnalysis.cpp.
References assert(), Context::getTopModuleName(), synth.LongestPathAnalysis::Impl::initializeAndRun(), Context::instanceGraph, Context::localVisitors, and circt::igraph::InstanceGraph::lookupOrNull().
Referenced by synth.LongestPathAnalysis::Impl::Impl(), synth.LongestPathAnalysis::Impl::initializeAndRun(), and synth.LongestPathAnalysis::Impl::initializeAndRun().
| bool synth.LongestPathAnalysis::Impl::isAnalysisAvailable | ( | StringAttr | moduleName | ) | const |
Return true if we have a LocalVisitor for the given HW module.
Definition at line 1830 of file LongestPathAnalysis.cpp.
References synth.LongestPathAnalysis::Impl::isAnalysisAvailable(), and Context::localVisitors.
Referenced by synth.LongestPathAnalysis::Impl::isAnalysisAvailable().
|
friend |
Definition at line 1566 of file LongestPathAnalysis.cpp.
|
private |
Analysis context.
Definition at line 1575 of file LongestPathAnalysis.cpp.
|
private |
Top-level HW modules that seed hierarchical analysis.
Definition at line 1577 of file LongestPathAnalysis.cpp.
Referenced by synth.LongestPathAnalysis::Impl::getTopModules().