Caches.py revision 11722
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
413395Shsul@eecs.umich.edufrom m5.objects import *
423395Shsul@eecs.umich.edu
439310Sandreas.hansson@arm.com# Base implementations of L1, L2, IO and TLB-walker caches. There are
449310Sandreas.hansson@arm.com# used in the regressions and also as base components in the
459310Sandreas.hansson@arm.com# system-configuration scripts. The values are meant to serve as a
469310Sandreas.hansson@arm.com# starting point, and specific parameters can be overridden in the
479310Sandreas.hansson@arm.com# specific instantiations.
489310Sandreas.hansson@arm.com
4911053Sandreas.hansson@arm.comclass L1Cache(Cache):
503395Shsul@eecs.umich.edu    assoc = 2
5111722Ssophiane.senni@gmail.com    tag_latency = 2
5211722Ssophiane.senni@gmail.com    data_latency = 2
539288Sandreas.hansson@arm.com    response_latency = 2
549310Sandreas.hansson@arm.com    mshrs = 4
558631Schander.sudanthi@arm.com    tgts_per_mshr = 20
563395Shsul@eecs.umich.edu
5710884Sandreas.hansson@arm.comclass L1_ICache(L1Cache):
5810884Sandreas.hansson@arm.com    is_read_only = True
5911199Sandreas.hansson@arm.com    # Writeback clean lines as well
6011199Sandreas.hansson@arm.com    writeback_clean = True
6110884Sandreas.hansson@arm.com
6210884Sandreas.hansson@arm.comclass L1_DCache(L1Cache):
6310884Sandreas.hansson@arm.com    pass
6410884Sandreas.hansson@arm.com
6511053Sandreas.hansson@arm.comclass L2Cache(Cache):
663668Srdreslin@umich.edu    assoc = 8
6711722Ssophiane.senni@gmail.com    tag_latency = 20
6811722Ssophiane.senni@gmail.com    data_latency = 20
699288Sandreas.hansson@arm.com    response_latency = 20
709321Sandreas.hansson@arm.com    mshrs = 20
719321Sandreas.hansson@arm.com    tgts_per_mshr = 12
729310Sandreas.hansson@arm.com    write_buffers = 8
739310Sandreas.hansson@arm.com
7411053Sandreas.hansson@arm.comclass IOCache(Cache):
759310Sandreas.hansson@arm.com    assoc = 8
7611722Ssophiane.senni@gmail.com    tag_latency = 50
7711722Ssophiane.senni@gmail.com    data_latency = 50
789310Sandreas.hansson@arm.com    response_latency = 50
793668Srdreslin@umich.edu    mshrs = 20
809310Sandreas.hansson@arm.com    size = '1kB'
813668Srdreslin@umich.edu    tgts_per_mshr = 12
823668Srdreslin@umich.edu
8311053Sandreas.hansson@arm.comclass PageTableWalkerCache(Cache):
847868Sgblack@eecs.umich.edu    assoc = 2
8511722Ssophiane.senni@gmail.com    tag_latency = 2
8611722Ssophiane.senni@gmail.com    data_latency = 2
879288Sandreas.hansson@arm.com    response_latency = 2
887868Sgblack@eecs.umich.edu    mshrs = 10
897868Sgblack@eecs.umich.edu    size = '1kB'
907868Sgblack@eecs.umich.edu    tgts_per_mshr = 12
9111331Sandreas.hansson@arm.com
9210884Sandreas.hansson@arm.com    # the x86 table walker actually writes to the table-walker cache
9310884Sandreas.hansson@arm.com    if buildEnv['TARGET_ISA'] == 'x86':
9410884Sandreas.hansson@arm.com        is_read_only = False
9510884Sandreas.hansson@arm.com    else:
9610884Sandreas.hansson@arm.com        is_read_only = True
9711199Sandreas.hansson@arm.com        # Writeback clean lines as well
9811199Sandreas.hansson@arm.com        writeback_clean = True
99