From: Steve Reinhardt Date: Mon, 21 May 2007 01:23:05 +0000 (-0700) Subject: Insist that PhysicalMemory object have at least one connection. X-Git-Tag: m5_2.0_beta4~396^2~4 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=87adc37e91784575d44572d2520b1adf115fc931;p=gem5.git Insist that PhysicalMemory object have at least one connection. --HG-- extra : convert_revision : 36c33d25a3b23ac2094577aa504c24fac0f3ffcc --- 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);