|
CIRCT 24.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 1514 of file LongestPathAnalysis.cpp.
| synth.LongestPathAnalysis::Impl::Impl | ( | Operation * | module, |
| mlir::AnalysisManager & | am, | ||
| const LongestPathAnalysisOptions & | option ) |
Definition at line 1733 of file LongestPathAnalysis.cpp.
References ctx, and 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 1642 of file LongestPathAnalysis.cpp.
References collectClosedPaths(), ctx, isAnalysisAvailable(), and success().
Referenced by 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 1692 of file LongestPathAnalysis.cpp.
References collectInputToInternalPaths(), ctx, failure(), and success().
Referenced by 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 1712 of file LongestPathAnalysis.cpp.
References collectInternalToOutputPaths(), ctx, failure(), and success().
Referenced by collectInternalToOutputPaths().
|
private |
Recursive helper for computeGlobalPaths.
Definition at line 1583 of file LongestPathAnalysis.cpp.
References assert(), computeGlobalPaths(), ctx, failure(), filterPaths(), and success().
| 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 1578 of file LongestPathAnalysis.cpp.
References computeGlobalPaths().
Referenced by computeGlobalPaths(), computeGlobalPaths(), getAverageMaxDelay(), and getMaxDelay().
| FailureOr< ArrayRef< OpenPath > > synth.LongestPathAnalysis::Impl::computeLocalPaths | ( | Value | value, |
| size_t | bitPos ) |
Compute local open paths to (value, bitPos).
Definition at line 1883 of file LongestPathAnalysis.cpp.
References assert(), computeLocalPaths(), and ctx.
Referenced by computeLocalPaths().
| FailureOr< int64_t > synth.LongestPathAnalysis::Impl::getAverageMaxDelay | ( | Value | value | ) |
Return average of per-bit max delays for a value.
Definition at line 1836 of file LongestPathAnalysis.cpp.
References computeGlobalPaths(), failure(), getAverageMaxDelay(), circt::hw::getBitWidth(), and getMaxDelayInPaths().
Referenced by getAverageMaxDelay().
| FailureOr< int64_t > synth.LongestPathAnalysis::Impl::getMaxDelay | ( | Value | value, |
| int64_t | bitPos ) |
Return the max delay for a value.
Definition at line 1855 of file LongestPathAnalysis.cpp.
References computeGlobalPaths(), failure(), circt::hw::getBitWidth(), getMaxDelay(), and getMaxDelayInPaths().
Referenced by getMaxDelay().
|
inline |
Top modules inferred or specified for this analysis run.
Definition at line 1552 of file LongestPathAnalysis.cpp.
References topModules.
| LogicalResult synth.LongestPathAnalysis::Impl::initializeAndRun | ( | hw::HWModuleOp | module | ) |
Initialize and run analysis for a single HW module (local scope).
Definition at line 1751 of file LongestPathAnalysis.cpp.
References assert(), ctx, and initializeAndRun().
| LogicalResult synth.LongestPathAnalysis::Impl::initializeAndRun | ( | mlir::ModuleOp | module | ) |
Initialize and run analysis for a full MLIR module (hierarchical).
Definition at line 1761 of file LongestPathAnalysis.cpp.
References assert(), ctx, failure(), initializeAndRun(), and topModules.
Referenced by Impl(), initializeAndRun(), and initializeAndRun().
| bool synth.LongestPathAnalysis::Impl::isAnalysisAvailable | ( | StringAttr | moduleName | ) | const |
Return true if we have a LocalVisitor for the given HW module.
Definition at line 1828 of file LongestPathAnalysis.cpp.
References ctx, and isAnalysisAvailable().
Referenced by collectClosedPaths(), and isAnalysisAvailable().
|
friend |
Definition at line 1564 of file LongestPathAnalysis.cpp.
References IncrementalLongestPathAnalysis.
Referenced by IncrementalLongestPathAnalysis.
|
private |
Analysis context.
Definition at line 1573 of file LongestPathAnalysis.cpp.
Referenced by collectClosedPaths(), collectInputToInternalPaths(), collectInternalToOutputPaths(), computeGlobalPaths(), computeLocalPaths(), Impl(), initializeAndRun(), initializeAndRun(), and isAnalysisAvailable().
|
private |
Top-level HW modules that seed hierarchical analysis.
Definition at line 1575 of file LongestPathAnalysis.cpp.
Referenced by getTopModules(), and initializeAndRun().