CIRCT  19.0.0git
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
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:
Collaboration graph
[legend]

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. More...
 
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

PortConverterImplconverter
 
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 97 of file PortConverter.h.

Constructor & Destructor Documentation

◆ PortConversion()

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

Definition at line 99 of file PortConverter.h.

◆ ~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 127 of file PortConverter.h.

References getModule().

◆ getModule()

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

Definition at line 140 of file PortConverter.h.

References converter, and circt::hw::PortConverterImpl::getModule().

Referenced by getContext().

◆ init()

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

Definition at line 106 of file PortConverter.h.

◆ isUntouched()

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

Definition at line 128 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 136 of file PortConverter.h.

Referenced by getModule().

◆ isUntouchedFlag

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

Definition at line 146 of file PortConverter.h.

Referenced by isUntouched().

◆ origPort

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

Definition at line 138 of file PortConverter.h.

Referenced by lowerPort().


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