CIRCT  18.0.0git
Functions
circt::firrtl::direction Namespace Reference

Functions

Direction get (bool isOutput)
 Return an output direction if isOutput is true, otherwise return an input direction. More...
 
Direction flip (Direction direction)
 Flip a port direction. More...
 
StringRef toString (Direction direction)
 
IntegerAttr packAttribute (MLIRContext *context, ArrayRef< Direction > directions)
 Return a IntegerAttr containing the packed representation of an array of directions. More...
 
SmallVector< DirectionunpackAttribute (IntegerAttr directions)
 Turn a packed representation of port attributes into a vector that can be worked with. More...
 

Function Documentation

◆ flip()

Direction circt::firrtl::direction::flip ( Direction  direction)

Flip a port direction.

Definition at line 27 of file FIRRTLAttributes.cpp.

References circt::firrtl::In, and circt::firrtl::Out.

Referenced by invalidateOutputs().

◆ get()

Direction circt::firrtl::direction::get ( bool  isOutput)
inline

Return an output direction if isOutput is true, otherwise return an input direction.

Definition at line 36 of file FIRRTLAttributes.h.

Referenced by unpackAttribute().

◆ packAttribute()

IntegerAttr circt::firrtl::direction::packAttribute ( MLIRContext *  context,
ArrayRef< Direction directions 
)

Return a IntegerAttr containing the packed representation of an array of directions.

Definition at line 37 of file FIRRTLAttributes.cpp.

References circt::calyx::direction::get(), and circt::firrtl::Out.

Referenced by firrtlAttrGetPortDirs().

◆ toString()

StringRef circt::firrtl::direction::toString ( Direction  direction)
inline

Definition at line 41 of file FIRRTLAttributes.h.

References circt::firrtl::In.

Referenced by Equivalence::check(), and circt::firrtl::operator<<().

◆ unpackAttribute()

SmallVector< Direction > circt::firrtl::direction::unpackAttribute ( IntegerAttr  directions)

Turn a packed representation of port attributes into a vector that can be worked with.

Definition at line 48 of file FIRRTLAttributes.cpp.

References assert(), get(), and value.

Referenced by Equivalence::check(), erasePorts(), insertPorts(), and printClassLike().