From 9af86633d762a79c95130371a84bd7b0dc60b928 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Fri, 17 Feb 2012 17:56:01 -0800 Subject: [PATCH] invalidate I$ prefetcher when invalidating I$ --- rocket/src/main/scala/icache_prefetch.scala | 5 +++++ rocket/src/main/scala/top.scala | 1 + 2 files changed, 6 insertions(+) diff --git a/rocket/src/main/scala/icache_prefetch.scala b/rocket/src/main/scala/icache_prefetch.scala index b69f03a0..1d0615aa 100644 --- a/rocket/src/main/scala/icache_prefetch.scala +++ b/rocket/src/main/scala/icache_prefetch.scala @@ -19,6 +19,7 @@ class ioIPrefetcherMem(view: List[String] = null) extends Bundle (view) class ioIPrefetcher extends Bundle() { val icache = new ioICache(); val mem = new ioIPrefetcherMem(); + val invalidate = Bool(INPUT) } class rocketIPrefetcher extends Component() { @@ -84,6 +85,10 @@ class rocketIPrefetcher extends Component() { when (fill_done.toBool & ip_mem_resp_val.toBool) { state := s_req_wait; } } } + + when (io.invalidate) { + state := s_invalid + } } } diff --git a/rocket/src/main/scala/top.scala b/rocket/src/main/scala/top.scala index ec40a7c7..a3b1f5c5 100644 --- a/rocket/src/main/scala/top.scala +++ b/rocket/src/main/scala/top.scala @@ -30,6 +30,7 @@ class Top() extends Component { cpu.io.debug <> io.debug; cpu.io.console <> io.console; + icache_pf.io.invalidate := cpu.io.imem.invalidate icache.io.mem <> icache_pf.io.icache; cpu.io.imem <> icache.io.cpu; cpu.io.vimem <> vicache.io.cpu;