CIRCT 20.0.0git
Loading...
Searching...
No Matches
VerifDialect.cpp
Go to the documentation of this file.
1//===- VerifDialect.cpp - Verif dialect implementation --------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
12#include "mlir/IR/Builders.h"
13#include "mlir/IR/DialectImplementation.h"
14
15using namespace circt;
16using namespace verif;
17
18void VerifDialect::initialize() {
19 addOperations<
20#define GET_OP_LIST
21#include "circt/Dialect/Verif/Verif.cpp.inc"
22 >();
23}
24
25Operation *VerifDialect::materializeConstant(OpBuilder &builder,
26 Attribute value, Type type,
27 Location loc) {
28 if (auto intType = dyn_cast<IntegerType>(type))
29 if (auto attrValue = dyn_cast<IntegerAttr>(value))
30 return builder.create<hw::ConstantOp>(loc, type, attrValue);
31 return nullptr;
32}
33
34#include "circt/Dialect/Verif/VerifDialect.cpp.inc"
35#include "circt/Dialect/Verif/VerifEnums.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition verif.py:1