113219Sodanrc@yahoo.com.br# Copyright (c) 2018 Inria 213219Sodanrc@yahoo.com.br# All rights reserved. 313219Sodanrc@yahoo.com.br# 413219Sodanrc@yahoo.com.br# Redistribution and use in source and binary forms, with or without 513219Sodanrc@yahoo.com.br# modification, are permitted provided that the following conditions are 613219Sodanrc@yahoo.com.br# met: redistributions of source code must retain the above copyright 713219Sodanrc@yahoo.com.br# notice, this list of conditions and the following disclaimer; 813219Sodanrc@yahoo.com.br# redistributions in binary form must reproduce the above copyright 913219Sodanrc@yahoo.com.br# notice, this list of conditions and the following disclaimer in the 1013219Sodanrc@yahoo.com.br# documentation and/or other materials provided with the distribution; 1113219Sodanrc@yahoo.com.br# neither the name of the copyright holders nor the names of its 1213219Sodanrc@yahoo.com.br# contributors may be used to endorse or promote products derived from 1313219Sodanrc@yahoo.com.br# this software without specific prior written permission. 1413219Sodanrc@yahoo.com.br# 1513219Sodanrc@yahoo.com.br# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1613219Sodanrc@yahoo.com.br# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1713219Sodanrc@yahoo.com.br# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1813219Sodanrc@yahoo.com.br# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1913219Sodanrc@yahoo.com.br# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2013219Sodanrc@yahoo.com.br# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2113219Sodanrc@yahoo.com.br# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2213219Sodanrc@yahoo.com.br# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2313219Sodanrc@yahoo.com.br# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2413219Sodanrc@yahoo.com.br# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2513219Sodanrc@yahoo.com.br# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2613219Sodanrc@yahoo.com.br# 2713219Sodanrc@yahoo.com.br# Authors: Daniel Carvalho 2813219Sodanrc@yahoo.com.br 2913219Sodanrc@yahoo.com.brfrom m5.params import * 3013219Sodanrc@yahoo.com.brfrom m5.proxy import * 3113219Sodanrc@yahoo.com.brfrom m5.SimObject import SimObject 3213219Sodanrc@yahoo.com.br 3313219Sodanrc@yahoo.com.brclass BaseIndexingPolicy(SimObject): 3413219Sodanrc@yahoo.com.br type = 'BaseIndexingPolicy' 3513219Sodanrc@yahoo.com.br abstract = True 3613219Sodanrc@yahoo.com.br cxx_header = "mem/cache/tags/indexing_policies/base.hh" 3713219Sodanrc@yahoo.com.br 3813219Sodanrc@yahoo.com.br # Get the size from the parent (cache) 3913219Sodanrc@yahoo.com.br size = Param.MemorySize(Parent.size, "capacity in bytes") 4013219Sodanrc@yahoo.com.br 4113219Sodanrc@yahoo.com.br # Get the entry size from the parent (tags) 4213219Sodanrc@yahoo.com.br entry_size = Param.Int(Parent.entry_size, "entry size in bytes") 4313219Sodanrc@yahoo.com.br 4413219Sodanrc@yahoo.com.br # Get the associativity 4513219Sodanrc@yahoo.com.br assoc = Param.Int(Parent.assoc, "associativity") 4613219Sodanrc@yahoo.com.br 4713219Sodanrc@yahoo.com.brclass SetAssociative(BaseIndexingPolicy): 4813219Sodanrc@yahoo.com.br type = 'SetAssociative' 4913219Sodanrc@yahoo.com.br cxx_class = 'SetAssociative' 5013219Sodanrc@yahoo.com.br cxx_header = "mem/cache/tags/indexing_policies/set_associative.hh" 5113219Sodanrc@yahoo.com.br 5213219Sodanrc@yahoo.com.brclass SkewedAssociative(BaseIndexingPolicy): 5313219Sodanrc@yahoo.com.br type = 'SkewedAssociative' 5413219Sodanrc@yahoo.com.br cxx_class = 'SkewedAssociative' 5513219Sodanrc@yahoo.com.br cxx_header = "mem/cache/tags/indexing_policies/skewed_associative.hh" 56