ReplacementPolicies.py (12601:21a10e7b578a) ReplacementPolicies.py (12607:b1cc6815194e)
1# Copyright (c) 2018 Inria
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 21 unchanged lines hidden (view full) ---

30from m5.proxy import *
31from m5.SimObject import SimObject
32
33class BaseReplacementPolicy(SimObject):
34 type = 'BaseReplacementPolicy'
35 abstract = True
36 cxx_header = "mem/cache/replacement_policies/base.hh"
37
1# Copyright (c) 2018 Inria
2# All rights reserved.
3#
4# Redistribution and use in source and binary forms, with or without
5# modification, are permitted provided that the following conditions are
6# met: redistributions of source code must retain the above copyright
7# notice, this list of conditions and the following disclaimer;
8# redistributions in binary form must reproduce the above copyright

--- 21 unchanged lines hidden (view full) ---

30from m5.proxy import *
31from m5.SimObject import SimObject
32
33class BaseReplacementPolicy(SimObject):
34 type = 'BaseReplacementPolicy'
35 abstract = True
36 cxx_header = "mem/cache/replacement_policies/base.hh"
37
38class FIFORP(BaseReplacementPolicy):
39 type = 'FIFORP'
40 cxx_class = 'FIFORP'
41 cxx_header = "mem/cache/replacement_policies/fifo_rp.hh"
42
38class LRURP(BaseReplacementPolicy):
39 type = 'LRURP'
40 cxx_class = 'LRURP'
41 cxx_header = "mem/cache/replacement_policies/lru_rp.hh"
42
43class MRURP(BaseReplacementPolicy):
44 type = 'MRURP'
45 cxx_class = 'MRURP'
46 cxx_header = "mem/cache/replacement_policies/mru_rp.hh"
47
48class RandomRP(BaseReplacementPolicy):
49 type = 'RandomRP'
50 cxx_class = 'RandomRP'
51 cxx_header = "mem/cache/replacement_policies/random_rp.hh"
43class LRURP(BaseReplacementPolicy):
44 type = 'LRURP'
45 cxx_class = 'LRURP'
46 cxx_header = "mem/cache/replacement_policies/lru_rp.hh"
47
48class MRURP(BaseReplacementPolicy):
49 type = 'MRURP'
50 cxx_class = 'MRURP'
51 cxx_header = "mem/cache/replacement_policies/mru_rp.hh"
52
53class RandomRP(BaseReplacementPolicy):
54 type = 'RandomRP'
55 cxx_class = 'RandomRP'
56 cxx_header = "mem/cache/replacement_policies/random_rp.hh"