From a1ebe6da4d16d77db173bcd76afa0f326c3dc7ed Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 7 Dec 2017 18:56:06 -0800 Subject: [PATCH] Prevent frontend deadlock fetching from uncacheable memory After detecting a corrupted BTB, don't speculatively update it until the next non-speculative fetch. This prevents the frontend from replaying forever. --- src/main/scala/rocket/Frontend.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/scala/rocket/Frontend.scala b/src/main/scala/rocket/Frontend.scala index 85ecbb46..6321fe9e 100644 --- a/src/main/scala/rocket/Frontend.scala +++ b/src/main/scala/rocket/Frontend.scala @@ -207,6 +207,7 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer) // a branch! Flush the BTB and the pipeline. btb.io.flush := true fq.io.enq.bits.replay := true + wrong_path := true } when (!prevTaken) {