CIRCT
19.0.0git
|
A packed struct. More...
#include <MooreTypes.h>
Public Member Functions | |
Sign | getSign () const |
Get the sign of this struct. More... | |
bool | isSignExplicit () const |
Returns whether the sign was explicitly mentioned by the user. More... | |
const Struct & | getStruct () const |
Get the struct definition. More... | |
void | format (llvm::raw_ostream &os) const |
Format this struct in SystemVerilog syntax. More... | |
operator const Struct & () const | |
Allow implicit casts from PackedStructType to the actual struct definition. More... | |
Static Public Member Functions | |
static PackedStructType | get (StructKind kind, ArrayRef< StructMember > members, StringAttr name, Location loc, std::optional< Sign > sign={}) |
static PackedStructType | get (const Struct &strukt, std::optional< Sign > sign={}) |
Static Public Attributes | |
static constexpr StringLiteral | name = "moore.packed_struct" |
A packed struct.
Definition at line 1170 of file MooreTypes.h.
|
inline |
Format this struct in SystemVerilog syntax.
Useful to present the struct back to the user in diagnostics.
Definition at line 1191 of file MooreTypes.h.
References circt::moore::Struct::format(), getSign(), getStruct(), and isSignExplicit().
|
inlinestatic |
Definition at line 1177 of file MooreTypes.h.
|
static |
Definition at line 1124 of file MooreTypes.cpp.
References assert(), circt::calyx::direction::get(), name, circt::moore::detail::StructTypeStorage::pack(), circt::moore::StructMember::type, and circt::moore::Unsigned.
Referenced by customTypeParser().
Sign PackedStructType::getSign | ( | ) | const |
Get the sign of this struct.
Definition at line 1139 of file MooreTypes.cpp.
Referenced by format().
const Struct & PackedStructType::getStruct | ( | ) | const |
Get the struct definition.
Definition at line 1145 of file MooreTypes.cpp.
Referenced by format(), and operator const Struct &().
bool PackedStructType::isSignExplicit | ( | ) | const |
Returns whether the sign was explicitly mentioned by the user.
Definition at line 1141 of file MooreTypes.cpp.
Referenced by format().
|
inline |
Allow implicit casts from PackedStructType
to the actual struct definition.
Definition at line 1199 of file MooreTypes.h.
References getStruct().
|
staticconstexpr |
Definition at line 1201 of file MooreTypes.h.
Referenced by get().