diff options
author | Joel Hestness <jthestness@gmail.com> | 2015-05-19 10:56:51 -0500 |
---|---|---|
committer | Joel Hestness <jthestness@gmail.com> | 2015-05-19 10:56:51 -0500 |
commit | 0479569f6748202f1704d70aad3b03b3d17f6092 (patch) | |
tree | 12ed286bef31c4eb74d9ff7ae8e2f4613fafda10 /src/mem/ruby/slicc_interface | |
parent | 99d3fa594565660d8d51fbda005e3c2213723fef (diff) | |
download | gem5-0479569f6748202f1704d70aad3b03b3d17f6092.tar.xz |
ruby: Fix RubySystem warm-up and cool-down scope
The processes of warming up and cooling down Ruby caches are simulation-wide
processes, not just RubySystem instance-specific processes. Thus, the warm-up
and cool-down variables should be globally visible to any Ruby components
participating in either process. Make these variables static members and track
the warm-up and cool-down processes as appropriate.
This patch also has two side benefits:
1) It removes references to the RubySystem g_system_ptr, which are problematic
for allowing multiple RubySystem instances in a single simulation. Warmup and
cooldown variables being static (global) reduces the need for instance-specific
dereferences through the RubySystem.
2) From the AbstractController, it removes local RubySystem pointers, which are
used inconsistently with other uses of the RubySystem: 11 other uses reference
the RubySystem with the g_system_ptr. Only sequencers have local pointers.
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r-- | src/mem/ruby/slicc_interface/AbstractController.cc | 7 | ||||
-rw-r--r-- | src/mem/ruby/slicc_interface/AbstractController.hh | 3 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc index 4290c63fa..a6d05fd3a 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.cc +++ b/src/mem/ruby/slicc_interface/AbstractController.cc @@ -40,8 +40,7 @@ AbstractController::AbstractController(const Params *p) m_transitions_per_cycle(p->transitions_per_cycle), m_buffer_size(p->buffer_size), m_recycle_latency(p->recycle_latency), memoryPort(csprintf("%s.memory", name()), this, ""), - m_responseFromMemory_ptr(new MessageBuffer()), - m_rubySystem(p->ruby_system) + m_responseFromMemory_ptr(new MessageBuffer()) { // Set the sender pointer of the response message buffer from the // memory controller. @@ -219,7 +218,7 @@ AbstractController::queueMemoryRead(const MachineID &id, Address addr, pkt->pushSenderState(s); // Use functional rather than timing accesses during warmup - if (m_rubySystem->m_warmup_enabled) { + if (RubySystem::getWarmupEnabled()) { memoryPort.sendFunctional(pkt); recvTimingResp(pkt); return; @@ -246,7 +245,7 @@ AbstractController::queueMemoryWrite(const MachineID &id, Address addr, pkt->pushSenderState(s); // Use functional rather than timing accesses during warmup - if (m_rubySystem->m_warmup_enabled) { + if (RubySystem::getWarmupEnabled()) { memoryPort.sendFunctional(pkt); recvTimingResp(pkt); return; diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh index 01859397a..f8970fb59 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.hh +++ b/src/mem/ruby/slicc_interface/AbstractController.hh @@ -205,9 +205,6 @@ class AbstractController : public MemObject, public Consumer // memory controller. MessageBuffer *m_responseFromMemory_ptr; - // Needed so we know if we are warming up - RubySystem *m_rubySystem; - // State that is stored in packets sent to the memory controller. struct SenderState : public Packet::SenderState { |