• Grzegorz Daniluk's avatar
    modules/swcore: bugfix to allocator preventing from using twice the same page when memory gets full · c6783f6a
    Grzegorz Daniluk authored
    The problem occured in swc_page_alloc_ram_bug.vhd when there were no more free
    pages (out_nomem_d1='1') and input block was requesting allocation and setting
    usecnt (alloc FSM in S_PCKSTART_SET_AND_REQ). The operation was _done_ because
    there is always one free page read in advance, prepared to be allocated to a
    requesting input block and set usecnt does not depend on out_nomem_d1.
    However, reading of the next free page from the memory was done only on
    alloc_req, only if there were still some free pages (q_read_p0 <= alloc_req &
    !out_nomem_d1).
    That means allocator was holding address of the page just allocated to one of
    the input blocks, and was giving the same address to the next one requesting
    allocation (if in the meantime out_nomem_d1 went to '0').
    To fix that I've added one register keeping information if the page read from
    the memory was already given to any requestor. If it was then I do _read_ of the
    new page imediately after there are some new pages (out_nomem_d1 = '0') so that
    it is ready when next time somebody asks.
    c6783f6a
Name
Last commit
Last update
ip_cores Loading commit data...
modules Loading commit data...
platform Loading commit data...
sim Loading commit data...
syn Loading commit data...
testbench Loading commit data...
top Loading commit data...
.gitignore Loading commit data...
.gitmodules Loading commit data...
Manifest.py Loading commit data...
README Loading commit data...
building.txt Loading commit data...