The Logic, SmallEnum, and Enum formats were not treated consistently.
Sometimes the wrong value type was used to store signals, and the
variable signal size of Enum was not handled properly. The correct
relationships for these types may be seen in the following table:
Format Value type Signal size
================ ============== ===========
vhpiLogicVal vhpiEnumT 8
vhpiSmallEnumVal vhpiSmallEnumT 8
vhpiEnumVal vhpiEnumT variable
In order to handle the variable size of Enum, we need to use FOR_ALL_SIZES
from model.c. Move it to util.h, and rename a conflicting macro with a
similar purpose. This also adds support for getting SmallEnumVecs.
This adds a test for the Vec versions of these formats; the non-vec
versions will be tested when indexedName get/put support is added.