summaryrefslogtreecommitdiff
path: root/src/mem/physical.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/physical.cc')
-rw-r--r--src/mem/physical.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/physical.cc b/src/mem/physical.cc
index 9c953e562..78181b7df 100644
--- a/src/mem/physical.cc
+++ b/src/mem/physical.cc
@@ -115,12 +115,12 @@ PhysicalMemory::PhysicalMemory(const Params *p)
void
PhysicalMemory::init()
{
- if (ports.empty()) {
- fatal("PhysicalMemory object %s is unconnected!", name());
- }
-
- for (PortIterator pi = ports.begin(); pi != ports.end(); ++pi) {
- (*pi)->sendRangeChange();
+ for (PortIterator p = ports.begin(); p != ports.end(); ++p) {
+ if (!(*p)->isConnected()) {
+ fatal("PhysicalMemory port %s is unconnected!\n", (*p)->name());
+ } else {
+ (*p)->sendRangeChange();
+ }
}
}