Skip to main content

Type Conversion

TO_BIT(<STD_LOGIC>)                         --STD_LOGIC to BIT

TO_BITVECTOR(<STD_LOGIC_VECTOR>) --STD_LOGIC_VECTOR to BIT_VECTOR
TO_STDLOGICVECTOR(<BIT_VECTOR>) --BIT_VECTOR to STD_LOGIC_VECTOR

SIGNED(<STD_LOGIC_VECTOR>) --STD_LOGIC_VECTOR to SIGNED
UNSIGNED(<STD_LOGIC_VECTOR>) --STD_LOGIC_VECTOR to UNSIGNED
STD_LOGIC_VECTOR(<SIGNED/UNSIGNED>) --SIGNED/UNSIGNED to STD_LOGIC_VECTOR

TO_SIGNED(<INTEGER>, <SIGNED>'LENGTH) --INTEGER/NATURAL/POSITIVE to SIGNED
TO_UNSIGNED(<NATURAL>, <UNSIGNED>'LENGTH) --NATURAL/INTEGER/POSITIVE to UNSIGNED
TO_INTEGER(<SIGNED/UNSIGNED>) --SIGNED/UNSIGNED to INTEGER