參考資訊:
https://www.nandland.com/vhdl/tips/tip-convert-numeric-std-logic-vector-to-integer.html#Numeric-Integer-To-Signed
| Conversion | Method |
|---|---|
| Integer to Signed | to_signed(src, dst'length); |
| Integer to Std_Logic_Vector | std_logic_vector(to_unsigned(src, dst'length)); |
| Integer to Unsigned | to_unsigned(src, dst'length); |
| Std_Logic_Vector to Integer | to_integer(unsigned(src)); |
| Std_Logic_Vector to Signed | signed(src); |
| Std_Logic_Vector to Unsigned | unsigned(src); |
| Signed to Integer | to_integer(src); |
| Signed to Std_Logic_Vector | std_logic_vector(src); |
| Signed to Unsigned | unsigned(src); |
| Unsigned to Integer | to_integer(src); |
| Unsigned to Signed | signed(src); |
| Unsigned to Std_Logic_Vector | std_logic_vector(src); |