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

Functions

static Direction get (bool isOutput)
 Return an output direction if isOutput is true, otherwise return an input direction. More...
 
static bool unGet (Direction dir)
 Convert from Direction to bool. The opposite of get;. More...
 
Direction flip (Direction direction)
 Flip a port direction. More...
 
static StringRef toString (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. More...
 
mlir::DenseBoolArrayAttr packAttribute (MLIRContext *context, ArrayRef< bool > directions)
 Return a DenseBoolArrayAttr containing the packed representation of an array of directions. More...
 
SmallVector< DirectionunpackAttribute (mlir::DenseBoolArrayAttr 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()

static 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 FIRRTLAttributes.h.

Referenced by 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 circt::calyx::direction::get().

◆ 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 circt::calyx::direction::get(), and circt::firrtl::Out.

Referenced by firrtlAttrGetPortDirs(), and lowerModuleSignature().

◆ toString() [1/2]

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

Definition at line 48 of file FIRRTLAttributes.h.

References get(), and toString().

◆ toString() [2/2]

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

◆ unGet()

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

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

Definition at line 39 of file FIRRTLAttributes.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().