CIRCT
19.0.0git
|
An unpacked associative dimension, like [T]
or [*]
.
More...
#include <MooreTypes.h>
Public Member Functions | |
UnpackedType | getIndexType () const |
Get the index type of the associative dimension. More... | |
Static Public Member Functions | |
static UnpackedAssocDim | get (UnpackedType inner, UnpackedType indexType={}) |
Static Public Attributes | |
static constexpr StringLiteral | name = "moore.unpacked_assoc_dim" |
Friends | |
struct | detail::DimStorage |
An unpacked associative dimension, like [T]
or [*]
.
Associative arrays in SystemVerilog can have a concrete index type ([T]
), or a wildcard index type ([*]
, §7.8.1). The latter is exceptionally strange, as it applies only to integer indices, but supports arbitrarily sized indices by always removing leading zeros from any index that is used in the lookup. This is interesting if a string
is used to index into such an array, because strings are automatically cast to a bit vector of equivalent size, which results in a sort-of string key lookup. However, note that there are also dedicated semantics for using string
as the actual index type (§7.8.2).
See IEEE 1800-2017 §7.8 "Associative arrays".
Definition at line 1013 of file MooreTypes.h.
|
static |
Definition at line 930 of file MooreTypes.cpp.
References circt::calyx::direction::get().
Referenced by customTypeParser(), mooreUnpackedAssocDimTypeGet(), and mooreUnpackedAssocDimTypeGetWithIndex().
UnpackedType UnpackedAssocDim::getIndexType | ( | ) | const |
Get the index type of the associative dimension.
This returns either the type T
in a dimension [T]
, or a null type in a dimension [*]
.
Definition at line 937 of file MooreTypes.cpp.
|
friend |
Definition at line 1027 of file MooreTypes.h.
|
staticconstexpr |
Definition at line 1023 of file MooreTypes.h.