Do not scroll in characters that are currently displayed
This commit is contained in:
@@ -10,7 +10,8 @@ entity scrolling_buffer is
|
||||
buffer_write : in std_logic;
|
||||
buffer_data : in std_logic_vector(4 downto 0);
|
||||
next_char : in std_logic;
|
||||
hex_char : out std_logic_vector(4 downto 0)
|
||||
hex_char : out std_logic_vector(4 downto 0);
|
||||
elements : out std_logic_vector(4 downto 0)
|
||||
);
|
||||
end entity scrolling_buffer;
|
||||
|
||||
@@ -34,12 +35,14 @@ begin
|
||||
ptr_last <= -1;
|
||||
ptr_write <= 0;
|
||||
ring_buffer <= (others => (others => '0'));
|
||||
elements <= (others => '0');
|
||||
else
|
||||
if buffer_write = '1' then
|
||||
ring_buffer(ptr_write) <= buffer_data;
|
||||
|
||||
if ptr_last /= BUFFER_SIZE - 1 then
|
||||
ptr_last <= ptr_write;
|
||||
elements <= std_logic_vector(to_unsigned(ptr_write + 1, 5));
|
||||
end if;
|
||||
|
||||
if ptr_write = BUFFER_SIZE - 1 then
|
||||
|
||||
Reference in New Issue
Block a user