gem5  v19.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fifo_rp.hh
Go to the documentation of this file.
1 
38 #ifndef __MEM_CACHE_REPLACEMENT_POLICIES_FIFO_RP_HH__
39 #define __MEM_CACHE_REPLACEMENT_POLICIES_FIFO_RP_HH__
40 
41 #include "base/types.hh"
43 
44 struct FIFORPParams;
45 
47 {
48  protected:
51  {
54 
58  FIFOReplData() : tickInserted(0) {}
59  };
60 
61  public:
63  typedef FIFORPParams Params;
64 
68  FIFORP(const Params *p);
69 
73  ~FIFORP() {}
74 
81  void invalidate(const std::shared_ptr<ReplacementData>& replacement_data)
82  const override;
83 
90  void touch(const std::shared_ptr<ReplacementData>& replacement_data) const
91  override;
92 
99  void reset(const std::shared_ptr<ReplacementData>& replacement_data) const
100  override;
101 
108  ReplaceableEntry* getVictim(const ReplacementCandidates& candidates) const
109  override;
110 
116  std::shared_ptr<ReplacementData> instantiateEntry() override;
117 };
118 
119 #endif // __MEM_CACHE_REPLACEMENT_POLICIES_FIFO_RP_HH__
void invalidate(const std::shared_ptr< ReplacementData > &replacement_data) const override
Invalidate replacement data to set it as the next probable victim.
Definition: fifo_rp.cc:44
A common base class of cache replacement policy objects.
Definition: base.hh:48
Tick tickInserted
Tick on which the entry was inserted.
Definition: fifo_rp.hh:53
STL vector class.
Definition: stl.hh:40
FIFOReplData()
Default constructor.
Definition: fifo_rp.hh:58
Copyright (c) 2018 Inria All rights reserved.
FIFORP(const Params *p)
Construct and initiliaze this replacement policy.
Definition: fifo_rp.cc:38
uint64_t Tick
Tick count type.
Definition: types.hh:63
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
void touch(const std::shared_ptr< ReplacementData > &replacement_data) const override
Touch an entry to update its replacement data.
Definition: fifo_rp.cc:53
~FIFORP()
Destructor.
Definition: fifo_rp.hh:73
ReplaceableEntry * getVictim(const ReplacementCandidates &candidates) const override
Find replacement victim using insertion timestamps.
Definition: fifo_rp.cc:67
FIFO-specific implementation of replacement data.
Definition: fifo_rp.hh:50
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
FIFORPParams Params
Convenience typedef.
Definition: fifo_rp.hh:63
Bitfield< 0 > p
void reset(const std::shared_ptr< ReplacementData > &replacement_data) const override
Reset replacement data.
Definition: fifo_rp.cc:59
std::shared_ptr< ReplacementData > instantiateEntry() override
Instantiate a replacement data entry.
Definition: fifo_rp.cc:88

Generated on Fri Feb 28 2020 16:27:02 for gem5 by doxygen 1.8.13