Commit 4303cc6a authored by Yuxiao Mao's avatar Yuxiao Mao
Browse files

Detect: regmap event active only when isMonitoring

parent 3c23055f
...@@ -78,8 +78,8 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams) ...@@ -78,8 +78,8 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams)
val reg_pid_change = RegInit(false.B) val reg_pid_change = RegInit(false.B)
val reg_pid_change_monitored = RegInit(false.B) val reg_pid_change_monitored = RegInit(false.B)
pid_change := currentPid =/= nextPid pid_change := currentPid =/= nextPid
reg_pid_change := pid_change reg_pid_change := pid_change && isMonitoring
reg_pid_change_monitored := (nextPid >= monitorPidMin) && pid_change reg_pid_change_monitored := (nextPid >= monitorPidMin) && pid_change && isMonitoring
// For the moment, we choose to monitor all pid >= monitorPidMin if detectEnable is high // For the moment, we choose to monitor all pid >= monitorPidMin if detectEnable is high
isMonitoring := detectEnable && (currentPid >= monitorPidMin) isMonitoring := detectEnable && (currentPid >= monitorPidMin)
...@@ -201,7 +201,7 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams) ...@@ -201,7 +201,7 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams)
RegmapUtil.countEvent(pack_has_valid, resetCounters, 0x100, "PackValid") ++ RegmapUtil.countEvent(pack_has_valid, resetCounters, 0x100, "PackValid") ++
RegmapUtil.countEvent(pack_has_timer, resetCounters, 0x104, "PackTimer") ++ RegmapUtil.countEvent(pack_has_timer, resetCounters, 0x104, "PackTimer") ++
RegmapUtil.countEvent(pack_has_flush, resetCounters, 0x108, "PackFlushL1D") ++ RegmapUtil.countEvent(pack_has_flush, resetCounters, 0x108, "PackFlushL1D") ++
RegmapUtil.countEvent(pack0.one_dmemaddr_valid, resetCounters, 0x10C, "DmemAddrValid") ++ RegmapUtil.countEvent(pack0.one_dmemaddr_valid && isMonitoring, resetCounters, 0x10C, "DmemAddrValid") ++
RegmapUtil.countEvent(isMonitoring, resetCounters, 0x110, "SlowCycle") ++ RegmapUtil.countEvent(isMonitoring, resetCounters, 0x110, "SlowCycle") ++
RegmapUtil.countEvent(pack_has_jalr, resetCounters, 0x114, "PackJalr") ++ RegmapUtil.countEvent(pack_has_jalr, resetCounters, 0x114, "PackJalr") ++
RegmapUtil.countEvent(pack_has_jump, resetCounters, 0x118, "PackJump") ++ RegmapUtil.countEvent(pack_has_jump, resetCounters, 0x118, "PackJump") ++
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment