mem: Add a page_bytes parameter to the classic prefetcher.
This parameter is used to figure out if two addresses are on the same or different pages, and could be used to find what page they were on and the page offset, although it doesn't look like the later two are actually used. This value could possibly come from the TLB parameter attached to the prefetcher, but making it explicit makes these more symmetric with the Ruby prefetcher, and reduces the complexity of the TLB implementation. Change-Id: I6921943c49af19971b84225ecfd1127304363426 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50352 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com> Maintainer: Andreas Sandberg <andreas.sandberg@arm.com>
This commit is contained in:
2
src/mem/cache/prefetch/Prefetcher.py
vendored
2
src/mem/cache/prefetch/Prefetcher.py
vendored
@@ -81,6 +81,8 @@ class BasePrefetcher(ClockedObject):
|
||||
"Notify the hardware prefetcher on hit on prefetched lines")
|
||||
use_virtual_addresses = Param.Bool(False,
|
||||
"Use virtual addresses for prefetching")
|
||||
page_bytes = Param.MemorySize('4KiB',
|
||||
"Size of pages for virtual addresses")
|
||||
|
||||
def __init__(self, **kwargs):
|
||||
super(BasePrefetcher, self).__init__(**kwargs)
|
||||
|
||||
2
src/mem/cache/prefetch/base.cc
vendored
2
src/mem/cache/prefetch/base.cc
vendored
@@ -98,7 +98,7 @@ Base::Base(const BasePrefetcherParams &p)
|
||||
lBlkSize(floorLog2(blkSize)), onMiss(p.on_miss), onRead(p.on_read),
|
||||
onWrite(p.on_write), onData(p.on_data), onInst(p.on_inst),
|
||||
requestorId(p.sys->getRequestorId(this)),
|
||||
pageBytes(p.sys->getPageBytes()),
|
||||
pageBytes(p.page_bytes),
|
||||
prefetchOnAccess(p.prefetch_on_access),
|
||||
prefetchOnPfHit(p.prefetch_on_pf_hit),
|
||||
useVirtualAddresses(p.use_virtual_addresses),
|
||||
|
||||
Reference in New Issue
Block a user