CIRCT
20.0.0git
|
#include "circt/Dialect/Emit/EmitOps.h"
#include "circt/Dialect/HW/HWAttributes.h"
#include "circt/Dialect/HW/HWInstanceGraph.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/HWSymCache.h"
#include "circt/Dialect/HW/InnerSymbolNamespace.h"
#include "circt/Dialect/SV/SVOps.h"
#include "circt/Dialect/SV/SVPasses.h"
#include "circt/Dialect/Seq/SeqDialect.h"
#include "circt/Dialect/Seq/SeqOps.h"
#include "circt/Dialect/Verif/VerifOps.h"
#include "circt/Support/Namespace.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/IRMapping.h"
#include "mlir/Pass/Pass.h"
#include "llvm/ADT/SetVector.h"
#include <set>
#include "circt/Dialect/SV/SVPasses.h.inc"
Go to the source code of this file.
Namespaces | |
circt | |
The InstanceGraph op interface, see InstanceGraphInterface.td for more details. | |
circt::sv | |
Macros | |
#define | GEN_PASS_DEF_SVEXTRACTTESTCODE |
Typedefs | |
using | BindTable = DenseMap< StringAttr, SmallDenseMap< StringAttr, sv::BindOp > > |
Functions | |
static void | getBackwardSliceSimple (Operation *rootOp, SetVector< Operation * > &backwardSlice, llvm::function_ref< bool(Operation *)> filter) |
static void | blockSlice (SetVector< Operation * > &ops, SetVector< Operation * > &blocks) |
static void | computeSlice (SetVector< Operation * > &roots, SetVector< Operation * > &results, llvm::function_ref< bool(Operation *)> filter) |
static SetVector< Operation * > | getBackwardSlice (SetVector< Operation * > &roots, llvm::function_ref< bool(Operation *)> filter) |
static SetVector< Operation * > | getBackwardSlice (hw::HWModuleOp module, llvm::function_ref< bool(Operation *)> rootFn, llvm::function_ref< bool(Operation *)> filterFn) |
static StringAttr | getNameForPort (Value val, SmallVector< mlir::Attribute > modulePorts) |
static hw::HWModuleOp | createModuleForCut (hw::HWModuleOp op, SetVector< Value > &inputs, IRMapping &cutMap, StringRef suffix, Attribute path, Attribute fileName, BindTable &bindTable) |
static void | setInsertPointToEndOrTerminator (OpBuilder &builder, Block *block) |
static void | addBlockMapping (IRMapping &cutMap, Operation *oldOp, Operation *newOp) |
static bool | hasOoOArgs (hw::HWModuleOp newMod, Operation *op) |
static void | updateOoOArgs (SmallVectorImpl< Operation * > &lateBoundOps, IRMapping &cutMap) |
static void | migrateOps (hw::HWModuleOp oldMod, hw::HWModuleOp newMod, SetVector< Operation * > &depOps, IRMapping &cutMap, hw::InstanceGraph &instanceGraph) |
static bool | isBound (hw::HWModuleLike op, hw::InstanceGraph &instanceGraph) |
static void | addExistingBinds (Block *topLevelModule, BindTable &bindTable) |
static void | inlineInputOnly (hw::HWModuleOp oldMod, hw::InstanceGraph &instanceGraph, BindTable &bindTable, SmallPtrSetImpl< Operation * > &opsToErase, llvm::DenseSet< hw::InnerRefAttr > &innerRefUsedByNonBindOp) |
static bool | isAssertOp (hw::HWSymbolCache &symCache, Operation *op) |
static bool | isCoverOp (hw::HWSymbolCache &symCache, Operation *op) |
static bool | isAssumeOp (hw::HWSymbolCache &symCache, Operation *op) |
bool | isInDesign (hw::HWSymbolCache &symCache, Operation *op, bool disableInstanceExtraction=false, bool disableRegisterExtraction=false) |
Return true if the operation belongs to the design. More... | |
#define GEN_PASS_DEF_SVEXTRACTTESTCODE |
Definition at line 37 of file SVExtractTestCode.cpp.
using BindTable = DenseMap<StringAttr, SmallDenseMap<StringAttr, sv::BindOp> > |
Definition at line 46 of file SVExtractTestCode.cpp.
|
static |
Definition at line 277 of file SVExtractTestCode.cpp.
References assert().
Referenced by migrateOps().
|
static |
Definition at line 350 of file SVExtractTestCode.cpp.
|
static |
Definition at line 99 of file SVExtractTestCode.cpp.
Referenced by getBackwardSlice().
|
static |
Definition at line 109 of file SVExtractTestCode.cpp.
References getBackwardSliceSimple().
Referenced by getBackwardSlice().
|
static |
Definition at line 188 of file SVExtractTestCode.cpp.
References circt::calyx::direction::get(), circt::emit::getFragmentsAttrName(), getNameForPort(), circt::hw::getVerilogModuleNameAttr(), Input, and circt::Namespace::newName().
|
static |
Definition at line 140 of file SVExtractTestCode.cpp.
References getBackwardSlice().
|
static |
Definition at line 119 of file SVExtractTestCode.cpp.
References blockSlice(), and computeSlice().
Referenced by getBackwardSlice().
|
static |
Definition at line 57 of file SVExtractTestCode.cpp.
References assert().
Referenced by computeSlice().
|
static |
Definition at line 151 of file SVExtractTestCode.cpp.
References circt::calyx::direction::get(), and seq::reg().
Referenced by createModuleForCut().
|
static |
Definition at line 290 of file SVExtractTestCode.cpp.
Referenced by inlineInputOnly(), and migrateOps().
|
static |
Definition at line 359 of file SVExtractTestCode.cpp.
References circt::igraph::InstanceGraphNode::addInstance(), assert(), circt::calyx::direction::get(), hasOoOArgs(), hw.ModuleLike::name(), circt::igraph::InstanceGraphNode::noUses(), updateOoOArgs(), and circt::igraph::InstanceGraphNode::uses().
|
static |
Definition at line 544 of file SVExtractTestCode.cpp.
Referenced by isInDesign().
|
static |
Definition at line 580 of file SVExtractTestCode.cpp.
Referenced by isInDesign().
|
static |
Definition at line 338 of file SVExtractTestCode.cpp.
|
static |
Definition at line 569 of file SVExtractTestCode.cpp.
Referenced by isInDesign().
bool isInDesign | ( | hw::HWSymbolCache & | symCache, |
Operation * | op, | ||
bool | disableInstanceExtraction = false , |
||
bool | disableRegisterExtraction = false |
||
) |
Return true if the operation belongs to the design.
Definition at line 593 of file SVExtractTestCode.cpp.
References isAssertOp(), isAssumeOp(), and isCoverOp().
|
static |
Definition at line 314 of file SVExtractTestCode.cpp.
References addBlockMapping(), circt::igraph::InstanceGraphNode::addInstance(), hasOoOArgs(), setInsertPointToEndOrTerminator(), and updateOoOArgs().
|
static |
Definition at line 268 of file SVExtractTestCode.cpp.
Referenced by migrateOps().
|
static |
Definition at line 302 of file SVExtractTestCode.cpp.
Referenced by inlineInputOnly(), and migrateOps().