summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:50 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:50 -0500
commit2cbe7c705be1cce44c5581fa58569cd95cc0f62d (patch)
treedf30549e0d7683b0f4c58039cd9c6247b54f7033 /src/mem/ruby/common
parent4ccdf8fb81ff670f111428c31b9741c926d87d20 (diff)
downloadgem5-2cbe7c705be1cce44c5581fa58569cd95cc0f62d.tar.xz
ruby: remove typedef of Index as int64
The Index type defined as typedef int64 does not really provide any help since in most places we use primitive types instead of Index. Also, the name Index is very generic that it does not merit being used as a typename.
Diffstat (limited to 'src/mem/ruby/common')
-rw-r--r--src/mem/ruby/common/Address.cc10
-rw-r--r--src/mem/ruby/common/Address.hh2
-rw-r--r--src/mem/ruby/common/TypeDefines.hh1
3 files changed, 6 insertions, 7 deletions
diff --git a/src/mem/ruby/common/Address.cc b/src/mem/ruby/common/Address.cc
index b075ef3c5..692f4cae8 100644
--- a/src/mem/ruby/common/Address.cc
+++ b/src/mem/ruby/common/Address.cc
@@ -57,22 +57,22 @@ Address::makeNextStrideAddress(int stride)
+ RubySystem::getBlockSizeBytes()*stride;
}
-Index
+int64
Address::memoryModuleIndex() const
{
- Index index =
+ int64 index =
bitSelect(RubySystem::getBlockSizeBits() +
RubySystem::getMemorySizeBits(), ADDRESS_WIDTH);
assert (index >= 0);
return index;
- // Index indexHighPortion =
+ // int64 indexHighPortion =
// address.bitSelect(MEMORY_SIZE_BITS - 1,
// PAGE_SIZE_BITS + NUMBER_OF_MEMORY_MODULE_BITS);
- // Index indexLowPortion =
+ // int64 indexLowPortion =
// address.bitSelect(DATA_BLOCK_BITS, PAGE_SIZE_BITS - 1);
//
- // Index index = indexLowPortion |
+ // int64 index = indexLowPortion |
// (indexHighPortion << (PAGE_SIZE_BITS - DATA_BLOCK_BITS));
/*
diff --git a/src/mem/ruby/common/Address.hh b/src/mem/ruby/common/Address.hh
index ba317174a..feb8741c9 100644
--- a/src/mem/ruby/common/Address.hh
+++ b/src/mem/ruby/common/Address.hh
@@ -72,7 +72,7 @@ class Address
void makePageAddress();
void makeNextStrideAddress(int stride);
- Index memoryModuleIndex() const;
+ int64 memoryModuleIndex() const;
void print(std::ostream& out) const;
void output(std::ostream& out) const;
diff --git a/src/mem/ruby/common/TypeDefines.hh b/src/mem/ruby/common/TypeDefines.hh
index 9996fb0f4..17b30f4b3 100644
--- a/src/mem/ruby/common/TypeDefines.hh
+++ b/src/mem/ruby/common/TypeDefines.hh
@@ -35,7 +35,6 @@ typedef long long int64;
typedef uint64 physical_address_t;
-typedef int64 Index; // what the address bit ripper returns
typedef unsigned int LinkID;
typedef unsigned int NodeID;
typedef unsigned int SwitchID;