From 87adc37e91784575d44572d2520b1adf115fc931 Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Sun, 20 May 2007 18:23:05 -0700 Subject: [PATCH] Insist that PhysicalMemory object have at least one connection. --HG-- extra : convert_revision : 36c33d25a3b23ac2094577aa504c24fac0f3ffcc --- src/mem/physical.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/mem/physical.cc b/src/mem/physical.cc index a49959e51..97c42509f 100644 --- a/src/mem/physical.cc +++ b/src/mem/physical.cc @@ -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); -- 2.30.2