summaryrefslogtreecommitdiff
path: root/src/mem/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/ruby')
-rw-r--r--src/mem/ruby/system/RubyPort.cc15
-rw-r--r--src/mem/ruby/system/RubyPort.hh10
2 files changed, 14 insertions, 11 deletions
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index aff129b50..aca6604c6 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -98,21 +98,18 @@ RubyPort::getPort(const std::string &if_name, int idx)
RubyPort::PioPort::PioPort(const std::string &_name,
RubyPort *_port)
- : SimpleTimingPort(_name, _port)
+ : QueuedPort(_name, _port, queue), queue(*_port, *this), ruby_port(_port)
{
DPRINTF(RubyPort, "creating port to ruby sequencer to cpu %s\n", _name);
- ruby_port = _port;
}
RubyPort::M5Port::M5Port(const std::string &_name, RubyPort *_port,
RubySystem *_system, bool _access_phys_mem)
- : SimpleTimingPort(_name, _port)
+ : QueuedPort(_name, _port, queue), queue(*_port, *this),
+ ruby_port(_port), ruby_system(_system),
+ _onRetryList(false), access_phys_mem(_access_phys_mem)
{
DPRINTF(RubyPort, "creating port from ruby sequcner to cpu %s\n", _name);
- ruby_port = _port;
- ruby_system = _system;
- _onRetryList = false;
- access_phys_mem = _access_phys_mem;
}
Tick
@@ -648,7 +645,7 @@ bool
RubyPort::M5Port::sendNextCycle(PacketPtr pkt)
{
//minimum latency, must be > 0
- schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
+ queue.schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
return true;
}
@@ -656,7 +653,7 @@ bool
RubyPort::PioPort::sendNextCycle(PacketPtr pkt)
{
//minimum latency, must be > 0
- schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
+ queue.schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
return true;
}
diff --git a/src/mem/ruby/system/RubyPort.hh b/src/mem/ruby/system/RubyPort.hh
index 4aa132131..bef291d63 100644
--- a/src/mem/ruby/system/RubyPort.hh
+++ b/src/mem/ruby/system/RubyPort.hh
@@ -46,9 +46,11 @@ class AbstractController;
class RubyPort : public MemObject
{
public:
- class M5Port : public SimpleTimingPort
+ class M5Port : public QueuedPort
{
private:
+
+ PacketQueue queue;
RubyPort *ruby_port;
RubySystem* ruby_system;
bool _onRetryList;
@@ -81,9 +83,12 @@ class RubyPort : public MemObject
friend class M5Port;
- class PioPort : public SimpleTimingPort
+ class PioPort : public QueuedPort
{
private:
+
+ PacketQueue queue;
+
RubyPort *ruby_port;
public:
@@ -93,6 +98,7 @@ class RubyPort : public MemObject
protected:
virtual bool recvTiming(PacketPtr pkt);
virtual Tick recvAtomic(PacketPtr pkt);
+ virtual void recvFunctional(PacketPtr pkt) { }
};
friend class PioPort;