VHDL/PlanAhead错误:<;countr>;由于没有绑定实体,因此仍为黑盒

VHDL/PlanAhead错误:<;countr>;由于没有绑定实体,因此仍为黑盒,vhdl,simulation,xilinx,Vhdl,Simulation,Xilinx,如何修复此错误?PlanAhead 14.7能够合成但不能正确模拟这个简单计数器。实例“dut:countr端口映射”在源选项卡中保留一个红色问号。我已经确保所有信号都被正确实例化;尝试重新添加源;尝试创建一个新项目。使用IP核显然会产生这个问题,但我不这么认为 设计来源: library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.NUMERIC_STD.ALL; entity countr is Port (clk : in std_logic

如何修复此错误?PlanAhead 14.7能够合成但不能正确模拟这个简单计数器。实例“dut:countr端口映射”在源选项卡中保留一个红色问号。我已经确保所有信号都被正确实例化;尝试重新添加源;尝试创建一个新项目。使用IP核显然会产生这个问题,但我不这么认为

设计来源:

library IEEE; 
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.NUMERIC_STD.ALL;

entity countr is
Port (clk : in std_logic;
      reset : in std_logic;
      output: out std_logic_vector(4 downto 0)
 );
end countr;

architecture Behavioral of countr is
signal count : std_logic_vector(4 downto 0);
BEGIN

proc_1: process(clk, reset)
begin
    if reset = '1' then
        count <= (others => '0');
    elsif rising_edge(clk) then
        count <= std_logic_vector(unsigned(count) + 1);
    end if;
end process;
output <= count;
END Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity cntr_TB is end cntr_TB;
architecture Behavioral of cntr_TB is
component countr is
port(clk  : in std_logic;
    reset : in std_logic;
    output: out std_logic_vector(4 downto 0)
 );
end component;
signal clk : std_logic := '0';
signal reset : std_logic := '1';
signal output : std_logic_vector(4 downto 0) := "00000";
signal endOfSim : boolean := false;      
constant period : time := 20 ns;
BEGIN
dut: countr port map (clk => clk, reset => reset, output => output);
clkStimulus: process(clk)
begin
    if endOfSim = false then
        clk <= not clk after period/2;
    end if;
end process;
stim: process
begin
wait for 40 ns;
reset <= '0';
wait;
end process;
END Behavioral;
IEEE库;
使用IEEE.STD_LOGIC_1164.ALL;
使用IEEE.NUMERIC_STD.ALL;
实体计数是
端口(时钟:在标准逻辑中;
复位:在标准逻辑中;
输出:输出标准逻辑向量(4到0)
);
结束计数;
countr的体系结构是
信号计数:标准逻辑向量(4到0);
开始
过程1:过程(时钟、复位)
开始
如果重置='1',则
计数“0”);
elsif上升沿(clk)则
计数重置,输出=>输出);
clk激励:过程(clk)
开始
如果endOfSim=false,则

clk我删除并重新添加了设计和模拟源,但仍然留下了黑匣子。在创建项目之前,我打开了一个新项目并添加了源代码,模拟运行没有问题。

代码很好,在Modelsim中模拟。您可以尝试直接在
countr
实体上启动模拟,以确保它在没有测试台的情况下正确加载到ISIM中永远在ISIM中模拟。考虑用等待时间替换它。@N8TRO。最后的等待导致stim进程停止运行,这通常是需要的。缺少的是一个赋值
endOfSim您是否尝试过删除
组件
并使用直接实例化-您可能会得到更有用的错误messages@Martin汤普森:这是否意味着使用一个包来定义
countr