Add scrolling program

This commit is contained in:
2022-11-20 17:48:42 +01:00
parent 6a76243fc0
commit 4666ae9bf8
5 changed files with 414 additions and 16 deletions

View File

@@ -52,6 +52,7 @@ begin
end if;
elsif buffer_clear = '1' then
ptr_last <= -1;
ptr_write <= 0;
end if;
end if;
end if;
@@ -65,17 +66,21 @@ begin
hex_char <= (others => '0');
else
hex_char <= (others => '0');
if next_char = '1' then
if ptr_last = -1 then -- Special case
hex_char <= (others => '0');
else
hex_char <= ring_buffer(ptr_read);
if ptr_read = ptr_last then
ptr_read <= 0;
if buffer_clear = '1' then
ptr_read <= 0;
else
if next_char = '1' then
if ptr_last = -1 then -- Special case
hex_char <= (others => '0');
else
ptr_read <= ptr_read + 1;
hex_char <= ring_buffer(ptr_read);
if ptr_read = ptr_last then
ptr_read <= 0;
else
ptr_read <= ptr_read + 1;
end if;
end if;
end if;
end if;