(FPGA) 10M02SCM (小脚丫STEP-MAX10)
型態轉換
參考資訊:
1. tip-convert-numeric-std-logic-vector-to-integer
表格如下:
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); |