This code reminds me that we really need to start having a plan to merge ruby/m5 code more. There are many things in both code bases and this is yet another example. Perhaps we can try to target that we all put some effort into this after ISCA.
Nate On Mon, Sep 14, 2009 at 3:14 PM, Derek Hower <[email protected]> wrote: > # HG changeset patch > # User Derek Hower <[email protected]> > # Date 1250630649 18000 > # Node ID 79d81f0b6217455b4f7586f53693f139285771a6 > # Parent 64bf776c5e704cd92fd6a1e286014bc39e96c90f > ruby: added random seed option to config scripts > > diff --git a/src/mem/ruby/config/MI_example-homogeneous.rb > b/src/mem/ruby/config/MI_example-homogeneous.rb > --- a/src/mem/ruby/config/MI_example-homogeneous.rb > +++ b/src/mem/ruby/config/MI_example-homogeneous.rb > @@ -34,6 +34,13 @@ > elsif $*[i] == "-m" > num_memories = $*[i+1].to_i > i = i+1 > + elsif $*[i] == "-R" > + if $*[i+1] == "rand" > + RubySystem.random_seed = "rand" > + else > + RubySystem.random_seed = $*[i+1].to_i > + end > + i = i+ 1 > elsif $*[i] == "-s" > memory_size_mb = $*[i+1].to_i > i = i + 1 > diff --git a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb > b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb > --- a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb > +++ b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb > @@ -40,6 +40,13 @@ > elsif $*[i] == "-p" > num_cores = $*[i+1].to_i > i = i+1 > + elsif $*[i] == "-R" > + if $*[i+1] == "rand" > + RubySystem.random_seed = "rand" > + else > + RubySystem.random_seed = $*[i+1].to_i > + end > + i = i+ 1 > elsif $*[i] == "-s" > memory_size_mb = $*[i+1].to_i > i = i + 1 > _______________________________________________ > m5-dev mailing list > [email protected] > http://m5sim.org/mailman/listinfo/m5-dev > > _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
