Commit dd0dadd6 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

modules/swcore: prevent losing a page when dropping on pages boundary

When it turns out we have to drop frame (e.g. because memory is full) and we get
this information on page boundary, next inter page is already being requested.
However, we do not use previously allocated inter page, that means we lose
previously allocated page forever.
In most of the cases, the conditional statement prevents such situation by
checking mpm_dlast = '0'. But mpm_dlast is delayed by 1 clock cycle, that's why
I added checking for tp_drop. Now, if we get in the same cycle mpm_pg_req and
tp_drop, then we don't make a new inter page request.
parent cfe50f15
......@@ -1192,7 +1192,7 @@ begin
pckstart_page_in_advance <= '1';
end if;
if(mpm_pg_req_i = '1' and mpm_dlast = '0') then
if(mpm_pg_req_i = '1' and mpm_dlast = '0' and tp_drop = '0') then
pckinter_page_in_advance <= '0';
elsif(mmu_page_alloc_done_i = '1' and pckinter_page_alloc_req = '1') then
pckinter_page_in_advance <= '1';
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment