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); } } }