summaryrefslogtreecommitdiff
path: root/src/mem/ruby/structures
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby/structures')
-rw-r--r--src/mem/ruby/structures/AbstractReplacementPolicy.cc4
-rw-r--r--src/mem/ruby/structures/BankedArray.cc2
-rw-r--r--src/mem/ruby/structures/CacheMemory.cc10
-rw-r--r--src/mem/ruby/structures/PseudoLRUPolicy.cc2
-rw-r--r--src/mem/ruby/structures/RubyMemoryControl.cc2
-rw-r--r--src/mem/ruby/structures/TBETable.hh2
6 files changed, 11 insertions, 11 deletions
diff --git a/src/mem/ruby/structures/AbstractReplacementPolicy.cc b/src/mem/ruby/structures/AbstractReplacementPolicy.cc
index d802ecd31..5abd55083 100644
--- a/src/mem/ruby/structures/AbstractReplacementPolicy.cc
+++ b/src/mem/ruby/structures/AbstractReplacementPolicy.cc
@@ -36,9 +36,9 @@ AbstractReplacementPolicy::AbstractReplacementPolicy(const Params * p)
m_num_sets = p->size/p->block_size/p->assoc;
m_assoc = p->assoc;
m_last_ref_ptr = new Tick*[m_num_sets];
- for(unsigned i = 0; i < m_num_sets; i++){
+ for (unsigned i = 0; i < m_num_sets; i++){
m_last_ref_ptr[i] = new Tick[m_assoc];
- for(unsigned j = 0; j < m_assoc; j++){
+ for (unsigned j = 0; j < m_assoc; j++){
m_last_ref_ptr[i][j] = 0;
}
}
diff --git a/src/mem/ruby/structures/BankedArray.cc b/src/mem/ruby/structures/BankedArray.cc
index 550693ca2..5054eae8a 100644
--- a/src/mem/ruby/structures/BankedArray.cc
+++ b/src/mem/ruby/structures/BankedArray.cc
@@ -73,7 +73,7 @@ BankedArray::reserve(int64_t idx)
unsigned int bank = mapIndexToBank(idx);
assert(bank < banks);
- if(busyBanks[bank].endAccess >= curTick()) {
+ if (busyBanks[bank].endAccess >= curTick()) {
if (busyBanks[bank].startAccess == curTick() &&
busyBanks[bank].idx == idx) {
// this is the same reservation (can happen when
diff --git a/src/mem/ruby/structures/CacheMemory.cc b/src/mem/ruby/structures/CacheMemory.cc
index 45fb85d05..f7c196119 100644
--- a/src/mem/ruby/structures/CacheMemory.cc
+++ b/src/mem/ruby/structures/CacheMemory.cc
@@ -323,7 +323,7 @@ CacheMemory::lookup(Addr address)
assert(address == makeLineAddress(address));
int64_t cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
- if(loc == -1) return NULL;
+ if (loc == -1) return NULL;
return m_cache[cacheSet][loc];
}
@@ -334,7 +334,7 @@ CacheMemory::lookup(Addr address) const
assert(address == makeLineAddress(address));
int64_t cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
- if(loc == -1) return NULL;
+ if (loc == -1) return NULL;
return m_cache[cacheSet][loc];
}
@@ -345,7 +345,7 @@ CacheMemory::setMRU(Addr address)
int64_t cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
- if(loc != -1)
+ if (loc != -1)
m_replacementPolicy_ptr->touch(cacheSet, loc, curTick());
}
@@ -363,7 +363,7 @@ CacheMemory::setMRU(Addr address, int occupancy)
int64_t cacheSet = addressToCacheSet(address);
int loc = findTagInSet(cacheSet, address);
- if(loc != -1) {
+ if (loc != -1) {
if (m_replacementPolicy_ptr->useOccupancy()) {
(static_cast<WeightedLRUPolicy*>(m_replacementPolicy_ptr))->
touch(cacheSet, loc, curTick(), occupancy);
@@ -380,7 +380,7 @@ CacheMemory::getReplacementWeight(int64_t set, int64_t loc)
assert(set < m_cache_num_sets);
assert(loc < m_cache_assoc);
int ret = 0;
- if(m_cache[set][loc] != NULL) {
+ if (m_cache[set][loc] != NULL) {
ret = m_cache[set][loc]->getNumValidBlocks();
assert(ret >= 0);
}
diff --git a/src/mem/ruby/structures/PseudoLRUPolicy.cc b/src/mem/ruby/structures/PseudoLRUPolicy.cc
index a2b21a625..954e7444a 100644
--- a/src/mem/ruby/structures/PseudoLRUPolicy.cc
+++ b/src/mem/ruby/structures/PseudoLRUPolicy.cc
@@ -51,7 +51,7 @@ PseudoLRUPolicy::PseudoLRUPolicy(const Params * p)
int tmp_assoc = m_effective_assoc;
while (true) {
tmp_assoc /= 2;
- if(!tmp_assoc) break;
+ if (!tmp_assoc) break;
m_num_levels++;
}
assert(m_num_levels < sizeof(unsigned int)*4);
diff --git a/src/mem/ruby/structures/RubyMemoryControl.cc b/src/mem/ruby/structures/RubyMemoryControl.cc
index 77f1c239f..095b2e306 100644
--- a/src/mem/ruby/structures/RubyMemoryControl.cc
+++ b/src/mem/ruby/structures/RubyMemoryControl.cc
@@ -639,7 +639,7 @@ DrainState
RubyMemoryControl::drain()
{
DPRINTF(RubyMemory, "MemoryController drain\n");
- if(m_event.scheduled()) {
+ if (m_event.scheduled()) {
deschedule(m_event);
}
return DrainState::Drained;
diff --git a/src/mem/ruby/structures/TBETable.hh b/src/mem/ruby/structures/TBETable.hh
index a39c5af2e..b6ee5d7c9 100644
--- a/src/mem/ruby/structures/TBETable.hh
+++ b/src/mem/ruby/structures/TBETable.hh
@@ -110,7 +110,7 @@ template<class ENTRY>
inline ENTRY*
TBETable<ENTRY>::lookup(Addr address)
{
- if(m_map.find(address) != m_map.end()) return &(m_map.find(address)->second);
+ if (m_map.find(address) != m_map.end()) return &(m_map.find(address)->second);
return NULL;
}