diff options
author | Brandon Potter <brandon.potter@amd.com> | 2015-07-10 16:05:23 -0500 |
---|---|---|
committer | Brandon Potter <brandon.potter@amd.com> | 2015-07-10 16:05:23 -0500 |
commit | c38f5098b152ea1e1dde96220d3f9e50d3411780 (patch) | |
tree | 921765f6aac17f76f5801deb2e14ea16f5ed8963 /src/mem/ruby/network/simple/Throttle.hh | |
parent | 9eda4bdc5a947883a2d55ab860d37c5cd80c3370 (diff) | |
download | gem5-c38f5098b152ea1e1dde96220d3f9e50d3411780.tar.xz |
ruby: replace g_ruby_start with per-RubySystem m_start_cycle
This patch begins the process of removing global variables from the Ruby
source with the goal of eventually allowing users to create multiple Ruby
instances in a single simulation. Currently, users cannot do so because
several global variables and static members are referenced by the RubySystem
object in a way that assumes that there will only ever be a single RubySystem.
These need to be replaced with per-RubySystem equivalents.
This specific patch replaces the global var g_ruby_start, which is used
to calculate throughput statistics for Throttles in simple networks and
links in Garnet networks, with a RubySystem instance var m_start_cycle.
Diffstat (limited to 'src/mem/ruby/network/simple/Throttle.hh')
-rw-r--r-- | src/mem/ruby/network/simple/Throttle.hh | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mem/ruby/network/simple/Throttle.hh b/src/mem/ruby/network/simple/Throttle.hh index 797511702..19b0fcd35 100644 --- a/src/mem/ruby/network/simple/Throttle.hh +++ b/src/mem/ruby/network/simple/Throttle.hh @@ -52,11 +52,12 @@ class MessageBuffer; class Throttle : public Consumer { public: - Throttle(int sID, NodeID node, Cycles link_latency, + Throttle(int sID, RubySystem *rs, NodeID node, Cycles link_latency, + int link_bandwidth_multiplier, int endpoint_bandwidth, + ClockedObject *em); + Throttle(RubySystem *rs, NodeID node, Cycles link_latency, int link_bandwidth_multiplier, int endpoint_bandwidth, ClockedObject *em); - Throttle(NodeID node, Cycles link_latency, int link_bandwidth_multiplier, - int endpoint_bandwidth, ClockedObject *em); ~Throttle() {} std::string name() @@ -103,6 +104,7 @@ class Throttle : public Consumer Cycles m_link_latency; int m_wakeups_wo_switch; int m_endpoint_bandwidth; + RubySystem *m_ruby_system; // Statistical variables Stats::Scalar m_link_utilization; |