本人是初学者,为什么这段VHDL程序会出现这种错误
entityand3isport(a,b:inbit;y:outbit);endentityand3;architectureoneofand3isbeginy<=aan...
entity and3 is
port (a,b:in bit;
y:out bit);
end entity and3;
architecture one of and3 is
begin
y<=a and b;
end
错误如下
Error (10522): VHDL Syntax error at /and3.vhd(8): experienced unexpected end-of-file ; expecting ";", or an identifier, or "architecture"
Error: Quartus II Analysis & Synthesis was unsuccessful. 1 error, 1 warning
Error: Peak virtual memory: 182 megabytes
Error: Processing ended: Fri Nov 11 11:07:04 2011
Error: Elapsed time: 00:00:01
Error: Total CPU time (on all processors): 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 3 errors, 1 warning 展开
port (a,b:in bit;
y:out bit);
end entity and3;
architecture one of and3 is
begin
y<=a and b;
end
错误如下
Error (10522): VHDL Syntax error at /and3.vhd(8): experienced unexpected end-of-file ; expecting ";", or an identifier, or "architecture"
Error: Quartus II Analysis & Synthesis was unsuccessful. 1 error, 1 warning
Error: Peak virtual memory: 182 megabytes
Error: Processing ended: Fri Nov 11 11:07:04 2011
Error: Elapsed time: 00:00:01
Error: Total CPU time (on all processors): 00:00:01
Error: Quartus II Full Compilation was unsuccessful. 3 errors, 1 warning 展开
4个回答
展开全部
VHDL的语法还要多学习了
architecture one of and3 is
begin
y<=a and b;
end
应该是 end one;最后要分号的
architecture one of and3 is
begin
y<=a and b;
end
应该是 end one;最后要分号的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity and3 is
port (a,b:in bit;
y:out bit
);
end and3;------------------------------
architecture one of and3 is
begin
y<=a and b;
end one;----------------------------------
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity and3 is
port (a,b:in bit;
y:out bit
);
end and3;------------------------------
architecture one of and3 is
begin
y<=a and b;
end one;----------------------------------
追问
照着上面写了,出现了这错误Error: Top-level design entity "AND2" is undefined。AND2是我那个project的名称,这个有冲突吗
追答
实体名必须和工程名一致,
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
entity and2 is-------------------------
port (a,b:in bit;
y:out bit
);
end and2;------------------------------
architecture one of and2 is------------------------
begin
y<=a and b;
end one;
把实体名改成and2就行了
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
end后面少个分号
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |