CIRCT 24.0.0git
Loading...
Searching...
No Matches
ESILowerPorts.cpp File Reference
#include "../PassDetails.h"
#include "circt/Dialect/ESI/ESIOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/PortConverter.h"
#include "circt/Support/BackedgeBuilder.h"
#include "circt/Support/LLVM.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/Support/MathExtras.h"
#include "circt/Dialect/ESI/ESIPasses.h.inc"
Include dependency graph for ESILowerPorts.cpp:

Go to the source code of this file.

Namespaces

namespace  circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
namespace  circt::esi

Macros

#define GEN_PASS_DEF_LOWERESIPORTS

Functions

static StringRef getStringAttributeOr (Operation *op, StringRef attrName, StringRef def)
static Value getArrayElement (OpBuilder &b, Location loc, Value array, size_t idx)
 Extract element 'idx' from the array-typed value 'array'.
static Value packArray (OpBuilder &b, Location loc, ArrayRef< Value > elements)
 Pack a list of element values (with 'elements[i]' destined for array index 'i') into an hw.array.

Macro Definition Documentation

◆ GEN_PASS_DEF_LOWERESIPORTS

#define GEN_PASS_DEF_LOWERESIPORTS

Definition at line 23 of file ESILowerPorts.cpp.

Function Documentation

◆ getArrayElement()

Value getArrayElement ( OpBuilder & b,
Location loc,
Value array,
size_t idx )
static

Extract element 'idx' from the array-typed value 'array'.

Definition at line 278 of file ESILowerPorts.cpp.

References hw.ArrayGetOp::create(), and hw.ConstantOp::create().

◆ getStringAttributeOr()

StringRef getStringAttributeOr ( Operation * op,
StringRef attrName,
StringRef def )
inlinestatic

Definition at line 35 of file ESILowerPorts.cpp.

◆ packArray()

Value packArray ( OpBuilder & b,
Location loc,
ArrayRef< Value > elements )
static

Pack a list of element values (with 'elements[i]' destined for array index 'i') into an hw.array.

hw.array_create takes its operands in reverse order (operand 0 becomes the highest index), so the list is reversed to keep 'elements[i]' at array index 'i'.

Definition at line 291 of file ESILowerPorts.cpp.

References hw.ArrayCreateOp::create().