summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/System.cc
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:19 -0800
commit12daaed84a44920968adb6b16bd558561bd18801 (patch)
tree0f72b27373669de9b7c060b080ac4a4093b8cccc /src/mem/ruby/system/System.cc
parented814899541d65783e93a37ab320650c5075c72d (diff)
downloadgem5-12daaed84a44920968adb6b16bd558561bd18801.tar.xz
ruby: Added clock to ruby system
As a first step to migrate ruby to the M5 eventqueue, added a clock variable to the ruby system.
Diffstat (limited to 'src/mem/ruby/system/System.cc')
-rw-r--r--src/mem/ruby/system/System.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index e27b03041..18404bd71 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -60,7 +60,7 @@
int RubySystem::m_random_seed;
bool RubySystem::m_randomization;
int RubySystem::m_tech_nm;
-int RubySystem::m_freq_mhz;
+Tick RubySystem::m_clock;
int RubySystem::m_block_size_bytes;
int RubySystem::m_block_size_bits;
uint64 RubySystem::m_memory_size_bytes;
@@ -93,7 +93,7 @@ RubySystem::RubySystem(const Params *p)
srandom(m_random_seed);
m_randomization = p->randomization;
m_tech_nm = p->tech_nm;
- m_freq_mhz = p->freq_mhz;
+ m_clock = p->clock;
m_block_size_bytes = p->block_size_bytes;
assert(is_power_of_2(m_block_size_bytes));
@@ -107,6 +107,7 @@ RubySystem::RubySystem(const Params *p)
m_profiler_ptr = p->profiler;
m_tracer_ptr = p->tracer;
+ g_eventQueue_ptr = new RubyEventQueue(m_clock);
g_system_ptr = this;
m_mem_vec_ptr = new MemoryVector;
m_mem_vec_ptr->setSize(m_memory_size_bytes);
@@ -129,7 +130,7 @@ void RubySystem::printSystemConfig(ostream & out)
out << " random_seed: " << m_random_seed << endl;
out << " randomization: " << m_randomization << endl;
out << " tech_nm: " << m_tech_nm << endl;
- out << " freq_mhz: " << m_freq_mhz << endl;
+ out << " cycle_period: " << m_clock << endl;
out << " block_size_bytes: " << m_block_size_bytes << endl;
out << " block_size_bits: " << m_block_size_bits << endl;
out << " memory_size_bytes: " << m_memory_size_bytes << endl;