打印

quartus7.1不认识"+"号

[复制链接]
1702|2
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
tom_xu|  楼主 | 2007-12-8 20:03 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
用quartus7.1编译一个计数器,源代码:

library ieee;
use ieee.std_logic_1164.all;

entity jxu_count10 is
  port(din: in std_logic;
       rst: in std_logic;
       yout: out std_logic_vector(3 downto 0));
end jxu_count10;

architecture if_cnt of jxu_count10 is
signal count: std_logic_vector(3 downto 0);
  begin
     process(din,rst)
     begin
       if(rst='1') then
         count<="0000";
       elsif(din'event and din='1') then
         count<=(count+1);
       end if;
     end process;
     yout<=count;
end if_cnt;

编译不通过,主要错误显示:
Error (10327): VHDL error at jxu_count10.vhd(18): can't determine definition of operator ""+"" -- found 0 possible definitions

也就是说quartus7.1不认识这句代码的"+"号,太奇怪了.
count<=(count+1);

相关帖子

沙发
alantutu| | 2007-12-8 21:59 | 只看该作者

是你的程序错了

+是用于integer的,再声明个库use ieee.std_logic_unsigned.all就可以了

使用特权

评论回复
板凳
tom_xu|  楼主 | 2007-12-9 11:58 | 只看该作者

谢谢alantutu大侠,可以了

谢谢alantutu大侠,可以了

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

66

主题

1657

帖子

4

粉丝