CIRCT 22.0.0git
Loading...
Searching...
No Matches
Classes | Namespaces | Macros | Functions
SimToSV.cpp File Reference
#include "circt/Conversion/SimToSV.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/Emit/EmitOps.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/SV/SVOps.h"
#include "circt/Dialect/Seq/SeqOps.h"
#include "circt/Dialect/Sim/SimDialect.h"
#include "circt/Dialect/Sim/SimOps.h"
#include "circt/Support/Namespace.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/DialectImplementation.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "mlir/IR/Threading.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
#include "circt/Conversion/Passes.h.inc"
Include dependency graph for SimToSV.cpp:

Go to the source code of this file.

Classes

class  PlusArgsTestLowering
 
class  PlusArgsValueLowering
 
class  DPICallLowering
 
struct  LowerDPIFunc
 

Namespaces

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

Macros

#define DEBUG_TYPE   "lower-sim-to-sv"
 
#define GEN_PASS_DEF_LOWERSIMTOSV
 

Functions

static bool needsIfdefGuard (Operation *op)
 Check whether an op should be placed inside an ifdef guard that prevents it from affecting synthesis runs.
 
static std::pair< Value, Value > needsClockAndConditionWrapper (Operation *op)
 Check whether an op should be placed inside an always process triggered on a clock, and an if statement checking for a condition.
 
static LogicalResult convert (ClockedTerminateOp op, PatternRewriter &rewriter)
 
static LogicalResult convert (ClockedPauseOp op, PatternRewriter &rewriter)
 
static LogicalResult convert (TerminateOp op, PatternRewriter &rewriter)
 
static LogicalResult convert (PauseOp op, PatternRewriter &rewriter)
 
static bool moveOpsIntoIfdefGuardsAndProcesses (Operation *rootOp)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lower-sim-to-sv"

Definition at line 29 of file SimToSV.cpp.

◆ GEN_PASS_DEF_LOWERSIMTOSV

#define GEN_PASS_DEF_LOWERSIMTOSV

Definition at line 32 of file SimToSV.cpp.

Function Documentation

◆ convert() [1/4]

static LogicalResult convert ( ClockedPauseOp  op,
PatternRewriter &  rewriter 
)
static

Definition at line 174 of file SimToSV.cpp.

◆ convert() [2/4]

static LogicalResult convert ( ClockedTerminateOp  op,
PatternRewriter &  rewriter 
)
static

Definition at line 166 of file SimToSV.cpp.

◆ convert() [3/4]

static LogicalResult convert ( PauseOp  op,
PatternRewriter &  rewriter 
)
static

Definition at line 187 of file SimToSV.cpp.

◆ convert() [4/4]

static LogicalResult convert ( TerminateOp  op,
PatternRewriter &  rewriter 
)
static

Definition at line 179 of file SimToSV.cpp.

◆ moveOpsIntoIfdefGuardsAndProcesses()

static bool moveOpsIntoIfdefGuardsAndProcesses ( Operation *  rootOp)
static

Definition at line 332 of file SimToSV.cpp.

References getBodyBlock(), needsClockAndConditionWrapper(), and needsIfdefGuard().

◆ needsClockAndConditionWrapper()

static std::pair< Value, Value > needsClockAndConditionWrapper ( Operation *  op)
static

Check whether an op should be placed inside an always process triggered on a clock, and an if statement checking for a condition.

Definition at line 47 of file SimToSV.cpp.

Referenced by moveOpsIntoIfdefGuardsAndProcesses().

◆ needsIfdefGuard()

static bool needsIfdefGuard ( Operation *  op)
static

Check whether an op should be placed inside an ifdef guard that prevents it from affecting synthesis runs.

Definition at line 41 of file SimToSV.cpp.

Referenced by moveOpsIntoIfdefGuardsAndProcesses().