13#ifndef CIRCT_DIALECT_MOORE_MOORETYPES_H
14#define CIRCT_DIALECT_MOORE_MOORETYPES_H
17#include "mlir/IR/Attributes.h"
18#include "mlir/IR/BuiltinAttributes.h"
19#include "mlir/IR/Location.h"
20#include "mlir/IR/Types.h"
21#include "mlir/Interfaces/MemorySlotInterfaces.h"
33class OpenUnpackedArrayType;
42class UnpackedArrayType;
43class UnpackedStructType;
44class UnpackedUnionType;
93 return llvm::isa<
PackedType, StringType, ChandleType, EventType, RealType,
94 UnpackedArrayType, OpenUnpackedArrayType, AssocArrayType,
95 QueueType, UnpackedStructType, UnpackedUnionType>(type);
109 static Type
parse(mlir::AsmParser &odsParser);
110 void print(mlir::AsmPrinter &odsPrinter)
const;
144 return llvm::isa<VoidType, IntType, ArrayType, OpenArrayType, StructType,
145 UnionType, TimeType>(type);
165 using UnpackedType::UnpackedType;
186 return llvm::hash_combine(x.
name, x.
type);
193#define GET_TYPEDEF_CLASSES
194#include "circt/Dialect/Moore/MooreTypes.h.inc"
A packed SystemVerilog type.
bool containsTimeType() const
Check if this is a TimeType, or an aggregate that contains a nested TimeType.
std::optional< unsigned > getBitSize() const
Get the size of this type in bits.
Domain getDomain() const
Get the value domain of this type.
static bool classof(Type type)
IntType getSimpleBitVector() const
Get the simple bit vector type equivalent to this packed type.
An unpacked SystemVerilog type.
std::optional< unsigned > getBitSize() const
Get the size of this type in bits.
Domain getDomain() const
Get the value domain of this type.
static bool classof(Type type)
static Type parse(mlir::AsmParser &odsParser)
void print(mlir::AsmPrinter &odsPrinter) const
llvm::hash_code hash_value(const StructLikeMember &x)
Domain
The number of values each bit of a type can assume.
@ FourValued
Four-valued types such as logic or integer.
@ TwoValued
Two-valued types such as bit or int.
bool isIntType(Type type, unsigned width)
Check if a type is an IntType type of the given width.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
UnpackedType type
The type of this member.
StringAttr name
The name of this member.
bool operator==(const StructLikeMember &other) const