FFd1在VHDL警告中的含义是什么FF/Latch的常量值为0
我试图用xilinix 10.1实现一个有限状态机标识符 我在前面的问题中看到了这些错误,但答案中没有包括我的问题。。我不是在寻找答案,而是在寻找FFd1部分的意义 生成以下错误FFd1在VHDL警告中的含义是什么FF/Latch的常量值为0,vhdl,xilinx,Vhdl,Xilinx,我试图用xilinix 10.1实现一个有限状态机标识符 我在前面的问题中看到了这些错误,但答案中没有包括我的问题。。我不是在寻找答案,而是在寻找FFd1部分的意义 生成以下错误 WARNING:Xst:1293 - FF/Latch <machine1/current_state_FFd1> has a constant value of 0 in block <Main>. This FF/Latch will be trimmed during the optimi
WARNING:Xst:1293 - FF/Latch <machine1/current_state_FFd1> has a constant value of 0 in block <Main>. This FF/Latch will be trimmed during the optimization process.
WARNING:Xst:1293 - FF/Latch <machine1/current_state_FFd2> has a constant value of 0 in block <Main>. This FF/Latch will be trimmed during the optimization process.
警告:Xst:1293-FF/Latch在块中的常量值为0。此FF/闩锁将在优化过程中进行修剪。
警告:Xst:1293-FF/Latch在块中的常量值为0。此FF/闩锁将在优化过程中进行修剪。
这是我的密码
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity M_1 is
Port ( x : in STD_LOGIC;
clk : in STD_LOGIC;
state : out integer range 0 to 5 := 0;
z : out STD_LOGIC );
end M_1;
architecture Behavioral of M_1 is
type state_type is (A, B, C, D);
signal next_state, current_state: state_type := A;
begin
process(clk) is
begin
if (clk = '1' and clk'event) then
current_state <= next_state;
end if;
end process;
process(x,current_state)
begin
case current_state is
when A =>
if(x='0') then
next_state <= B;
z <='0';
elsif(x='1') then
next_state <= C;
z <='1';
end if;
when B =>
if(x='0') then
next_state <= C;
z <='1';
elsif(x='1') then
next_state <= D;
z <='0';
end if;
when C =>
if(x='0') then
next_state <= A;
z <='0';
elsif(x='1') then
next_state <= D;
z <='1';
end if;
when D =>
if(x='0') then
next_state <= B;
z <='0';
elsif(x='1') then
next_state <= C;
z <='0';
end if;
end case;
end process;
process (current_State) is
begin
case current_state is
when A =>
state <=0;
when B =>
state <=1;
when C =>
state <=2;
when D =>
state <=3;
end case;
end process;
end Behavioral;
IEEE库;
使用IEEE.STD_LOGIC_1164.ALL;
使用IEEE.STD_LOGIC_ARITH.ALL;
使用IEEE.STD_LOGIC_UNSIGNED.ALL;
实体M_1是
端口(x:STD_逻辑中的;
clk:标准逻辑中;
状态:超出整数范围0到5:=0;
z:输出标准(U逻辑);
结束M_1;
M_1的体系结构是
类型状态_类型为(A、B、C、D);
信号下一个状态,当前状态:状态类型:=A;
开始
过程(clk)是
开始
如果(clk='1'和clk'事件),则
当前状态
如果(x='0'),则
接下来,CAD工具将“当前状态”信号映射到2位触发器原语上。这个人字拖看起来像
触发器将接收2个数据输入(当前_状态_FFd1和当前_状态_FFd2)和一个时钟,并产生两个数据输出(当前_状态_FFq1和当前_状态_FFq2)。输入确定在下一个时钟边缘采样的当前_状态信号的值,输出反映当前状态
您看到的信息表明,CAD工具可以证明“当前_状态”从未从“00”编码(“枚举类型中的A”)更改,因此触发器可以通过硬接线输出“00”进行优化
您发布的VHDL看起来合理--“x”输入上的更改应该会导致当前_状态的更改。我敢打赌,在更高级的VHDL(或您的测试台)中,“x”输入以某种方式硬连接到0。该消息意味着当前状态信号永远不会改变,因此将对其进行优化。没有足够的代码知道为什么会发生这种情况,但可能是因为clk是常量。非常感谢,这非常有用:)