Currently the Ruby System maintains pointer to only one of the memory
controllers. But there can be multiple controllers in the system. This
patch adds a vector of memory controllers.
void
RubySystem::registerMemController(MemoryControl *mc) {
- m_memory_controller = mc;
+ m_memory_controller_vec.push_back(mc);
}
RubySystem::~RubySystem()
delete m_cache_recorder;
m_cache_recorder = NULL;
m_warmup_enabled = false;
+
// reset DRAM so that it's not waiting for events on the old event
// queue
- m_memory_controller->reset();
+ for (int i = 0; i < m_memory_controller_vec.size(); ++i) {
+ m_memory_controller_vec[i]->reset();
+ }
+
// Restore eventq head
eventq_head = eventq->replaceHead(eventq_head);
// Restore curTick and Ruby System's clock
static int m_memory_size_bits;
Network* m_network_ptr;
- MemoryControl *m_memory_controller;
+ std::vector<MemoryControl *> m_memory_controller_vec;
+ std::vector<AbstractController *> m_abs_cntrl_vec;
public:
Profiler* m_profiler_ptr;
MemoryVector* m_mem_vec_ptr;
- std::vector<AbstractController*> m_abs_cntrl_vec;
bool m_warmup_enabled;
bool m_cooldown_enabled;
CacheRecorder* m_cache_recorder;