summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:23 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-01-29 20:29:23 -0800
commit134cc3d48dc389aecbe6bebe27482e5e378eb692 (patch)
tree13589ed946a9f5d7192a285ae78a11b3bea3916e /src
parent3a835c7cbb481808a46a0491cf23b29378c0f866 (diff)
downloadgem5-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 'src')
-rw-r--r--src/mem/ruby/system/Cache.py2
-rw-r--r--src/mem/ruby/system/DirectoryMemory.cc2
-rw-r--r--src/mem/ruby/system/DirectoryMemory.py2
-rw-r--r--src/mem/ruby/system/RubySystem.py2
-rw-r--r--src/mem/ruby/system/System.cc2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/system/Cache.py b/src/mem/ruby/system/Cache.py
index 209d6f6e2..8098e6192 100644
--- a/src/mem/ruby/system/Cache.py
+++ b/src/mem/ruby/system/Cache.py
@@ -5,7 +5,7 @@ from Controller import RubyController
class RubyCache(SimObject):
type = 'RubyCache'
cxx_class = 'CacheMemory'
- size = Param.Int("");
+ size = Param.MemorySize("capacity in bytes");
latency = Param.Int("");
assoc = Param.Int("");
replacement_policy = Param.String("PSEUDO_LRU", "");
diff --git a/src/mem/ruby/system/DirectoryMemory.cc b/src/mem/ruby/system/DirectoryMemory.cc
index e4801594c..adf63d06f 100644
--- a/src/mem/ruby/system/DirectoryMemory.cc
+++ b/src/mem/ruby/system/DirectoryMemory.cc
@@ -49,7 +49,7 @@ DirectoryMemory::DirectoryMemory(const Params *p)
: SimObject(p)
{
m_version = p->version;
- m_size_bytes = p->size_mb * static_cast<uint64>(1<<20);
+ m_size_bytes = p->size;
m_size_bits = log_int(m_size_bytes);
}
diff --git a/src/mem/ruby/system/DirectoryMemory.py b/src/mem/ruby/system/DirectoryMemory.py
index e3becc4fc..e430cede3 100644
--- a/src/mem/ruby/system/DirectoryMemory.py
+++ b/src/mem/ruby/system/DirectoryMemory.py
@@ -6,4 +6,4 @@ class RubyDirectoryMemory(SimObject):
type = 'RubyDirectoryMemory'
cxx_class = 'DirectoryMemory'
version = Param.Int(0, "")
- size_mb = Param.Int(1024, "")
+ size = Param.MemorySize("1GB", "capacity in bytes")
diff --git a/src/mem/ruby/system/RubySystem.py b/src/mem/ruby/system/RubySystem.py
index d53271e45..3b079f9c0 100644
--- a/src/mem/ruby/system/RubySystem.py
+++ b/src/mem/ruby/system/RubySystem.py
@@ -9,7 +9,7 @@ class RubySystem(SimObject):
clock = Param.Clock('1GHz', "")
block_size_bytes = Param.Int(64,
"default cache block size; must be a power of two");
- mem_size_mb = Param.Int("");
+ mem_size = Param.MemorySize("total memory size of the system");
network = Param.RubyNetwork("")
debug = Param.RubyDebug("the default debug object")
profiler = Param.RubyProfiler("");
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index 3159a2888..47b53aedd 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -98,7 +98,7 @@ RubySystem::RubySystem(const Params *p)
assert(is_power_of_2(m_block_size_bytes));
m_block_size_bits = log_int(m_block_size_bytes);
- m_memory_size_bytes = (uint64_t)p->mem_size_mb * 1024 * 1024;
+ m_memory_size_bytes = p->mem_size;
m_memory_size_bits = log_int(m_memory_size_bytes);
m_network_ptr = p->network;