CIRCT
18.0.0git
|
An unpacked dimension. More...
#include <MooreTypes.h>
Public Member Functions | |
UnpackedType | getInner () const |
Get the element type of the dimension. This is the x in x[a:b] . More... | |
void | format (llvm::raw_ostream &os, llvm::function_ref< void(llvm::raw_ostream &)> around={}) const |
Format this type in SystemVerilog syntax. More... | |
void | formatDim (llvm::raw_ostream &os) const |
Format just the dimension part, [...] . More... | |
UnpackedType | resolved () const |
Resolve one level of name or type reference indirection. More... | |
UnpackedType | fullyResolved () const |
Resolve all name or type reference indirections. More... | |
![]() | |
UnpackedType | resolved () const |
Resolve one level of name or type reference indirection. More... | |
UnpackedType | fullyResolved () const |
Resolve all name or type reference indirections. More... | |
Domain | getDomain () const |
Get the value domain of this type. More... | |
Sign | getSign () const |
Get the sign for this type. More... | |
std::optional< unsigned > | getBitSize () const |
Get the size of this type in bits. More... | |
SimpleBitVectorType | getSimpleBitVectorOrNull () const |
Get this type as a simple bit vector, if it is one. More... | |
bool | isSimpleBitVector () const |
Check whether this is a simple bit vector type. More... | |
SimpleBitVectorType | getSimpleBitVector () const |
Get this type as a simple bit vector. More... | |
SimpleBitVectorType | castToSimpleBitVectorOrNull () const |
Cast this type to a simple bit vector. More... | |
bool | isCastableToSimpleBitVector () const |
Check whether this type can be cast to a simple bit vector type. More... | |
SimpleBitVectorType | castToSimpleBitVector () const |
Cast this type to a simple bit vector. More... | |
void | format (llvm::raw_ostream &os, llvm::function_ref< void(llvm::raw_ostream &os)> around={}) const |
Format this type in SystemVerilog syntax into an output stream. More... | |
void | format (llvm::raw_ostream &os, StringRef around) const |
template<typename... Args> | |
std::string | toString (Args... args) const |
Format this type in SystemVerilog syntax into a string. More... | |
Static Public Member Functions | |
static bool | classof (Type type) |
![]() | |
static bool | classof (Type type) |
Protected Member Functions | |
const detail::DimStorage * | getImpl () const |
An unpacked dimension.
Definition at line 863 of file MooreTypes.h.
|
inlinestatic |
Definition at line 865 of file MooreTypes.h.
void UnpackedDim::format | ( | llvm::raw_ostream & | os, |
llvm::function_ref< void(llvm::raw_ostream &)> | around = {} |
||
) | const |
Format this type in SystemVerilog syntax.
Useful to present the type back to the user in diagnostics. The unpacked dimensions are separated from any packed dimensions by calling the provided around
callback, or a $
if no callback has been provided. This can be useful when printing declarations like bit [7:0] foo [16]
to have the type properly surround the declaration name foo
, and to easily tell packed from unpacked dimensions in types like bit [7:0] $ [15]
.
Definition at line 839 of file MooreTypes.cpp.
References circt::moore::UnpackedType::format().
void UnpackedDim::formatDim | ( | llvm::raw_ostream & | os | ) | const |
Format just the dimension part, [...]
.
Definition at line 864 of file MooreTypes.cpp.
UnpackedType UnpackedDim::fullyResolved | ( | ) | const |
Resolve all name or type reference indirections.
See UnpackedType::fullyResolved
.
Definition at line 890 of file MooreTypes.cpp.
References circt::moore::detail::DimStorage::fullyResolved, and getImpl().
|
protected |
Definition at line 894 of file MooreTypes.cpp.
Referenced by fullyResolved(), getInner(), and resolved().
UnpackedType UnpackedDim::getInner | ( | ) | const |
Get the element type of the dimension. This is the x
in x[a:b]
.
Definition at line 837 of file MooreTypes.cpp.
References getImpl(), and circt::moore::detail::DimStorage::inner.
UnpackedType UnpackedDim::resolved | ( | ) | const |
Resolve one level of name or type reference indirection.
Definition at line 888 of file MooreTypes.cpp.
References getImpl(), and circt::moore::detail::DimStorage::resolved.