Insist that PhysicalMemory object have at least one connection.
authorSteve Reinhardt <stever@eecs.umich.edu>
Mon, 21 May 2007 01:23:05 +0000 (18:23 -0700)
committerSteve Reinhardt <stever@eecs.umich.edu>
Mon, 21 May 2007 01:23:05 +0000 (18:23 -0700)
--HG--
extra : convert_revision : 36c33d25a3b23ac2094577aa504c24fac0f3ffcc

src/mem/physical.cc

index a49959e51700ddd4e4f18fdf44bf45ff93a78538..97c42509fb02c245a78396e0cef77710ed0fc11d 100644 (file)
@@ -76,6 +76,10 @@ PhysicalMemory::PhysicalMemory(Params *p)
 void
 PhysicalMemory::init()
 {
+    if (ports.size() == 0) {
+        fatal("PhysicalMemory object %s is unconnected!", name());
+    }
+
     for (PortIterator pi = ports.begin(); pi != ports.end(); ++pi) {
         if (*pi)
             (*pi)->sendStatusChange(Port::RangeChange);