自己刚开始学习VHDL和Quartus II 7.2,写了下面一段程序后编译总是出错,希望高手指点一下,在下先谢谢了!
程序如下: library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_unsigned.all; entity adder is port(a1: in bit_vector; a2: in bit_vector; cnt1: in bit; pout: out bit_vector); end adder; architecture func of adder is begin cale:process(cnt1) begin if(cnt1='1')then pout <= a1 + a2; end if; end process; end func;
其实就是一个很简单的加法器,可是编译不通过,显示错误信息如下:
Error (10327): VHDL error at adder.vhd(14): can't determine definition of operator ""+"" -- found 0 possible definitions
希望高手帮忙解答!!! 谢谢! |