Struct moore_svlog::ty::UnpackedType [−][src]
pub struct UnpackedType<'a> {
pub core: UnpackedCore<'a>,
pub dims: Vec<UnpackedDim<'a>>,
// some fields omitted
}
Expand description
An unpacked type.
Fields
core: UnpackedCore<'a>
The core unpacked type.
dims: Vec<UnpackedDim<'a>>
The unpacked dimensions.
Implementations
Create a new type with no unpacked dimensions.
This creates the type on the stack. In general you will want to use the
make_*
functions to create a type that is interned into a context.
Create a new type with unpacked dimensions.
This creates the type on the stack. In general you will want to use the
make_*
functions to create a type that is interned into a context.
Create an interned type with no unpacked dimensions.
pub fn make_dims(
cx: &impl TypeContext<'a>,
core: impl Into<UnpackedCore<'a>>,
dims: Vec<UnpackedDim<'a>>
) -> &'a Self
pub fn make_dims(
cx: &impl TypeContext<'a>,
core: impl Into<UnpackedCore<'a>>,
dims: Vec<UnpackedDim<'a>>
) -> &'a Self
Create an interned type with unpacked dimensions.
Create a tombstone.
Create a logic
type.
Internalize this type in a context and resolve it.
Resolve one level of name or type reference indirection.
For example, given typedef int foo; typedef foo bar;
, resolves bar
to foo
.
Resolve all name or type reference indirections recursively.
For example, given typedef int foo; typedef foo bar;
, resolves bar
to int
.
Check if this type is equal to another one.
Types which coalesce to iN
in LLHD are checked for equality of their
SBVT.
Check if this type is strictly equal to another one.
If this type is strictly a packed type, convert it.
Compute the size of this type in bits.
Returns None
if one of the type’s dimensions is unsized, associative,
or a queue, or the core type has no known size.
Check if this type is trivially a SBVT.
Check if this type is an integer atom type, like int
.
Check if this type is a single bit type, like bit
.
Check if this type will coalesce to a scalar type in LLHD, like i42
.
Convert this type into an SBVT if possible.
Convert this type into an SBVT, or report a bug with the given span.
Get an iterator over the type’s packed dimensions, slowest-varying first.
For example, produces [3:0], [7:0]
for bit [3:0][7:0] $ [1][2]
.
Get an iterator over the type’s unpacked dimensions, slowest-varying first.
For example, produces [1], [2]
for bit [3:0][7:0] $ [1][2]
.
Get an iterator over the type’s dimensions. slowest-varying first.
For example, produces [1], [2], [3:0], [7:0]
for bit [3:0][7:0] $ [1][2]
.
Pop the outermost dimension off the type.
For example, maps bit $ [1][2]
to bit $ [2]
. Pops off the packed
type as well, mapping bit [7:0] $
to bit $
.
Replace the outermost dimension of the type.
Panics if the type has no dimensions, or a packed dimension is replaced with an unpacked dimension, or vice-versa.
Get the outermost dimension of the type.
For example, yields the [1]
in bit $ [1][2]
.
Get the underlying struct, or None
if the type is no struct.
Get the underlying enum, or None
if the type is no enum.
Get the underlying module, or None
if the type is not a module.
Get the underlying interface, or None
if the type is not a interface.
Trait Implementations
Performs the conversion.
Performs the conversion.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for UnpackedType<'a>
impl<'a> Send for UnpackedType<'a>
impl<'a> Sync for UnpackedType<'a>
impl<'a> Unpin for UnpackedType<'a>
impl<'a> !UnwindSafe for UnpackedType<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more