summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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;