LRUPolicy.hh revision 11061
16145SN/A/*
26145SN/A * Copyright (c) 2007 Mark D. Hill and David A. Wood
36145SN/A * All rights reserved.
46145SN/A *
56145SN/A * Redistribution and use in source and binary forms, with or without
66145SN/A * modification, are permitted provided that the following conditions are
76145SN/A * met: redistributions of source code must retain the above copyright
86145SN/A * notice, this list of conditions and the following disclaimer;
96145SN/A * redistributions in binary form must reproduce the above copyright
106145SN/A * notice, this list of conditions and the following disclaimer in the
116145SN/A * documentation and/or other materials provided with the distribution;
126145SN/A * neither the name of the copyright holders nor the names of its
136145SN/A * contributors may be used to endorse or promote products derived from
146145SN/A * this software without specific prior written permission.
156145SN/A *
166145SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
176145SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
186145SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
196145SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
206145SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
216145SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
226145SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
236145SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
246145SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
256145SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
266145SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
276145SN/A */
286145SN/A
297832SN/A#ifndef __MEM_RUBY_STRUCTURES_LRUPOLICY_HH__
307832SN/A#define __MEM_RUBY_STRUCTURES_LRUPOLICY_HH__
319356Snilay@cs.wisc.edu
328232SN/A#include "mem/ruby/structures/AbstractReplacementPolicy.hh"
336154SN/A#include "params/LRUReplacementPolicy.hh"
347054SN/A
358257SBrad.Beckmann@amd.com/* Simple true LRU replacement policy */
368255SBrad.Beckmann@amd.com
377054SN/Aclass LRUPolicy : public AbstractReplacementPolicy
386145SN/A{
397055SN/A  public:
407055SN/A    typedef LRUReplacementPolicyParams Params;
417054SN/A    LRUPolicy(const Params * p);
428257SBrad.Beckmann@amd.com    ~LRUPolicy();
436145SN/A
446145SN/A    void touch(int64_t set, int64_t way, Tick time);
456145SN/A    int64_t getVictim(int64_t set) const;
466145SN/A};
476145SN/A
486145SN/A#endif // __MEM_RUBY_STRUCTURES_LRUPOLICY_HH__
496145SN/A