summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-09-14 17:11:02 -0500
committerDerek Hower <drh5@cs.wisc.edu>2009-09-14 17:11:02 -0500
commit18e328cb63539accf7e7187ffed1e8a69e4db7cd (patch)
tree6ed958526f4bbcfa05e330b7b4bdcaa90ef9ef0f /src/mem/ruby
parent62b06f4a70cb04ac6c0612bcc0176f3c7d40f35b (diff)
downloadgem5-18e328cb63539accf7e7187ffed1e8a69e4db7cd.tar.xz
ruby: configuration updates
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb4
-rw-r--r--src/mem/ruby/config/cfg.rb10
-rw-r--r--src/mem/ruby/config/defaults.rb17
3 files changed, 8 insertions, 23 deletions
diff --git a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
index b44813ab6..1476ce34b 100644
--- a/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
+++ b/src/mem/ruby/config/TwoLevel_SplitL1UnifiedL2.rb
@@ -27,7 +27,7 @@ memory_size_mb = 1024
num_dma = 1
#default protocol
-protocol = "MESI_CMP_directory"
+protocol = ""#"MESI_CMP_directory"
# check for overrides
@@ -57,7 +57,7 @@ end
net_ports = Array.new
iface_ports = Array.new
-assert((protocol == "MESI_CMP_directory" or protocol == "MOESI_CMP_directory"), __FILE__+" cannot be used with protocol "+protocol);
+assert((protocol == "MESI_CMP_directory" or protocol == "MOESI_CMP_directory"), __FILE__+" cannot be used with protocol #{protocol}");
require protocol+".rb"
diff --git a/src/mem/ruby/config/cfg.rb b/src/mem/ruby/config/cfg.rb
index 9ec0df252..7e27ac59e 100644
--- a/src/mem/ruby/config/cfg.rb
+++ b/src/mem/ruby/config/cfg.rb
@@ -1,7 +1,7 @@
#!/usr/bin/ruby
-class AssertionFailure < RuntimeError
-end
+root = File.dirname(File.expand_path(__FILE__))
+require root+'/assert.rb'
class Boolean
def self.is_a?(obj)
@@ -9,12 +9,6 @@ class Boolean
end
end
-def assert(condition,message)
- unless condition
- raise AssertionFailure.new(message), "\n\nAssertion failed: \n\n #{message}\n\n"
- end
-end
-
class LibRubyObject
@@all_objs = Array.new
attr_reader :obj_name
diff --git a/src/mem/ruby/config/defaults.rb b/src/mem/ruby/config/defaults.rb
index 4e3db4495..20d633d87 100644
--- a/src/mem/ruby/config/defaults.rb
+++ b/src/mem/ruby/config/defaults.rb
@@ -1,7 +1,5 @@
#!/usr/bin/ruby
-
-
class NetPort < LibRubyObject
# number of transitions a SLICC state machine can transition per
# cycle
@@ -11,7 +9,6 @@ class NetPort < LibRubyObject
# SLICC Controllers. When 0, infinite buffering is used.
default_param :buffer_size, Integer, 32
- # added by SS for TBE
default_param :number_of_TBEs, Integer, 256
default_param :recycle_latency, Integer, 10
@@ -39,10 +36,10 @@ class Debug < LibRubyObject
default_param :protocol_trace, Boolean, false
# a string for filtering debugging output (for all g_debug vars see Debug.h)
- default_param :filter_string, String, ""
+ default_param :filter_string, String, "none"
- # filters debugging messages based on priority (low, med, high)
- default_param :verbosity_string, String, ""
+ # filters debugging messages based on priority (none, low, med, high)
+ default_param :verbosity_string, String, "none"
# filters debugging messages based on a ruby time
default_param :start_time, Integer, 1
@@ -65,7 +62,7 @@ class Topology < LibRubyObject
# indicates whether the topology config will be displayed in the
# stats file
- default_param :print_config, Boolean, true
+ default_param :print_config, Boolean, false
end
class Network < LibRubyObject
@@ -94,20 +91,15 @@ class GarnetNetwork < Network
default_param :using_network_testing, Boolean, false
end
-
-
-#added by SS
class Tracer < LibRubyObject
default_param :warmup_length, Integer, 1000000
end
-#added by SS
class Profiler < LibRubyObject
default_param :hot_lines, Boolean, false
default_param :all_instructions, Boolean, false
end
-#added by SS
class MemoryControl < LibRubyObject
default_param :mem_bus_cycle_multiplier, Integer, 10
@@ -230,7 +222,6 @@ class RubySystem
default_param :profiler, Profiler, Profiler.new("profiler0")
end
-#added by SS