【问题标题】:VHDL - unconnected components in top moduleVHDL - 顶部模块中未连接的组件
【发布时间】:2014-11-08 22:06:23
【问题描述】:

我正在处理一个项目,但无法连接顶部模块中的组件。 我只是看不出我做错了什么。任何建议都非常感谢。

除了看不到 RTL 原理图中的组件外,我还收到了一些警告:

WARNING:Xst:1290 - Hierarchical block <u0> is unconnected in block <TOP>.
   It will be removed from the design.
WARNING:Xst:1290 - Hierarchical block <u1> is unconnected in block <TOP>.
   It will be removed from the design.

WARNING:Xst:2677 - Node <u1/calc_deb> of sequential type is unconnected in block <TOP>.
WARNING:Xst:2677 - Node <u1/flipflops_1> of sequential type is unconnected in block <TOP>.
WARNING:Xst:2677 - Node <u1/flipflops_0> of sequential type is unconnected in block <TOP>.

所以这里是顶层模块的实现:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity TOP is
port(
    calc: in std_logic;
    OP: in std_logic_vector(1 downto 0);
    inValue: in std_logic_vector(3 downto 0);
    clk: in std_logic
    );
end TOP;

architecture Behavioral of TOP is

component alu port(
        OP : in  std_logic_vector(1 downto 0);
      inValue : in  std_logic_vector(3 downto 0);
      regValue : in  std_logic_vector(3 downto 0);
      result: out std_logic_vector(4 downto 0);
      clk : in  STD_LOGIC
        );
end component;

component debouncer port(
    calc : in  STD_LOGIC;
    calc_deb : out  STD_LOGIC;
    clk: in std_logic
);  
end component;

signal calc_debaux: std_logic;
signal regValueaux: std_logic_vector(3 downto 0);
signal resultaux: std_logic_vector(4 downto 0);
--signal OP: std_logic_vector(1 downto 0);
--signal OP: std_logic_vector(3 downto 0);


begin

u0: alu port map(OP => OP,  inValue=>inValue,   regValue=>regValueaux,  result=>resultaux, clk=>clk);

u1: debouncer PORT MAP(calc=>calc, alc_deb=>calc_debaux, clk=>clk);

end Behavioral;

这是我在顶部模块中实例化的两个实体:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;

entity ALU is
    Port ( OP : in  std_logic_vector(1 downto 0);
           inValue : in  std_logic_vector(3 downto 0);
           regValue : in  std_logic_vector(3 downto 0);
           result: out std_logic_vector(4 downto 0);
           clk : in  STD_LOGIC
              );
end ALU;

architecture archi of alu is

signal res_temp: std_logic_vector(4 downto 0);
signal aux1, aux2: std_logic_vector(4 downto 0);

begin

aux1 <= ('0' & inValue);
aux2 <= ('0' & regValue);
result <= res_temp; 

process (inValue, OP)
begin
        case OP is
            when "00" =>
                res_temp <=  (aux1) + (aux2) ;
            when "01" =>
                res_temp <= aux1 - aux2; 
            when "10" =>
                res_temp <= (inValue and regValue);
            when others =>
                res_temp <= '0' & (regValue(0) & regValue(3 downto 1));   
        end case;
end process;
end archi ; 

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;


entity debouncer is
    Port ( calc : in  STD_LOGIC;
           calc_deb : out  STD_LOGIC;
              clk: in std_logic);
end debouncer;

architecture Behavioral of debouncer is
  SIGNAL flipflops   : STD_LOGIC_VECTOR(1 DOWNTO 0); --input flip flops
  SIGNAL counter_set : STD_LOGIC;                    --sync reset to zero
  SIGNAL counter_out : STD_LOGIC_VECTOR(8 DOWNTO 0) := (OTHERS => '0'); --counter output
