13 #include "mlir/IR/Builders.h"
14 #include "mlir/IR/DialectImplementation.h"
15 #include "llvm/ADT/TypeSwitch.h"
17 using namespace circt;
21 #define GET_TYPEDEF_CLASSES
22 #include "circt/Dialect/Arc/ArcTypes.cpp.inc"
27 StateType::verify(llvm::function_ref<InFlightDiagnostic()> emitError,
30 return emitError() <<
"state type must have a known bit width; got "
35 unsigned MemoryType::getStride() {
36 unsigned stride = (getWordType().getWidth() + 7) / 8;
37 return llvm::alignToPowerOf2(stride, llvm::bit_ceil(std::min(stride, 16U)));
40 void ArcDialect::registerTypes() {
42 #define GET_TYPEDEF_LIST
43 #include "circt/Dialect/Arc/ArcTypes.cpp.inc"
mlir::Type innerType(mlir::Type type)
std::optional< int64_t > getBitWidth(FIRRTLBaseType type, bool ignoreFlip=false)
int64_t getBitWidth(mlir::Type type)
Return the hardware bit width of a type.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.