ruby: added random seed option to config scripts
authorDerek Hower <drh5@cs.wisc.edu>
Tue, 18 Aug 2009 21:24:09 +0000 (16:24 -0500)
committerDerek Hower <drh5@cs.wisc.edu>
Tue, 18 Aug 2009 21:24:09 +0000 (16:24 -0500)
src/mem/ruby/config/MI_example-homogeneous.rb
src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb

index 2b416e647acc5943eb6f0ca68752c162309858e1..409d0fe3a21d5af74ffd52487ffd67e70bd4bf6c 100644 (file)
@@ -34,6 +34,13 @@ for i in 0..$*.size-1 do
   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
index 8a202d450eb3b9b5f6fae141ab139e70ca872d7e..2c59a09164af3976ef679c77100b992428835de4 100644 (file)
@@ -40,6 +40,13 @@ for i in 0..$*.size-1 do
   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