changeset 9e2a4cf89be6 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9e2a4cf89be6
description:
Ruby: Rename RubyPort::sendTiming to avoid overriding base class
This patch renames the sendTiming member function in the RubyPort to
avoid inadvertently hiding Port::sendTiming (discovered through some
rather painful debugging). The RubyPort does, in fact, rely on the
functionality of the queued port and the implementation merely
schedules a send the next cycle. The new name for the member function
is sendNextCycle to better reflect this behaviour.
In the unlikely event that we ever shift to using C++11 the member
functions in Port should have a "final" identifier to prevent any
overriding in derived classes.
diffstat:
src/mem/ruby/system/RubyPort.cc | 10 +++++-----
src/mem/ruby/system/RubyPort.hh | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diffs (68 lines):
diff -r f349cc840cab -r 9e2a4cf89be6 src/mem/ruby/system/RubyPort.cc
--- a/src/mem/ruby/system/RubyPort.cc Fri Mar 02 08:18:19 2012 -0600
+++ b/src/mem/ruby/system/RubyPort.cc Fri Mar 02 09:16:50 2012 -0500
@@ -188,7 +188,7 @@
"Request for address 0x%#x is assumed to be a pio request\n",
pkt->getAddr());
- return ruby_port->pio_port.sendTiming(pkt);
+ return ruby_port->pio_port.sendNextCycle(pkt);
}
assert(Address(pkt->getAddr()).getOffset() + pkt->getSize() <=
@@ -637,7 +637,7 @@
// turn packet around to go back to requester if response expected
if (needsResponse) {
DPRINTF(RubyPort, "Sending packet back over port\n");
- sendTiming(pkt);
+ sendNextCycle(pkt);
} else {
delete pkt;
}
@@ -645,7 +645,7 @@
}
bool
-RubyPort::M5Port::sendTiming(PacketPtr pkt)
+RubyPort::M5Port::sendNextCycle(PacketPtr pkt)
{
//minimum latency, must be > 0
schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
@@ -653,7 +653,7 @@
}
bool
-RubyPort::PioPort::sendTiming(PacketPtr pkt)
+RubyPort::PioPort::sendNextCycle(PacketPtr pkt)
{
//minimum latency, must be > 0
schedSendTiming(pkt, curTick() + (1 * g_eventQueue_ptr->getClock()));
@@ -690,6 +690,6 @@
Request req(address.getAddress(), 0, 0, Request::funcMasterId);
for (CpuPortIter it = cpu_ports.begin(); it != cpu_ports.end(); it++) {
Packet *pkt = new Packet(&req, MemCmd::InvalidationReq, -1);
- (*it)->sendTiming(pkt);
+ (*it)->sendNextCycle(pkt);
}
}
diff -r f349cc840cab -r 9e2a4cf89be6 src/mem/ruby/system/RubyPort.hh
--- a/src/mem/ruby/system/RubyPort.hh Fri Mar 02 08:18:19 2012 -0600
+++ b/src/mem/ruby/system/RubyPort.hh Fri Mar 02 09:16:50 2012 -0500
@@ -57,7 +57,7 @@
public:
M5Port(const std::string &_name, RubyPort *_port,
RubySystem*_system, bool _access_phys_mem);
- bool sendTiming(PacketPtr pkt);
+ bool sendNextCycle(PacketPtr pkt);
void hitCallback(PacketPtr pkt);
void evictionCallback(const Address& address);
unsigned deviceBlockSize() const;
@@ -88,7 +88,7 @@
public:
PioPort(const std::string &_name, RubyPort *_port);
- bool sendTiming(PacketPtr pkt);
+ bool sendNextCycle(PacketPtr pkt);
protected:
virtual bool recvTiming(PacketPtr pkt);
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev