summaryrefslogtreecommitdiff
path: root/src/mem/ruby/config/MI_example.rb
diff options
context:
space:
mode:
authorDerek Hower <drh5@cs.wisc.edu>2009-08-05 14:20:32 -0500
committerDerek Hower <drh5@cs.wisc.edu>2009-08-05 14:20:32 -0500
commitfbf7391bb0aa3c32289abb8a1b1066267df7c705 (patch)
treee05f36245b08938be2c87c29ef97c8f349e02956 /src/mem/ruby/config/MI_example.rb
parent1276df51e245c6e836d7e96c0df66a7b74b549c9 (diff)
downloadgem5-fbf7391bb0aa3c32289abb8a1b1066267df7c705.tar.xz
ruby: configuration supports multiple runs in same session
These changes allow to run Ruby-gems multiple times from the same ruby-lang script with different configurations
Diffstat (limited to 'src/mem/ruby/config/MI_example.rb')
-rw-r--r--src/mem/ruby/config/MI_example.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mem/ruby/config/MI_example.rb b/src/mem/ruby/config/MI_example.rb
index 3196bb639..187dc7a68 100644
--- a/src/mem/ruby/config/MI_example.rb
+++ b/src/mem/ruby/config/MI_example.rb
@@ -1,4 +1,6 @@
+require "util.rb"
+
class MI_example_CacheController < L1CacheController
attr :cache
def initialize(obj_name, mach_type, cache, sequencer)
@@ -21,6 +23,8 @@ class MI_example_DirectoryController < DirectoryController
def argv()
vec = super()
vec += " directory_latency "+directory_latency.to_s
+ vec += " dma_select_low_bit "+log_int(RubySystem.block_size_bytes).to_s
+ vec += " dma_select_num_bits "+log_int(NetPort.totalOfType("DMA")).to_s
end
end