RubyPrefetcher.py revision 10466
12023SN/A# Copyright (c) 2012 Mark D. Hill and David A. Wood 22023SN/A# All rights reserved. 32023SN/A# 42023SN/A# Redistribution and use in source and binary forms, with or without 52023SN/A# modification, are permitted provided that the following conditions are 62023SN/A# met: redistributions of source code must retain the above copyright 72023SN/A# notice, this list of conditions and the following disclaimer; 82023SN/A# redistributions in binary form must reproduce the above copyright 92023SN/A# notice, this list of conditions and the following disclaimer in the 102023SN/A# documentation and/or other materials provided with the distribution; 112023SN/A# neither the name of the copyright holders nor the names of its 122023SN/A# contributors may be used to endorse or promote products derived from 132023SN/A# this software without specific prior written permission. 142023SN/A# 152023SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 162023SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 172023SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 182023SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 192023SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 202023SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 212023SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 222023SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 232023SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 242023SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 252023SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 262023SN/A# 272023SN/A# Authors: Nilay Vaish 282023SN/A 292023SN/Afrom m5.SimObject import SimObject 302023SN/Afrom System import System 312023SN/Afrom m5.params import * 322225SN/Afrom m5.proxy import * 332225SN/A 342225SN/Aclass Prefetcher(SimObject): 352225SN/A type = 'Prefetcher' 362225SN/A cxx_class = 'Prefetcher' 372023SN/A cxx_header = "mem/ruby/structures/Prefetcher.hh" 382023SN/A 392225SN/A num_streams = Param.UInt32(4, 402023SN/A "Number of prefetch streams to be allocated") 412225SN/A pf_per_stream = Param.UInt32(1, "Number of prefetches per stream") 422225SN/A unit_filter = Param.UInt32(8, 432023SN/A "Number of entries in the unit filter array") 442458SN/A nonunit_filter = Param.UInt32(8, 452023SN/A "Number of entries in the non-unit filter array") 462225SN/A train_misses = Param.UInt32(4, "") 472225SN/A num_startup_pfs = Param.UInt32(1, "") 482225SN/A cross_page = Param.Bool(False, """True if prefetched address can be on a 492225SN/A page different from the observed address""") 502225SN/A sys = Param.System(Parent.any, "System this prefetcher belongs to") 512225SN/A