From 5a6665e57f8b140baca0401134ff59a0574102f8 Mon Sep 17 00:00:00 2001 From: Charles Papon Date: Fri, 5 Apr 2019 20:02:57 +0200 Subject: [PATCH] Fix DataCache flush on the last line --- src/main/scala/vexriscv/ip/DataCache.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/vexriscv/ip/DataCache.scala b/src/main/scala/vexriscv/ip/DataCache.scala index 8c50d40..d4d6f14 100644 --- a/src/main/scala/vexriscv/ip/DataCache.scala +++ b/src/main/scala/vexriscv/ip/DataCache.scala @@ -448,9 +448,9 @@ class DataCache(p : DataCacheConfig) extends Component{ tagsWriteCmd.address := mmuRsp.physicalAddress(lineRange) tagsWriteCmd.way.setAll() tagsWriteCmd.data.valid := False + io.cpu.writeBack.haltIt := True when(mmuRsp.physicalAddress(lineRange) =/= wayLineCount - 1) { mmuRsp.physicalAddress.getDrivingReg(lineRange) := mmuRsp.physicalAddress(lineRange) + 1 - io.cpu.writeBack.haltIt := True } otherwise { valid := False }