17#include "mlir/IR/Builders.h"
18#include "mlir/IR/BuiltinTypes.h"
19#include "mlir/IR/DialectImplementation.h"
25struct SeqProbeTypeDialectInterface :
public hw::ProbeTypeDialectInterface {
29 return isa<ClockType>(type);
38void SeqDialect::initialize() {
43 addInterfaces<SeqProbeTypeDialectInterface>();
53Operation *SeqDialect::materializeConstant(OpBuilder &builder, Attribute value,
54 Type type, Location loc) {
56 if (
auto intType = dyn_cast<IntegerType>(type))
57 if (
auto attrValue = dyn_cast<IntegerAttr>(value))
60 if (isa<ClockType>(type))
61 if (
auto attrValue = dyn_cast<ClockConstAttr>(value))
62 return seq::ConstClockOp::create(builder, loc, attrValue);
67#include "circt/Dialect/Seq/SeqDialect.cpp.inc"
bool isValidProbeElementType(mlir::Type type)
Return true if type is a valid probe payload.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
ProbeTypeDialectInterface(mlir::Dialect *dialect)