summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/RubyPort.hh
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:18 -0800
committerBrad Beckmann <Brad.Beckmann@amd.com>2011-02-06 22:14:18 -0800
commit2da54d1285a506c3ba01ff8cdcaa95fcdfccccdb (patch)
treee6e4a3af3bb67924e1de34adfdf034952552dfe5 /src/mem/ruby/system/RubyPort.hh
parentdedb4fbf058c96597cd48e506e4a3479b192d9aa (diff)
downloadgem5-2da54d1285a506c3ba01ff8cdcaa95fcdfccccdb.tar.xz
ruby: Fix RubyPort to properly handle retrys
Diffstat (limited to 'src/mem/ruby/system/RubyPort.hh')
-rw-r--r--src/mem/ruby/system/RubyPort.hh25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/mem/ruby/system/RubyPort.hh b/src/mem/ruby/system/RubyPort.hh
index a2316781a..a96e9f6ac 100644
--- a/src/mem/ruby/system/RubyPort.hh
+++ b/src/mem/ruby/system/RubyPort.hh
@@ -50,12 +50,19 @@ class RubyPort : public MemObject
{
private:
RubyPort *ruby_port;
+ bool _onRetryList;
public:
M5Port(const std::string &_name, RubyPort *_port);
bool sendTiming(PacketPtr pkt);
void hitCallback(PacketPtr pkt);
unsigned deviceBlockSize() const;
+
+ bool onRetryList()
+ { return _onRetryList; }
+
+ void onRetryList(bool newVal)
+ { _onRetryList = newVal; }
protected:
virtual bool recvTiming(PacketPtr pkt);
@@ -118,14 +125,32 @@ class RubyPort : public MemObject
AbstractController* m_controller;
MessageBuffer* m_mandatory_q_ptr;
PioPort* pio_port;
+ bool m_usingRubyTester;
private:
+ void addToRetryList(M5Port * port)
+ {
+ if (!port->onRetryList()) {
+ port->onRetryList(true);
+ retryList.push_back(port);
+ waitingOnSequencer = true;
+ }
+ }
+
uint16_t m_port_id;
uint64_t m_request_cnt;
M5Port* physMemPort;
PhysicalMemory* physmem;
+
+ //
+ // Based on similar code in the M5 bus. Stores pointers to those ports
+ // that should be called when the Sequencer becomes available after a stall.
+ //
+ std::list<M5Port*> retryList;
+
+ bool waitingOnSequencer;
};
#endif // __MEM_RUBY_SYSTEM_RUBYPORT_HH__