首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

初学者遇到的一个问题?望大虾指教!

初学者遇到的一个问题?望大虾指教!

请各位大师帮偶把把脉(系统Win98+MAX+plus II 10.2 BASELINE): 程序如下: LIBRARY IEEE; USE IEEE.STD_LOGIC_1164.ALL; ENTITY and_gate IS PORT ( a : IN STD_LOGIC; b : IN STD_LOGIC; c : OUT STD_LOGIC); END ENTITY and_gate; ARCHITECTURE behave OF and_gate IS BEGIN c <= a AND b; END ARCHITECTURE behave; 执行Create Default Symbol时出现如下错误提示: Errorine 1:File d:\maxplus2\study\12\abb.vhd:VHDL Design File "abb" must contain an entity of the same name 什么意思?多谢了!
这个论坛真是徒有虚名,还是我自己来回答吧:实体名与文件名应一致!!我是在C51BBS得到这个答案的。 再提一问: 程序代码: Library ieee; use ieee.std_logic_1164.all; Entity mux4 is port ( d0,d1,d2,d3 : in std_logic_vector(7 downto 0); s0,s1 : in std_logic; q : out std_logic_vector(7 downto 0)); end mux4; Architecture behave of mux4 is begin label : process(d0,d1,d2,d3,s0,s1) variable tmp : integer; begin tmp := 0; if (s0 = 1) then tmp := tmp + 1; end if; if (s1 = 1) then tmp := tmp + 2; end if; case tmp is when 0 => q <= d0; when 1 => q <= d1; when 2 => q <= d2; when 3 => q <=d3; when others => null; end case; end process; end behave; 执行Create Default Symbol时报错如下: Errorine 12:File d:\maxplus2\study\mux4.vhd:VHDL syntax error:expected a Concurrent Statement Errorine 14:File d:\maxplus2\study\mux4.vhd:VHDL syntax error:expected a Concurrent Statement Errorine 16:File d:\maxplus2\study\mux4.vhd:VHDL syntax error:expected a Concurrent Statement Error:Termination notification:errors in d:\maxplus2\study\mux4.vhd prevent further processing 请问高手如何解决?系统:Win98+MAX PLUS II 10.2
返回列表