From 3025da0bf1243cd387b027a52862d76d327cfb6b Mon Sep 17 00:00:00 2001 From: Wei Song Date: Thu, 27 Jun 2024 11:42:18 +0800 Subject: [PATCH] add an upper limit check for inner coherent client --- cache/coherence.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cache/coherence.hpp b/cache/coherence.hpp index b10777a..a5fa171 100644 --- a/cache/coherence.hpp +++ b/cache/coherence.hpp @@ -67,6 +67,8 @@ class InnerCohPortBase return std::make_pair(-1, policy); } else { coh.push_back(c); + assert(coh.size() <= 64 || 0 == + "Only 64 coherent inner caches are supported for now as the directory in class MetadataDirectoryBase is implemented as a 64-bit bitmap."); return std::make_pair(coh.size()-1, policy); } }