--if horizontal_counter(9 downto 3) = 0 and vertical_counter(9 downto 3) = 0 then
-- neighbours_count <= neighbours_count + unsigned(neighbours(8 to 8)) + unsigned(shift_register_middle(0 to 0)) + unsigned(actual_register);
-- right top corner
--elsif horizontal_counter(9 downto 3) = cell_number-1 and vertical_counter(9 downto 3) = 0 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(1 to 1)) - unsigned(neighbours(2 to 2));
-- left bottom corner
--elsif horizontal_counter(9 downto 3) = 0 and vertical_counter(9 downto 3) = cell_number-1 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(0 to 0)) - unsigned(neighbours(1 to 1)) - unsigned(neighbours(2 to 2)) - unsigned(neighbours(3 to 3)) - unsigned(neighbours(4 to 4)) - unsigned(neighbours(5 to 5)) + unsigned(neighbours(6 to 6)) + unsigned(neighbours(7 to 7)) + unsigned(neighbours(8 to 8)) + unsigned(shift_register_top(0 to 0)) + unsigned(shift_register_middle(0 to 0));
-- right bottom corner
--elsif horizontal_counter(9 downto 3) = cell_number-1 and vertical_counter(9 downto 3) = cell_number-1 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(0 to 0)) - unsigned(neighbours(1 to 1));
-- top edge
--elsif vertical_counter(9 downto 3) = 0 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(1 to 1)) - unsigned(neighbours(2 to 2)) + unsigned(shift_register_middle(0 to 0)) + unsigned(actual_register);
-- left edge
--elsif horizontal_counter(9 downto 3) = 0 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(0 to 0)) - unsigned(neighbours(1 to 1)) - unsigned(neighbours(2 to 2)) - unsigned(neighbours(3 to 3)) - unsigned(neighbours(4 to 4)) - unsigned(neighbours(5 to 5)) + unsigned(neighbours(6 to 6)) + unsigned(neighbours(7 to 7)) + unsigned(neighbours(8 to 8)) + unsigned(shift_register_top(0 to 0)) + unsigned(shift_register_middle(0 to 0)) + unsigned(actual_register);
-- right edge
--elsif horizontal_counter(9 downto 3) = cell_number-1 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(0 to 0)) - unsigned(neighbours(1 to 1)) - unsigned(neighbours(2 to 2));
-- bottom edge
--elsif vertical_counter(9 downto 3) = cell_number-1 then
-- neighbours_count <= neighbours_count - unsigned(neighbours(0 to 0)) - unsigned(neighbours(1 to 1)) + unsigned(shift_register_top(0 to 0)) + unsigned(shift_register_middle(0 to 0));