From 698866d46197ad062384894f1927f99f26b03f3b Mon Sep 17 00:00:00 2001 From: David Hashe Date: Mon, 20 Jul 2015 09:15:18 -0500 Subject: ruby: split CPU and GPU latency stats --- src/mem/slicc/symbols/StateMachine.py | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/mem/slicc') 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* @@ -700,6 +707,28 @@ $c_ident::getCPUSequencer() const { return NULL; } +''') + + 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(''' -- cgit v1.2.3