diff options
author | Steve Reinhardt <stever@gmail.com> | 2008-06-21 01:04:43 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@gmail.com> | 2008-06-21 01:04:43 -0400 |
commit | 6b45238316052f458ba9ebc9d24a91cfa9e41cf1 (patch) | |
tree | 25f6faa5422b6e44e51fbd2f50d3d969d63a1e10 /src/mem/bus.cc | |
parent | c1584e422783a33731c7dfa23517d30bcecf28bc (diff) | |
download | gem5-6b45238316052f458ba9ebc9d24a91cfa9e41cf1.tar.xz |
Generate more useful error messages for unconnected ports.
Force all non-default ports to provide a name and an
owner in the constructor.
Diffstat (limited to 'src/mem/bus.cc')
-rw-r--r-- | src/mem/bus.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mem/bus.cc b/src/mem/bus.cc index 3bf1c6cfc..9dd3353fd 100644 --- a/src/mem/bus.cc +++ b/src/mem/bus.cc @@ -72,8 +72,8 @@ Bus::getPort(const std::string &if_name, int idx) return bp; } -void -Bus::deletePortRefs(Port *p) +bool +Bus::deletePort(Port *p) { BusPort *bp = dynamic_cast<BusPort*>(p); @@ -81,10 +81,11 @@ Bus::deletePortRefs(Port *p) panic("Couldn't convert Port* to BusPort*\n"); // If this is our one functional port if (funcPort == bp) - return; + return false; interfaces.erase(bp->getId()); clearBusCache(); delete bp; + return true; } /** Get the ranges of anyone other buses that we are connected to. */ |