diff options
author | Brad Beckmann <Brad.Beckmann@amd.com> | 2015-07-20 09:15:18 -0500 |
---|---|---|
committer | Brad Beckmann <Brad.Beckmann@amd.com> | 2015-07-20 09:15:18 -0500 |
commit | 173a7869219534de5053889a84e1006281ec7645 (patch) | |
tree | 0cbd44d0669204d4fb3a551e98b1b668f8e6bee4 /src/mem/ruby/system/RubyPort.hh | |
parent | 4e6241007c514c3f90e9aeebf7cfd92853e45850 (diff) | |
download | gem5-173a7869219534de5053889a84e1006281ec7645.tar.xz |
ruby: more flexible ruby tester support
This patch allows the ruby random tester to use ruby ports that may only
support instr or data requests. This patch is similar to a previous changeset
(8932:1b2c17565ac8) that was unfortunately broken by subsequent changesets.
This current patch implements the support in a more straight-forward way.
Since retries are now tested when running the ruby random tester, this patch
splits up the retry and drain check behavior so that RubyPort children, such
as the GPUCoalescer, can perform those operations correctly without having to
duplicate code. Finally, the patch also includes better DPRINTFs for
debugging the tester.
Diffstat (limited to 'src/mem/ruby/system/RubyPort.hh')
-rw-r--r-- | src/mem/ruby/system/RubyPort.hh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/mem/ruby/system/RubyPort.hh b/src/mem/ruby/system/RubyPort.hh index 58d2558dd..07e0fde5a 100644 --- a/src/mem/ruby/system/RubyPort.hh +++ b/src/mem/ruby/system/RubyPort.hh @@ -11,7 +11,7 @@ * unmodified and in its entirety in all distributions of the software, * modified or unmodified, in source code or in binary form. * - * Copyright (c) 2009 Advanced Micro Devices, Inc. + * Copyright (c) 2009-2013 Advanced Micro Devices, Inc. * Copyright (c) 2011 Mark D. Hill and David A. Wood * All rights reserved. * @@ -76,10 +76,12 @@ class RubyPort : public MemObject private: RespPacketQueue queue; bool access_backing_store; + bool no_retry_on_stall; public: MemSlavePort(const std::string &_name, RubyPort *_port, - bool _access_backing_store, PortID id); + bool _access_backing_store, + PortID id, bool _no_retry_on_stall); void hitCallback(PacketPtr pkt); void evictionCallback(Addr address); @@ -94,6 +96,8 @@ class RubyPort : public MemObject AddrRangeList getAddrRanges() const { AddrRangeList ranges; return ranges; } + void addToRetryList(); + private: bool isPhysMemAddress(Addr addr) const; }; @@ -164,6 +168,7 @@ class RubyPort : public MemObject DrainState drain() override; protected: + void trySendRetries(); void ruby_hit_callback(PacketPtr pkt); void testDrainComplete(); void ruby_eviction_callback(Addr address); @@ -186,10 +191,14 @@ class RubyPort : public MemObject System* system; private: + bool onRetryList(MemSlavePort * port) + { + return (std::find(retryList.begin(), retryList.end(), port) != + retryList.end()); + } void addToRetryList(MemSlavePort * port) { - if (std::find(retryList.begin(), retryList.end(), port) != - retryList.end()) return; + if (onRetryList(port)) return; retryList.push_back(port); } |