Decide whether the datatype is packed or not.
(vl-datatype-packedp x) → packedp
A shallow check; e.g. we don't check for invalid things such as a packed struct with a member that's an unpacked array.
Note that the question of whether something is packed is subtly different
from the question of whether you can select from it: namely, simple bit types
such as
Function:
(defun vl-datatype-packedp (x) (declare (xargs :guard (vl-datatype-p x))) (declare (xargs :guard (vl-datatype-resolved-p x))) (let ((__function__ 'vl-datatype-packedp)) (declare (ignorable __function__)) (b* ((x (vl-maybe-usertype-resolve x)) ((when (consp (vl-datatype->udims x))) nil) ((when (consp (vl-datatype->pdims x))) t)) (vl-datatype-case x :vl-coretype (b* (((vl-coredatatype-info xinfo) (vl-coretypename->info x.name))) (and xinfo.size t)) :vl-struct x.packedp :vl-union x.packedp :vl-enum t :vl-usertype (impossible)))))
Theorem:
(defthm vl-datatype-packedp-of-vl-datatype-fix-x (equal (vl-datatype-packedp (vl-datatype-fix x)) (vl-datatype-packedp x)))
Theorem:
(defthm vl-datatype-packedp-vl-datatype-equiv-congruence-on-x (implies (vl-datatype-equiv x x-equiv) (equal (vl-datatype-packedp x) (vl-datatype-packedp x-equiv))) :rule-classes :congruence)