diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:08 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-02-10 21:43:08 -0600 |
commit | 9d6d6c67180533464fc839a8a6da182226cb3ee2 (patch) | |
tree | 04ebc1303b13c2aa4967120397b62977447d0096 /src/mem/ruby/system/AbstractReplacementPolicy.hh | |
parent | 221d39284e2b5b220ab72f3999db7f9d42c68a60 (diff) | |
download | gem5-9d6d6c67180533464fc839a8a6da182226cb3ee2.tar.xz |
ruby: replace Time with Tick in replacement policy classes
Diffstat (limited to 'src/mem/ruby/system/AbstractReplacementPolicy.hh')
-rw-r--r-- | src/mem/ruby/system/AbstractReplacementPolicy.hh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/mem/ruby/system/AbstractReplacementPolicy.hh b/src/mem/ruby/system/AbstractReplacementPolicy.hh index d03685c65..3c492377e 100644 --- a/src/mem/ruby/system/AbstractReplacementPolicy.hh +++ b/src/mem/ruby/system/AbstractReplacementPolicy.hh @@ -29,7 +29,7 @@ #ifndef __MEM_RUBY_SYSTEM_ABSTRACTREPLACEMENTPOLICY_HH__ #define __MEM_RUBY_SYSTEM_ABSTRACTREPLACEMENTPOLICY_HH__ -#include "mem/ruby/common/TypeDefines.hh" +#include "base/types.hh" class AbstractReplacementPolicy { @@ -38,18 +38,18 @@ class AbstractReplacementPolicy virtual ~AbstractReplacementPolicy(); /* touch a block. a.k.a. update timestamp */ - virtual void touch(Index set, Index way, Time time) = 0; + virtual void touch(Index set, Index way, Tick time) = 0; /* returns the way to replace */ virtual Index getVictim(Index set) const = 0; /* get the time of the last access */ - Time getLastAccess(Index set, Index way); + Tick getLastAccess(Index set, Index way); protected: unsigned m_num_sets; /** total number of sets */ unsigned m_assoc; /** set associativity */ - Time **m_last_ref_ptr; /** timestamp of last reference */ + Tick **m_last_ref_ptr; /** timestamp of last reference */ }; inline @@ -58,9 +58,9 @@ AbstractReplacementPolicy::AbstractReplacementPolicy(Index num_sets, { m_num_sets = num_sets; m_assoc = assoc; - m_last_ref_ptr = new Time*[m_num_sets]; + m_last_ref_ptr = new Tick*[m_num_sets]; for(unsigned i = 0; i < m_num_sets; i++){ - m_last_ref_ptr[i] = new Time[m_assoc]; + m_last_ref_ptr[i] = new Tick[m_assoc]; for(unsigned j = 0; j < m_assoc; j++){ m_last_ref_ptr[i][j] = 0; } @@ -80,7 +80,7 @@ AbstractReplacementPolicy::~AbstractReplacementPolicy() } } -inline Time +inline Tick AbstractReplacementPolicy::getLastAccess(Index set, Index way) { return m_last_ref_ptr[set][way]; |