CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::firrtl::direction Namespace Reference

Functions

static Direction get (bool isOutput)
 Return an output direction if isOutput is true, otherwise return an input direction.
static bool unGet (Direction dir)
 Convert from Direction to bool. The opposite of get;.
Direction flip (Direction direction)
 Flip a port direction.
static StringRef toString (Direction direction)
static StringRef toLongString (Direction direction)
static StringRef toString (bool direction)
mlir::DenseBoolArrayAttr packAttribute (MLIRContext *context, ArrayRef< Direction > directions)
 Return a DenseBoolArrayAttr containing the packed representation of an array of directions.
mlir::DenseBoolArrayAttr packAttribute (MLIRContext *context, ArrayRef< bool > directions)
 Return a DenseBoolArrayAttr containing the packed representation of an array of directions.
SmallVector< Direction > unpackAttribute (mlir::DenseBoolArrayAttr directions)
 Turn a packed representation of port attributes into a vector that can be worked with.

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.

◆ get()

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

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

Definition at line 36 of file FIRRTLEnums.h.

Referenced by printModulePorts(), toString(), and unpackAttribute().

◆ packAttribute() [1/2]

mlir::DenseBoolArrayAttr circt::firrtl::direction::packAttribute ( MLIRContext * context,
ArrayRef< bool > directions )

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

Definition at line 47 of file FIRRTLAttributes.cpp.

References context.

◆ packAttribute() [2/2]

mlir::DenseBoolArrayAttr circt::firrtl::direction::packAttribute ( MLIRContext * context,
ArrayRef< Direction > directions )

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

Definition at line 38 of file FIRRTLAttributes.cpp.

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

Referenced by buildModuleLike(), erasePorts(), firrtlAttrGetPortDirs(), insertPorts(), lowerModuleSignature(), parseClassLike(), and parseFModuleLikeOp().

◆ toLongString()

StringRef circt::firrtl::direction::toLongString ( Direction direction)
inlinestatic

Definition at line 48 of file FIRRTLEnums.h.

References circt::firrtl::In.

◆ toString() [1/2]

StringRef circt::firrtl::direction::toString ( bool direction)
inlinestatic

Definition at line 52 of file FIRRTLEnums.h.

References get(), and toString().

◆ toString() [2/2]

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

◆ unGet()

bool circt::firrtl::direction::unGet ( Direction dir)
inlinestatic

Convert from Direction to bool. The opposite of get;.

Definition at line 39 of file FIRRTLEnums.h.

Referenced by insertPorts().

◆ unpackAttribute()

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

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

Definition at line 54 of file FIRRTLAttributes.cpp.

References get().