+
+class SlimAccessMapPatternMatching(AccessMapPatternMatching):
+ start_degree = 2
+ limit_stride = 4
+
+class SlimDeltaCorrelatingPredictionTables(DeltaCorrelatingPredictionTables):
+ table_entries = "256"
+ table_assoc = 256
+ deltas_per_entry = 9
+
+class SlimAMPMPrefetcher(QueuedPrefetcher):
+ type = 'SlimAMPMPrefetcher'
+ cxx_class = 'SlimAMPMPrefetcher'
+ cxx_header = "mem/cache/prefetch/slim_ampm.hh"
+
+ ampm = Param.AccessMapPatternMatching(SlimAccessMapPatternMatching(),
+ "Access Map Pattern Matching object")
+ dcpt = Param.DeltaCorrelatingPredictionTables(
+ SlimDeltaCorrelatingPredictionTables(),
+ "Delta Correlating Prediction Tables object")
+
+class BOPPrefetcher(QueuedPrefetcher):
+ type = "BOPPrefetcher"
+ cxx_class = "BOPPrefetcher"
+ cxx_header = "mem/cache/prefetch/bop.hh"
+ score_max = Param.Unsigned(31, "Max. score to update the best offset")
+ round_max = Param.Unsigned(100, "Max. round to update the best offset")
+ bad_score = Param.Unsigned(10, "Score at which the HWP is disabled")
+ rr_size = Param.Unsigned(64, "Number of entries of each RR bank")
+ tag_bits = Param.Unsigned(12, "Bits used to store the tag")
+ offset_list_size = Param.Unsigned(46,
+ "Number of entries in the offsets list")
+ negative_offsets_enable = Param.Bool(True,
+ "Initialize the offsets list also with negative values \
+ (i.e. the table will have half of the entries with positive \
+ offsets and the other half with negative ones)")
+ delay_queue_enable = Param.Bool(True, "Enable the delay queue")
+ delay_queue_size = Param.Unsigned(15,
+ "Number of entries in the delay queue")
+ delay_queue_cycles = Param.Cycles(60,
+ "Cycles to delay a write in the left RR table from the delay \
+ queue")
+
+class SBOOEPrefetcher(QueuedPrefetcher):
+ type = 'SBOOEPrefetcher'
+ cxx_class = 'SBOOEPrefetcher'
+ cxx_header = "mem/cache/prefetch/sbooe.hh"
+ latency_buffer_size = Param.Int(32, "Entries in the latency buffer")
+ sequential_prefetchers = Param.Int(9, "Number of sequential prefetchers")
+ sandbox_entries = Param.Int(1024, "Size of the address buffer")
+ score_threshold_pct = Param.Percent(25, "Min. threshold to issue a \
+ prefetch. The value is the percentage of sandbox entries to use")
+
+class STeMSPrefetcher(QueuedPrefetcher):
+ type = "STeMSPrefetcher"
+ cxx_class = "STeMSPrefetcher"
+ cxx_header = "mem/cache/prefetch/spatio_temporal_memory_streaming.hh"
+
+ spatial_region_size = Param.MemorySize("2kB",
+ "Memory covered by a hot zone")
+ active_generation_table_entries = Param.MemorySize("64",
+ "Number of entries in the active generation table")
+ active_generation_table_assoc = Param.Unsigned(64,
+ "Associativity of the active generation table")
+ active_generation_table_indexing_policy = Param.BaseIndexingPolicy(
+ SetAssociative(entry_size = 1,
+ assoc = Parent.active_generation_table_assoc,
+ size = Parent.active_generation_table_entries),
+ "Indexing policy of the active generation table")
+ active_generation_table_replacement_policy = Param.BaseReplacementPolicy(
+ LRURP(), "Replacement policy of the active generation table")
+
+ pattern_sequence_table_entries = Param.MemorySize("16384",
+ "Number of entries in the pattern sequence table")
+ pattern_sequence_table_assoc = Param.Unsigned(16384,
+ "Associativity of the pattern sequence table")
+ pattern_sequence_table_indexing_policy = Param.BaseIndexingPolicy(
+ SetAssociative(entry_size = 1,
+ assoc = Parent.pattern_sequence_table_assoc,
+ size = Parent.pattern_sequence_table_entries),
+ "Indexing policy of the pattern sequence table")
+ pattern_sequence_table_replacement_policy = Param.BaseReplacementPolicy(
+ LRURP(), "Replacement policy of the pattern sequence table")
+
+ region_miss_order_buffer_entries = Param.Unsigned(131072,
+ "Number of entries of the Region Miss Order Buffer")
+ reconstruction_entries = Param.Unsigned(256,
+ "Number of reconstruction entries")
+
+class HWPProbeEventRetiredInsts(HWPProbeEvent):
+ def register(self):
+ if self.obj:
+ for name in self.names:
+ self.prefetcher.getCCObject().addEventProbeRetiredInsts(
+ self.obj.getCCObject(), name)
+
+class PIFPrefetcher(QueuedPrefetcher):
+ type = 'PIFPrefetcher'
+ cxx_class = 'PIFPrefetcher'
+ cxx_header = "mem/cache/prefetch/pif.hh"
+ cxx_exports = [
+ PyBindMethod("addEventProbeRetiredInsts"),
+ ]
+
+ prec_spatial_region_bits = Param.Unsigned(2,
+ "Number of preceding addresses in the spatial region")
+ succ_spatial_region_bits = Param.Unsigned(8,
+ "Number of subsequent addresses in the spatial region")
+ compactor_entries = Param.Unsigned(2, "Entries in the temp. compactor")
+ stream_address_buffer_entries = Param.Unsigned(7, "Entries in the SAB")
+ history_buffer_size = Param.Unsigned(16, "Entries in the history buffer")
+
+ index_entries = Param.MemorySize("64",
+ "Number of entries in the index")
+ index_assoc = Param.Unsigned(64,
+ "Associativity of the index")
+ index_indexing_policy = Param.BaseIndexingPolicy(
+ SetAssociative(entry_size = 1, assoc = Parent.index_assoc,
+ size = Parent.index_entries),
+ "Indexing policy of the index")
+ index_replacement_policy = Param.BaseReplacementPolicy(LRURP(),
+ "Replacement policy of the index")
+
+ def listenFromProbeRetiredInstructions(self, simObj):
+ if not isinstance(simObj, SimObject):
+ raise TypeError("argument must be of SimObject type")
+ self.addEvent(HWPProbeEventRetiredInsts(self, simObj,"RetiredInstsPC"))