Prefetcher.py revision 13735:52ab3bab4f28
12330SN/A# Copyright (c) 2012, 2014 ARM Limited 29426SAndreas.Sandberg@ARM.com# All rights reserved. 39920Syasuko.eckert@amd.com# 48733Sgeoffrey.blake@arm.com# The license below extends only to copyright in the software and shall 58733Sgeoffrey.blake@arm.com# not be construed as granting a license to any other intellectual 68733Sgeoffrey.blake@arm.com# property including but not limited to intellectual property relating 78733Sgeoffrey.blake@arm.com# to a hardware implementation of the functionality of the software 88733Sgeoffrey.blake@arm.com# licensed hereunder. You may use the software subject to the license 98733Sgeoffrey.blake@arm.com# terms below provided that you ensure that this notice is replicated 108733Sgeoffrey.blake@arm.com# unmodified and in its entirety in all distributions of the software, 118733Sgeoffrey.blake@arm.com# modified or unmodified, in source code or in binary form. 128733Sgeoffrey.blake@arm.com# 138733Sgeoffrey.blake@arm.com# Copyright (c) 2005 The Regents of The University of Michigan 148733Sgeoffrey.blake@arm.com# All rights reserved. 152330SN/A# 162330SN/A# Redistribution and use in source and binary forms, with or without 172330SN/A# modification, are permitted provided that the following conditions are 182330SN/A# met: redistributions of source code must retain the above copyright 192330SN/A# notice, this list of conditions and the following disclaimer; 202330SN/A# redistributions in binary form must reproduce the above copyright 212330SN/A# notice, this list of conditions and the following disclaimer in the 222330SN/A# documentation and/or other materials provided with the distribution; 232330SN/A# neither the name of the copyright holders nor the names of its 242330SN/A# contributors may be used to endorse or promote products derived from 252330SN/A# this software without specific prior written permission. 262330SN/A# 272330SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 282330SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 292330SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 302330SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 312330SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 322330SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 332330SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 342330SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 352330SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 362330SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 372330SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 382330SN/A# 392330SN/A# Authors: Ron Dreslinski 402689Sktlim@umich.edu# Mitch Hayenga 412689Sktlim@umich.edu 422330SN/Afrom m5.SimObject import * 432330SN/Afrom m5.params import * 442683Sktlim@umich.edufrom m5.proxy import * 452683Sktlim@umich.edu 462315SN/Afrom m5.objects.ClockedObject import ClockedObject 472972Sgblack@eecs.umich.edufrom m5.objects.IndexingPolicies import * 486658Snate@binkert.orgfrom m5.objects.ReplacementPolicies import * 492315SN/A 502683Sktlim@umich.educlass HWPProbeEvent(object): 512680SN/A def __init__(self, prefetcher, obj, *listOfNames): 528733Sgeoffrey.blake@arm.com self.obj = obj 532315SN/A self.prefetcher = prefetcher 542315SN/A self.names = listOfNames 553548Sgblack@eecs.umich.edu 563548Sgblack@eecs.umich.edu def register(self): 573548Sgblack@eecs.umich.edu if self.obj: 583548Sgblack@eecs.umich.edu for name in self.names: 599020Sgblack@eecs.umich.edu self.prefetcher.getCCObject().addEventProbe( 602330SN/A self.obj.getCCObject(), name) 612315SN/A 622350SN/Aclass BasePrefetcher(ClockedObject): 632680SN/A type = 'BasePrefetcher' 642680SN/A abstract = True 652683Sktlim@umich.edu cxx_header = "mem/cache/prefetch/base.hh" 662683Sktlim@umich.edu cxx_exports = [ 672683Sktlim@umich.edu PyBindMethod("addEventProbe"), 682683Sktlim@umich.edu ] 692350SN/A sys = Param.System(Parent.any, "System this prefetcher belongs to") 702680SN/A 712680SN/A # Get the block size from the parent (system) 722315SN/A block_size = Param.Int(Parent.cache_line_size, "Block size in bytes") 732315SN/A 742680SN/A on_miss = Param.Bool(False, "Only notify prefetcher on misses") 752683Sktlim@umich.edu on_read = Param.Bool(True, "Notify prefetcher on reads") 762683Sktlim@umich.edu on_write = Param.Bool(True, "Notify prefetcher on writes") 772330SN/A on_data = Param.Bool(True, "Notify prefetcher on data accesses") 782315SN/A on_inst = Param.Bool(True, "Notify prefetcher on instruction accesses") 792315SN/A prefetch_on_access = Param.Bool(Parent.prefetch_on_access, 802315SN/A "Notify the hardware prefetcher on every access (not just misses)") 812683Sktlim@umich.edu use_virtual_addresses = Param.Bool(False, 822683Sktlim@umich.edu "Use virtual addresses for prefetching") 832680SN/A 842683Sktlim@umich.edu _events = [] 852683Sktlim@umich.edu def addEvent(self, newObject): 862683Sktlim@umich.edu self._events.append(newObject) 872683Sktlim@umich.edu 882683Sktlim@umich.edu # Override the normal SimObject::regProbeListeners method and 892315SN/A # register deferred event handlers. 902315SN/A def regProbeListeners(self): 912315SN/A for event in self._events: 922315SN/A event.register() 932680SN/A self.getCCObject().regProbeListeners() 942315SN/A 9510190Sakash.bagdia@arm.com def listenFromProbe(self, simObj, *probeNames): 9610190Sakash.bagdia@arm.com if not isinstance(simObj, SimObject): 9710110Sandreas.hansson@arm.com raise TypeError("argument must be of SimObject type") 988733Sgeoffrey.blake@arm.com if len(probeNames) <= 0: 9911005Sandreas.sandberg@arm.com raise TypeError("probeNames must have at least one element") 1008733Sgeoffrey.blake@arm.com self.addEvent(HWPProbeEvent(self, simObj, *probeNames)) 10111005Sandreas.sandberg@arm.com 1022315SN/Aclass QueuedPrefetcher(BasePrefetcher): 1038733Sgeoffrey.blake@arm.com type = "QueuedPrefetcher" 1048733Sgeoffrey.blake@arm.com abstract = True 1052315SN/A cxx_class = "QueuedPrefetcher" 1062315SN/A cxx_header = "mem/cache/prefetch/queued.hh" 1078733Sgeoffrey.blake@arm.com latency = Param.Int(1, "Latency for generated prefetches") 10810110Sandreas.hansson@arm.com queue_size = Param.Int(32, "Maximum number of queued prefetches") 1098733Sgeoffrey.blake@arm.com queue_squash = Param.Bool(True, "Squash queued prefetch on demand access") 1108733Sgeoffrey.blake@arm.com queue_filter = Param.Bool(True, "Don't queue redundant prefetches") 1118733Sgeoffrey.blake@arm.com cache_snoop = Param.Bool(False, "Snoop cache to eliminate redundant request") 1128733Sgeoffrey.blake@arm.com 1138733Sgeoffrey.blake@arm.com tag_prefetch = Param.Bool(True, "Tag prefetch with PC of generating access") 1142315SN/A 1156022Sgblack@eecs.umich.educlass StridePrefetcher(QueuedPrefetcher): 1164997Sgblack@eecs.umich.edu type = 'StridePrefetcher' 1176022Sgblack@eecs.umich.edu cxx_class = 'StridePrefetcher' 1184997Sgblack@eecs.umich.edu cxx_header = "mem/cache/prefetch/stride.hh" 1198887Sgeoffrey.blake@arm.com 1208887Sgeoffrey.blake@arm.com # Do not consult stride prefetcher on instruction accesses 1218887Sgeoffrey.blake@arm.com on_inst = False 1228887Sgeoffrey.blake@arm.com 1238733Sgeoffrey.blake@arm.com max_conf = Param.Int(7, "Maximum confidence level") 1249020Sgblack@eecs.umich.edu thresh_conf = Param.Int(4, "Threshold confidence level") 1258733Sgeoffrey.blake@arm.com min_conf = Param.Int(0, "Minimum confidence level") 1262680SN/A start_conf = Param.Int(4, "Starting confidence for new entries") 1272315SN/A 1283548Sgblack@eecs.umich.edu table_sets = Param.Int(16, "Number of sets in PC lookup table") 1293548Sgblack@eecs.umich.edu table_assoc = Param.Int(4, "Associativity of PC lookup table") 1302690Sktlim@umich.edu use_master_id = Param.Bool(True, "Use master id based history") 1317679Sgblack@eecs.umich.edu 1327679Sgblack@eecs.umich.edu degree = Param.Int(4, "Number of prefetches to generate") 13311886Sbrandon.potter@amd.com 13411886Sbrandon.potter@amd.com # Get replacement policy 1358852Sandreas.hansson@arm.com replacement_policy = Param.BaseReplacementPolicy(RandomRP(), 1362690Sktlim@umich.edu "Replacement policy") 1378852Sandreas.hansson@arm.com 1388706Sandreas.hansson@arm.comclass TaggedPrefetcher(QueuedPrefetcher): 1398733Sgeoffrey.blake@arm.com type = 'TaggedPrefetcher' 1408733Sgeoffrey.blake@arm.com cxx_class = 'TaggedPrefetcher' 1418733Sgeoffrey.blake@arm.com cxx_header = "mem/cache/prefetch/tagged.hh" 1428733Sgeoffrey.blake@arm.com 1438733Sgeoffrey.blake@arm.com degree = Param.Int(2, "Number of prefetches to generate") 1448733Sgeoffrey.blake@arm.com 1458733Sgeoffrey.blake@arm.comclass SignaturePathPrefetcher(QueuedPrefetcher): 1468733Sgeoffrey.blake@arm.com type = 'SignaturePathPrefetcher' 1478809Sgblack@eecs.umich.edu cxx_class = 'SignaturePathPrefetcher' 1488852Sandreas.hansson@arm.com cxx_header = "mem/cache/prefetch/signature_path.hh" 1492690Sktlim@umich.edu 1508733Sgeoffrey.blake@arm.com signature_shift = Param.UInt8(3, 15111877Sbrandon.potter@amd.com "Number of bits to shift when calculating a new signature"); 15211877Sbrandon.potter@amd.com signature_bits = Param.UInt16(12, 1532315SN/A "Size of the signature, in bits"); 1542680SN/A signature_table_entries = Param.MemorySize("1024", 1552315SN/A "Number of entries of the signature table") 1562315SN/A signature_table_assoc = Param.Unsigned(2, 1572330SN/A "Associativity of the signature table") 1582680SN/A signature_table_indexing_policy = Param.BaseIndexingPolicy( 1592680SN/A SetAssociative(entry_size = 1, assoc = Parent.signature_table_assoc, 1602330SN/A size = Parent.signature_table_entries), 1612315SN/A "Indexing policy of the signature table") 16210407Smitch.hayenga@arm.com signature_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 16310407Smitch.hayenga@arm.com "Replacement policy of the signature table") 1642315SN/A 1652315SN/A max_counter_value = Param.UInt8(7, "Maximum pattern counter value") 16610407Smitch.hayenga@arm.com pattern_table_entries = Param.MemorySize("4096", 1672315SN/A "Number of entries of the pattern table") 1682315SN/A pattern_table_assoc = Param.Unsigned(1, 16910407Smitch.hayenga@arm.com "Associativity of the pattern table") 1702315SN/A strides_per_pattern_entry = Param.Unsigned(4, 1712680SN/A "Number of strides stored in each pattern entry") 1722315SN/A pattern_table_indexing_policy = Param.BaseIndexingPolicy( 1732680SN/A SetAssociative(entry_size = 1, assoc = Parent.pattern_table_assoc, 1742315SN/A size = Parent.pattern_table_entries), 1752680SN/A "Indexing policy of the pattern table") 1763225Sktlim@umich.edu pattern_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 1772315SN/A "Replacement policy of the pattern table") 1782315SN/A 1798733Sgeoffrey.blake@arm.com prefetch_confidence_threshold = Param.Float(0.5, 1808733Sgeoffrey.blake@arm.com "Minimum confidence to issue prefetches") 1818733Sgeoffrey.blake@arm.com lookahead_confidence_threshold = Param.Float(0.75, 1828733Sgeoffrey.blake@arm.com "Minimum confidence to continue exploring lookahead entries") 1838733Sgeoffrey.blake@arm.com 1842315SN/Aclass SignaturePathPrefetcherV2(SignaturePathPrefetcher): 1852680SN/A type = 'SignaturePathPrefetcherV2' 1862315SN/A cxx_class = 'SignaturePathPrefetcherV2' 1872680SN/A cxx_header = "mem/cache/prefetch/signature_path_v2.hh" 1882680SN/A 1892315SN/A signature_table_entries = "256" 1902680SN/A signature_table_assoc = 1 1912680SN/A pattern_table_entries = "512" 1922315SN/A pattern_table_assoc = 1 1932315SN/A max_counter_value = 15 1942680SN/A prefetch_confidence_threshold = 0.25 1952315SN/A lookahead_confidence_threshold = 0.25 1962680SN/A 1972680SN/A global_history_register_entries = Param.MemorySize("8", 1982315SN/A "Number of entries of global history register") 1992315SN/A global_history_register_indexing_policy = Param.BaseIndexingPolicy( 2002315SN/A SetAssociative(entry_size = 1, 2012315SN/A assoc = Parent.global_history_register_entries, 2022680SN/A size = Parent.global_history_register_entries), 2032680SN/A "Indexing policy of the global history register") 2042315SN/A global_history_register_replacement_policy = Param.BaseReplacementPolicy( 2052315SN/A LRURP(), "Replacement policy of the global history register") 2062315SN/A 2072315SN/Aclass AccessMapPatternMatching(ClockedObject): 2082315SN/A type = 'AccessMapPatternMatching' 2092315SN/A cxx_class = 'AccessMapPatternMatching' 2102680SN/A cxx_header = "mem/cache/prefetch/access_map_pattern_matching.hh" 2112315SN/A 2122669SN/A block_size = Param.Unsigned(Parent.block_size, 2132680SN/A "Cacheline size used by the prefetcher using this object") 2142315SN/A 2152669SN/A limit_stride = Param.Unsigned(0, 2162680SN/A "Limit the strides checked up to -X/X, if 0, disable the limit") 2172315SN/A start_degree = Param.Unsigned(4, 2189920Syasuko.eckert@amd.com "Initial degree (Maximum number of prefetches generated") 2199920Syasuko.eckert@amd.com hot_zone_size = Param.MemorySize("2kB", "Memory covered by a hot zone") 2209920Syasuko.eckert@amd.com access_map_table_entries = Param.MemorySize("256", 2212315SN/A "Number of entries in the access map table") 2222315SN/A access_map_table_assoc = Param.Unsigned(8, 2232680SN/A "Associativity of the access map table") 2242680SN/A access_map_table_indexing_policy = Param.BaseIndexingPolicy( 2252315SN/A SetAssociative(entry_size = 1, assoc = Parent.access_map_table_assoc, 2262315SN/A size = Parent.access_map_table_entries), 2272669SN/A "Indexing policy of the access map table") 2282315SN/A access_map_table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 2292680SN/A "Replacement policy of the access map table") 2302680SN/A high_coverage_threshold = Param.Float(0.25, 2312315SN/A "A prefetch coverage factor bigger than this is considered high") 2322315SN/A low_coverage_threshold = Param.Float(0.125, 2332669SN/A "A prefetch coverage factor smaller than this is considered low") 2342669SN/A high_accuracy_threshold = Param.Float(0.5, 2352680SN/A "A prefetch accuracy factor bigger than this is considered high") 2362680SN/A low_accuracy_threshold = Param.Float(0.25, 2372315SN/A "A prefetch accuracy factor smaller than this is considered low") 2382315SN/A high_cache_hit_threshold = Param.Float(0.875, 2399920Syasuko.eckert@amd.com "A cache hit ratio bigger than this is considered high") 2409920Syasuko.eckert@amd.com low_cache_hit_threshold = Param.Float(0.75, 2419920Syasuko.eckert@amd.com "A cache hit ratio smaller than this is considered low") 2429920Syasuko.eckert@amd.com epoch_cycles = Param.Cycles(256000, "Cycles in an epoch period") 2439920Syasuko.eckert@amd.com offchip_memory_latency = Param.Latency("30ns", 2449920Syasuko.eckert@amd.com "Memory latency used to compute the required memory bandwidth") 2458733Sgeoffrey.blake@arm.com 2468733Sgeoffrey.blake@arm.comclass AMPMPrefetcher(QueuedPrefetcher): 2478733Sgeoffrey.blake@arm.com type = 'AMPMPrefetcher' 2482315SN/A cxx_class = 'AMPMPrefetcher' 2498733Sgeoffrey.blake@arm.com cxx_header = "mem/cache/prefetch/access_map_pattern_matching.hh" 2508733Sgeoffrey.blake@arm.com ampm = Param.AccessMapPatternMatching( AccessMapPatternMatching(), 2512315SN/A "Access Map Pattern Matching object") 2528733Sgeoffrey.blake@arm.com 2538733Sgeoffrey.blake@arm.comclass DeltaCorrelatingPredictionTables(SimObject): 2548733Sgeoffrey.blake@arm.com type = 'DeltaCorrelatingPredictionTables' 2552315SN/A cxx_class = 'DeltaCorrelatingPredictionTables' 2568733Sgeoffrey.blake@arm.com cxx_header = "mem/cache/prefetch/delta_correlating_prediction_tables.hh" 2572315SN/A deltas_per_entry = Param.Unsigned(20, 2582315SN/A "Number of deltas stored in each table entry") 25911886Sbrandon.potter@amd.com delta_bits = Param.Unsigned(12, "Bits per delta") 26011886Sbrandon.potter@amd.com delta_mask_bits = Param.Unsigned(8, 26111886Sbrandon.potter@amd.com "Lower bits to mask when comparing deltas") 26211886Sbrandon.potter@amd.com table_entries = Param.MemorySize("128", 26311886Sbrandon.potter@amd.com "Number of entries in the table") 26411886Sbrandon.potter@amd.com table_assoc = Param.Unsigned(128, 2658733Sgeoffrey.blake@arm.com "Associativity of the table") 2662315SN/A table_indexing_policy = Param.BaseIndexingPolicy( 2678733Sgeoffrey.blake@arm.com SetAssociative(entry_size = 1, assoc = Parent.table_assoc, 2682315SN/A size = Parent.table_entries), 2692315SN/A "Indexing policy of the table") 2708733Sgeoffrey.blake@arm.com table_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 2718733Sgeoffrey.blake@arm.com "Replacement policy of the table") 2728733Sgeoffrey.blake@arm.com 2732669SN/Aclass DCPTPrefetcher(QueuedPrefetcher): 2748733Sgeoffrey.blake@arm.com type = 'DCPTPrefetcher' 2758733Sgeoffrey.blake@arm.com cxx_class = 'DCPTPrefetcher' 2768733Sgeoffrey.blake@arm.com cxx_header = "mem/cache/prefetch/delta_correlating_prediction_tables.hh" 2778733Sgeoffrey.blake@arm.com dcpt = Param.DeltaCorrelatingPredictionTables( 2788733Sgeoffrey.blake@arm.com DeltaCorrelatingPredictionTables(), 2798733Sgeoffrey.blake@arm.com "Delta Correlating Prediction Tables object") 2808733Sgeoffrey.blake@arm.com 2812669SN/Aclass IrregularStreamBufferPrefetcher(QueuedPrefetcher): 28210698Sandreas.hansson@arm.com type = "IrregularStreamBufferPrefetcher" 2834172Ssaidi@eecs.umich.edu cxx_class = "IrregularStreamBufferPrefetcher" 2844172Ssaidi@eecs.umich.edu cxx_header = "mem/cache/prefetch/irregular_stream_buffer.hh" 2852315SN/A 2862680SN/A max_counter_value = Param.Unsigned(3, 2872315SN/A "Maximum value of the confidence counter") 2884172Ssaidi@eecs.umich.edu chunk_size = Param.Unsigned(256, 2894172Ssaidi@eecs.umich.edu "Maximum number of addresses in a temporal stream") 2908733Sgeoffrey.blake@arm.com degree = Param.Unsigned(4, "Number of prefetches to generate") 2918733Sgeoffrey.blake@arm.com training_unit_assoc = Param.Unsigned(128, 2924172Ssaidi@eecs.umich.edu "Associativity of the training unit") 2934172Ssaidi@eecs.umich.edu training_unit_entries = Param.MemorySize("128", 2944172Ssaidi@eecs.umich.edu "Number of entries of the training unit") 2952315SN/A training_unit_indexing_policy = Param.BaseIndexingPolicy( 2963468Sgblack@eecs.umich.edu SetAssociative(entry_size = 1, assoc = Parent.training_unit_assoc, 2972315SN/A size = Parent.training_unit_entries), 2988733Sgeoffrey.blake@arm.com "Indexing policy of the training unit") 2998733Sgeoffrey.blake@arm.com training_unit_replacement_policy = Param.BaseReplacementPolicy(LRURP(), 3002680SN/A "Replacement policy of the training unit") 3013468Sgblack@eecs.umich.edu 3022315SN/A prefetch_candidates_per_entry = Param.Unsigned(16, 3032315SN/A "Number of prefetch candidates stored in a SP-AMC entry") 3048733Sgeoffrey.blake@arm.com address_map_cache_assoc = Param.Unsigned(128, 3058733Sgeoffrey.blake@arm.com "Associativity of the PS/SP AMCs") 3069920Syasuko.eckert@amd.com address_map_cache_entries = Param.MemorySize("128", 30710033SAli.Saidi@ARM.com "Number of entries of the PS/SP AMCs") 3088733Sgeoffrey.blake@arm.com ps_address_map_cache_indexing_policy = Param.BaseIndexingPolicy( 3092315SN/A SetAssociative(entry_size = 1, 3102680SN/A assoc = Parent.address_map_cache_assoc, 3112315SN/A size = Parent.address_map_cache_entries), 3122315SN/A "Indexing policy of the Physical-to-Structural Address Map Cache") 3132315SN/A ps_address_map_cache_replacement_policy = Param.BaseReplacementPolicy( 3142680SN/A LRURP(), 3152315SN/A "Replacement policy of the Physical-to-Structural Address Map Cache") 3162315SN/A sp_address_map_cache_indexing_policy = Param.BaseIndexingPolicy( 3172680SN/A SetAssociative(entry_size = 1, 3189426SAndreas.Sandberg@ARM.com assoc = Parent.address_map_cache_assoc, 3199426SAndreas.Sandberg@ARM.com size = Parent.address_map_cache_entries), 3209426SAndreas.Sandberg@ARM.com "Indexing policy of the Structural-to-Physical Address Mao Cache") 3219426SAndreas.Sandberg@ARM.com sp_address_map_cache_replacement_policy = Param.BaseReplacementPolicy( 3229426SAndreas.Sandberg@ARM.com LRURP(), 3239426SAndreas.Sandberg@ARM.com "Replacement policy of the Structural-to-Physical Address Map Cache") 3249426SAndreas.Sandberg@ARM.com 3259426SAndreas.Sandberg@ARM.comclass SlimAccessMapPatternMatching(AccessMapPatternMatching): 3269426SAndreas.Sandberg@ARM.com start_degree = 2 3279426SAndreas.Sandberg@ARM.com limit_stride = 4 3289426SAndreas.Sandberg@ARM.com 3299426SAndreas.Sandberg@ARM.comclass SlimDeltaCorrelatingPredictionTables(DeltaCorrelatingPredictionTables): 3309426SAndreas.Sandberg@ARM.com table_entries = "256" 3319426SAndreas.Sandberg@ARM.com table_assoc = 256 3329426SAndreas.Sandberg@ARM.com deltas_per_entry = 9 3339426SAndreas.Sandberg@ARM.com 3349426SAndreas.Sandberg@ARM.comclass SlimAMPMPrefetcher(QueuedPrefetcher): 3359426SAndreas.Sandberg@ARM.com type = 'SlimAMPMPrefetcher' 3369920Syasuko.eckert@amd.com cxx_class = 'SlimAMPMPrefetcher' 3379920Syasuko.eckert@amd.com cxx_header = "mem/cache/prefetch/slim_ampm.hh" 3389920Syasuko.eckert@amd.com 3399920Syasuko.eckert@amd.com ampm = Param.AccessMapPatternMatching(SlimAccessMapPatternMatching(), 3409920Syasuko.eckert@amd.com "Access Map Pattern Matching object") 3419920Syasuko.eckert@amd.com dcpt = Param.DeltaCorrelatingPredictionTables( 3422315SN/A SlimDeltaCorrelatingPredictionTables(), 3432315SN/A "Delta Correlating Prediction Tables object") 3442315SN/A 345class BOPPrefetcher(QueuedPrefetcher): 346 type = "BOPPrefetcher" 347 cxx_class = "BOPPrefetcher" 348 cxx_header = "mem/cache/prefetch/bop.hh" 349 score_max = Param.Unsigned(31, "Max. score to update the best offset") 350 round_max = Param.Unsigned(100, "Max. round to update the best offset") 351 bad_score = Param.Unsigned(10, "Score at which the HWP is disabled") 352 rr_size = Param.Unsigned(64, "Number of entries of each RR bank") 353 tag_bits = Param.Unsigned(12, "Bits used to store the tag") 354 offset_list_size = Param.Unsigned(46, 355 "Number of entries in the offsets list") 356 negative_offsets_enable = Param.Bool(True, 357 "Initialize the offsets list also with negative values \ 358 (i.e. the table will have half of the entries with positive \ 359 offsets and the other half with negative ones)") 360 delay_queue_enable = Param.Bool(True, "Enable the delay queue") 361 delay_queue_size = Param.Unsigned(15, 362 "Number of entries in the delay queue") 363 delay_queue_cycles = Param.Cycles(60, 364 "Cycles to delay a write in the left RR table from the delay \ 365 queue") 366 367class SBOOEPrefetcher(QueuedPrefetcher): 368 type = 'SBOOEPrefetcher' 369 cxx_class = 'SBOOEPrefetcher' 370 cxx_header = "mem/cache/prefetch/sbooe.hh" 371 latency_buffer_size = Param.Int(32, "Entries in the latency buffer") 372 sequential_prefetchers = Param.Int(9, "Number of sequential prefetchers") 373 sandbox_entries = Param.Int(1024, "Size of the address buffer") 374 score_threshold_pct = Param.Percent(25, "Min. threshold to issue a \ 375 prefetch. The value is the percentage of sandbox entries to use") 376