BEGIN

  counter_set <= flipflops(0) xor flipflops(1);   --determine when to start/reset counter

  PROCESS(clk)
  BEGIN
    IF(clk'EVENT and clk = '1') THEN
      flipflops(0) <= calc;
      flipflops(1) <= flipflops(0);
      If(counter_set = '1') THEN                  --reset counter because input is changing
        counter_out <= (OTHERS => '0');
      ELSIF(counter_out(8) = '0') THEN --stable input time is not yet met
        counter_out <= counter_out + 1;
      ELSE                                        --stable input time is met
        calc_deb <= flipflops(1);
      END IF;    
    END IF;
  END PROCESS;

end Behavioral;

我还收到了一些警告:

Synthesizing Unit <TOP>.
    Related source file is "D:/Mestrado/1o ano/1o semestre/PSD/Projectos/andgates/TOP.vhd".
WARNING:Xst:646 - Signal <resultaux> is assigned but never used. This unconnected signal will be trimmed during the optimization process.
WARNING:Xst:653 - Signal <regValueaux> is used but never assigned. This sourceless signal will be automatically connected to value 0000.
WARNING:Xst:646 - Signal <calc_debaux> is assigned but never used. This unconnected signal will be trimmed during the optimization process.
Unit <TOP> synthesized.

我在这方面花了很多时间(这是一个更大项目的一部分,我只是想通过逐步进行故障排除来重新启动),现在我一无所知。 :(

感谢您的宝贵时间。

【问题讨论】:

  • u1: debouncer PORT MAP(calc=&gt;calc, alc_deb=&gt;calc_debaux, clk=&gt;clk); 应该是u1: debouncer PORT MAP(calc=&gt;calc, calc_deb=&gt;calc_debaux, clk=&gt;clk);(关联列表中正式的alc_deb 应该是calc_deb)。集体 VHDL 设计规范在修复后进行分析和详细说明。
  • 您可以在 Stackoverflow 上搜索 Posts containing 'warning:xst:1290'。还有谷歌,特别是赛灵思的支持网站。 aludebouncer 在你的项目中吗?
  • 另请参阅赛灵思支持网站上的 [WARNING:Xst:1290](forums.xilinx.com/t5/Synthesis/…)。
  • 嗨,大卫,谢谢!但是在修复它之后,我在综合报告中得到了完全相同的警告。正如您可能已经注意到的那样,我对 VHDL 相当陌生,而且我无法理解这些警告的含义。请注意,我不会构建刺激文件来模拟。相反,我将在 spartan-3e 上运行该项目。
  • 嗨大卫,我没有注意到你的其他 2 个 cmets。我会检查这些链接并回复你。是的,debouncer 和 ALU 在我的项目中的顶部模块“树”下

标签: vhdl xilinx xilinx-ise


【解决方案1】:

您的顶级实体TOP 似乎没有任何输出引脚。 ISE 在综合过程中尝试节省 FPGA 资源时非常聪明。任何未以某种方式用于确定顶级实体中输出引脚状态的逻辑都将被综合掉。我猜它认为你的整个设计(因为没有更好的词)是无用的,因为它没有用于驱动TOP 的输出引脚。

尝试将您的resultaux 和/或calc_debaux 输出信号实际连接到TOP 本身的输出端口。希望这可以消除您的警告。

【讨论】:

  • 查看问题本身的评论“注意top没有输出。一切都会被吃掉”。提问者早些时候在回答中指出,他已经让它起作用了。他撤回了答案,因为它没有用(他没有解释什么是错的)。
  • 你是对的@DavidKoontz。抱歉,我没有看到您的最终评论。我猜只要他能让事情顺利进行。
【解决方案2】:

您的代码中的一些问题包括:

  • 端口名称alc_deb 中的错字在u1 的实例化中应为calc_deb。这是一个硬错误。
  • process (inValue, OP) 的敏感度列表不完整。应该是:process (inValue, OP, aux1, aux2, regValue)
  • clk 未在实体 ALU 中使用
  • TOP 中的任何信号都未被读取。 (Rhis 与 TOP 没有输出端口有关。)
  • 奖励(讨厌):将IEEE.STD_LOGIC_UNSIGNED.ALL 替换为IEEE.NUMERIC_STD。前者不规范,存在诸多问题。

【讨论】:

    猜你喜欢
    • 2018-08-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2010-09-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多