From a60d7d419da2b0a9ad902bd4d2a7407fc0950d89 Mon Sep 17 00:00:00 2001 From: Yunsup Lee Date: Mon, 20 Nov 2017 13:05:44 -0800 Subject: [PATCH] icache: add a couple cover points for I$ and ITIM iteraction --- src/main/scala/rocket/ICache.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/scala/rocket/ICache.scala b/src/main/scala/rocket/ICache.scala index a922280a..426bcbfa 100644 --- a/src/main/scala/rocket/ICache.scala +++ b/src/main/scala/rocket/ICache.scala @@ -297,6 +297,17 @@ class ICacheModule(outer: ICache) extends LazyModuleImp(outer) invalidate := true } scratchpadOn := enable + + val itim_allocated = !scratchpadOn && enable + val itim_deallocated = scratchpadOn && !enable + val itim_increase = scratchpadOn && enable && scratchpadLine(a.address) > scratchpadMax.get + val refilling = refill_valid && refill_cnt > 0 + ccover(itim_allocated, "ITIM_ALLOCATE", "ITIM allocated") + ccover(itim_allocated && refilling, "ITIM_ALLOCATE_WHILE_REFILL", "ITIM allocated while I$ refill") + ccover(itim_deallocated, "ITIM_DEALLOCATE", "ITIM deallocated") + ccover(itim_deallocated && refilling, "ITIM_DEALLOCATE_WHILE_REFILL", "ITIM deallocated while I$ refill") + ccover(itim_increase, "ITIM_SIZE_INCREASE", "ITIM size increased") + ccover(itim_increase && refilling, "ITIM_SIZE_INCREASE_WHILE_REFILL", "ITIM size increased while I$ refill") } }