From 3f5e771a5c271e7e865b1040515140e893723b3b Mon Sep 17 00:00:00 2001 From: Dolu1990 Date: Thu, 17 Sep 2020 22:06:29 +0200 Subject: [PATCH] dbus mmu access improvement --- src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala | 2 +- src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala | 4 +++- src/main/scala/vexriscv/plugin/SrcPlugin.scala | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala b/src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala index 0eacb27..e067c39 100644 --- a/src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala +++ b/src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala @@ -159,7 +159,7 @@ object VexRiscvSmpClusterGen { iCacheWays : Int = 2, dCacheWays : Int = 2, iBusRelax : Boolean = false, - earlyBranch : Boolean = true) = { + earlyBranch : Boolean = false) = { assert(iCacheSize/iCacheWays <= 4096, "Instruction cache ways can't be bigger than 4096 bytes") assert(dCacheSize/dCacheWays <= 4096, "Data cache ways can't be bigger than 4096 bytes") val config = VexRiscvConfig( diff --git a/src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala b/src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala index 0b580d8..2901c25 100644 --- a/src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala +++ b/src/main/scala/vexriscv/plugin/DBusCachedPlugin.scala @@ -250,8 +250,10 @@ class DBusCachedPlugin(val config : DataCacheConfig, if(twoStageMmu) { mmuBus.cmd(0).isValid := cache.io.cpu.execute.isValid mmuBus.cmd(0).isStuck := arbitration.isStuck - mmuBus.cmd(0).virtualAddress := cache.io.cpu.execute.address + mmuBus.cmd(0).virtualAddress := input(SRC_ADD).asUInt mmuBus.cmd(0).bypassTranslation := False +// KeepAttribute(mmuBus.cmd(0)) +// KeepAttribute(mmuBus.cmd(1)) } cache.io.cpu.flush.valid := arbitration.isValid && input(MEMORY_MANAGMENT) diff --git a/src/main/scala/vexriscv/plugin/SrcPlugin.scala b/src/main/scala/vexriscv/plugin/SrcPlugin.scala index 9085ed1..eb5ab1f 100644 --- a/src/main/scala/vexriscv/plugin/SrcPlugin.scala +++ b/src/main/scala/vexriscv/plugin/SrcPlugin.scala @@ -2,6 +2,7 @@ package vexriscv.plugin import vexriscv._ import spinal.core._ +import spinal.lib.KeepAttribute class SrcPlugin(separatedAddSub : Boolean = false, executeInsertion : Boolean = false, decodeAddSub : Boolean = false) extends Plugin[VexRiscv]{