type row_t is array(0 to 3) of std_logic_vector(7 downto 0);
type matrix_t is array(0 to 3, 0 to 3) of std_logic_vector(7 downto 0);;
signal matrix : matrix_t;
signal temp_row : row_t;
signal count : unsigned(1 downto 0) := "00";
function extract_row( m : matrix_t; row : integer) return row_t is
variable ret : row_t;
begin
for i in row_t'range loop
ret(i) := m(row, i);
end loop;
return ret;
end function;
begin
process(clk)
begin
if rising_edge(clk) then
temp_row <= extract_row( matrix, to_integer(count) );
count <= count + 1;
end if;
end process;