CIRCT 24.0.0git
Loading...
Searching...
No Matches
TechLibraryPattern Struct Reference

Simple technology library encoded as a HWModuleOp. More...

Inheritance diagram for TechLibraryPattern:
Collaboration diagram for TechLibraryPattern:

Public Member Functions

 TechLibraryPattern (hw::HWModuleOp module, double area, SmallVector< DelayType > delay, NPNClass npnClass)
StringRef getPatternName () const override
 Get the name of this pattern. Used for debugging.
std::optional< MatchResult > match (CutEnumerator &enumerator, const Cut &cut) const override
 Match the cut set against this library primitive.
bool useTruthTableMatcher (SmallVectorImpl< NPNClass > &matchingNPNClasses) const override
 Enable truth table matching for this pattern.
llvm::FailureOr< Operation * > rewrite (mlir::OpBuilder &builder, CutEnumerator &enumerator, const Cut &cut) const override
 Rewrite the cut set using this library primitive.
unsigned getNumInputs () const
unsigned getNumOutputs () const override
 Get the number of outputs this pattern produces.
LocationAttr getLoc () const override
 Get location for this pattern(optional).
Public Member Functions inherited from circt::synth::CutRewritePattern
 CutRewritePattern (mlir::MLIRContext *context)
virtual ~CutRewritePattern ()=default
 Virtual destructor for base class.
mlir::MLIRContext * getContext () const

Private Attributes

const double area
const SmallVector< DelayType > delay
hw::HWModuleOp module
NPNClass npnClass

Detailed Description

Simple technology library encoded as a HWModuleOp.

Definition at line 91 of file TechMapper.cpp.

Constructor & Destructor Documentation

◆ TechLibraryPattern()

TechLibraryPattern::TechLibraryPattern ( hw::HWModuleOp module,
double area,
SmallVector< DelayType > delay,
NPNClass npnClass )
inline

Member Function Documentation

◆ getLoc()

LocationAttr TechLibraryPattern::getLoc ( ) const
inlineoverridevirtual

Get location for this pattern(optional).

Reimplemented from circt::synth::CutRewritePattern.

Definition at line 165 of file TechMapper.cpp.

◆ getNumInputs()

unsigned TechLibraryPattern::getNumInputs ( ) const
inline

Definition at line 157 of file TechMapper.cpp.

References module.

◆ getNumOutputs()

unsigned TechLibraryPattern::getNumOutputs ( ) const
inlineoverridevirtual

Get the number of outputs this pattern produces.

Implements circt::synth::CutRewritePattern.

Definition at line 161 of file TechMapper.cpp.

References module.

◆ getPatternName()

StringRef TechLibraryPattern::getPatternName ( ) const
inlineoverridevirtual

Get the name of this pattern. Used for debugging.

Reimplemented from circt::synth::CutRewritePattern.

Definition at line 109 of file TechMapper.cpp.

◆ match()

std::optional< MatchResult > TechLibraryPattern::match ( CutEnumerator & enumerator,
const Cut & cut ) const
inlineoverridevirtual

◆ rewrite()

llvm::FailureOr< Operation * > TechLibraryPattern::rewrite ( mlir::OpBuilder & builder,
CutEnumerator & enumerator,
const Cut & cut ) const
inlineoverridevirtual

◆ useTruthTableMatcher()

bool TechLibraryPattern::useTruthTableMatcher ( SmallVectorImpl< NPNClass > & matchingNPNClasses) const
inlineoverridevirtual

Enable truth table matching for this pattern.

Reimplemented from circt::synth::CutRewritePattern.

Definition at line 125 of file TechMapper.cpp.

References npnClass.

Member Data Documentation

◆ area

const double TechLibraryPattern::area
private

Definition at line 171 of file TechMapper.cpp.

Referenced by match(), and TechLibraryPattern().

◆ delay

const SmallVector<DelayType> TechLibraryPattern::delay
private

Definition at line 172 of file TechMapper.cpp.

Referenced by match(), TechLibraryPattern(), and synth.DataflowPath::to_flamegraph().

◆ module

hw::HWModuleOp TechLibraryPattern::module
private

◆ npnClass

NPNClass TechLibraryPattern::npnClass
private

Definition at line 174 of file TechMapper.cpp.

Referenced by match(), rewrite(), TechLibraryPattern(), and useTruthTableMatcher().


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