summaryrefslogtreecommitdiff
path: root/src/mem/slicc/symbols
diff options
context:
space:
mode:
authorDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
committerDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
commit698866d46197ad062384894f1927f99f26b03f3b (patch)
treed614d93a6d072c8440b9db13831e80b45756a742 /src/mem/slicc/symbols
parent1a7d3f9fcb76a68540dd948f91413533a383bfde (diff)
downloadgem5-698866d46197ad062384894f1927f99f26b03f3b.tar.xz
ruby: split CPU and GPU latency stats
Diffstat (limited to 'src/mem/slicc/symbols')
-rw-r--r--src/mem/slicc/symbols/StateMachine.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/mem/slicc/symbols/StateMachine.py b/src/mem/slicc/symbols/StateMachine.py
index fc3f32c3d..6a398423f 100644
--- a/src/mem/slicc/symbols/StateMachine.py
+++ b/src/mem/slicc/symbols/StateMachine.py
@@ -310,6 +310,7 @@ class $c_ident : public AbstractController
void recordCacheTrace(int cntrl, CacheRecorder* tr);
Sequencer* getCPUSequencer() const;
+ GPUCoalescer* getGPUCoalescer() const;
int functionalWriteBuffers(PacketPtr&);
@@ -680,6 +681,12 @@ $c_ident::init()
assert(param.pointer)
seq_ident = "m_%s_ptr" % param.ident
+ coal_ident = "NULL"
+ for param in self.config_parameters:
+ if param.ident == "coalescer":
+ assert(param.pointer)
+ coal_ident = "m_%s_ptr" % param.ident
+
if seq_ident != "NULL":
code('''
Sequencer*
@@ -702,6 +709,28 @@ $c_ident::getCPUSequencer() const
}
''')
+ if coal_ident != "NULL":
+ code('''
+GPUCoalescer*
+$c_ident::getGPUCoalescer() const
+{
+ if (NULL != $coal_ident && !$coal_ident->isCPUSequencer()) {
+ return $coal_ident;
+ } else {
+ return NULL;
+ }
+}
+''')
+ else:
+ code('''
+
+GPUCoalescer*
+$c_ident::getGPUCoalescer() const
+{
+ return NULL;
+}
+''')
+
code('''
void