Prefetcher.py revision 13717
110623Smitch.hayenga@arm.com# Copyright (c) 2012, 2014 ARM Limited 29288Sandreas.hansson@arm.com# All rights reserved. 39288Sandreas.hansson@arm.com# 49288Sandreas.hansson@arm.com# The license below extends only to copyright in the software and shall 59288Sandreas.hansson@arm.com# not be construed as granting a license to any other intellectual 69288Sandreas.hansson@arm.com# property including but not limited to intellectual property relating 79288Sandreas.hansson@arm.com# to a hardware implementation of the functionality of the software 89288Sandreas.hansson@arm.com# licensed hereunder. You may use the software subject to the license 99288Sandreas.hansson@arm.com# terms below provided that you ensure that this notice is replicated 109288Sandreas.hansson@arm.com# unmodified and in its entirety in all distributions of the software, 119288Sandreas.hansson@arm.com# modified or unmodified, in source code or in binary form. 129288Sandreas.hansson@arm.com# 139288Sandreas.hansson@arm.com# Copyright (c) 2005 The Regents of The University of Michigan 149288Sandreas.hansson@arm.com# All rights reserved. 159288Sandreas.hansson@arm.com# 169288Sandreas.hansson@arm.com# Redistribution and use in source and binary forms, with or without 179288Sandreas.hansson@arm.com# modification, are permitted provided that the following conditions are 189288Sandreas.hansson@arm.com# met: redistributions of source code must retain the above copyright 199288Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer; 209288Sandreas.hansson@arm.com# redistributions in binary form must reproduce the above copyright 219288Sandreas.hansson@arm.com# notice, this list of conditions and the following disclaimer in the 229288Sandreas.hansson@arm.com# documentation and/or other materials provided with the distribution; 239288Sandreas.hansson@arm.com# neither the name of the copyright holders nor the names of its 249288Sandreas.hansson@arm.com# contributors may be used to endorse or promote products derived from 259288Sandreas.hansson@arm.com# this software without specific prior written permission. 269288Sandreas.hansson@arm.com# 279288Sandreas.hansson@arm.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 289288Sandreas.hansson@arm.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 299288Sandreas.hansson@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 309288Sandreas.hansson@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 319288Sandreas.hansson@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 329288Sandreas.hansson@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 339288Sandreas.hansson@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 349288Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 359288Sandreas.hansson@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 369288Sandreas.hansson@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 379288Sandreas.hansson@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 389288Sandreas.hansson@arm.com# 399288Sandreas.hansson@arm.com# Authors: Ron Dreslinski 4010623Smitch.hayenga@arm.com# Mitch Hayenga 419288Sandreas.hansson@arm.com 4213416Sjavier.bueno@metempsy.comfrom m5.SimObject import * 438831Smrinmoy.ghosh@arm.comfrom m5.params import * 448832SAli.Saidi@ARM.comfrom m5.proxy import * 4513665Sandreas.sandberg@arm.com 4613665Sandreas.sandberg@arm.comfrom m5.objects.ClockedObject import ClockedObject 4713665Sandreas.sandberg@arm.comfrom m5.objects.IndexingPolicies import * 4813665Sandreas.sandberg@arm.comfrom m5.objects.ReplacementPolicies import * 498832SAli.Saidi@ARM.com 5013416Sjavier.bueno@metempsy.comclass HWPProbeEvent(object): 5113416Sjavier.bueno@metempsy.com def __init__(self, prefetcher, obj, *listOfNames): 5213416Sjavier.bueno@metempsy.com self.obj = obj 5313416Sjavier.bueno@metempsy.com self.prefetcher = prefetcher 5413416Sjavier.bueno@metempsy.com self.names = listOfNames 5513416Sjavier.bueno@metempsy.com 5613416Sjavier.bueno@metempsy.com def register(self): 5713416Sjavier.bueno@metempsy.com if self.obj: 5813416Sjavier.bueno@metempsy.com for name in self.names: 5913416Sjavier.bueno@metempsy.com self.prefetcher.getCCObject().addEventProbe( 6013416Sjavier.bueno@metempsy.com self.obj.getCCObject(), name) 6113416Sjavier.bueno@metempsy.com 629288Sandreas.hansson@arm.comclass BasePrefetcher(ClockedObject): 638831Smrinmoy.ghosh@arm.com type = 'BasePrefetcher' 648831Smrinmoy.ghosh@arm.com abstract = True 659338SAndreas.Sandberg@arm.com cxx_header = "mem/cache/prefetch/base.hh" 6613416Sjavier.bueno@metempsy.com cxx_exports = [ 6713416Sjavier.bueno@metempsy.com PyBindMethod("addEventProbe"), 6813416Sjavier.bueno@metempsy.com ] 6910466Sandreas.hansson@arm.com sys = Param.System(Parent.any, "System this prefetcher belongs to") 708831Smrinmoy.ghosh@arm.com 7113422Sodanrc@yahoo.com.br # Get the block size from the parent (system) 7213422Sodanrc@yahoo.com.br block_size = Param.Int(Parent.cache_line_size, "Block size in bytes") 7313422Sodanrc@yahoo.com.br 7410623Smitch.hayenga@arm.com on_miss = Param.Bool(False, "Only notify prefetcher on misses") 7510623Smitch.hayenga@arm.com on_read = Param.Bool(True, "Notify prefetcher on reads") 7610623Smitch.hayenga@arm.com on_write = Param.Bool(True, "Notify prefetcher on writes") 7710623Smitch.hayenga@arm.com on_data = Param.Bool(True, "Notify prefetcher on data accesses") 7810623Smitch.hayenga@arm.com on_inst = Param.Bool(True, "Notify prefetcher on instruction accesses") 7913416Sjavier.bueno@metempsy.com prefetch_on_access = Param.Bool(Parent.prefetch_on_access, 8013416Sjavier.bueno@metempsy.com "Notify the hardware prefetcher on every access (not just misses)") 8113551Sjavier.bueno@metempsy.com use_virtual_addresses = Param.Bool(False, 8213551Sjavier.bueno@metempsy.com "Use virtual addresses for prefetching") 8313416Sjavier.bueno@metempsy.com 8413416Sjavier.bueno@metempsy.com _events = [] 8513416Sjavier.bueno@metempsy.com def addEvent(self, newObject): 8613416Sjavier.bueno@metempsy.com self._events.append(newObject) 8713416Sjavier.bueno@metempsy.com 8813416Sjavier.bueno@metempsy.com # Override the normal SimObject::regProbeListeners method and 8913416Sjavier.bueno@metempsy.com # register deferred event handlers. 9013416Sjavier.bueno@metempsy.com def regProbeListeners(self): 9113416Sjavier.bueno@metempsy.com for event in self._events: 9213416Sjavier.bueno@metempsy.com event.register() 9313416Sjavier.bueno@metempsy.com self.getCCObject().regProbeListeners() 9413416Sjavier.bueno@metempsy.com 9513416Sjavier.bueno@metempsy.com def listenFromProbe(self, simObj, *probeNames): 9613416Sjavier.bueno@metempsy.com if not isinstance(simObj, SimObject): 9713416Sjavier.bueno@metempsy.com raise TypeError("argument must be of SimObject type") 9813416Sjavier.bueno@metempsy.com if len(probeNames) <= 0: 9913416Sjavier.bueno@metempsy.com raise TypeError("probeNames must have at least one element") 10013416Sjavier.bueno@metempsy.com self.addEvent(HWPProbeEvent(self, simObj, *probeNames)) 10110623Smitch.hayenga@arm.com 10210623Smitch.hayenga@arm.comclass QueuedPrefetcher(BasePrefetcher): 10310623Smitch.hayenga@arm.com type = "QueuedPrefetcher" 10410623Smitch.hayenga@arm.com abstract = True 10510623Smitch.hayenga@arm.com cxx_class = "QueuedPrefetcher" 10610623Smitch.hayenga@arm.com cxx_header = "mem/cache/prefetch/queued.hh" 10710623Smitch.hayenga@arm.com latency = Param.Int(1, "Latency for generated prefetches") 10810623Smitch.hayenga@arm.com queue_size = Param.Int(32, "Maximum number of queued prefetches") 10910623Smitch.hayenga@arm.com queue_squash = Param.Bool(True, "Squash queued prefetch on demand access") 11010623Smitch.hayenga@arm.com queue_filter = Param.Bool(True, "Don't queue redundant prefetches") 11110623Smitch.hayenga@arm.com cache_snoop = Param.Bool(False, "Snoop cache to eliminate redundant request") 11210623Smitch.hayenga@arm.com 11310623Smitch.hayenga@arm.com tag_prefetch = Param.Bool(True, "Tag prefetch with PC of generating access") 11410623Smitch.hayenga@arm.com 11510623Smitch.hayenga@arm.comclass StridePrefetcher(QueuedPrefetcher): 1168831Smrinmoy.ghosh@arm.com type = 'StridePrefetcher' 1178831Smrinmoy.ghosh@arm.com cxx_class = 'StridePrefetcher' 1189338SAndreas.Sandberg@arm.com cxx_header = "mem/cache/prefetch/stride.hh" 1198831Smrinmoy.ghosh@arm.com 12013422Sodanrc@yahoo.com.br # Do not consult stride prefetcher on instruction accesses 12113422Sodanrc@yahoo.com.br on_inst = False 12213422Sodanrc@yahoo.com.br 12310623Smitch.hayenga@arm.com max_conf = Param.Int(7, "Maximum confidence level") 12410623Smitch.hayenga@arm.com thresh_conf = Param.Int(4, "Threshold confidence level") 12510623Smitch.hayenga@arm.com min_conf = Param.Int(0, "Minimum confidence level") 12610623Smitch.hayenga@arm.com start_conf = Param.Int(4, "Starting confidence for new entries") 12710623Smitch.hayenga@arm.com 12810623Smitch.hayenga@arm.com table_sets = Param.Int(16, "Number of sets in PC lookup table") 12910623Smitch.hayenga@arm.com table_assoc = Param.Int(4, "Associativity of PC lookup table") 13010623Smitch.hayenga@arm.com use_master_id = Param.Bool(True, "Use master id based history") 13110623Smitch.hayenga@arm.com 13210623Smitch.hayenga@arm.com degree = Param.Int(4, "Number of prefetches to generate") 13310623Smitch.hayenga@arm.com 13413427Sodanrc@yahoo.com.br # Get replacement policy 13513427Sodanrc@yahoo.com.br replacement_policy = Param.BaseReplacementPolicy(RandomRP(), 13613427Sodanrc@yahoo.com.br "Replacement policy") 13713427Sodanrc@yahoo.com.br 13810623Smitch.hayenga@arm.comclass TaggedPrefetcher(QueuedPrefetcher): 1398831Smrinmoy.ghosh@arm.com type = 'TaggedPrefetcher' 1408831Smrinmoy.ghosh@arm.com cxx_class = 'TaggedPrefetcher' 1419338SAndreas.Sandberg@arm.com cxx_header = "mem/cache/prefetch/tagged.hh" 1428831Smrinmoy.ghosh@arm.com 14310623Smitch.hayenga@arm.com degree = Param.Int(2, "Number of prefetches to generate") 14413553Sjavier.bueno@metempsy.com 14513553Sjavier.bueno@metempsy.comclass SignaturePathPrefetcher(QueuedPrefetcher): 14613553Sjavier.bueno@metempsy.com type = 'SignaturePathPrefetcher' 14713553Sjavier.bueno@metempsy.com cxx_class = 'SignaturePathPrefetcher' 14813553Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/signature_path.hh" 14913553Sjavier.bueno@metempsy.com 15013553Sjavier.bueno@metempsy.com signature_shift = Param.UInt8(3, 15113553Sjavier.bueno@metempsy.com "Number of bits to shift when calculating a new signature"); 15213553Sjavier.bueno@metempsy.com signature_bits = Param.UInt16(12, 15313553Sjavier.bueno@metempsy.com "Size of the signature, in bits"); 15413553Sjavier.bueno@metempsy.com signature_table_entries = Param.MemorySize("1024", 15513553Sjavier.bueno@metempsy.com "Number of entries of the signature table") 15613553Sjavier.bueno@metempsy.com signature_table_assoc = Param.Unsigned(2, 15713553Sjavier.bueno@metempsy.com "Associativity of the signature table") 15813553Sjavier.bueno@metempsy.com signature_table_indexing_policy = Param.BaseIndexingPolicy( 15913553Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, assoc = Parent.signature_table_assoc, 16013553Sjavier.bueno@metempsy.com size = Parent.signature_table_entries), 16113553Sjavier.bueno@metempsy.com "Indexing policy of the signature table") 16213553Sjavier.bueno@metempsy.com signature_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 16313553Sjavier.bueno@metempsy.com "Replacement policy of the signature table") 16413553Sjavier.bueno@metempsy.com 16513553Sjavier.bueno@metempsy.com max_counter_value = Param.UInt8(7, "Maximum pattern counter value") 16613553Sjavier.bueno@metempsy.com pattern_table_entries = Param.MemorySize("4096", 16713553Sjavier.bueno@metempsy.com "Number of entries of the pattern table") 16813553Sjavier.bueno@metempsy.com pattern_table_assoc = Param.Unsigned(1, 16913553Sjavier.bueno@metempsy.com "Associativity of the pattern table") 17013553Sjavier.bueno@metempsy.com strides_per_pattern_entry = Param.Unsigned(4, 17113553Sjavier.bueno@metempsy.com "Number of strides stored in each pattern entry") 17213553Sjavier.bueno@metempsy.com pattern_table_indexing_policy = Param.BaseIndexingPolicy( 17313553Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, assoc = Parent.pattern_table_assoc, 17413553Sjavier.bueno@metempsy.com size = Parent.pattern_table_entries), 17513553Sjavier.bueno@metempsy.com "Indexing policy of the pattern table") 17613553Sjavier.bueno@metempsy.com pattern_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 17713553Sjavier.bueno@metempsy.com "Replacement policy of the pattern table") 17813553Sjavier.bueno@metempsy.com 17913553Sjavier.bueno@metempsy.com prefetch_confidence_threshold = Param.Float(0.5, 18013553Sjavier.bueno@metempsy.com "Minimum confidence to issue prefetches") 18113553Sjavier.bueno@metempsy.com lookahead_confidence_threshold = Param.Float(0.75, 18213553Sjavier.bueno@metempsy.com "Minimum confidence to continue exploring lookahead entries") 18313554Sjavier.bueno@metempsy.com 18413624Sjavier.bueno@metempsy.comclass SignaturePathPrefetcherV2(SignaturePathPrefetcher): 18513624Sjavier.bueno@metempsy.com type = 'SignaturePathPrefetcherV2' 18613624Sjavier.bueno@metempsy.com cxx_class = 'SignaturePathPrefetcherV2' 18713624Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/signature_path_v2.hh" 18813624Sjavier.bueno@metempsy.com 18913624Sjavier.bueno@metempsy.com signature_table_entries = "256" 19013624Sjavier.bueno@metempsy.com signature_table_assoc = 1 19113624Sjavier.bueno@metempsy.com pattern_table_entries = "512" 19213624Sjavier.bueno@metempsy.com pattern_table_assoc = 1 19313624Sjavier.bueno@metempsy.com max_counter_value = 15 19413624Sjavier.bueno@metempsy.com prefetch_confidence_threshold = 0.25 19513624Sjavier.bueno@metempsy.com lookahead_confidence_threshold = 0.25 19613624Sjavier.bueno@metempsy.com 19713624Sjavier.bueno@metempsy.com global_history_register_entries = Param.MemorySize("8", 19813624Sjavier.bueno@metempsy.com "Number of entries of global history register") 19913624Sjavier.bueno@metempsy.com global_history_register_indexing_policy = Param.BaseIndexingPolicy( 20013624Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, 20113624Sjavier.bueno@metempsy.com assoc = Parent.global_history_register_entries, 20213624Sjavier.bueno@metempsy.com size = Parent.global_history_register_entries), 20313624Sjavier.bueno@metempsy.com "Indexing policy of the global history register") 20413624Sjavier.bueno@metempsy.com global_history_register_replacement_policy = Param.BaseReplacementPolicy( 20513624Sjavier.bueno@metempsy.com LRURP(), "Replacement policy of the global history register") 20613624Sjavier.bueno@metempsy.com 20713700Sjavier.bueno@metempsy.comclass AccessMapPatternMatching(ClockedObject): 20813700Sjavier.bueno@metempsy.com type = 'AccessMapPatternMatching' 20913700Sjavier.bueno@metempsy.com cxx_class = 'AccessMapPatternMatching' 21013554Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/access_map_pattern_matching.hh" 21113554Sjavier.bueno@metempsy.com 21213700Sjavier.bueno@metempsy.com block_size = Param.Unsigned(Parent.block_size, 21313700Sjavier.bueno@metempsy.com "Cacheline size used by the prefetcher using this object") 21413700Sjavier.bueno@metempsy.com 21513700Sjavier.bueno@metempsy.com limit_stride = Param.Unsigned(0, 21613700Sjavier.bueno@metempsy.com "Limit the strides checked up to -X/X, if 0, disable the limit") 21713554Sjavier.bueno@metempsy.com start_degree = Param.Unsigned(4, 21813554Sjavier.bueno@metempsy.com "Initial degree (Maximum number of prefetches generated") 21913554Sjavier.bueno@metempsy.com hot_zone_size = Param.MemorySize("2kB", "Memory covered by a hot zone") 22013554Sjavier.bueno@metempsy.com access_map_table_entries = Param.MemorySize("256", 22113554Sjavier.bueno@metempsy.com "Number of entries in the access map table") 22213554Sjavier.bueno@metempsy.com access_map_table_assoc = Param.Unsigned(8, 22313554Sjavier.bueno@metempsy.com "Associativity of the access map table") 22413554Sjavier.bueno@metempsy.com access_map_table_indexing_policy = Param.BaseIndexingPolicy( 22513554Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, assoc = Parent.access_map_table_assoc, 22613554Sjavier.bueno@metempsy.com size = Parent.access_map_table_entries), 22713554Sjavier.bueno@metempsy.com "Indexing policy of the access map table") 22813554Sjavier.bueno@metempsy.com access_map_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 22913554Sjavier.bueno@metempsy.com "Replacement policy of the access map table") 23013554Sjavier.bueno@metempsy.com high_coverage_threshold = Param.Float(0.25, 23113554Sjavier.bueno@metempsy.com "A prefetch coverage factor bigger than this is considered high") 23213554Sjavier.bueno@metempsy.com low_coverage_threshold = Param.Float(0.125, 23313554Sjavier.bueno@metempsy.com "A prefetch coverage factor smaller than this is considered low") 23413554Sjavier.bueno@metempsy.com high_accuracy_threshold = Param.Float(0.5, 23513554Sjavier.bueno@metempsy.com "A prefetch accuracy factor bigger than this is considered high") 23613554Sjavier.bueno@metempsy.com low_accuracy_threshold = Param.Float(0.25, 23713554Sjavier.bueno@metempsy.com "A prefetch accuracy factor smaller than this is considered low") 23813554Sjavier.bueno@metempsy.com high_cache_hit_threshold = Param.Float(0.875, 23913554Sjavier.bueno@metempsy.com "A cache hit ratio bigger than this is considered high") 24013554Sjavier.bueno@metempsy.com low_cache_hit_threshold = Param.Float(0.75, 24113554Sjavier.bueno@metempsy.com "A cache hit ratio smaller than this is considered low") 24213554Sjavier.bueno@metempsy.com epoch_cycles = Param.Cycles(256000, "Cycles in an epoch period") 24313554Sjavier.bueno@metempsy.com offchip_memory_latency = Param.Latency("30ns", 24413554Sjavier.bueno@metempsy.com "Memory latency used to compute the required memory bandwidth") 24513667Sjavier.bueno@metempsy.com 24613700Sjavier.bueno@metempsy.comclass AMPMPrefetcher(QueuedPrefetcher): 24713700Sjavier.bueno@metempsy.com type = 'AMPMPrefetcher' 24813700Sjavier.bueno@metempsy.com cxx_class = 'AMPMPrefetcher' 24913700Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/access_map_pattern_matching.hh" 25013700Sjavier.bueno@metempsy.com ampm = Param.AccessMapPatternMatching( AccessMapPatternMatching(), 25113700Sjavier.bueno@metempsy.com "Access Map Pattern Matching object") 25213700Sjavier.bueno@metempsy.com 25313667Sjavier.bueno@metempsy.comclass DeltaCorrelatingPredictionTables(SimObject): 25413667Sjavier.bueno@metempsy.com type = 'DeltaCorrelatingPredictionTables' 25513667Sjavier.bueno@metempsy.com cxx_class = 'DeltaCorrelatingPredictionTables' 25613667Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/delta_correlating_prediction_tables.hh" 25713667Sjavier.bueno@metempsy.com deltas_per_entry = Param.Unsigned(20, 25813667Sjavier.bueno@metempsy.com "Number of deltas stored in each table entry") 25913667Sjavier.bueno@metempsy.com delta_bits = Param.Unsigned(12, "Bits per delta") 26013667Sjavier.bueno@metempsy.com delta_mask_bits = Param.Unsigned(8, 26113667Sjavier.bueno@metempsy.com "Lower bits to mask when comparing deltas") 26213667Sjavier.bueno@metempsy.com table_entries = Param.MemorySize("128", 26313667Sjavier.bueno@metempsy.com "Number of entries in the table") 26413667Sjavier.bueno@metempsy.com table_assoc = Param.Unsigned(128, 26513667Sjavier.bueno@metempsy.com "Associativity of the table") 26613667Sjavier.bueno@metempsy.com table_indexing_policy = Param.BaseIndexingPolicy( 26713667Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, assoc = Parent.table_assoc, 26813667Sjavier.bueno@metempsy.com size = Parent.table_entries), 26913667Sjavier.bueno@metempsy.com "Indexing policy of the table") 27013667Sjavier.bueno@metempsy.com table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 27113667Sjavier.bueno@metempsy.com "Replacement policy of the table") 27213667Sjavier.bueno@metempsy.com 27313667Sjavier.bueno@metempsy.comclass DCPTPrefetcher(QueuedPrefetcher): 27413667Sjavier.bueno@metempsy.com type = 'DCPTPrefetcher' 27513667Sjavier.bueno@metempsy.com cxx_class = 'DCPTPrefetcher' 27613667Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/delta_correlating_prediction_tables.hh" 27713667Sjavier.bueno@metempsy.com dcpt = Param.DeltaCorrelatingPredictionTables( 27813667Sjavier.bueno@metempsy.com DeltaCorrelatingPredictionTables(), 27913667Sjavier.bueno@metempsy.com "Delta Correlating Prediction Tables object") 28013667Sjavier.bueno@metempsy.com 28113669Sjavier.bueno@metempsy.comclass IrregularStreamBufferPrefetcher(QueuedPrefetcher): 28213669Sjavier.bueno@metempsy.com type = "IrregularStreamBufferPrefetcher" 28313669Sjavier.bueno@metempsy.com cxx_class = "IrregularStreamBufferPrefetcher" 28413669Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/irregular_stream_buffer.hh" 28513669Sjavier.bueno@metempsy.com 28613669Sjavier.bueno@metempsy.com max_counter_value = Param.Unsigned(3, 28713669Sjavier.bueno@metempsy.com "Maximum value of the confidence counter") 28813669Sjavier.bueno@metempsy.com chunk_size = Param.Unsigned(256, 28913669Sjavier.bueno@metempsy.com "Maximum number of addresses in a temporal stream") 29013669Sjavier.bueno@metempsy.com degree = Param.Unsigned(4, "Number of prefetches to generate") 29113669Sjavier.bueno@metempsy.com training_unit_assoc = Param.Unsigned(128, 29213669Sjavier.bueno@metempsy.com "Associativity of the training unit") 29313669Sjavier.bueno@metempsy.com training_unit_entries = Param.MemorySize("128", 29413669Sjavier.bueno@metempsy.com "Number of entries of the training unit") 29513669Sjavier.bueno@metempsy.com training_unit_indexing_policy = Param.BaseIndexingPolicy( 29613669Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, assoc = Parent.training_unit_assoc, 29713669Sjavier.bueno@metempsy.com size = Parent.training_unit_entries), 29813669Sjavier.bueno@metempsy.com "Indexing policy of the training unit") 29913669Sjavier.bueno@metempsy.com training_unit_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 30013669Sjavier.bueno@metempsy.com "Replacement policy of the training unit") 30113669Sjavier.bueno@metempsy.com 30213669Sjavier.bueno@metempsy.com prefetch_candidates_per_entry = Param.Unsigned(16, 30313669Sjavier.bueno@metempsy.com "Number of prefetch candidates stored in a SP-AMC entry") 30413669Sjavier.bueno@metempsy.com address_map_cache_assoc = Param.Unsigned(128, 30513669Sjavier.bueno@metempsy.com "Associativity of the PS/SP AMCs") 30613669Sjavier.bueno@metempsy.com address_map_cache_entries = Param.MemorySize("128", 30713669Sjavier.bueno@metempsy.com "Number of entries of the PS/SP AMCs") 30813669Sjavier.bueno@metempsy.com ps_address_map_cache_indexing_policy = Param.BaseIndexingPolicy( 30913669Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, 31013669Sjavier.bueno@metempsy.com assoc = Parent.address_map_cache_assoc, 31113669Sjavier.bueno@metempsy.com size = Parent.address_map_cache_entries), 31213669Sjavier.bueno@metempsy.com "Indexing policy of the Physical-to-Structural Address Map Cache") 31313669Sjavier.bueno@metempsy.com ps_address_map_cache_replacement_policy = Param.BaseReplacementPolicy( 31413669Sjavier.bueno@metempsy.com LRURP(), 31513669Sjavier.bueno@metempsy.com "Replacement policy of the Physical-to-Structural Address Map Cache") 31613669Sjavier.bueno@metempsy.com sp_address_map_cache_indexing_policy = Param.BaseIndexingPolicy( 31713669Sjavier.bueno@metempsy.com SetAssociative(entry_size = 1, 31813669Sjavier.bueno@metempsy.com assoc = Parent.address_map_cache_assoc, 31913669Sjavier.bueno@metempsy.com size = Parent.address_map_cache_entries), 32013669Sjavier.bueno@metempsy.com "Indexing policy of the Structural-to-Physical Address Mao Cache") 32113669Sjavier.bueno@metempsy.com sp_address_map_cache_replacement_policy = Param.BaseReplacementPolicy( 32213669Sjavier.bueno@metempsy.com LRURP(), 32313669Sjavier.bueno@metempsy.com "Replacement policy of the Structural-to-Physical Address Map Cache") 32413700Sjavier.bueno@metempsy.com 32513700Sjavier.bueno@metempsy.comclass SlimAccessMapPatternMatching(AccessMapPatternMatching): 32613700Sjavier.bueno@metempsy.com start_degree = 2 32713700Sjavier.bueno@metempsy.com limit_stride = 4 32813700Sjavier.bueno@metempsy.com 32913700Sjavier.bueno@metempsy.comclass SlimDeltaCorrelatingPredictionTables(DeltaCorrelatingPredictionTables): 33013700Sjavier.bueno@metempsy.com table_entries = "256" 33113700Sjavier.bueno@metempsy.com table_assoc = 256 33213700Sjavier.bueno@metempsy.com deltas_per_entry = 9 33313700Sjavier.bueno@metempsy.com 33413700Sjavier.bueno@metempsy.comclass SlimAMPMPrefetcher(QueuedPrefetcher): 33513700Sjavier.bueno@metempsy.com type = 'SlimAMPMPrefetcher' 33613700Sjavier.bueno@metempsy.com cxx_class = 'SlimAMPMPrefetcher' 33713700Sjavier.bueno@metempsy.com cxx_header = "mem/cache/prefetch/slim_ampm.hh" 33813700Sjavier.bueno@metempsy.com 33913700Sjavier.bueno@metempsy.com ampm = Param.AccessMapPatternMatching(SlimAccessMapPatternMatching(), 34013700Sjavier.bueno@metempsy.com "Access Map Pattern Matching object") 34113700Sjavier.bueno@metempsy.com dcpt = Param.DeltaCorrelatingPredictionTables( 34213700Sjavier.bueno@metempsy.com SlimDeltaCorrelatingPredictionTables(), 34313700Sjavier.bueno@metempsy.com "Delta Correlating Prediction Tables object") 34413717Sivan.pizarro@metempsy.com 34513717Sivan.pizarro@metempsy.comclass BOPPrefetcher(QueuedPrefetcher): 34613717Sivan.pizarro@metempsy.com type = "BOPPrefetcher" 34713717Sivan.pizarro@metempsy.com cxx_class = "BOPPrefetcher" 34813717Sivan.pizarro@metempsy.com cxx_header = "mem/cache/prefetch/bop.hh" 34913717Sivan.pizarro@metempsy.com score_max = Param.Unsigned(31, "Max. score to update the best offset") 35013717Sivan.pizarro@metempsy.com round_max = Param.Unsigned(100, "Max. round to update the best offset") 35113717Sivan.pizarro@metempsy.com bad_score = Param.Unsigned(10, "Score at which the HWP is disabled") 35213717Sivan.pizarro@metempsy.com rr_size = Param.Unsigned(64, "Number of entries of each RR bank") 35313717Sivan.pizarro@metempsy.com tag_bits = Param.Unsigned(12, "Bits used to store the tag") 35413717Sivan.pizarro@metempsy.com offset_list_size = Param.Unsigned(46, 35513717Sivan.pizarro@metempsy.com "Number of entries in the offsets list") 35613717Sivan.pizarro@metempsy.com negative_offsets_enable = Param.Bool(True, 35713717Sivan.pizarro@metempsy.com "Initialize the offsets list also with negative values \ 35813717Sivan.pizarro@metempsy.com (i.e. the table will have half of the entries with positive \ 35913717Sivan.pizarro@metempsy.com offsets and the other half with negative ones)") 36013717Sivan.pizarro@metempsy.com delay_queue_enable = Param.Bool(True, "Enable the delay queue") 36113717Sivan.pizarro@metempsy.com delay_queue_size = Param.Unsigned(15, 36213717Sivan.pizarro@metempsy.com "Number of entries in the delay queue") 36313717Sivan.pizarro@metempsy.com delay_queue_cycles = Param.Cycles(60, 36413717Sivan.pizarro@metempsy.com "Cycles to delay a write in the left RR table from the delay \ 36513717Sivan.pizarro@metempsy.com queue") 366