summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-11-06 05:42:20 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-11-06 05:42:20 -0600
commit85c29973a3cdbbbc2ed77014a730cbc625899b03 (patch)
tree94dc98ea81cea698f2d9715f961f20bee70715e9 /src/mem/ruby/system
parent95a0b184314cf0171a20fb7e71c845891dc56496 (diff)
downloadgem5-85c29973a3cdbbbc2ed77014a730cbc625899b03.tar.xz
ruby: remove sparse memory.
In my opinion, it creates needless complications in rest of the code. Also, this structure hinders the move towards common set of code for physical memory controllers.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/System.cc30
-rw-r--r--src/mem/ruby/system/System.hh3
2 files changed, 6 insertions, 27 deletions
diff --git a/src/mem/ruby/system/System.cc b/src/mem/ruby/system/System.cc
index 0675366d1..edc739b85 100644
--- a/src/mem/ruby/system/System.cc
+++ b/src/mem/ruby/system/System.cc
@@ -109,12 +109,6 @@ RubySystem::registerAbstractController(AbstractController* cntrl)
}
void
-RubySystem::registerSparseMemory(SparseMemory* s)
-{
- m_sparse_memory_vector.push_back(s);
-}
-
-void
RubySystem::registerMemController(MemoryControl *mc) {
m_memory_controller_vec.push_back(mc);
}
@@ -160,17 +154,13 @@ void
RubySystem::serialize(std::ostream &os)
{
m_cooldown_enabled = true;
-
vector<Sequencer*> sequencer_map;
Sequencer* sequencer_ptr = NULL;
- int cntrl_id = -1;
-
for (int cntrl = 0; cntrl < m_abs_cntrl_vec.size(); cntrl++) {
sequencer_map.push_back(m_abs_cntrl_vec[cntrl]->getSequencer());
if (sequencer_ptr == NULL) {
sequencer_ptr = sequencer_map[cntrl];
- cntrl_id = cntrl;
}
}
@@ -217,23 +207,15 @@ RubySystem::serialize(std::ostream &os)
setCurTick(curtick_original);
uint8_t *raw_data = NULL;
+ uint64 memory_trace_size = m_mem_vec->collatePages(raw_data);
- if (m_mem_vec != NULL) {
- uint64 memory_trace_size = m_mem_vec->collatePages(raw_data);
-
- string memory_trace_file = name() + ".memory.gz";
- writeCompressedTrace(raw_data, memory_trace_file,
- memory_trace_size);
+ string memory_trace_file = name() + ".memory.gz";
+ writeCompressedTrace(raw_data, memory_trace_file,
+ memory_trace_size);
- SERIALIZE_SCALAR(memory_trace_file);
- SERIALIZE_SCALAR(memory_trace_size);
+ SERIALIZE_SCALAR(memory_trace_file);
+ SERIALIZE_SCALAR(memory_trace_size);
- } else {
- for (int i = 0; i < m_sparse_memory_vector.size(); ++i) {
- m_sparse_memory_vector[i]->recordBlocks(cntrl_id,
- m_cache_recorder);
- }
- }
// Aggergate the trace entries together into a single array
raw_data = new uint8_t[4096];
diff --git a/src/mem/ruby/system/System.hh b/src/mem/ruby/system/System.hh
index c909dc614..8193764dc 100644
--- a/src/mem/ruby/system/System.hh
+++ b/src/mem/ruby/system/System.hh
@@ -41,7 +41,6 @@
#include "mem/ruby/slicc_interface/AbstractController.hh"
#include "mem/ruby/structures/MemoryControl.hh"
#include "mem/ruby/structures/MemoryVector.hh"
-#include "mem/ruby/structures/SparseMemory.hh"
#include "mem/ruby/system/CacheRecorder.hh"
#include "mem/packet.hh"
#include "params/RubySystem.hh"
@@ -107,7 +106,6 @@ class RubySystem : public ClockedObject
void registerNetwork(Network*);
void registerAbstractController(AbstractController*);
- void registerSparseMemory(SparseMemory*);
void registerMemController(MemoryControl *mc);
bool eventQueueEmpty() { return eventq->empty(); }
@@ -147,7 +145,6 @@ class RubySystem : public ClockedObject
bool m_warmup_enabled;
bool m_cooldown_enabled;
CacheRecorder* m_cache_recorder;
- std::vector<SparseMemory*> m_sparse_memory_vector;
};
class RubyStatsCallback : public Callback