此设计包含一个或多个 registers/latches 与 Spartan6 架构直接不兼容

This design contains one or more registers/latches that are directly incompatible with the Spartan6 architecture

我是这个世界上的新人。

实际上,我正在学习 VHDL。我写了下面的代码:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity Problems is
    port(
        S   : in std_logic;
        D   : in std_logic;
        CLK : in std_logic;
        R   : in std_logic;
        Q   : out std_logic;
        Q_n : out std_logic
    );
end Problems;

architecture Behavioral of Problems is
    signal t_tmp1 : std_logic; 
begin
    DFF: process (S,R,D,CLK)
    begin
        if (S = '0' and R = '0') then
            t_tmp1 <= not t_tmp1;
        elsif (S = '0' and R = '1') then
            t_tmp1 <= '1';
        elsif (S = '1' and R = '0') then
            t_tmp1 <= '0';
        elsif (rising_edge(CLK)) then
            t_tmp1 <= D;

        end if;
    end process DFF;
    Q    <=  t_tmp1;
    Q_n <= not t_tmp1;

end Behavioral;

当我合成时出现以下警告:

WARNING:HDLCompiler:92 - "/home/joseph/ISEProjects/Exercise_BasicMemoryElements/Problems.vhd" Line 41: t_tmp1 should be on the sensitivity list of the process

WARNING:Xst:3002 - This design contains one or more registers/latches that are directly incompatible with the Spartan6 architecture. The two primary causes of this is either a register or latch described with both an asynchronous set and asynchronous reset or a register or latch described with an asynchronous set or reset which however has an initialization value of the opposite polarity (i.e. asynchronous reset with an initialization value of 1).

模拟效果很好。

我想知道为什么会出现警告,我需要学习什么才能解决这样的问题。

此致,

约瑟夫·佩纳。

如果您通读 Spartan-6 原理图设计库指南,您会发现 D 触发器不提供异步预设和异步清除Spartan 6(或更高版本的设备系列)。

您的 if 语句的第一个条件语句的行为似乎并未表示如果重置和设置同时为 TRUE 时会发生什么。您可以模拟的内容与您可以通过综合技术映射的内容之间的区别。

例如在 Spartan-3e 中,重置将覆盖设置:

在 IEEE 标准 1076.6-2004 中找到了用于映射到目标技术中的寄存器传输逻辑元素的 VHDL 语言的符合条件的综合子集的约束,现已废除,并且可以在 ISE 中为 Xilinx 找到 XST 用户指南Vivado Design Suite 用户指南综合 (ug901).

映射 VHDL 描述的能力取决于设备系列的受支持目标。