Go to the documentation of this file.
60 size(
p->size), lookupLatency(
p->tag_latency),
62 warmupBound((
p->warmup_percentage/100.0) * (
p->size /
p->block_size)),
63 warmedUp(false), numBlocks(
p->size /
p->block_size),
64 dataBlks(new uint8_t[
p->size]),
87 for (
const auto& location : entries) {
109 assert(requestor_id < system->maxRequestors());
178 for (
unsigned j = 0;
j < 5; ++
j) {
191 auto print_blk = [&str](
CacheBlk &blk) {
193 str +=
csprintf(
"\tBlock: %s\n", blk.print());
198 str =
"no valid tags\n";
204 :
Stats::Group(&_tags),
207 tagsInUse(this,
"tagsinuse",
208 "Cycle average of tags in use"),
209 totalRefs(this,
"total_refs",
210 "Total number of references to valid blocks."),
211 sampledRefs(this,
"sampled_refs",
212 "Sample count of references to valid blocks."),
213 avgRefs(this,
"avg_refs",
214 "Average number of references to valid blocks."),
215 warmupCycle(this,
"warmup_cycle",
216 "Cycle when the warmup percentage was hit."),
217 occupancies(this,
"occ_blocks",
218 "Average occupied blocks per requestor"),
219 avgOccs(this,
"occ_percent",
220 "Average percentage of cache occupancy"),
221 occupanciesTaskId(this,
"occ_task_id_blocks",
222 "Occupied blocks per task id"),
223 ageTaskId(this,
"age_task_id_blocks",
"Occupied blocks per task id"),
224 percentOccsTaskId(this,
"occ_task_id_percent",
225 "Percentage of cache occupancy per task id"),
226 tagAccesses(this,
"tag_accesses",
"Number of tag accesses"),
227 dataAccesses(this,
"data_accesses",
"Number of data accesses")
234 using namespace Stats;
240 avgRefs = totalRefs / sampledRefs;
267 percentOccsTaskId.flags(
nozero);
269 percentOccsTaskId = occupanciesTaskId /
Stats::constant(tags.numBlocks);
A replaceable entry is a basic entry in a 2d table-like structure that needs to have replacement func...
virtual void regStats()
Callback to set stat parameters.
ReplaceableEntry * getEntry(const uint32_t set, const uint32_t way) const
Get an entry based on its set and way.
void init() override
After all objects have been created and all ports are connected, check that the system port is connec...
uint64_t Tick
Tick count type.
RequestPtr req
A pointer to the original request.
virtual void preDumpStats()
Callback before stats are dumped.
uint32_t task_id
Task Id associated with this block.
The ClockedObject class extends the SimObject with a clock and accessor functions to relate ticks to ...
void registerExitCallback(const std::function< void()> &callback)
Register an exit callback.
Counter value() const
Return the current value of this stat as its base type.
virtual Addr extractTag(const Addr addr) const
Generate the tag from the given address.
unsigned refCount
Number of references to this block since it was brought in.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
virtual std::vector< ReplaceableEntry * > getPossibleEntries(const Addr addr) const =0
Find all possible entries for insertion and replacement of an address.
const FlagsType nozero
Don't print if this is zero.
Addr tag
Data block tag value.
Tick tickInserted
Tick on which the block was inserted in the cache.
bool isValid() const
Checks that a block is valid.
virtual 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.
RequestorID maxRequestors()
Get the number of requestors registered in the system.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
std::string getRequestorName(RequestorID requestor_id)
Get the name of an object for a given request id.
const FlagsType total
Print the total.
std::string csprintf(const char *format, const Args &...args)
bool isSecure() const
Check if this block holds data from the secure memory space.
const FlagsType nonan
Don't print if this is NAN.
Tick curTick()
The current simulated tick.
Generated on Wed Sep 30 2020 14:02:08 for gem5 by doxygen 1.8.17