CIRCT  20.0.0git
Namespaces | Macros | Typedefs | Functions
DCToHW.cpp File Reference
#include "circt/Conversion/DCToHW.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/DC/DCDialect.h"
#include "circt/Dialect/DC/DCOps.h"
#include "circt/Dialect/DC/DCPasses.h"
#include "circt/Dialect/ESI/ESIOps.h"
#include "circt/Dialect/ESI/ESITypes.h"
#include "circt/Dialect/HW/ConversionPatterns.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/HWTypes.h"
#include "circt/Dialect/Seq/SeqOps.h"
#include "circt/Support/BackedgeBuilder.h"
#include "circt/Support/ValueMapper.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Transforms/DialectConversion.h"
#include "llvm/ADT/TypeSwitch.h"
#include "llvm/Support/MathExtras.h"
#include <optional>
#include "circt/Conversion/Passes.h.inc"
Include dependency graph for DCToHW.cpp:

Go to the source code of this file.

Namespaces

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

Macros

#define GEN_PASS_DEF_DCTOHW
 

Typedefs

using NameUniquer = std::function< std::string(Operation *)>
 

Functions

static Type tupleToStruct (TupleType tuple)
 
static Type toHWType (Type t)
 Converts any type 't' into a hw-compatible type. More...
 
static Type toESIHWType (Type t)
 
static bool isDCType (Type type)
 
static bool isLegalOp (Operation *op)
 Returns true if the given op is considered as legal - i.e. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_DCTOHW

#define GEN_PASS_DEF_DCTOHW

Definition at line 36 of file DCToHW.cpp.

Typedef Documentation

◆ NameUniquer

using NameUniquer = std::function<std::string(Operation *)>

Definition at line 45 of file DCToHW.cpp.

Function Documentation

◆ isDCType()

static bool isDCType ( Type  type)
static

Definition at line 840 of file DCToHW.cpp.

Referenced by isLegalOp().

◆ isLegalOp()

static bool isLegalOp ( Operation *  op)
static

Returns true if the given op is considered as legal - i.e.

it does not contain any dc-typed values.

Definition at line 844 of file DCToHW.cpp.

References isDCType().

◆ toESIHWType()

static Type toESIHWType ( Type  t)
static

Definition at line 81 of file DCToHW.cpp.

References circt::calyx::direction::get(), and toHWType().

◆ toHWType()

static Type toHWType ( Type  t)
static

Converts any type 't' into a hw-compatible type.

tuple -> hw.struct none -> i0 (tuple[...] | hw.struct)[...] -> (tuple | hw.struct)[toHwType(...)]

Definition at line 67 of file DCToHW.cpp.

References circt::calyx::direction::get(), and tupleToStruct().

Referenced by toESIHWType().

◆ tupleToStruct()

static Type tupleToStruct ( TupleType  tuple)
static

Definition at line 48 of file DCToHW.cpp.

References circt::calyx::direction::get(), and circt::esi::innerType().

Referenced by toHWType().