Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 093fc6707f
...
compare: 25c3e73418
  • 3 commits
  • 6 files changed
  • 0 commit comments
  • 1 contributor
Commits on Jan 28, 2013
Nilay Vaish ruby: remove call to curCycle in panic()
The panic() function already prints the current tick value. This call to
curCycle() is as such redundant. Since we are trying to move towards multiple
clock domains, this call will print misleading time.
31659e8
Nilay Vaish ruby: remove get_time()
This patch replaces get_time() in *.sm files with curCycle() which
is now possible since controllers are clocked objects.
a8eb5b1
Nilay Vaish merged 798c2cec8e37 and e96ff45795bc 25c3e73
View
5 src/mem/protocol/MOESI_CMP_token-L1cache.sm
@@ -179,6 +179,7 @@ machine(L1Cache, "Token protocol")
void unset_tbe();
void wakeUpAllBuffers();
void wakeUpBuffers(Address a);
+ Time curCycle();
TBETable L1_TBEs, template="<L1Cache_TBE>", constructor="m_number_of_TBEs";
@@ -1344,7 +1345,7 @@ machine(L1Cache, "Token protocol")
tbe.Prefetch := in_msg.Prefetch;
tbe.AccessMode := in_msg.AccessMode;
}
- tbe.IssueTime := get_time();
+ tbe.IssueTime := curCycle();
}
action(ta_traceStalledAddress, "ta", desc="Trace Stalled Address") {
@@ -1447,7 +1448,7 @@ machine(L1Cache, "Token protocol")
// Update average latency
if (tbe.IssueCount <= 1) {
if (tbe.ExternalResponse == true) {
- updateAverageLatencyEstimate(time_to_int(get_time()) - time_to_int(tbe.IssueTime));
+ updateAverageLatencyEstimate(time_to_int(curCycle()) - time_to_int(tbe.IssueTime));
}
}
View
11 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();
}
}
}
View
19 src/mem/protocol/MOESI_hammer-dir.sm
@@ -179,6 +179,7 @@ machine(Directory, "AMD Hammer-like protocol")
void set_tbe(TBE a);
void unset_tbe();
void wakeUpBuffers(Address a);
+ Time curCycle();
// ** OBJECTS **
@@ -877,7 +878,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.setNetDest(MachineType:L1Cache, fwd_set);
out_msg.MessageSize := MessageSizeType:Multicast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
assert(tbe.SilentAcks > 0);
out_msg.SilentAcks := tbe.SilentAcks;
}
@@ -893,7 +894,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.remove(in_msg.Requestor); // Don't include the original requestor
out_msg.MessageSize := MessageSizeType:Broadcast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
@@ -953,7 +954,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.setNetDest(MachineType:L1Cache, fwd_set);
out_msg.MessageSize := MessageSizeType:Multicast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
out_msg.SilentAcks := machineCount(MachineType:L1Cache) - fwd_set.count();
out_msg.SilentAcks := out_msg.SilentAcks - 1;
}
@@ -967,7 +968,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.remove(in_msg.Requestor); // Don't include the original requestor
out_msg.MessageSize := MessageSizeType:Broadcast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
@@ -1007,7 +1008,7 @@ machine(Directory, "AMD Hammer-like protocol")
}
out_msg.MessageSize := MessageSizeType:Request_Control;
out_msg.InitialRequestTime := zero_time();
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
@@ -1025,7 +1026,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.MessageSize := MessageSizeType:Request_Control;
out_msg.DirectedProbe := true;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
} else {
@@ -1038,7 +1039,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.remove(in_msg.Requestor); // Don't include the original requestor
out_msg.MessageSize := MessageSizeType:Broadcast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
@@ -1059,7 +1060,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.MessageSize := MessageSizeType:Request_Control;
out_msg.DirectedProbe := true;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
@@ -1073,7 +1074,7 @@ machine(Directory, "AMD Hammer-like protocol")
out_msg.Destination.remove(in_msg.Requestor); // Don't include the original requestor
out_msg.MessageSize := MessageSizeType:Broadcast_Control;
out_msg.InitialRequestTime := in_msg.InitialRequestTime;
- out_msg.ForwardRequestTime := get_time();
+ out_msg.ForwardRequestTime := curCycle();
}
}
}
View
1  src/mem/protocol/RubySlicc_Util.sm
@@ -32,7 +32,6 @@
void error(std::string msg);
void assert(bool condition);
int random(int number);
-Time get_time();
Time zero_time();
NodeID intToID(int nodenum);
int IDToInt(NodeID id);
View
6 src/mem/ruby/slicc_interface/RubySlicc_Util.hh
@@ -48,12 +48,6 @@ random(int n)
}
inline Time
-get_time()
-{
- return g_system_ptr->getTime();
-}
-
-inline Time
zero_time()
{
return 0;
View
3  src/mem/slicc/ast/AST.py
@@ -54,7 +54,6 @@ def embedError(self, message, *args):
message = message % args
code = self.slicc.codeFormatter()
code('''
-panic("Runtime Error at ${{self.location}}, Ruby Time: %d, %s.\\n",
- curCycle(), $message);
+panic("Runtime Error at ${{self.location}}: %s.\\n", $message);
''')
return code

No commit comments for this range

Something went wrong with that request. Please try again.