diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2011-01-03 12:40:31 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2011-01-03 12:40:31 -0600 |
commit | 5e25f317125ee8311702831f7b7a99cd19172293 (patch) | |
tree | 940f31a759a595c40466ba40cdb1bcdf07fdefe7 /configs | |
parent | d6ad7419fffe25a076f620170645aca6ae7f3a4d (diff) | |
download | gem5-5e25f317125ee8311702831f7b7a99cd19172293.tar.xz |
Ruby: Add option for random seed to Ruby.py
This patch adds an option to the script Ruby.py for setting the parameter
m_random_seed used for randomizing delays in the memory system. The option
can be specified as "--random_seed <seed value>".
Diffstat (limited to 'configs')
-rw-r--r-- | configs/ruby/Ruby.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index ba9d09847..e88e8dfb7 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -56,7 +56,10 @@ def define_options(parser): parser.add_option("--recycle-latency", type="int", default=10, help="Recycle latency for ruby controller input buffers") - + + parser.add_option("--random_seed", type="int", default=1234, + help="Used for seeding the random number generator") + protocol = buildEnv['PROTOCOL'] exec "import %s" % protocol eval("%s.define_options(parser)" % protocol) @@ -135,5 +138,6 @@ def create_system(options, system, piobus = None, dma_devices = []): mem_size = total_mem_size) ruby.cpu_ruby_ports = cpu_sequencers + ruby.random_seed = options.random_seed return ruby |