mem-ruby: Provide a fromSequencer helper function
Based on the CHIRequestType, it automatically tells if the request has been originated from the sequencer (CPU load/fetch/store) Change-Id: I50fd116c8b1a995b1c37e948cd96db60c027fe66 Signed-off-by: Giacomo Travaglini <giacomo.travaglini@arm.com>
This commit is contained in:
@@ -3155,9 +3155,7 @@ action(Profile_OutgoingEnd_DatalessResp, desc="") {
|
||||
action(TagArrayRead, desc="") {
|
||||
assert(is_valid(tbe));
|
||||
tbe.delayNextAction := curTick() + cyclesToTicks(
|
||||
tagLatency((tbe.reqType == CHIRequestType:Load) ||
|
||||
(tbe.reqType == CHIRequestType:Store) ||
|
||||
(tbe.reqType == CHIRequestType:StoreLine)));
|
||||
tagLatency(fromSequencer(tbe.reqType)));
|
||||
}
|
||||
|
||||
action(TagArrayWrite, desc="") {
|
||||
|
||||
@@ -299,6 +299,12 @@ Cycles dataLatency() {
|
||||
return cache.getDataLatency();
|
||||
}
|
||||
|
||||
bool fromSequencer(CHIRequestType reqType) {
|
||||
return reqType == CHIRequestType:Load ||
|
||||
reqType == CHIRequestType:Store ||
|
||||
reqType == CHIRequestType:StoreLine;
|
||||
}
|
||||
|
||||
bool inCache(Addr addr) {
|
||||
CacheEntry entry := getCacheEntry(makeLineAddress(addr));
|
||||
// NOTE: we consider data for the addr to be in cache if it exists in local,
|
||||
|
||||
Reference in New Issue
Block a user