diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:23 -0800 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2010-01-29 20:29:23 -0800 |
commit | 134cc3d48dc389aecbe6bebe27482e5e378eb692 (patch) | |
tree | 13589ed946a9f5d7192a285ae78a11b3bea3916e /configs | |
parent | 3a835c7cbb481808a46a0491cf23b29378c0f866 (diff) | |
download | gem5-134cc3d48dc389aecbe6bebe27482e5e378eb692.tar.xz |
ruby: convert to M5 MemorySize
Converted both ruby caches and directory memory to use the M5 MemorySize python
type.
Diffstat (limited to 'configs')
-rw-r--r-- | configs/example/ruby_fs.py | 10 | ||||
-rw-r--r-- | configs/ruby/MOESI_hammer.py | 13 | ||||
-rw-r--r-- | configs/ruby/Ruby.py | 10 |
3 files changed, 21 insertions, 12 deletions
diff --git a/configs/example/ruby_fs.py b/configs/example/ruby_fs.py index e30f40bd5..33f2fd0e5 100644 --- a/configs/example/ruby_fs.py +++ b/configs/example/ruby_fs.py @@ -72,9 +72,15 @@ parser.add_option("-i", "--input", default="", help="Read stdin from a file.") parser.add_option("--output", default="", help="Redirect stdout to a file.") parser.add_option("--errout", default="", help="Redirect stderr to a file.") +# cache parameters +parser.add_option("--l1d_size", type="string", default="32kB") +parser.add_option("--l1i_size", type="string", default="32kB") +parser.add_option("--l2_size", type="string", default="1MB") +parser.add_option("--l1d_assoc", type="int", default=2) +parser.add_option("--l1i_assoc", type="int", default=2) +parser.add_option("--l2_assoc", type="int", default=16) + # ruby host memory experimentation -parser.add_option("--cache_size", type="int") -parser.add_option("--cache_assoc", type="int") parser.add_option("--map_levels", type="int") execfile(os.path.join(config_root, "common", "Options.py")) diff --git a/configs/ruby/MOESI_hammer.py b/configs/ruby/MOESI_hammer.py index 5273f597b..dba31b8b7 100644 --- a/configs/ruby/MOESI_hammer.py +++ b/configs/ruby/MOESI_hammer.py @@ -37,17 +37,13 @@ from m5.util import addToPath # Note: the L1 Cache latency is only used by the sequencer on fast path hits # class L1Cache(RubyCache): - assoc = 2 latency = 3 - size = 32768 # # Note: the L2 Cache latency is not currently used # class L2Cache(RubyCache): - assoc = 16 latency = 15 - size = 1048576 def create_system(options, phys_mem, piobus, dma_devices): @@ -74,9 +70,12 @@ def create_system(options, phys_mem, piobus, dma_devices): # # First create the Ruby objects associated with this cpu # - l1i_cache = L1Cache() - l1d_cache = L1Cache() - l2_cache = L2Cache() + l1i_cache = L1Cache(size = options.l1i_size, + assoc = options.l1i_assoc) + l1d_cache = L1Cache(size = options.l1d_size, + assoc = options.l1d_assoc) + l2_cache = L2Cache(size = options.l2_size, + assoc = options.l2_assoc) cpu_seq = RubySequencer(icache = l1i_cache, dcache = l1d_cache, diff --git a/configs/ruby/Ruby.py b/configs/ruby/Ruby.py index abc9a8df5..7003e6266 100644 --- a/configs/ruby/Ruby.py +++ b/configs/ruby/Ruby.py @@ -54,8 +54,12 @@ def create_system(options, physmem, piobus = None, dma_devices = []): # network = SimpleNetwork(topology = makeCrossbar(all_cntrls)) - mem_size_mb = sum([int(dir_cntrl.directory.size_mb) \ - for dir_cntrl in dir_cntrls]) + # + # determine the total memory size of the ruby system + # + total_mem_size = MemorySize('0B') + for dir_cntrl in dir_cntrls: + total_mem_size.value += dir_cntrl.directory.size.value ruby_profiler = RubyProfiler(num_of_sequencers = len(cpu_sequencers)) @@ -66,7 +70,7 @@ def create_system(options, physmem, piobus = None, dma_devices = []): debug = RubyDebug(filter_string = 'none', verbosity_string = 'none', protocol_trace = False), - mem_size_mb = mem_size_mb) + mem_size = total_mem_size) ruby.cpu_ruby_ports = cpu_sequencers |