CIRCT 22.0.0git
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
aig.LongestPathAnalysis::Impl Struct Reference

Internal implementation for LongestPathAnalysis. More...

Collaboration diagram for aig.LongestPathAnalysis::Impl:
Collaboration graph
[legend]

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::HWModuleOpgetTopModules () 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::HWModuleOptopModules
 Top-level HW modules that seed hierarchical analysis.
 

Friends

class IncrementalLongestPathAnalysis
 

Detailed Description

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 1486 of file LongestPathAnalysis.cpp.

Constructor & Destructor Documentation

◆ Impl()

aig.LongestPathAnalysis::Impl::Impl ( Operation *  module,
mlir::AnalysisManager &  am,
const LongestPathAnalysisOptions &  option 
)

Member Function Documentation

◆ collectClosedPaths()

template<bool elaborate>
LogicalResult aig.LongestPathAnalysis::Impl::collectClosedPaths ( StringAttr  moduleName,
SmallVectorImpl< DataflowPath > &  results 
) const

◆ collectInputToInternalPaths()

LogicalResult aig.LongestPathAnalysis::Impl::collectInputToInternalPaths ( StringAttr  moduleName,
SmallVectorImpl< DataflowPath > &  results 
) const

Collect open paths from module input ports to internal sequential sinks.

Definition at line 1667 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::collectInputToInternalPaths(), and Context::getLocalVisitor().

Referenced by aig.LongestPathAnalysis::Impl::collectInputToInternalPaths().

◆ collectInternalToOutputPaths()

LogicalResult aig.LongestPathAnalysis::Impl::collectInternalToOutputPaths ( StringAttr  moduleName,
SmallVectorImpl< DataflowPath > &  results 
) const

Collect open paths from internal sequential sources to module output ports.

Definition at line 1687 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::collectInternalToOutputPaths(), and Context::getLocalVisitor().

Referenced by aig.LongestPathAnalysis::Impl::collectInternalToOutputPaths().

◆ computeGlobalPaths() [1/2]

LogicalResult aig.LongestPathAnalysis::Impl::computeGlobalPaths ( const Object originalObject,
Value  value,
size_t  bitPos,
SmallVectorImpl< DataflowPath > &  results 
)
private

◆ computeGlobalPaths() [2/2]

LogicalResult aig.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 1550 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::computeGlobalPaths().

Referenced by aig.LongestPathAnalysis::Impl::computeGlobalPaths(), and aig.LongestPathAnalysis::Impl::computeGlobalPaths().

◆ computeLocalPaths()

FailureOr< ArrayRef< OpenPath > > aig.LongestPathAnalysis::Impl::computeLocalPaths ( Value  value,
size_t  bitPos 
)

◆ getAverageMaxDelay()

FailureOr< int64_t > aig.LongestPathAnalysis::Impl::getAverageMaxDelay ( Value  value)

Return average of per-bit max delays for a value.

Definition at line 1813 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::getAverageMaxDelay(), circt::hw::getBitWidth(), and getMaxDelayInPaths().

Referenced by aig.LongestPathAnalysis::Impl::getAverageMaxDelay().

◆ getMaxDelay()

FailureOr< int64_t > aig.LongestPathAnalysis::Impl::getMaxDelay ( Value  value,
int64_t  bitPos 
)

◆ getTopModules()

llvm::ArrayRef< hw::HWModuleOp > aig.LongestPathAnalysis::Impl::getTopModules ( ) const
inline

Top modules inferred or specified for this analysis run.

Definition at line 1524 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::topModules.

◆ initializeAndRun() [1/2]

LogicalResult aig.LongestPathAnalysis::Impl::initializeAndRun ( hw::HWModuleOp  module)

Initialize and run analysis for a single HW module (local scope).

Definition at line 1726 of file LongestPathAnalysis.cpp.

References assert(), aig.LongestPathAnalysis::Impl::initializeAndRun(), and Context::localVisitors.

◆ initializeAndRun() [2/2]

LogicalResult aig.LongestPathAnalysis::Impl::initializeAndRun ( mlir::ModuleOp  module)

◆ isAnalysisAvailable()

bool aig.LongestPathAnalysis::Impl::isAnalysisAvailable ( StringAttr  moduleName) const

Return true if we have a LocalVisitor for the given HW module.

Definition at line 1805 of file LongestPathAnalysis.cpp.

References aig.LongestPathAnalysis::Impl::isAnalysisAvailable(), and Context::localVisitors.

Referenced by aig.LongestPathAnalysis::Impl::isAnalysisAvailable().

Friends And Related Symbol Documentation

◆ IncrementalLongestPathAnalysis

friend class IncrementalLongestPathAnalysis
friend

Definition at line 1536 of file LongestPathAnalysis.cpp.

Member Data Documentation

◆ ctx

Context aig.LongestPathAnalysis::Impl::ctx
private

Analysis context.

Definition at line 1545 of file LongestPathAnalysis.cpp.

◆ topModules

SmallVector<hw::HWModuleOp> aig.LongestPathAnalysis::Impl::topModules
private

Top-level HW modules that seed hierarchical analysis.

Definition at line 1547 of file LongestPathAnalysis.cpp.

Referenced by aig.LongestPathAnalysis::Impl::getTopModules().


The documentation for this struct was generated from the following file: