我是新手,刚开始学vhdl
编了一个小程序,但是编译的时候出了错误
下面是源程序
LIBRARY ieee;
USE ieee.std_logic_1164.ALL;
--
-- Do not delete following library and use clauses.
--
library work;
use work.components.all;
ENTITY half1 IS
PORT (
a,b : IN bit;
s,c : OUT bit
);
END half1;
ARCHITECTURE arch1 OF half1 IS
--
-- Add SIGNAL definitions here
--
BEGIN
--
-- Enter Architectural definition here
s<=a xor b;
c<=a and b;
end process;
END architecture arch1;
这是出错信息
** Error: (vcom-11) Could not find work.components.
ERROR: F:/training/test/arch1.vhd(8): cannot find expanded name: work.components
ERROR: F:/training/test/arch1.vhd(8): Unknown field: components.
ERROR: F:/training/test/arch1.vhd(10): VHDL Compiler exiting
那位大虾能帮我看一下,谢谢
还有我想请问vhdl里面的库是怎么样用的?什么时候要用ieee?什么时候要用work?
还是每一段程序都需要这些库? |