VHDL合成工具赢得';不能推断FSM

VHDL合成工具赢得';不能推断FSM,vhdl,fpga,vivado,Vhdl,Fpga,Vivado,我正在尝试用VHDL创建一个FSM。然而,我使用的合成工具(Vivado)不会推断它,相反,它认为我已经创建了很多寄存器和mux 我设计的硬件的目标是在FPGA上实现一个锁定器。我已经改变了很多东西,以避免产生任何闩锁,所以如果你看到一些错误,请告诉我。还有,我是西班牙人,所以有些名字是西班牙文的;如果你不明白,请告诉我。我不知道你是否需要像综合报告这样的东西。(请不要告诉我只创建一个流程,我必须使用一个顺序和一个组合流程进行设计) 代码如下: library ieee; use ieee.st

我正在尝试用VHDL创建一个FSM。然而,我使用的合成工具(Vivado)不会推断它,相反,它认为我已经创建了很多寄存器和mux

我设计的硬件的目标是在FPGA上实现一个锁定器。我已经改变了很多东西,以避免产生任何闩锁,所以如果你看到一些错误,请告诉我。还有,我是西班牙人,所以有些名字是西班牙文的;如果你不明白,请告诉我。我不知道你是否需要像综合报告这样的东西。(请不要告诉我只创建一个流程,我必须使用一个顺序和一个组合流程进行设计)

代码如下:

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

entity cerrojo is
    port ( boton : in std_logic;
           rst : in std_logic;
           clk : in std_logic;
           clave : in std_logic_vector(7 downto 0);
           leds : out std_logic_vector(15 downto 0);
           intentos: out std_logic_vector(6 downto 0));
end cerrojo;

architecture archCerrojo of cerrojo is

signal intentos_binario : unsigned(3 downto 0);
signal sin_rebote : std_logic;
signal guardado : unsigned(7 downto 0);
type estado is(inicial, tres, dos, uno, final);
signal estado_actual, estado_siguiente : estado;

    component  conv_7seg is
     port (x       : in  std_logic_vector (3 downto 0);
           display : out std_logic_vector (6 downto 0));
    end component conv_7seg;

    component debouncer is
     port (
        rst             : in  std_logic;
        clk             : in  std_logic;
        x               : in  std_logic;
        xdeb            : out std_logic;
        xdebfallingedge : out std_logic;
        xdebrisingedge  : out std_logic);
    end component debouncer;

begin

sieteSeg : conv_7seg
port map ( x => std_logic_vector(intentos_binario(3 downto 0)),
           display => intentos);

rebotes : debouncer
port map (rst => rst, clk => clk, x => boton, xdeb => sin_rebote);

p_reg : process(clk, rst)
begin
    if rst = '1' then
        guardado <= "00000000";
        estado_actual <= inicial;
    elsif rising_edge(clk) and estado_actual = inicial then
        guardado <= unsigned(clave);
        estado_actual <= estado_siguiente;
    elsif rising_edge(clk) then
        guardado <= guardado;
        estado_actual <= estado_siguiente;
    end if;
end process p_reg;

p_comb : process(estado_actual, sin_rebote, clave, guardado)
begin
    case estado_actual is
        when inicial =>
            intentos_binario <= "1000";
            leds <= "1111111111111111";
            --guardado <= unsigned(clave);
            if (sin_rebote = '1') then                
                estado_siguiente <= tres;
            else             
                estado_siguiente <= inicial;
            end if;                
        when tres =>
            intentos_binario <= "0011";
            leds <= "0000000000000000";
           -- guardado <= guardado;
            if (sin_rebote = '1' and  guardado = unsigned(clave)) then
                estado_siguiente <= inicial;
            elsif (sin_rebote = '1' and guardado /= unsigned(clave)) then
                estado_siguiente <= dos;
            else
                estado_siguiente <= tres;
            end if;
        when dos =>
            intentos_binario <= "0010";
            leds <= "0000000000000000";
            --guardado <= guardado;
            if (sin_rebote = '1' and guardado = unsigned(clave)) then
                estado_siguiente <= inicial;
            elsif (sin_rebote = '1' and guardado /= unsigned(clave)) then                
                estado_siguiente <= uno;
            else
                estado_siguiente <= dos;
            end if; 
         when uno =>
            intentos_binario <= "0001";
            leds <= "0000000000000000";
            --guardado <= guardado;
            if (sin_rebote = '1' and guardado = unsigned(clave)) then
                estado_siguiente <= inicial;
            elsif (sin_rebote = '1' and guardado /= unsigned(clave)) then
                estado_siguiente <= final;
            else
                estado_siguiente <= uno;
            end if;
         when final =>
            intentos_binario <= "0000";
            leds <= "0000000000000000";
            --guardado <= guardado;
            estado_siguiente <= final;
      end case;
end process p_comb;
end architecture archCerrojo;
ieee库;
使用ieee.std_logic_1164.all;
使用ieee.numeric_std.all;
实体cerrojo是
端口(boton:标准逻辑中;
rst:标准逻辑中;
clk:标准逻辑中;
clave:标准逻辑向量(7到0);
LED:输出标准逻辑向量(15至0);
intentos:out标准逻辑向量(6到0);
结束塞罗约;
cerrojo的建筑archCerrojo是
信号强度:无符号(3到0);
信号sin_重新启动:标准逻辑;
信号guardado:无符号(7到0);
estado类型为(INIAL、tres、dos、uno、final);
信号estado_实际,estado_信号:estado;
组件conv_7seg为
端口(x:std_逻辑_向量中(3到0);
显示:输出标准逻辑向量(6到0);
端部组件conv_7seg;
分量去抖器
港口(
rst:标准逻辑中;
clk:标准逻辑中;
x:在标准逻辑中;
xdeb:out std_逻辑;
xdebfallingedge:输出标准逻辑;
xdebrisingedge:输出标准逻辑);
端部分量去抖器;
开始
sieteSeg:conv_7seg
端口映射(x=>std_逻辑_向量(intentos_binario(3到0)),
显示=>intentos);
重新启动:去Bouncer
端口映射(rst=>rst,clk=>clk,x=>boton,xdeb=>sin_重新启动);
p_reg:过程(时钟、rst)
开始
如果rst='1',则

guardado没有任何错误或警告,我想我不能提供一个最小的可重复的例子,因为我认为所有的代码行都是知道如何解决这个问题所必需的。但是,如果你不这么认为,请给我更详细的说明,以便我能理解你的意思。谢谢旁注:FSM不需要被合成工具识别为FSM。它只是使它更容易转换,例如转换为一个热编码。您尚未提供具体问题。(此处第134页)“FSM由以下部分组成:状态寄存器、下一状态功能、输出功能”。你三个都有。风险仅在于控制
estado
的首选编码方法。可能无法识别具有状态寄存器的进程。尝试这是公认的形式。状态机由寄存器和mux组成。谢谢!这就是解决方案,只对时钟进行一次评估。