ReplacementPolicies.py revision 12601:21a10e7b578a
110553Salexandru.dutu@amd.com# Copyright (c) 2018 Inria 210553Salexandru.dutu@amd.com# All rights reserved. 310553Salexandru.dutu@amd.com# 410553Salexandru.dutu@amd.com# Redistribution and use in source and binary forms, with or without 510553Salexandru.dutu@amd.com# modification, are permitted provided that the following conditions are 610553Salexandru.dutu@amd.com# met: redistributions of source code must retain the above copyright 710553Salexandru.dutu@amd.com# notice, this list of conditions and the following disclaimer; 810553Salexandru.dutu@amd.com# redistributions in binary form must reproduce the above copyright 910553Salexandru.dutu@amd.com# notice, this list of conditions and the following disclaimer in the 1010553Salexandru.dutu@amd.com# documentation and/or other materials provided with the distribution; 1110553Salexandru.dutu@amd.com# neither the name of the copyright holders nor the names of its 1210553Salexandru.dutu@amd.com# contributors may be used to endorse or promote products derived from 1310553Salexandru.dutu@amd.com# this software without specific prior written permission. 1410553Salexandru.dutu@amd.com# 1510553Salexandru.dutu@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1610553Salexandru.dutu@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1710553Salexandru.dutu@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1810553Salexandru.dutu@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1910553Salexandru.dutu@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2010553Salexandru.dutu@amd.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2110553Salexandru.dutu@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2210553Salexandru.dutu@amd.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2310553Salexandru.dutu@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2410553Salexandru.dutu@amd.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2510553Salexandru.dutu@amd.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2610553Salexandru.dutu@amd.com# 2710553Salexandru.dutu@amd.com# Authors: Daniel Carvalho 2810553Salexandru.dutu@amd.com 2910553Salexandru.dutu@amd.comfrom m5.params import * 3010553Salexandru.dutu@amd.comfrom m5.proxy import * 3110553Salexandru.dutu@amd.comfrom m5.SimObject import SimObject 3211793Sbrandon.potter@amd.com 3311659Salexandru.dutu@amd.comclass BaseReplacementPolicy(SimObject): 3411800Sbrandon.potter@amd.com type = 'BaseReplacementPolicy' 3510553Salexandru.dutu@amd.com abstract = True 3611800Sbrandon.potter@amd.com cxx_header = "mem/cache/replacement_policies/base.hh" 3710553Salexandru.dutu@amd.com 3810553Salexandru.dutu@amd.comclass LRURP(BaseReplacementPolicy): 3910553Salexandru.dutu@amd.com type = 'LRURP' 4010553Salexandru.dutu@amd.com cxx_class = 'LRURP' 4110553Salexandru.dutu@amd.com cxx_header = "mem/cache/replacement_policies/lru_rp.hh" 4210553Salexandru.dutu@amd.com 4310553Salexandru.dutu@amd.comclass MRURP(BaseReplacementPolicy): 4410553Salexandru.dutu@amd.com type = 'MRURP' 4510553Salexandru.dutu@amd.com cxx_class = 'MRURP' 4610553Salexandru.dutu@amd.com cxx_header = "mem/cache/replacement_policies/mru_rp.hh" 4710553Salexandru.dutu@amd.com 4810553Salexandru.dutu@amd.comclass RandomRP(BaseReplacementPolicy): 4910553Salexandru.dutu@amd.com type = 'RandomRP' 5010553Salexandru.dutu@amd.com cxx_class = 'RandomRP' 5110553Salexandru.dutu@amd.com cxx_header = "mem/cache/replacement_policies/random_rp.hh" 5211877Sbrandon.potter@amd.com