1

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 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.

これは私のコードです

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;

誰でも教えてもらえますか

  • current_state_FFd1とは何ですか?それとcurrent_State_1の違いは何ですか?
  • このエラーを解決するにはどうすればよいですか?

前もって感謝します

4

1 に答える 1

3

「current_state」信号は、CADツールによって2ビットのフリップフロッププリミティブにマッピングされます。フリップフロップは、ここに示すFD16CEプリミティブのようになります

フリップフロップは、2つのデータ入力(current_state_FFd1とcurrent_state_FFd2)と1つのクロックを受け取り、2つのデータ出力(current_state_FFq1とcurrent_state_FFq2)を生成します。入力は次のクロックエッジでサンプリングされたcurrent_state信号の値を決定し、出力は現在の状態を反映します。

表示されているメッセージは、CADツールが「current_state」が「00」エンコーディング(列挙型の「A」)から変更されないことを証明できることを示しています。したがって、フリップフロップは有線で最適化できます。 「00」の出力。

投稿したVHDLは妥当なように見えます。「x」入力を変更すると、current_stateが変更されるはずです。'x'入力は、高レベルのVHDL(またはテストベンチ)ではどういうわけか0に配線されているに違いありません。

于 2012-05-15T16:24:06.847 に答える