Complete the code to declare a signal for the BCD counter.
signal counter : std_logic_vector([1] downto 0) := (others => '0');
The BCD counter counts from 0 to 9, which requires 4 bits (3 downto 0).
Complete the process sensitivity list to trigger on clock and reset signals.
process([1])The process must be sensitive to both clock and reset signals using 'clk, reset'.
Fix the error in the if statement checking for reset.
if [1] = '1' then
The reset signal is checked to initialize the counter.
Fill both blanks to correctly increment the BCD counter and reset after 9.
if counter = [1] then counter <= [2];
The counter resets to "0000" after reaching "1001" (decimal 9).
Fill all three blanks to complete the BCD counter process with clock, reset, and increment logic.
process([1]) begin if [2] = '1' then counter <= [3]; elsif rising_edge(clk) then if counter = "1001" then counter <= "0000"; else counter <= counter + 1; end if; end if; end process;
The process is sensitive to clock and reset. It resets counter to "0000" when reset is high.
