我是VHDL新手,我使用的是VIvado 2017.1。VHDL包不编译
我想使用一个包来定义常量和其他这样的枚举类型以包含在多个模型中。但是,现在我无法在我的模型中使用该软件包。我不断收到
Error: Cannot find <PACKAGE NAME> in library <xil_defaultlib>. Please ensure that the library was compiled, and that a library and a use clause are present in the VHDL file
然而,包问题是在xil_defaultlib文件夹,我敢肯定,我看不出有什么错误[这里看到]它的编译[1]。
我对各个码
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.std_logic_unsigned.all;
use work.Specs_Package.all;
entity Freq_Divider is
Port (En,clk, reset : in std_logic; clock_out: out std_logic);
end Freq_Divider;
architecture bhv of Freq_Divider is
signal count: std_logic_vector(7 downto 0);
signal tmp : std_logic := '0';
begin
if rising_edge(reset) then
count <= x'00';
end if
process(clk,EN)
begin
if EN = '1' then
rising_edge(clk) then
count <= count + 1;
end if;
end if;
end process;
end bhv;
和
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
PACKAGE SPECS_PACKAGE IS
--Freq Divider
--667Mhz clock
--667/23=29MHz 22 - 0x16
--667/29=23MHz 28 - 0x1C
--667/46=14.5MHz 45 - 0x2D
CONSTANT FREQ_DIVIDER_LIMIT : STD_LOGIC_VECTOR(7 DOWNTO 0) := X'1C';
END PACKAGE SPECS_PACKAGE;
://i.stack.imgur.com/4b1vz.png
你如何想象运行VHDL片段?:) – Staszek
我认为这是一个vivado配置问题。当你添加文件时,你需要把它们放在同一个库中。只有这样他们才能看到对方(使用“工作”)。检查vivado中的库选项卡。 – JHBonarius
我很确定代码没有编译,因为我看到了几个错误。 –