diff options
author | Derek Hower <drh5@cs.wisc.edu> | 2009-09-11 14:17:21 -0500 |
---|---|---|
committer | Derek Hower <drh5@cs.wisc.edu> | 2009-09-11 14:17:21 -0500 |
commit | bd770274b013acd21caf6bd864a8e3374c06138e (patch) | |
tree | 0f0334fd66b466b2162db88be3d11f0a65e16c09 /src/mem/ruby/config/cfg.rb | |
parent | 1e40ee4ea081908782dd7ba159b9f680d933855c (diff) | |
parent | 8cdd7265ce1026a58fd0280a4f80f3ba8441c9aa (diff) | |
download | gem5-bd770274b013acd21caf6bd864a8e3374c06138e.tar.xz |
merge
Diffstat (limited to 'src/mem/ruby/config/cfg.rb')
-rw-r--r-- | src/mem/ruby/config/cfg.rb | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/src/mem/ruby/config/cfg.rb b/src/mem/ruby/config/cfg.rb index 16d658a4c..e6bc1b831 100644 --- a/src/mem/ruby/config/cfg.rb +++ b/src/mem/ruby/config/cfg.rb @@ -296,7 +296,6 @@ private end -#require "defaults.rb" @@ -439,27 +438,27 @@ class SetAssociativeCache < Cache cacti_args << 360 << 0 << 0 << 0 << 0 << 1 << 1 << 1 << 1 << 0 << 0 cacti_args << 50 << 10 << 10 << 0 << 1 << 1 - cacti_cmd = File.dirname(__FILE__) + "/cacti/cacti " + cacti_args.join(" ") - - IO.popen(cacti_cmd) { |pipe| - str1 = pipe.readline - str2 = pipe.readline - results = str2.split(", ") - if results.size != 61 - print "CACTI ERROR: CACTI produced unexpected output.\n" - print "Are you using the version shipped with libruby?\n" - raise Exception - end - latency_ns = results[5].to_f - if (latency_ns == "1e+39") - print "CACTI ERROR: CACTI was unable to realistically model the cache ",@obj_name,"\n" - print "Either change the cache parameters or manually set the latency values\n" - raise Exception - end - clk_period_ns = 1e9 * (1.0 / (RubySystem.freq_mhz * 1e6)) - latency_cycles = (latency_ns / clk_period_ns).ceil - @latency = latency_cycles - } +# cacti_cmd = File.dirname(__FILE__) + "/cacti/cacti " + cacti_args.join(" ") + +# IO.popen(cacti_cmd) { |pipe| +# str1 = pipe.readline +# str2 = pipe.readline +# results = str2.split(", ") +# if results.size != 61 +# print "CACTI ERROR: CACTI produced unexpected output.\n" +# print "Are you using the version shipped with libruby?\n" +# raise Exception +# end +# latency_ns = results[5].to_f +# if (latency_ns == "1e+39") +# print "CACTI ERROR: CACTI was unable to realistically model the cache ",@obj_name,"\n" +# print "Either change the cache parameters or manually set the latency values\n" +# raise Exception +# end +# clk_period_ns = 1e9 * (1.0 / (RubySystem.freq_mhz * 1e6)) +# latency_cycles = (latency_ns / clk_period_ns).ceil +# @latency = latency_cycles +# } elsif @latency.is_a?(Float) clk_period_ns = 1e9 * (1.0 / (RubySystem.freq_mhz * 1e6)) latency_cycles = (@latency / clk_period_ns).ceil @@ -540,7 +539,6 @@ class MemoryControl < LibRubyObject end - class Sequencer < IfacePort def cppClassName() @@ -759,4 +757,5 @@ class GarnetFlexiblePipeline < GarnetNetwork end end +#added by SS require "defaults.rb" |