Complete the code to declare the clock signal sensitivity in the process.
process([1]) begin if rising_edge(clk) then state <= next_state; end if; end process;
The clock process must be sensitive to the clock signal clk only.
Complete the code to assign the next state in the combinational process.
process(state, input_signal)
begin
case state is
when S0 =>
if input_signal = '1' then
next_state <= [1];
else
next_state <= S0;
end if;
when others =>
next_state <= S0;
end case;
end process;When input_signal is '1' in state S0, the FSM transitions to state S1.
Fix the error in the reset condition of the clocked process.
process(clk, rst) begin if [1] = '1' then state <= S0; elsif rising_edge(clk) then state <= next_state; end if; end process;
The reset signal rst is checked to initialize the state to S0.
Fill both blanks to complete the combinational process sensitivity list and the state assignment.
process([1]) begin case state is when S1 => if input_signal = '0' then next_state <= [2]; else next_state <= S1; end if; when others => next_state <= S0; end case; end process;
The combinational process must be sensitive to state and input_signal. When input_signal is '0' in state S1, the FSM transitions to state S2.
Fill all three blanks to complete the two-process FSM: sensitivity list, reset assignment, and clock edge check.
process([1]) begin if [2] = '1' then state <= S0; elsif [3](clk) then state <= next_state; end if; end process;
The clocked process is sensitive to clk and rst. The reset condition checks rst for active-high reset. The clock edge is detected using rising_edge(clk).
