From 2d2cbdbafe3af02132f0c25a7a81b0d0384b36a3 Mon Sep 17 00:00:00 2001 From: Romain Dolbeau Date: Sun, 12 Jun 2022 13:46:58 +0200 Subject: [PATCH] update ioRange; it doesn't actually affect the cache, only the MMU which we don't use... --- nubus-to-ztex-gateware/GenGoblinAccel.scala | 5 ++++- nubus-to-ztex-gateware/VexRiscv_FbAccel.v | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/nubus-to-ztex-gateware/GenGoblinAccel.scala b/nubus-to-ztex-gateware/GenGoblinAccel.scala index ca34129..a2d1129 100644 --- a/nubus-to-ztex-gateware/GenGoblinAccel.scala +++ b/nubus-to-ztex-gateware/GenGoblinAccel.scala @@ -60,7 +60,10 @@ object GenGoblinAccel { // extends App { ), new StaticMemoryTranslatorPlugin( // only cache the sdram memory - ioRange = addr => addr(31 downto 28) =/= 0x8 + ioRange = addr => ((addr(31 downto 28) =/= 0x8) & // SDRAM + (addr(31 downto 12) =/= 0xF0902) & // SRAM + (addr(31 downto 16) =/= 0xF091) // ROM + ) ), new DecoderSimplePlugin( catchIllegalInstruction = false diff --git a/nubus-to-ztex-gateware/VexRiscv_FbAccel.v b/nubus-to-ztex-gateware/VexRiscv_FbAccel.v index 62620c4..20ba344 100644 --- a/nubus-to-ztex-gateware/VexRiscv_FbAccel.v +++ b/nubus-to-ztex-gateware/VexRiscv_FbAccel.v @@ -3493,7 +3493,7 @@ module VexRiscv ( assign IBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; assign IBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; assign IBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; - assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] != 4'b1000); + assign IBusCachedPlugin_mmuBus_rsp_isIoAccess = (((IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] != 4'b1000) && (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 12] != 20'hf0902)) && (IBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 16] != 16'hf091)); assign IBusCachedPlugin_mmuBus_rsp_isPaging = 1'b0; assign IBusCachedPlugin_mmuBus_rsp_exception = 1'b0; assign IBusCachedPlugin_mmuBus_rsp_refilling = 1'b0; @@ -3502,7 +3502,7 @@ module VexRiscv ( assign DBusCachedPlugin_mmuBus_rsp_allowRead = 1'b1; assign DBusCachedPlugin_mmuBus_rsp_allowWrite = 1'b1; assign DBusCachedPlugin_mmuBus_rsp_allowExecute = 1'b1; - assign DBusCachedPlugin_mmuBus_rsp_isIoAccess = (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] != 4'b1000); + assign DBusCachedPlugin_mmuBus_rsp_isIoAccess = (((DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 28] != 4'b1000) && (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 12] != 20'hf0902)) && (DBusCachedPlugin_mmuBus_rsp_physicalAddress[31 : 16] != 16'hf091)); assign DBusCachedPlugin_mmuBus_rsp_isPaging = 1'b0; assign DBusCachedPlugin_mmuBus_rsp_exception = 1'b0; assign DBusCachedPlugin_mmuBus_rsp_refilling = 1'b0;