summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:44 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-14 19:28:44 -0500
commitca368765a1ea846697621c6eac0ad8a0b6aa5a3a (patch)
treef1da14d5c6e91e9d6075e0f770714b0efb86c965
parent514f18cdda0abafdb3769ae4863ff03e57eeaed4 (diff)
downloadgem5-ca368765a1ea846697621c6eac0ad8a0b6aa5a3a.tar.xz
ruby: SubBlock: refactor code
-rw-r--r--src/mem/ruby/common/SubBlock.cc7
-rw-r--r--src/mem/ruby/common/SubBlock.hh7
2 files changed, 4 insertions, 10 deletions
diff --git a/src/mem/ruby/common/SubBlock.cc b/src/mem/ruby/common/SubBlock.cc
index 5175cb950..f1839df72 100644
--- a/src/mem/ruby/common/SubBlock.cc
+++ b/src/mem/ruby/common/SubBlock.cc
@@ -41,7 +41,7 @@ SubBlock::SubBlock(Addr addr, int size)
}
void
-SubBlock::internalMergeFrom(const DataBlock& data)
+SubBlock::mergeFrom(const DataBlock& data)
{
int size = getSize();
assert(size > 0);
@@ -52,7 +52,7 @@ SubBlock::internalMergeFrom(const DataBlock& data)
}
void
-SubBlock::internalMergeTo(DataBlock& data) const
+SubBlock::mergeTo(DataBlock& data) const
{
int size = getSize();
assert(size > 0);
@@ -68,6 +68,3 @@ SubBlock::print(std::ostream& out) const
{
out << "[" << m_address << ", " << getSize() << ", " << m_data << "]";
}
-
-
-
diff --git a/src/mem/ruby/common/SubBlock.hh b/src/mem/ruby/common/SubBlock.hh
index ad1d68ae1..f336328fa 100644
--- a/src/mem/ruby/common/SubBlock.hh
+++ b/src/mem/ruby/common/SubBlock.hh
@@ -56,15 +56,12 @@ class SubBlock
// Merging to and from DataBlocks - We only need to worry about
// updates when we are using DataBlocks
- void mergeTo(DataBlock& data) const { internalMergeTo(data); }
- void mergeFrom(const DataBlock& data) { internalMergeFrom(data); }
+ void mergeTo(DataBlock& data) const;
+ void mergeFrom(const DataBlock& data);
void print(std::ostream& out) const;
private:
- void internalMergeTo(DataBlock& data) const;
- void internalMergeFrom(const DataBlock& data);
-
// Data Members (m_ prefix)
Addr m_address;
std::vector<uint8_t> m_data;