Complete the code to declare a 4-bit signal.
signal data : std_logic_vector([1] downto 0);
The signal is 4 bits wide, so the highest index is 3 (0 to 3).
Complete the code to instantiate a process sensitive to clock and reset.
process([1])In VHDL, signals in the process sensitivity list are separated by commas.
Fix the error in the if statement for synchronous reset.
if [1] then output <= (others => '0'); end if;
In VHDL, single quotes are used for single bits, and the equality operator is '='.
Fill both blanks to create a combinational process with proper sensitivity list and assignment.
process([1]) begin result <= a [2] b; end process;
The sensitivity list must include all inputs 'a' and 'b' for combinational logic. The operation is addition '+'.
Fill both blanks to implement a registered output with synchronous reset and enable.
process(clk, reset) begin if rising_edge(clk) then if reset = '1' then output <= (others => '0'); elsif [1] = '1' then output <= [2]; end if; end if; end process;
