Forum Discussion
Altera_Forum
Honored Contributor
15 years agoquestion about arithmetic operator '+'
Every time I try following code, there is a error saying that "Error (10327): VHDL error at Arithmetic.vhd(35): can't determine definition of operator ""+"" -- found 0 possible definitions", Can anyo...
Altera_Forum
Honored Contributor
15 years agoYou get the error, because you are using unsuitable data types and incompatible libraries.
There are two possible ways: - You can refer to the legacy non-IEEE STD_LOGIC_UNSIGNED library. But then you have to import STD_LOGIC_ARITH instead of NUMERIC_STD. bit_vector has to be changed to std_logic_vector in addition - You can use correct VHDL types and the official IEEE.NUMERIC_STD library. The involved signals should be defined as unsigned in this case. As a side remark, the inplemented left-shift can be simply written asvar9 <= var3 & '0'; without involving numeric types.