CIRCT
18.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={}) |
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 965 of file MooreTypes.h.
|
static |
Definition at line 920 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 927 of file MooreTypes.cpp.
|
friend |
Definition at line 977 of file MooreTypes.h.