[求助] 请大家看看这个错误什么意思

Hanux   2012-4-27 18:39 楼主
到底错在哪了?新手,今年我们才开eda(vhdl版)
我的程序:
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_unsigned.all;
entity shmxsh is
port( data:out std_logic_vector(6 downto 0);
   rst,clk:in  std_logic
);
end shmxsh;
architecture behav of shmxsh is
begin
process(rst,clk,data)
variable Q:std_logic_vector(2 downto 0);
begin
if 
rst='0' then Q:=(others=>'0');
elsif
 clk'event and clk='1' then
if
 Q<7 then Q:=Q+1;
else
 Q:=(others=>'0');
end if;
end if;
case Q is
when "000"=> data<='0111111';
when "001"=> data<='0000110';
when "010"=> data<='1011011';
when "011"=> data<='1001111';
when "100"=> data<='1100110';
when "101"=> data<='1101101';
when "110"=> data<='1111101';
when "111"=> data<='0000111';
when others=>null;
end case;
end process;
end architecture behav;

-----------------------------------------------------------------------------
messages:


Info: *******************************************************************
Info: Running Quartus II Analysis & Synthesis
Info: Version 7.2 Build 151 09/26/2007 SJ Full Version
Info: Processing started: Fri Apr 27 18:34:56 2012
Info: Command: quartus_map --read_settings_files=on --write_settings_files=off shmxsh -c shmxsh
Error (10500): VHDL syntax error at shmxsh.vhd(25) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(26) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(27) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(28) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(29) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(30) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(31) near text "'";  expecting "(", or an identifier, or  unary operator
Error (10500): VHDL syntax error at shmxsh.vhd(32) near text "'";  expecting "(", or an identifier, or  unary operator
Info: Found 0 design units, including 0 entities, in source file shmxsh.vhd
Error: Quartus II Analysis & Synthesis was unsuccessful. 8 errors, 0 warnings
Info: Allocated 182 megabytes of memory during processing
Error: Processing ended: Fri Apr 27 18:34:58 2012
Error: Elapsed time: 00:00:02
Error: Quartus II Full Compilation was unsuccessful. 8 errors, 0 warnings


):'( 
[ 本帖最后由 Hanux 于 2012-4-27 19:05 编辑 ]

回复评论 (1)

Q<7 then Q:=Q+1;

 

楼主,〈两边的类型不一致。还有Q=Q+1也该应该类型一致!

一个为理想不懈前进的人,一个永不言败人! http://shop57496282.taobao.com/ 欢迎光临网上店铺!
点赞  2012-4-28 12:31
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复