- fixed bounds check error

git-svn-id: http://moon:8086/svn/vhdl/trunk@1510 cc03376c-175c-47c8-b038-4cd826a8556b
This commit is contained in:
2021-03-24 10:11:06 +00:00
parent 018cb85f4b
commit 9d6ab7b156
+3 -1
View File
@@ -137,7 +137,9 @@ proc_bus_read_counter:
elsif cmd_read_en = '1' and read_fifo_empty = '1' then
read_cnt <= read_cnt + 1;
elsif cmd_read_en = '0' and read_fifo_empty = '0' and dout_re = '1' then
read_cnt <= read_cnt - 1;
if read_cnt > 0 then
read_cnt <= read_cnt - 1;
end if;
end if;
end if;
end process;