summaryrefslogtreecommitdiff
path: root/src/mem/cache
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@gmail.com>2008-06-21 01:04:43 -0400
committerSteve Reinhardt <stever@gmail.com>2008-06-21 01:04:43 -0400
commit6b45238316052f458ba9ebc9d24a91cfa9e41cf1 (patch)
tree25f6faa5422b6e44e51fbd2f50d3d969d63a1e10 /src/mem/cache
parentc1584e422783a33731c7dfa23517d30bcecf28bc (diff)
downloadgem5-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/cache')
-rw-r--r--src/mem/cache/cache.hh2
-rw-r--r--src/mem/cache/cache_impl.hh5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh
index 88c9deb7b..56ae811a3 100644
--- a/src/mem/cache/cache.hh
+++ b/src/mem/cache/cache.hh
@@ -217,7 +217,7 @@ class Cache : public BaseCache
Cache(const Params *p, TagStore *tags, BasePrefetcher *prefetcher);
virtual Port *getPort(const std::string &if_name, int idx = -1);
- virtual void deletePortRefs(Port *p);
+ virtual bool deletePort(Port *p);
void regStats();
diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh
index 3b56c0a2e..a3dae7b2a 100644
--- a/src/mem/cache/cache_impl.hh
+++ b/src/mem/cache/cache_impl.hh
@@ -105,13 +105,14 @@ Cache<TagStore>::getPort(const std::string &if_name, int idx)
}
template<class TagStore>
-void
-Cache<TagStore>::deletePortRefs(Port *p)
+bool
+Cache<TagStore>::deletePort(Port *p)
{
if (cpuSidePort == p || memSidePort == p)
panic("Can only delete functional ports\n");
delete p;
+ return true;
}