Caches.py revision 11199
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 519288Sandreas.hansson@arm.com hit_latency = 2 529288Sandreas.hansson@arm.com response_latency = 2 539310Sandreas.hansson@arm.com mshrs = 4 548631Schander.sudanthi@arm.com tgts_per_mshr = 20 553395Shsul@eecs.umich.edu 5610884Sandreas.hansson@arm.comclass L1_ICache(L1Cache): 5710884Sandreas.hansson@arm.com is_read_only = True 5811199Sandreas.hansson@arm.com # Writeback clean lines as well 5911199Sandreas.hansson@arm.com writeback_clean = True 6010884Sandreas.hansson@arm.com 6110884Sandreas.hansson@arm.comclass L1_DCache(L1Cache): 6210884Sandreas.hansson@arm.com pass 6310884Sandreas.hansson@arm.com 6411053Sandreas.hansson@arm.comclass L2Cache(Cache): 653668Srdreslin@umich.edu assoc = 8 669288Sandreas.hansson@arm.com hit_latency = 20 679288Sandreas.hansson@arm.com response_latency = 20 689321Sandreas.hansson@arm.com mshrs = 20 699321Sandreas.hansson@arm.com tgts_per_mshr = 12 709310Sandreas.hansson@arm.com write_buffers = 8 719310Sandreas.hansson@arm.com 7211053Sandreas.hansson@arm.comclass IOCache(Cache): 739310Sandreas.hansson@arm.com assoc = 8 749310Sandreas.hansson@arm.com hit_latency = 50 759310Sandreas.hansson@arm.com response_latency = 50 763668Srdreslin@umich.edu mshrs = 20 779310Sandreas.hansson@arm.com size = '1kB' 783668Srdreslin@umich.edu tgts_per_mshr = 12 799310Sandreas.hansson@arm.com forward_snoops = False 803668Srdreslin@umich.edu 8111053Sandreas.hansson@arm.comclass PageTableWalkerCache(Cache): 827868Sgblack@eecs.umich.edu assoc = 2 839288Sandreas.hansson@arm.com hit_latency = 2 849288Sandreas.hansson@arm.com response_latency = 2 857868Sgblack@eecs.umich.edu mshrs = 10 867868Sgblack@eecs.umich.edu size = '1kB' 877868Sgblack@eecs.umich.edu tgts_per_mshr = 12 8810820Sandreas.hansson@arm.com forward_snoops = False 8910884Sandreas.hansson@arm.com # the x86 table walker actually writes to the table-walker cache 9010884Sandreas.hansson@arm.com if buildEnv['TARGET_ISA'] == 'x86': 9110884Sandreas.hansson@arm.com is_read_only = False 9210884Sandreas.hansson@arm.com else: 9310884Sandreas.hansson@arm.com is_read_only = True 9411199Sandreas.hansson@arm.com # Writeback clean lines as well 9511199Sandreas.hansson@arm.com writeback_clean = True 96