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;
103 return llvm::isa<
PackedType, StringType, ChandleType, EventType, RealType,
104 UnpackedArrayType, OpenUnpackedArrayType, AssocArrayType,
105 QueueType, UnpackedStructType, UnpackedUnionType>(type);
119 static Type
parse(mlir::AsmParser &odsParser);
120 void print(mlir::AsmPrinter &odsPrinter)
const;
154 return llvm::isa<VoidType, IntType, ArrayType, OpenArrayType, StructType,
155 UnionType, TimeType>(type);
175 using UnpackedType::UnpackedType;
196 return llvm::hash_combine(x.
name, x.
type);
203#define GET_TYPEDEF_CLASSES
204#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)
bool isRealType(Type type, unsigned width)
Check if a type is a RealType type of the given width.
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.
RealWidth
The type of floating point / real number behind a RealType.
@ f32
A standard 32-Bit floating point number ("float")
@ f64
A 64-bit double-precision floation point number ("double")
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