ruby: remove the cpu assumptions for the random tester
This commit is contained in:
parent
a22918dd41
commit
6f9bd33b73
2 changed files with 4 additions and 2 deletions
|
@ -90,8 +90,7 @@ if buildEnv['PROTOCOL'] == 'MOESI_hammer':
|
||||||
|
|
||||||
tester = RubyTester(check_flush = check_flush,
|
tester = RubyTester(check_flush = check_flush,
|
||||||
checks_to_complete = options.checks,
|
checks_to_complete = options.checks,
|
||||||
wakeup_frequency = options.wakeup_freq,
|
wakeup_frequency = options.wakeup_freq)
|
||||||
num_cpus = options.num_cpus)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Create the M5 system. Note that the Memory Object isn't
|
# Create the M5 system. Note that the Memory Object isn't
|
||||||
|
@ -104,6 +103,8 @@ Ruby.create_system(options, system)
|
||||||
|
|
||||||
assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
|
assert(options.num_cpus == len(system.ruby._cpu_ruby_ports))
|
||||||
|
|
||||||
|
tester.num_cpus = len(system.ruby._cpu_ruby_ports)
|
||||||
|
|
||||||
#
|
#
|
||||||
# The tester is most effective when randomization is turned on and
|
# The tester is most effective when randomization is turned on and
|
||||||
# artifical delay is randomly inserted on messages
|
# artifical delay is randomly inserted on messages
|
||||||
|
|
|
@ -106,6 +106,7 @@ CheckTable::addCheck(const Address& address)
|
||||||
Check*
|
Check*
|
||||||
CheckTable::getRandomCheck()
|
CheckTable::getRandomCheck()
|
||||||
{
|
{
|
||||||
|
assert(m_check_vector.size() > 0);
|
||||||
return m_check_vector[random() % m_check_vector.size()];
|
return m_check_vector[random() % m_check_vector.size()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue