2016-09-22 3 views
2

간단한 VHDL 프로젝트를 만들어 내 메모리를 닦으려고합니다. 파일 half_adder.vhd을 사용하여 시뮬레이션하려는 다른 파일 full_adder.vhd을 만듭니다. 이러한 파일은 같은 프로젝트에 없습니다. Xilinx ISE 버전 14.7을 사용하고 있습니다.맞춤 라이브러리를 사용하여 VHDL 디자인 시뮬레이션

내 코드는 완벽하게 합성되어 구문 검사를 통과합니다. 또한 RTL 회로도를 만들 수 있습니다. 나는 전 가산기에 대한 테스트 벤치를 만들려고 할 때마다 그러나, 나는 다음과 같은 오류 메시지가 얻을 : 나는 작업 라이브러리에 half_adder.vhd을 추가 한

ERROR:HDLParsers:3317 - "E:/workspaceXilinx/FullAdder/full_adder.vhd" Line 23. Library half_adder cannot be found.

ERROR:HDLParsers:3513 - "E:/workspaceXilinx/FullAdder/full_adder.vhd" Line 24. Declaration all can not be made visible in this scope since design unit half_adder is not a package.

을, 그래서 나는 확실하지 않다 왜 도서관을 찾을 수 없는지. 여기 내가 사용하고 두 파일은 다음과 같습니다

half_adder.vhd

library IEEE; 
use IEEE.STD_LOGIC_1164.ALL; 

library half_adder; 
use half_adder.all; 

entity full_adder is 
    port (a, b, cin: in STD_LOGIC; 
      s, cout: out STD_LOGIC); 
end full_adder; 


architecture Behavioral of full_adder is 
signal s1, c1, c2: STD_LOGIC:='0'; 
begin 

    HA1: entity work.half_adder port map(a, b, s1, c1); 
    HA2: entity work.half_adder port map(s1, cin, s, c2); 
    cout <= c1 or c2; 

end Behavioral; 

답변

0

work 라이브러리는 현재 컴파일되는 라이브러리를 참조

library IEEE; 
use IEEE.STD_LOGIC_1164.ALL; 

entity half_adder is 
    port(a, b: in STD_LOGIC; 
      s, c: out STD_LOGIC); 
end half_adder; 

architecture Behavioral of half_adder is 
begin 
    s <= a xor b; 
    c <= a and b; 
end Behavioral; 

full_adder.vhd. 디자인 도구에 명시 적으로 half_adder 라이브러리를 만들지 않았다면 존재하지 않습니다. 당신이해야 할 일은 half_adder과 관련된 libraryuse 절을 제거하는 것입니다. 필요하지 않습니다.

+0

신속한 답변에 감사드립니다. – Razorfoot