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/cache | |
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/cache')
-rw-r--r-- | src/mem/cache/cache.hh | 2 | ||||
-rw-r--r-- | src/mem/cache/cache_impl.hh | 5 |
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; } |