From dd0dadd69266a45806b71022819019cad6e68226 Mon Sep 17 00:00:00 2001 From: Grzegorz Daniluk <grzegorz.daniluk@cern.ch> Date: Mon, 30 Mar 2015 10:21:15 +0200 Subject: [PATCH] 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. --- modules/wrsw_swcore/xswc_input_block.vhd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/wrsw_swcore/xswc_input_block.vhd b/modules/wrsw_swcore/xswc_input_block.vhd index 092471ff..4c2fa16d 100644 --- a/modules/wrsw_swcore/xswc_input_block.vhd +++ b/modules/wrsw_swcore/xswc_input_block.vhd @@ -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'; -- GitLab