Caches.py revision 11763
19288Sandreas.hansson@arm.com# Copyright (c) 2012 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#
134444Ssaidi@eecs.umich.edu# Copyright (c) 2006-2007 The Regents of The University of Michigan
143395Shsul@eecs.umich.edu# All rights reserved.
153395Shsul@eecs.umich.edu#
163395Shsul@eecs.umich.edu# Redistribution and use in source and binary forms, with or without
173395Shsul@eecs.umich.edu# modification, are permitted provided that the following conditions are
183395Shsul@eecs.umich.edu# met: redistributions of source code must retain the above copyright
193395Shsul@eecs.umich.edu# notice, this list of conditions and the following disclaimer;
203395Shsul@eecs.umich.edu# redistributions in binary form must reproduce the above copyright
213395Shsul@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the
223395Shsul@eecs.umich.edu# documentation and/or other materials provided with the distribution;
233395Shsul@eecs.umich.edu# neither the name of the copyright holders nor the names of its
243395Shsul@eecs.umich.edu# contributors may be used to endorse or promote products derived from
253395Shsul@eecs.umich.edu# this software without specific prior written permission.
263395Shsul@eecs.umich.edu#
273395Shsul@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
283395Shsul@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
293395Shsul@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
303395Shsul@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
313395Shsul@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
323395Shsul@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
333395Shsul@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
343395Shsul@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
353395Shsul@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
363395Shsul@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
373395Shsul@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
383395Shsul@eecs.umich.edu#
393395Shsul@eecs.umich.edu# Authors: Lisa Hsu
403395Shsul@eecs.umich.edu
4111763Sandreas.sandberg@arm.comfrom m5.defines import buildEnv
423395Shsul@eecs.umich.edufrom m5.objects import *
433395Shsul@eecs.umich.edu
449310Sandreas.hansson@arm.com# Base implementations of L1, L2, IO and TLB-walker caches. There are
459310Sandreas.hansson@arm.com# used in the regressions and also as base components in the
469310Sandreas.hansson@arm.com# system-configuration scripts. The values are meant to serve as a
479310Sandreas.hansson@arm.com# starting point, and specific parameters can be overridden in the
489310Sandreas.hansson@arm.com# specific instantiations.
499310Sandreas.hansson@arm.com
5011053Sandreas.hansson@arm.comclass L1Cache(Cache):
513395Shsul@eecs.umich.edu    assoc = 2
5211722Ssophiane.senni@gmail.com    tag_latency = 2
5311722Ssophiane.senni@gmail.com    data_latency = 2
549288Sandreas.hansson@arm.com    response_latency = 2
559310Sandreas.hansson@arm.com    mshrs = 4
568631Schander.sudanthi@arm.com    tgts_per_mshr = 20
573395Shsul@eecs.umich.edu
5810884Sandreas.hansson@arm.comclass L1_ICache(L1Cache):
5910884Sandreas.hansson@arm.com    is_read_only = True
6011199Sandreas.hansson@arm.com    # Writeback clean lines as well
6111199Sandreas.hansson@arm.com    writeback_clean = True
6210884Sandreas.hansson@arm.com
6310884Sandreas.hansson@arm.comclass L1_DCache(L1Cache):
6410884Sandreas.hansson@arm.com    pass
6510884Sandreas.hansson@arm.com
6611053Sandreas.hansson@arm.comclass L2Cache(Cache):
673668Srdreslin@umich.edu    assoc = 8
6811722Ssophiane.senni@gmail.com    tag_latency = 20
6911722Ssophiane.senni@gmail.com    data_latency = 20
709288Sandreas.hansson@arm.com    response_latency = 20
719321Sandreas.hansson@arm.com    mshrs = 20
729321Sandreas.hansson@arm.com    tgts_per_mshr = 12
739310Sandreas.hansson@arm.com    write_buffers = 8
749310Sandreas.hansson@arm.com
7511053Sandreas.hansson@arm.comclass IOCache(Cache):
769310Sandreas.hansson@arm.com    assoc = 8
7711722Ssophiane.senni@gmail.com    tag_latency = 50
7811722Ssophiane.senni@gmail.com    data_latency = 50
799310Sandreas.hansson@arm.com    response_latency = 50
803668Srdreslin@umich.edu    mshrs = 20
819310Sandreas.hansson@arm.com    size = '1kB'
823668Srdreslin@umich.edu    tgts_per_mshr = 12
833668Srdreslin@umich.edu
8411053Sandreas.hansson@arm.comclass PageTableWalkerCache(Cache):
857868Sgblack@eecs.umich.edu    assoc = 2
8611722Ssophiane.senni@gmail.com    tag_latency = 2
8711722Ssophiane.senni@gmail.com    data_latency = 2
889288Sandreas.hansson@arm.com    response_latency = 2
897868Sgblack@eecs.umich.edu    mshrs = 10
907868Sgblack@eecs.umich.edu    size = '1kB'
917868Sgblack@eecs.umich.edu    tgts_per_mshr = 12
9211331Sandreas.hansson@arm.com
9310884Sandreas.hansson@arm.com    # the x86 table walker actually writes to the table-walker cache
9410884Sandreas.hansson@arm.com    if buildEnv['TARGET_ISA'] == 'x86':
9510884Sandreas.hansson@arm.com        is_read_only = False
9610884Sandreas.hansson@arm.com    else:
9710884Sandreas.hansson@arm.com        is_read_only = True
9811199Sandreas.hansson@arm.com        # Writeback clean lines as well
9911199Sandreas.hansson@arm.com        writeback_clean = True
100