我是一个新手,最近我在QUARTUSII6.0用VHDL编程,每次只要程序中含有 + 、-、*、/ ,编译时都会报类似的错误,如下面这个程序:
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_unsigned.ALL;
entity adder is
port( in1 : bit_vector;
in2 : bit_vector;
cnt1 : bit;
pout : out bit_vector);
end entity adder;
architecture func of adder is
begin
process(cnt1)
begin
if(cnt1='1') then pout<=in1 + in2;
end if;
end process;
end architecture func;
每次编译时总是出现这样的错误提示:
Error (10327): VHDL error at adder.vhd(15): can't determine definition of operator ""+"" -- found 0 possible definitions
Error (10523): Ignored construct func at adder.vhd(11) due to previous errors
如果把程序中的“+”换成“*”或者“-”,编译时会把错误中的operator ""+"" 改成operator ""*""和operator ""-"",请高手指点一下出错的原因。谢谢了
打赏帖 | |
---|---|
宏定义和const关键字定义被打赏5分 | |
【功率监测与控制系统DIY活动成果贴】DIY功率计与LabVIEW数据采集被打赏100分 | |
【Freertos】任务管理被打赏10分 | |
分享博世的两种不同的喷射系统模式被打赏5分 | |
汽车+开路实验与短路实验被打赏10分 | |
多点式电子控制汽油喷射系统知识分享被打赏10分 | |
分享机械控制式汽油喷射系统被打赏5分 | |
【分享开发笔记,赚取电动螺丝刀】解决基于CH341制作无线模块时芯片发热问题被打赏31分 | |
【分享开发笔记,赚取电动螺丝刀】使用STM32F103ZE主控调试RS485通讯的避坑经验被打赏36分 | |
【分享开发笔记,赚取电动螺丝刀】移植xprintf模块被打赏27分 |