summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/physical.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 2ca3f1c83..a49959e51 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -336,6 +336,13 @@ PhysicalMemory::doFunctionalAccess(PacketPtr pkt)
Port *
PhysicalMemory::getPort(const std::string &if_name, int idx)
{
+ // Accept request for "functional" port for backwards compatibility
+ // with places where this function is called from C++. I'd prefer
+ // to move all these into Python someday.
+ if (if_name == "functional") {
+ return new MemoryPort(csprintf("%s-functional", name()), this);
+ }
+
if (if_name != "port") {
panic("PhysicalMemory::getPort: unknown port %s requested", if_name);
}