From c38f5098b152ea1e1dde96220d3f9e50d3411780 Mon Sep 17 00:00:00 2001 From: Brandon Potter Date: Fri, 10 Jul 2015 16:05:23 -0500 Subject: 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. --- src/mem/ruby/common/Global.cc | 1 - src/mem/ruby/common/Global.hh | 4 ---- 2 files changed, 5 deletions(-) (limited to 'src/mem/ruby/common') diff --git a/src/mem/ruby/common/Global.cc b/src/mem/ruby/common/Global.cc index 3fdbd28b6..407e37307 100644 --- a/src/mem/ruby/common/Global.cc +++ b/src/mem/ruby/common/Global.cc @@ -32,4 +32,3 @@ using namespace std; RubySystem* g_system_ptr = 0; vector > g_abs_controls; -Cycles g_ruby_start; diff --git a/src/mem/ruby/common/Global.hh b/src/mem/ruby/common/Global.hh index d3f802963..e6f943aaf 100644 --- a/src/mem/ruby/common/Global.hh +++ b/src/mem/ruby/common/Global.hh @@ -41,8 +41,4 @@ extern RubySystem* g_system_ptr; class AbstractController; extern std::vector > g_abs_controls; -// A globally visible time at which the actual execution started. Meant only -// for components with in Ruby. Initialized in RubySystem::startup(). -extern Cycles g_ruby_start; - #endif // __MEM_RUBY_COMMON_GLOBAL_HH__ -- cgit v1.2.3