Complete the code to declare a 4-bit counter signal.
signal counter : std_logic_vector([1] downto 0);
The counter is 4 bits wide, so the highest index is 3 (0 to 3).
Complete the process sensitivity list to trigger on clock and reset.
process([1])The sensitivity list must include both clock and reset signals separated by commas.
Fix the error in the if statement checking reset signal.
if [1] = '1' then
The reset signal must be checked to initialize the counter.
Fill both blanks to complete the counter increment and reset logic.
if [1] = '1' then counter <= (others => '0'); elsif rising_edge([2]) then counter <= counter + 1;
Reset clears the counter, and clock triggers the increment on rising edge.
Fill all three blanks to complete the full process for a 4-bit binary up counter with asynchronous reset.
process([1]) begin if [2] = '1' then counter <= (others => '0'); elsif rising_edge([3]) then counter <= counter + 1; end if; end process;
The process sensitivity list includes clock and reset. Reset is checked first, then the rising edge of clock triggers the counter increment.
