Struct moore_svlog::ty::PackedType [−][src]
pub struct PackedType<'a> {
pub core: PackedCore<'a>,
pub sign: Sign,
pub sign_explicit: bool,
pub dims: Vec<PackedDim>,
// some fields omitted
}
Expand description
A packed type.
Fields
core: PackedCore<'a>
The core packed type.
sign: Sign
The type sign.
sign_explicit: bool
Whether the sign was explicit in the source code.
dims: Vec<PackedDim>
The packed dimensions.
Implementations
Create a new type with default sign and no packed 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 default sign and packed 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 no packed 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.
pub fn with_sign_and_dims(
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool,
dims: Vec<PackedDim>
) -> Self
pub fn with_sign_and_dims(
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool,
dims: Vec<PackedDim>
) -> Self
Create a new type with packed 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 from an SBVT.
Create an interned type with default sign and no packed dimensions.
pub fn make_dims(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
dims: Vec<PackedDim>
) -> &'a Self
pub fn make_dims(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
dims: Vec<PackedDim>
) -> &'a Self
Create an interned type with default sign and packed dimensions.
pub fn make_sign(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool
) -> &'a Self
pub fn make_sign(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool
) -> &'a Self
Create an interned type with no packed dimensions.
pub fn make_sign_and_dims(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool,
dims: Vec<PackedDim>
) -> &'a Self
pub fn make_sign_and_dims(
cx: &impl TypeContext<'a>,
core: impl Into<PackedCore<'a>>,
sign: Sign,
sign_explicit: bool,
dims: Vec<PackedDim>
) -> &'a Self
Create an interned type with packed dimensions.
Create an interned type from an SBVT.
Create a tombstone.
Create a logic
type.
Internalize this type in a context and resolve it.
Wrap this packed type up in an unpacked type.
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.
Compute the size of this type in bits.
Returns None
if one of the type’s dimensions is []
.
Check if this type is trivially a SBVT.
Check if this type is a simple integer vector type, like logic [x:y]
or logic
.
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.
Pop the outermost dimension off the type.
For example, maps bit [3:0][7:0]
to bit [7:0]
.
Replace the outermost dimension of the type.
Panics if the type has no dimensions.
Get the outermost dimension of the type.
For example, yields the [3:0]
in bit [3:0][7:0]
.
Get the underlying struct, or None
if the type is no struct.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for PackedType<'a>
impl<'a> Send for PackedType<'a>
impl<'a> Sync for PackedType<'a>
impl<'a> Unpin for PackedType<'a>
impl<'a> !UnwindSafe for PackedType<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more