ruby: give access to cache tag/data latencies from SLICC

This patch exposes the tag and data array latencies to the SLICC state machines
so that it can be used to determine the correct enqueue latency for response
messages.
This commit is contained in:
David Hashe 2015-07-20 09:15:18 -05:00
parent 536e3664e4
commit 74ca89f8b7
3 changed files with 6 additions and 0 deletions

View file

@ -149,6 +149,8 @@ structure (CacheMemory, external = "yes") {
void deallocate(Address);
AbstractCacheEntry lookup(Address);
bool isTagPresent(Address);
Cycles getTagLatency();
Cycles getDataLatency();
void setMRU(Address);
void recordRequestType(CacheRequestType);
bool checkResourceAvailable(CacheResourceType, Address);

View file

@ -70,6 +70,7 @@ class BankedArray
// This is so we don't get aliasing on blocks being replaced
bool tryAccess(int64 idx);
Cycles getLatency() const { return accessLatency; }
};
#endif

View file

@ -91,6 +91,9 @@ class CacheMemory : public SimObject
const AbstractCacheEntry* lookup(const Address& address) const;
Cycles getLatency() const { return m_latency; }
Cycles getTagLatency() const { return tagArray.getLatency(); }
Cycles getDataLatency() const { return dataArray.getLatency(); }
// Hook for checkpointing the contents of the cache
void recordCacheContents(int cntrl, CacheRecorder* tr) const;