Go to the documentation of this file.
63 size(
p.size), lookupLatency(
p.tag_latency),
65 warmupBound((
p.warmup_percentage/100.0) * (
p.size /
p.block_size)),
66 warmedUp(false), numBlocks(
p.size /
p.block_size),
67 dataBlks(new uint8_t[
p.size]),
90 for (
const auto& location : entries) {
111 assert(requestor_id < system->maxRequestors());
136 *dest_blk = std::move(*src_blk);
167 const uint32_t task_id = blk.
getTaskId();
193 for (
unsigned j = 0;
j < 5; ++
j) {
206 auto print_blk = [&str](
CacheBlk &blk) {
208 str +=
csprintf(
"\tBlock: %s\n", blk.print());
213 str =
"no valid tags\n";
219 : statistics::
Group(&_tags),
222 ADD_STAT(tagsInUse, statistics::units::Rate<
223 statistics::units::
Tick, statistics::units::Count>::get(),
224 "Average ticks per tags in use"),
225 ADD_STAT(totalRefs, statistics::units::Count::get(),
226 "Total number of references to valid blocks."),
227 ADD_STAT(sampledRefs, statistics::units::Count::get(),
228 "Sample count of references to valid blocks."),
229 ADD_STAT(avgRefs, statistics::units::Rate<
230 statistics::units::Count, statistics::units::Count>::get(),
231 "Average number of references to valid blocks."),
233 "The tick when the warmup percentage was hit."),
234 ADD_STAT(occupancies, statistics::units::Rate<
235 statistics::units::Count, statistics::units::
Tick>::get(),
236 "Average occupied blocks per tick, per requestor"),
237 ADD_STAT(avgOccs, statistics::units::Rate<
238 statistics::units::Ratio, statistics::units::
Tick>::get(),
239 "Average percentage of cache occupancy"),
240 ADD_STAT(occupanciesTaskId, statistics::units::Count::get(),
241 "Occupied blocks per task id"),
242 ADD_STAT(ageTaskId, statistics::units::Count::get(),
243 "Occupied blocks per task id, per block age"),
244 ADD_STAT(ratioOccsTaskId, statistics::units::Ratio::get(),
245 "Ratio of occupied blocks and all blocks, per task id"),
246 ADD_STAT(tagAccesses, statistics::units::Count::get(),
247 "Number of tag accesses"),
248 ADD_STAT(dataAccesses, statistics::units::Count::get(),
249 "Number of data accesses")
256 using namespace statistics;
262 avgRefs = totalRefs / sampledRefs;
289 ratioOccsTaskId.flags(
nozero);
Tick curTick()
The universal simulation clock.
RequestPtr req
A pointer to the original request.
const FlagsType nozero
Don't print if this is zero.
virtual void init()
init() is called after all C++ SimObjects have been created and all ports are connected.
virtual bool matchTag(Addr tag, bool is_secure) const
Checks if the given tag information corresponds to this entry's.
const FlagsType nonan
Don't print if this is NAN.
std::string csprintf(const char *format, const Args &...args)
virtual std::vector< ReplaceableEntry * > getPossibleEntries(const Addr addr) const =0
Find all possible entries for insertion and replacement of an address.
uint32_t getTaskId() const
Get the task id associated to this block.
RequestorID maxRequestors()
Get the number of requestors registered in the system.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Tick getAge() const
Get the block's age, that is, the number of ticks since its insertion.
uint64_t Tick
Tick count type.
std::string getRequestorName(RequestorID requestor_id)
Get the name of an object for a given request id.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual void regStats()
Callback to set stat parameters.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
ReplaceableEntry * getEntry(const uint32_t set, const uint32_t way) const
Get an entry based on its set and way.
virtual Addr extractTag(const Addr addr) const
Generate the tag from the given address.
void registerExitCallback(const std::function< void()> &callback)
Register an exit callback.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
const FlagsType total
Print the total.
unsigned getRefCount() const
Get the number of references to this block since insertion.
virtual void preDumpStats()
Callback before stats are dumped.
virtual bool isValid() const
Checks if the entry is valid.
void insert(const Addr tag, const bool is_secure, const int src_requestor_ID, const uint32_t task_ID)
Set member variables when a block insertion occurs.
Counter value() const
Return the current value of this stat as its base type.
Generated on Wed May 4 2022 12:13:52 for gem5 by doxygen 1.8.17