私はVHDLの初心者です。私は現在FSMに取り組んでおり、自分の入力が変化したときにのみ状態マシンの状態を変更したい。次のコードでどのような変更を行う必要がありますか? >状態遷移は入力イベントに依存VHDL
clk
X_in
の値はまた
を変更、私はよ高いです - が
entity fsm is
Port (clk : in STD_LOGIC;
reset : in STD_LOGIC;
x_in : in STD_LOGIC; -- input Bitstream
y_out : out STD_LOGIC_VECTOR (1 downto 0)); -- Encoded output
end fsm;
-----------------------------------------------------
architecture Behavioral of fsm is
-- Building an Enumerated type for the state machine
type state_type is (s_idle,s1,s2,s3,s4); -- constraint length = 3, Hence number of Regs = 2 therefore Number of states = 4
signal state, next_state: state_type ; -- Registers to hold the Present and next states
begin
-----------------------------------------------------
process1: process (reset, clk) -- Sequential Logic Selection process:
begin
if (reset ='1') then
state <=s_idle;
elsif (clk='1' and x_in'Event) then
state <= next_state;
end if;
-----------------------------------------------------
end process process1;
私はあなたの質問を編集しましたが、中央の部分からは分かりませんでした。あなたはそれを再フォーマットしたいかもしれません。 –