Complete the code to declare a RAM array of 16 locations, each 8 bits wide.
type ram_type is array (0 to 15) of std_logic_vector([1] downto 0);
The RAM has 8 bits per location, so the index goes from 7 down to 0.
Complete the code to declare a signal named ram of the RAM type.
signal ram : [1];The signal ram must be declared with the RAM array type defined earlier.
Fix the error in the process sensitivity list to include the clock signal named clk.
process([1]) begin if rising_edge(clk) then -- RAM write or read logic end if; end process;
The process must be sensitive to the clock signal to detect rising edges.
Fill both blanks to write data_in to ram at address when write_enable is high.
if [1] = '1' then ram([2]) <= data_in; end if;
Write happens when write_enable is '1' at the given address.
Fill both blanks to read ram at address into data_out.
if rising_edge(clk) then if [1] = '0' then data_out <= ram([2]); end if; end if;
Reading occurs when write_enable is '0', reading from ram at address.
