19363Snilay@cs.wisc.edu# Copyright (c) 2012 Mark D. Hill and David A. Wood
29363Snilay@cs.wisc.edu# All rights reserved.
39363Snilay@cs.wisc.edu#
49363Snilay@cs.wisc.edu# Redistribution and use in source and binary forms, with or without
59363Snilay@cs.wisc.edu# modification, are permitted provided that the following conditions are
69363Snilay@cs.wisc.edu# met: redistributions of source code must retain the above copyright
79363Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer;
89363Snilay@cs.wisc.edu# redistributions in binary form must reproduce the above copyright
99363Snilay@cs.wisc.edu# notice, this list of conditions and the following disclaimer in the
109363Snilay@cs.wisc.edu# documentation and/or other materials provided with the distribution;
119363Snilay@cs.wisc.edu# neither the name of the copyright holders nor the names of its
129363Snilay@cs.wisc.edu# contributors may be used to endorse or promote products derived from
139363Snilay@cs.wisc.edu# this software without specific prior written permission.
149363Snilay@cs.wisc.edu#
159363Snilay@cs.wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
169363Snilay@cs.wisc.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
179363Snilay@cs.wisc.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
189363Snilay@cs.wisc.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
199363Snilay@cs.wisc.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
209363Snilay@cs.wisc.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
219363Snilay@cs.wisc.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
229363Snilay@cs.wisc.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
239363Snilay@cs.wisc.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
249363Snilay@cs.wisc.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
259363Snilay@cs.wisc.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
269363Snilay@cs.wisc.edu#
279363Snilay@cs.wisc.edu# Authors: Nilay Vaish
289363Snilay@cs.wisc.edu
299363Snilay@cs.wisc.edufrom m5.SimObject import SimObject
309363Snilay@cs.wisc.edufrom m5.params import *
3110466Sandreas.hansson@arm.comfrom m5.proxy import *
329363Snilay@cs.wisc.edu
3313665Sandreas.sandberg@arm.comfrom m5.objects.System import System
3413665Sandreas.sandberg@arm.com
359363Snilay@cs.wisc.educlass Prefetcher(SimObject):
369363Snilay@cs.wisc.edu    type = 'Prefetcher'
379363Snilay@cs.wisc.edu    cxx_class = 'Prefetcher'
389363Snilay@cs.wisc.edu    cxx_header = "mem/ruby/structures/Prefetcher.hh"
399363Snilay@cs.wisc.edu
409363Snilay@cs.wisc.edu    num_streams = Param.UInt32(4,
419363Snilay@cs.wisc.edu        "Number of prefetch streams to be allocated")
429363Snilay@cs.wisc.edu    pf_per_stream = Param.UInt32(1, "Number of prefetches per stream")
439363Snilay@cs.wisc.edu    unit_filter  = Param.UInt32(8,
449363Snilay@cs.wisc.edu        "Number of entries in the unit filter array")
459363Snilay@cs.wisc.edu    nonunit_filter = Param.UInt32(8,
469363Snilay@cs.wisc.edu        "Number of entries in the non-unit filter array")
479363Snilay@cs.wisc.edu    train_misses = Param.UInt32(4, "")
489363Snilay@cs.wisc.edu    num_startup_pfs = Param.UInt32(1, "")
499363Snilay@cs.wisc.edu    cross_page = Param.Bool(False, """True if prefetched address can be on a
509363Snilay@cs.wisc.edu            page different from the observed address""")
5110466Sandreas.hansson@arm.com    sys = Param.System(Parent.any, "System this prefetcher belongs to")
52