# HG changeset patch
# User Brad Beckmann <[email protected]>
# Date 1263536247 28800
# Node ID 69b0eb267a9b14f0b02e7114561e4c7de72c2785
# Parent f5f1581d5b7c5d3443cd0792ec20a8bddfc670d5
ruby: Made the RubyTester wakeup frequency configurable
diff -r f5f1581d5b7c -r 69b0eb267a9b configs/example/rubytest.py
--- a/configs/example/rubytest.py Thu Jan 14 22:17:26 2010 -0800
+++ b/configs/example/rubytest.py Thu Jan 14 22:17:27 2010 -0800
@@ -75,7 +75,8 @@
#
# create the tester and system, including ruby
#
-tester = RubyTester(checks_to_complete = options.checks)
+tester = RubyTester(checks_to_complete = options.checks,
+ wakeup_frequency = options.wakeup_freq)
system = System(physmem = PhysicalMemory())
diff -r f5f1581d5b7c -r 69b0eb267a9b src/cpu/rubytest/RubyTester.cc
--- a/src/cpu/rubytest/RubyTester.cc Thu Jan 14 22:17:26 2010 -0800
+++ b/src/cpu/rubytest/RubyTester.cc Thu Jan 14 22:17:27 2010 -0800
@@ -39,7 +39,8 @@
: MemObject(p),
checkStartEvent(this),
m_checks_to_complete(p->checks_to_complete),
- m_deadlock_threshold(p->deadlock_threshold)
+ m_deadlock_threshold(p->deadlock_threshold),
+ m_wakeup_frequency(p->wakeup_frequency)
{
m_checks_completed = 0;
@@ -167,7 +168,7 @@
checkForDeadlock();
- schedule(checkStartEvent, curTick + 2);
+ schedule(checkStartEvent, curTick + m_wakeup_frequency);
} else {
exitSimLoop("Ruby Tester completed");
}
diff -r f5f1581d5b7c -r 69b0eb267a9b src/cpu/rubytest/RubyTester.hh
--- a/src/cpu/rubytest/RubyTester.hh Thu Jan 14 22:17:26 2010 -0800
+++ b/src/cpu/rubytest/RubyTester.hh Thu Jan 14 22:17:27 2010 -0800
@@ -139,6 +139,7 @@
uint64 m_checks_to_complete;
int m_deadlock_threshold;
int m_num_cpu_sequencers;
+ int m_wakeup_frequency;
};
// Output operator declaration
diff -r f5f1581d5b7c -r 69b0eb267a9b src/cpu/rubytest/RubyTester.py
--- a/src/cpu/rubytest/RubyTester.py Thu Jan 14 22:17:26 2010 -0800
+++ b/src/cpu/rubytest/RubyTester.py Thu Jan 14 22:17:27 2010 -0800
@@ -34,3 +34,4 @@
cpuPort = VectorPort("the cpu ports")
checks_to_complete = Param.Int(100, "checks to complete")
deadlock_threshold = Param.Int(50000, "how often to check for deadlock")
+ wakeup_frequency = Param.Int(10, "number of cycles between wakeups")
_______________________________________________
m5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/m5-dev