changeset ed3816dae6d5 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=ed3816dae6d5
description:
ruby: Fixes clock domains in configuration files
This patch fixes scripts related to ruby by adding the ruby clock
domain.
Now the L1 controllers and the Sequencer shares the cpu clock domain,
while the rest of the components use the ruby clock domain.
Before this patch, running simulations with the cpu clock set at 2GHz or
1GHz will output the same time results and could distort power
measurements.
Committed by: Nilay Vaish <[email protected]>
diffstat:
configs/example/ruby_direct_test.py | 2 +-
configs/example/ruby_random_test.py | 2 +-
configs/example/se.py | 2 ++
configs/ruby/MESI_Three_Level.py | 2 ++
configs/ruby/MESI_Two_Level.py | 2 ++
configs/ruby/MI_example.py | 2 ++
configs/ruby/MOESI_CMP_directory.py | 2 ++
configs/ruby/MOESI_CMP_token.py | 2 ++
configs/ruby/MOESI_hammer.py | 2 ++
tests/configs/rubytest-ruby.py | 5 ++++-
10 files changed, 20 insertions(+), 3 deletions(-)
diffs (152 lines):
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/example/ruby_direct_test.py
--- a/configs/example/ruby_direct_test.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/example/ruby_direct_test.py Mon Sep 01 16:55:30 2014 -0500
@@ -105,7 +105,7 @@
#
# Create the ruby random tester
#
-system.tester = RubyDirectedTester(requests_to_complete = \
+system.cpu = RubyDirectedTester(requests_to_complete = \
options.requests,
generator = generator)
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/example/ruby_random_test.py
--- a/configs/example/ruby_random_test.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/example/ruby_random_test.py Mon Sep 01 16:55:30 2014 -0500
@@ -97,7 +97,7 @@
# actually used by the rubytester, but is included to support the
# M5 memory size == Ruby memory size checks
#
-system = System(tester = tester, physmem = SimpleMemory(),
+system = System(cpu = tester, physmem = SimpleMemory(),
mem_ranges = [AddrRange(options.mem_size)])
# Create a top-level voltage domain and clock domain
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/example/se.py
--- a/configs/example/se.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/example/se.py Mon Sep 01 16:55:30 2014 -0500
@@ -235,6 +235,8 @@
Ruby.create_system(options, system)
assert(options.num_cpus == len(system.ruby._cpu_ports))
+ system.ruby.clk_domain = SrcClockDomain(clock = options.ruby_clock,
+ voltage_domain = system.voltage_domain)
for i in xrange(np):
ruby_port = system.ruby._cpu_ports[i]
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MESI_Three_Level.py
--- a/configs/ruby/MESI_Three_Level.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MESI_Three_Level.py Mon Sep 01 16:55:30 2014 -0500
@@ -102,9 +102,11 @@
l0_cntrl = L0Cache_Controller(version = i*num_cpus_per_cluster + j,
Icache = l0i_cache, Dcache = l0d_cache,
send_evictions = (options.cpu_type == "detailed"),
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i, icache = l0i_cache,
+ clk_domain=system.cpu[i].clk_domain,
dcache = l0d_cache, ruby_system = ruby_system)
l0_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MESI_Two_Level.py
--- a/configs/ruby/MESI_Two_Level.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MESI_Two_Level.py Mon Sep 01 16:55:30 2014 -0500
@@ -95,12 +95,14 @@
options.cpu_type == "detailed"),
prefetcher = prefetcher,
ruby_system = ruby_system,
+ clk_domain=system.cpu[i].clk_domain,
transitions_per_cycle=options.ports,
enable_prefetch = False)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MI_example.py
--- a/configs/ruby/MI_example.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MI_example.py Mon Sep 01 16:55:30 2014 -0500
@@ -82,11 +82,13 @@
send_evictions = (
options.cpu_type == "detailed"),
transitions_per_cycle = options.ports,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = cache,
dcache = cache,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MOESI_CMP_directory.py
--- a/configs/ruby/MOESI_CMP_directory.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MOESI_CMP_directory.py Mon Sep 01 16:55:30 2014 -0500
@@ -92,11 +92,13 @@
send_evictions = (
options.cpu_type == "detailed"),
transitions_per_cycle = options.ports,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MOESI_CMP_token.py
--- a/configs/ruby/MOESI_CMP_token.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MOESI_CMP_token.py Mon Sep 01 16:55:30 2014 -0500
@@ -112,11 +112,13 @@
send_evictions = (
options.cpu_type == "detailed"),
transitions_per_cycle = options.ports,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 configs/ruby/MOESI_hammer.py
--- a/configs/ruby/MOESI_hammer.py Thu Aug 28 10:11:44 2014 -0500
+++ b/configs/ruby/MOESI_hammer.py Mon Sep 01 16:55:30 2014 -0500
@@ -105,11 +105,13 @@
send_evictions = (
options.cpu_type == "detailed"),
transitions_per_cycle = options.ports,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
cpu_seq = RubySequencer(version = i,
icache = l1i_cache,
dcache = l1d_cache,
+ clk_domain=system.cpu[i].clk_domain,
ruby_system = ruby_system)
l1_cntrl.sequencer = cpu_seq
diff -r bec0c5ffc323 -r ed3816dae6d5 tests/configs/rubytest-ruby.py
--- a/tests/configs/rubytest-ruby.py Thu Aug 28 10:11:44 2014 -0500
+++ b/tests/configs/rubytest-ruby.py Mon Sep 01 16:55:30 2014 -0500
@@ -78,7 +78,10 @@
tester = RubyTester(check_flush = check_flush, checks_to_complete = 100,
wakeup_frequency = 10, num_cpus = options.num_cpus)
-system = System(tester = tester, physmem = SimpleMemory(null = True))
+# We set the testers as cpu for ruby to find the correct clock domains
+# for the L1 Objects.
+system = System(cpu = tester, physmem = SimpleMemory(null = True))
+
# Dummy voltage domain for all our clock domains
system.voltage_domain = VoltageDomain(voltage = options.sys_voltage)
system.clk_domain = SrcClockDomain(clock = '1GHz',
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev