Skip to content
Snippets Groups Projects
Commit acc2b904 authored by vagle's avatar vagle
Browse files

middle is good

parent e1435986
No related branches found
No related tags found
No related merge requests found
......@@ -158,7 +158,7 @@ begin
end if;
-- handle shift registers
--if switch_mode = '1' and frame_counter = 0 and horizontal_counter(9 downto 3) < cell_number+2 and vertical_counter(9 downto 3) < cell_number+2 then
--if switch_mode = '1' and frame_counter = 0 and horizontal_counter(2 downto 0) = 0 and horizontal_counter(9 downto 3) < cell_number+2 and vertical_counter(2 downto 0) = 0 and vertical_counter(9 downto 3) < cell_number+2 then
if switch_mode = '1' and frame_counter = 0 and horizontal_counter(2 downto 0) = 0 and horizontal_counter(9 downto 3) < cell_number and vertical_counter(2 downto 0) = 0 and vertical_counter(9 downto 3) < cell_number then
shift_register_top <= shift_register_top(1 to cell_number-1) & shift_register_middle(0);
......@@ -185,19 +185,19 @@ begin
if neighbours(4)='1' then
if neighbours_count = 3 or neighbours_count = 4 then
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '1';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '1';
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '1';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '1';
else
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '0';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '0';
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '0';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '0';
end if;
else
if neighbours_count = 3 then
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '1';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '1';
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '1';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '1';
else
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '0';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-2)) <= '0';
cells(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '0';
cells_to_draw(to_integer((vertical_counter(9 downto 3)-1) * to_unsigned(cell_number,8) + horizontal_counter(9 downto 3)-3)) <= '0';
end if;
end if;
......@@ -251,7 +251,7 @@ begin
-- position changing
if vertical_counter = VERTICAL_SYNC_PULSE-1 then
vertical_counter <= (others => '0');
if frame_counter = 127 then
if frame_counter = 63 then
frame_counter <= (others => '0');
else
frame_counter <= frame_counter + 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment