summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-01-17 12:55:07 -0600
committerAndreas Hansson <andreas.hansson@arm.com>2012-01-17 12:55:07 -0600
commit41af57f9fbc8220fbac8a3061ddadf4a4d942ebf (patch)
treec35bc2f0c1480e6abc183f47b2eaa0286fb2b132 /src/sim/system.cc
parent13ef7a56478fdd993a726833e14a85307446c28f (diff)
downloadgem5-41af57f9fbc8220fbac8a3061ddadf4a4d942ebf.tar.xz
MEM: Add the system port as a central access point
The system port is used as a globally reachable access point to the memory subsystem. The benefit of using an actual port is that the usual infrastructure is used to resolve any access and thus makes the overall system able to handle distributed memories in any configuration, and also makes the accesses agnostic to the address map. This patch only introduces the port and does not actually use it for anything.
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 556a919d5..bff98ace7 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011 ARM Limited
+ * Copyright (c) 2011-2012 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -78,7 +78,9 @@ vector<System *> System::systemList;
int System::numSystemsRunning = 0;
System::System(Params *p)
- : SimObject(p), physmem(p->physmem), _numContexts(0),
+ : MemObject(p), _systemPort("system_port", this),
+ physmem(p->physmem),
+ _numContexts(0),
#if FULL_SYSTEM
init_param(p->init_param),
loadAddrMask(p->load_addr_mask),
@@ -190,6 +192,13 @@ System::~System()
delete workItemStats[j];
}
+Port*
+System::getPort(const std::string &if_name, int idx)
+{
+ // no need to distinguish at the moment (besides checking)
+ return &_systemPort;
+}
+
void
System::setMemoryMode(Enums::MemoryMode mode)
{