CIRCT
18.0.0git
|
#include <APIUtilities.h>
Public Types | |
using | FieldInfo = hw::StructType::FieldInfo |
Public Member Functions | |
ESIAPIType (mlir::Type) | |
virtual | ~ESIAPIType ()=default |
bool | operator== (const ESIAPIType &) const |
mlir::Type | getType () const |
Get the type back. More... | |
virtual bool | isSupported () const |
Returns true if the type is currently supported. More... | |
llvm::ArrayRef< FieldInfo > | getFields () const |
StringRef | name () const |
For now, the name is just the type serialized. More... | |
uint64_t | size () const |
uint64_t | typeID () const |
Protected Attributes | |
llvm::SmallVector< FieldInfo > | fieldTypes |
Cosim requires that everything be contained in a struct. More... | |
mlir::Type | type |
std::string | cachedName |
std::optional< uint64_t > | cachedID |
Definition at line 31 of file APIUtilities.h.
using circt::esi::ESIAPIType::FieldInfo = hw::StructType::FieldInfo |
Definition at line 33 of file APIUtilities.h.
circt::esi::ESIAPIType::ESIAPIType | ( | mlir::Type | ) |
Definition at line 63 of file APIUtilities.cpp.
References fieldTypes, circt::calyx::direction::get(), and type.
|
virtualdefault |
|
inline |
Definition at line 45 of file APIUtilities.h.
References fieldTypes.
|
inline |
|
virtual |
Returns true if the type is currently supported.
Definition at line 53 of file APIUtilities.cpp.
References circt::esi::isSupported(), and type.
StringRef circt::esi::ESIAPIType::name | ( | ) | const |
For now, the name is just the type serialized.
This works only because we only support ints.
Definition at line 108 of file APIUtilities.cpp.
References cachedName, circt::esi::emitName(), type, and typeID().
bool circt::esi::ESIAPIType::operator== | ( | const ESIAPIType & | that | ) | const |
Definition at line 79 of file APIUtilities.cpp.
References type.
uint64_t circt::esi::ESIAPIType::size | ( | ) | const |
Definition at line 57 of file APIUtilities.cpp.
References circt::hw::getBitWidth(), and type.
uint64_t circt::esi::ESIAPIType::typeID | ( | ) | const |
Definition at line 119 of file APIUtilities.cpp.
References cachedID, circt::esi::esiApiVersion, and type.
Referenced by name().
|
mutableprotected |
Definition at line 62 of file APIUtilities.h.
Referenced by typeID().
|
mutableprotected |
Definition at line 61 of file APIUtilities.h.
Referenced by name().
|
protected |
Cosim requires that everything be contained in a struct.
ESI doesn't so we wrap non-struct types in a struct.
Definition at line 58 of file APIUtilities.h.
Referenced by ESIAPIType(), and getFields().
|
protected |
Definition at line 60 of file APIUtilities.h.
Referenced by fsm.MachineOp::__init__(), hw.HWModuleOp::add_entry_block(), ESIAPIType(), getType(), hw.HWModuleOp::input_indices(), fsm.MachineOp::instantiate(), isSupported(), name(), operator==(), hw.HWModuleOp::outputs(), size(), and typeID().