CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::hw::PortConversion Class Referenceabstract

Base class for the port conversion of a particular port. More...

#include <PortConverter.h>

Collaboration diagram for circt::hw::PortConversion:

Public Member Functions

 PortConversion (PortConverterImpl &converter, hw::PortInfo origPort)
virtual ~PortConversion ()=default
virtual LogicalResult init ()
void lowerPort ()
virtual void mapInputSignals (OpBuilder &b, Operation *inst, Value instValue, SmallVectorImpl< Value > &newOperands, ArrayRef< Backedge > newResults)=0
 Update an instance port to the new port information.
virtual void mapOutputSignals (OpBuilder &b, Operation *inst, Value instValue, SmallVectorImpl< Value > &newOperands, ArrayRef< Backedge > newResults)=0
MLIRContext * getContext ()
bool isUntouched () const

Protected Member Functions

virtual void buildInputSignals ()=0
virtual void buildOutputSignals ()=0
hw::HWMutableModuleLike getModule ()

Protected Attributes

PortConverterImpl & converter
Block * body
hw::PortInfo origPort
bool isUntouchedFlag = false

Detailed Description

Base class for the port conversion of a particular port.

Abstracts the details of a particular port conversion from the port layout. Subclasses keep around port mapping information to use when updating instances.

Definition at line 104 of file PortConverter.h.

Constructor & Destructor Documentation

◆ PortConversion()

circt::hw::PortConversion::PortConversion ( PortConverterImpl & converter,
hw::PortInfo origPort )
inline

Definition at line 106 of file PortConverter.h.

References body, converter, and origPort.

◆ ~PortConversion()

virtual circt::hw::PortConversion::~PortConversion ( )
virtualdefault

Member Function Documentation

◆ buildInputSignals()

virtual void circt::hw::PortConversion::buildInputSignals ( )
protectedpure virtual

Referenced by lowerPort().

◆ buildOutputSignals()

virtual void circt::hw::PortConversion::buildOutputSignals ( )
protectedpure virtual

Referenced by lowerPort().

◆ getContext()

MLIRContext * circt::hw::PortConversion::getContext ( )
inline

Definition at line 134 of file PortConverter.h.

References getModule().

◆ getModule()

hw::HWMutableModuleLike circt::hw::PortConversion::getModule ( )
inlineprotected

Definition at line 147 of file PortConverter.h.

References converter.

Referenced by getContext().

◆ init()

virtual LogicalResult circt::hw::PortConversion::init ( )
inlinevirtual

Definition at line 113 of file PortConverter.h.

References success().

◆ isUntouched()

bool circt::hw::PortConversion::isUntouched ( ) const
inline

Definition at line 135 of file PortConverter.h.

References isUntouchedFlag.

◆ lowerPort()

void circt::hw::PortConversion::lowerPort ( )
inline

◆ mapInputSignals()

virtual void circt::hw::PortConversion::mapInputSignals ( OpBuilder & b,
Operation * inst,
Value instValue,
SmallVectorImpl< Value > & newOperands,
ArrayRef< Backedge > newResults )
pure virtual

Update an instance port to the new port information.

◆ mapOutputSignals()

virtual void circt::hw::PortConversion::mapOutputSignals ( OpBuilder & b,
Operation * inst,
Value instValue,
SmallVectorImpl< Value > & newOperands,
ArrayRef< Backedge > newResults )
pure virtual

Member Data Documentation

◆ body

Block* circt::hw::PortConversion::body
protected

◆ converter

PortConverterImpl& circt::hw::PortConversion::converter
protected

Definition at line 143 of file PortConverter.h.

Referenced by getModule(), and PortConversion().

◆ isUntouchedFlag

bool circt::hw::PortConversion::isUntouchedFlag = false
protected

Definition at line 153 of file PortConverter.h.

Referenced by isUntouched().

◆ origPort

hw::PortInfo circt::hw::PortConversion::origPort
protected

Definition at line 145 of file PortConverter.h.

Referenced by lowerPort(), and PortConversion().


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