From 052c8dd60222f18acf7461067d403ea1f53636f7 Mon Sep 17 00:00:00 2001 From: Charles Papon Date: Fri, 20 Dec 2019 00:21:55 +0100 Subject: [PATCH] Fix inWfi naming, fix regressions --- src/main/scala/vexriscv/plugin/CsrPlugin.scala | 3 ++- src/test/cpp/regression/main.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/scala/vexriscv/plugin/CsrPlugin.scala b/src/main/scala/vexriscv/plugin/CsrPlugin.scala index 77ea091..e707c01 100644 --- a/src/main/scala/vexriscv/plugin/CsrPlugin.scala +++ b/src/main/scala/vexriscv/plugin/CsrPlugin.scala @@ -388,6 +388,8 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep override def setup(pipeline: VexRiscv): Unit = { import pipeline.config._ + inWfi = False.addTag(Verilator.public) + thirdPartyWake = False val defaultEnv = List[(Stageable[_ <: BaseType],Any)]( @@ -911,7 +913,6 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep execute plug new Area{ import execute._ //Manage WFI instructions - inWfi = False.addTag(Verilator.public) if(wfiOutput) out(inWfi) val wfiWake = RegNext(interruptSpecs.map(_.cond).orR || thirdPartyWake) init(False) if(wfiGenAsWait) when(arbitration.isValid && input(ENV_CTRL) === EnvCtrlEnum.WFI){ diff --git a/src/test/cpp/regression/main.cpp b/src/test/cpp/regression/main.cpp index 421a433..75f06bd 100644 --- a/src/test/cpp/regression/main.cpp +++ b/src/test/cpp/regression/main.cpp @@ -1548,7 +1548,7 @@ public: riscvRef.ipInput |= top->externalInterruptS << 9; #endif - riscvRef.liveness(top->VexRiscv->execute_CsrPlugin_inWfi); + riscvRef.liveness(top->VexRiscv->CsrPlugin_inWfi); if(top->VexRiscv->CsrPlugin_interruptJump){ if(riscvRefEnable) riscvRef.trap(true, top->VexRiscv->CsrPlugin_interrupt_code); }