summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/RubyPort.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-03-02 09:16:50 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2012-03-02 09:16:50 -0500
commitadc419a13a698414a0623ce286cafebcdf2f272e (patch)
treec23df45d74fc761927fe7adc20a2b32ef55855fa /src/mem/ruby/system/RubyPort.cc
parentb129d7ce00a2cb6f0bbdcee90f0202cda8449117 (diff)
downloadgem5-adc419a13a698414a0623ce286cafebcdf2f272e.tar.xz
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 (limited to 'src/mem/ruby/system/RubyPort.cc')
-rw-r--r--src/mem/ruby/system/RubyPort.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index c55b4a2c2..aff129b50 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -188,7 +188,7 @@ RubyPort::M5Port::recvTiming(PacketPtr pkt)
"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 @@ RubyPort::M5Port::hitCallback(PacketPtr pkt)
// 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 @@ RubyPort::M5Port::hitCallback(PacketPtr pkt)
}
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 @@ RubyPort::M5Port::sendTiming(PacketPtr pkt)
}
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 @@ RubyPort::ruby_eviction_callback(const Address& address)
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);
}
}