CIRCT 22.0.0git
Loading...
Searching...
No Matches
SynthDialect.cpp
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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
13using namespace circt;
14using namespace synth;
15
16void SynthDialect::initialize() {
17 addOperations<
18#define GET_OP_LIST
19#include "circt/Dialect/Synth/Synth.cpp.inc"
20 >();
21}
22
23Operation *SynthDialect::materializeConstant(OpBuilder &builder,
24 Attribute value, Type type,
25 Location loc) {
26 // Integer constants.
27 if (auto intType = dyn_cast<IntegerType>(type))
28 if (auto attrValue = dyn_cast<IntegerAttr>(value))
29 return hw::ConstantOp::create(builder, loc, type, attrValue);
30 return nullptr;
31}
32
33#include "circt/Dialect/Synth/SynthDialect.cpp.inc"
create(data_type, value)
Definition hw.py:433
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition synth.py:1