From 375a0392794619bee7380dd2b6d66eb3efdf9c68 Mon Sep 17 00:00:00 2001 From: Megan Wachs Date: Tue, 28 Mar 2017 21:14:22 -0700 Subject: [PATCH] debug: Use proper write-1-to-clear ABSTRACTCS.cmderr behavior (because fesvr code is using correct spec) --- src/main/scala/uncore/devices/debug/Debug.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/scala/uncore/devices/debug/Debug.scala b/src/main/scala/uncore/devices/debug/Debug.scala index 6ae5522e..657a1b9c 100644 --- a/src/main/scala/uncore/devices/debug/Debug.scala +++ b/src/main/scala/uncore/devices/debug/Debug.scala @@ -617,8 +617,8 @@ class TLDebugModuleInner(device: Device, getNComponents: () => Int)(implicit p: ABSTRACTCSReg.cmderr := DebugAbstractCommandError.ErrHaltResume.id.U }.otherwise { //TODO: Should be write-1-to-clear & ~ABSTRACTCSWrData.cmderr - when (ABSTRACTCSWrEn && ABSTRACTCSWrData.cmderr === 0.U){ - ABSTRACTCSReg.cmderr := 0.U + when (ABSTRACTCSWrEn /* && ABSTRACTCSWrData.cmderr === 0.U*/){ + ABSTRACTCSReg.cmderr := ABSTRACTCSReg.cmderr & ~(ABSTRACTCSWrData.cmderr); } } }