diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2012-09-18 22:46:34 -0500 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2012-09-18 22:46:34 -0500 |
commit | 86b1c0fd540b57c1e7bba948ad0417f22f90eb41 (patch) | |
tree | c4dc42939158c13b5eeff2f6809fa800c99e490b /src/mem/ruby/system | |
parent | d2b57a7473768e8aff3707916b40b264cab6821c (diff) | |
download | gem5-86b1c0fd540b57c1e7bba948ad0417f22f90eb41.tar.xz |
ruby: avoid using g_system_ptr for event scheduling
This patch removes the use of g_system_ptr for event scheduling. Each consumer
object now needs to specify upfront an EventManager object it would use for
scheduling events. This makes the ruby memory system more amenable for a
multi-threaded simulation.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r-- | src/mem/ruby/system/AbstractMemOrCache.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/system/MemoryControl.cc | 3 | ||||
-rw-r--r-- | src/mem/ruby/system/System.hh | 1 | ||||
-rw-r--r-- | src/mem/ruby/system/WireBuffer.cc | 3 | ||||
-rw-r--r-- | src/mem/ruby/system/WireBuffer.hh | 3 |
5 files changed, 3 insertions, 8 deletions
diff --git a/src/mem/ruby/system/AbstractMemOrCache.hh b/src/mem/ruby/system/AbstractMemOrCache.hh index 4d1fee69a..3f3fb6fa0 100644 --- a/src/mem/ruby/system/AbstractMemOrCache.hh +++ b/src/mem/ruby/system/AbstractMemOrCache.hh @@ -35,7 +35,6 @@ class Consumer; class MemoryNode; -class Message; class AbstractMemOrCache { diff --git a/src/mem/ruby/system/MemoryControl.cc b/src/mem/ruby/system/MemoryControl.cc index f1ebc07fa..c5ddb0c44 100644 --- a/src/mem/ruby/system/MemoryControl.cc +++ b/src/mem/ruby/system/MemoryControl.cc @@ -42,7 +42,8 @@ #include "mem/ruby/system/System.hh" using namespace std; -MemoryControl::MemoryControl(const Params *p) : ClockedObject(p), m_event(this) +MemoryControl::MemoryControl(const Params *p) + : ClockedObject(p), Consumer(this), m_event(this) { g_system_ptr->registerMemController(this); } diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh index c7d005085..f7e0efc2a 100644 --- a/src/mem/ruby/system/System.hh +++ b/src/mem/ruby/system/System.hh @@ -133,7 +133,6 @@ class RubySystem : public ClockedObject void init(); - static void printSystemConfig(std::ostream& out); void readCompressedTrace(std::string filename, uint8_t *&raw_data, uint64& uncompressed_trace_size); diff --git a/src/mem/ruby/system/WireBuffer.cc b/src/mem/ruby/system/WireBuffer.cc index fb12998be..0845b3c8d 100644 --- a/src/mem/ruby/system/WireBuffer.cc +++ b/src/mem/ruby/system/WireBuffer.cc @@ -38,9 +38,6 @@ using namespace std; -class Consumer; - - // Output operator definition ostream& diff --git a/src/mem/ruby/system/WireBuffer.hh b/src/mem/ruby/system/WireBuffer.hh index c22fab70b..07da965c8 100644 --- a/src/mem/ruby/system/WireBuffer.hh +++ b/src/mem/ruby/system/WireBuffer.hh @@ -37,7 +37,7 @@ #include <vector> #include "mem/ruby/buffers/MessageBufferNode.hh" -#include "mem/ruby/common/Global.hh" +#include "mem/ruby/common/Consumer.hh" #include "params/RubyWireBuffer.hh" #include "sim/sim_object.hh" @@ -51,7 +51,6 @@ // separated by a network in real systems to simplify coherence. ///////////////////////////////////////////////////////////////////////////// -class Consumer; class Message; class WireBuffer : public SimObject |