-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #157 from OpenXiangShan/ruby-pf
Ruby pf
- Loading branch information
Showing
59 changed files
with
891 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
import m5 | ||
from m5.objects import * | ||
from common.Caches import * | ||
from common import ObjectList | ||
|
||
|
||
def _get_hwp(hwp_option): | ||
if hwp_option == None: | ||
return NULL | ||
|
||
hwpClass = ObjectList.hwp_list.get(hwp_option) | ||
return hwpClass() | ||
|
||
def create_prefetcher(cpu, cache_level, options): | ||
prefetcher_attr = '{}_hwp_type'.format(cache_level) | ||
prefetcher_name = '' | ||
prefetcher = NULL | ||
if hasattr(options, prefetcher_attr): | ||
prefetcher_name = getattr(options, prefetcher_attr) | ||
prefetcher = _get_hwp(prefetcher_name) | ||
print(f"create_prefetcher at {cache_level}: {prefetcher_name}") | ||
|
||
if prefetcher == NULL: | ||
return NULL | ||
|
||
if cpu != NULL: | ||
prefetcher.registerTLB(cpu.mmu.dtb) | ||
|
||
prefetcher.queue_size = 64 | ||
|
||
if prefetcher_name == 'XSCompositePrefetcher': | ||
if options.l1d_enable_spp: | ||
prefetcher.enable_spp = True | ||
if options.l1d_enable_cplx: | ||
prefetcher.enable_cplx = True | ||
prefetcher.pht_pf_level = options.pht_pf_level | ||
prefetcher.short_stride_thres = options.short_stride_thres | ||
prefetcher.fuzzy_stride_matching = False | ||
prefetcher.stream_pf_ahead = True | ||
prefetcher.bop_large.delay_queue_enable = True | ||
prefetcher.bop_large.bad_score = 10 | ||
prefetcher.bop_small.delay_queue_enable = True | ||
prefetcher.bop_small.bad_score = 5 | ||
prefetcher.queue_size = 128 | ||
prefetcher.max_prefetch_requests_with_pending_translation = 128 | ||
prefetcher.region_size = 64*16 # 64B * blocks per region | ||
|
||
prefetcher.berti.use_byte_addr = True | ||
prefetcher.berti.aggressive_pf = False | ||
prefetcher.berti.trigger_pht = True | ||
|
||
return prefetcher |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.