summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MOESI_hammer-cache.sm
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2013-01-28 06:14:18 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2013-01-28 06:14:18 -0600
commita8eb5b18e06c1304ac0bc7e5929c57a1cfaacda1 (patch)
treedc3ed04d39c3a64ec8cd13cf6f6a0cab795b5af4 /src/mem/protocol/MOESI_hammer-cache.sm
parent31659e83fbf6fa2b9024908cdba428145ef1fade (diff)
downloadgem5-a8eb5b18e06c1304ac0bc7e5929c57a1cfaacda1.tar.xz
ruby: remove get_time()
This patch replaces get_time() in *.sm files with curCycle() which is now possible since controllers are clocked objects.
Diffstat (limited to 'src/mem/protocol/MOESI_hammer-cache.sm')
-rw-r--r--src/mem/protocol/MOESI_hammer-cache.sm11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mem/protocol/MOESI_hammer-cache.sm b/src/mem/protocol/MOESI_hammer-cache.sm
index 0f35b4277..e4d01df65 100644
--- a/src/mem/protocol/MOESI_hammer-cache.sm
+++ b/src/mem/protocol/MOESI_hammer-cache.sm
@@ -181,6 +181,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
void unset_tbe();
void wakeUpAllBuffers();
void wakeUpBuffers(Address a);
+ Time curCycle();
Entry getCacheEntry(Address address), return_by_pointer="yes" {
Entry L2cache_entry := static_cast(Entry, "pointer", L2cacheMemory.lookup(address));
@@ -545,7 +546,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
out_msg.Requestor := machineID;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.MessageSize := MessageSizeType:Request_Control;
- out_msg.InitialRequestTime := get_time();
+ out_msg.InitialRequestTime := curCycle();
tbe.NumPendingMsgs := machineCount(MachineType:L1Cache); // One from each other cache (n-1) plus the memory (+1)
}
}
@@ -558,7 +559,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
out_msg.Requestor := machineID;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.MessageSize := MessageSizeType:Request_Control;
- out_msg.InitialRequestTime := get_time();
+ out_msg.InitialRequestTime := curCycle();
tbe.NumPendingMsgs := machineCount(MachineType:L1Cache); // One from each other cache (n-1) plus the memory (+1)
}
}
@@ -572,7 +573,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
out_msg.Requestor := machineID;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.MessageSize := MessageSizeType:Request_Control;
- out_msg.InitialRequestTime := get_time();
+ out_msg.InitialRequestTime := curCycle();
}
}
tbe.NumPendingMsgs := machineCount(MachineType:L1Cache); // One from each other cache (n-1) plus the memory (+1)
@@ -586,7 +587,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
out_msg.Requestor := machineID;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.MessageSize := MessageSizeType:Request_Control;
- out_msg.InitialRequestTime := get_time();
+ out_msg.InitialRequestTime := curCycle();
tbe.NumPendingMsgs := machineCount(MachineType:L1Cache); // One from each other cache (n-1) plus the memory (+1)
}
}
@@ -982,7 +983,7 @@ machine(L1Cache, "AMD Hammer-like protocol")
tbe.ForwardRequestTime := in_msg.ForwardRequestTime;
}
if (tbe.FirstResponseTime == zero_time()) {
- tbe.FirstResponseTime := get_time();
+ tbe.FirstResponseTime := curCycle();
}
}
}