From d6ede818eea81ce5641836052edaed437634b9b2 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 3 Nov 2017 15:37:48 -0700 Subject: [PATCH] DTIM doesn't accept grants --- src/main/scala/rocket/DCache.scala | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/scala/rocket/DCache.scala b/src/main/scala/rocket/DCache.scala index ab43abd3..a00d1606 100644 --- a/src/main/scala/rocket/DCache.scala +++ b/src/main/scala/rocket/DCache.scala @@ -434,7 +434,15 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) { // grant val (d_first, d_last, d_done, d_address_inc) = edge.addr_inc(tl_out.d) - val grantIsCached = tl_out.d.bits.opcode.isOneOf(Grant, GrantData) + val grantIsCached = { + val res = tl_out.d.bits.opcode.isOneOf(Grant, GrantData) + if (usingDataScratchpad) { + assert(!(tl_out.d.valid && res)) + false.B + } else { + res + } + } val grantIsUncached = tl_out.d.bits.opcode.isOneOf(AccessAck, AccessAckData, HintAck) val grantIsUncachedData = tl_out.d.bits.opcode === AccessAckData val grantIsVoluntary = tl_out.d.bits.opcode === ReleaseAck // Clears a different pending bit