Commit c69f304a authored by Yuxiao Mao's avatar Yuxiao Mao
Browse files

Matana: remove unused MMIO registers for area

parent 042536b4
...@@ -150,14 +150,14 @@ class DetectPatternRopInternal(params: DetectPatternRopParams)(implicit mp: Mata ...@@ -150,14 +150,14 @@ class DetectPatternRopInternal(params: DetectPatternRopParams)(implicit mp: Mata
override def regmap(offset: Int) = override def regmap(offset: Int) =
RegmapUtil.readValueMax(countjalr1, in.resetCounters, mp.counterWidth, offset, "CountRopJalr1") ++ RegmapUtil.readValueMax(countjalr1, in.resetCounters, mp.counterWidth, offset, "CountRopJalr1") ++
RegmapUtil.readValueMax(countjalr2, in.resetCounters, mp.counterWidth, offset + 0x8, "CountRopJalr2") ++ //RegmapUtil.readValueMax(countjalr2, in.resetCounters, mp.counterWidth, offset + 0x8, "CountRopJalr2") ++
RegmapUtil.readValueMax(countjalr3, in.resetCounters, mp.counterWidth, offset + 0x10, "CountRopJalr3") ++ //RegmapUtil.readValueMax(countjalr3, in.resetCounters, mp.counterWidth, offset + 0x10, "CountRopJalr3") ++
RegmapUtil.readValueMax(countjalr4, in.resetCounters, mp.counterWidth, offset + 0x18, "CountRopJalr4") ++ //RegmapUtil.readValueMax(countjalr4, in.resetCounters, mp.counterWidth, offset + 0x18, "CountRopJalr4") ++
RegmapUtil.readValueMax(countjalr5, in.resetCounters, mp.counterWidth, offset + 0x20, "CountRopJalr5") ++ //RegmapUtil.readValueMax(countjalr5, in.resetCounters, mp.counterWidth, offset + 0x20, "CountRopJalr5") ++
RegmapUtil.readValueMax(countjalr6, in.resetCounters, mp.counterWidth, offset + 0x28, "CountRopJalr6") ++ //RegmapUtil.readValueMax(countjalr6, in.resetCounters, mp.counterWidth, offset + 0x28, "CountRopJalr6") ++
RegmapUtil.readValueMax(countjalr7, in.resetCounters, mp.counterWidth, offset + 0x30, "CountRopJalr7") ++ RegmapUtil.readValueMax(countjalr7, in.resetCounters, mp.counterWidth, offset + 0x30, "CountRopJalr7") ++
RegmapUtil.readValueMax(countjalr8, in.resetCounters, mp.counterWidth, offset + 0x38, "CountRopJalr8") ++ //RegmapUtil.readValueMax(countjalr8, in.resetCounters, mp.counterWidth, offset + 0x38, "CountRopJalr8") ++
RegmapUtil.readValueMax(countjalr9, in.resetCounters, mp.counterWidth, offset + 0x40, "CountRopJalr9") ++ //RegmapUtil.readValueMax(countjalr9, in.resetCounters, mp.counterWidth, offset + 0x40, "CountRopJalr9") ++
Nil Nil
} }
......
...@@ -189,26 +189,23 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams) ...@@ -189,26 +189,23 @@ class MatanaSlowDetectionImp(outer: MatanaSlowDetection, params: MatanaParams)
RegField(mp.pidWidth, monitorPidMin, RegField(mp.pidWidth, monitorPidMin,
RegFieldDesc("monitorPidMin", RegFieldDesc("monitorPidMin",
"Monitor all process with PID >= monitorPidMin.", "Monitor all process with PID >= monitorPidMin.",
reset=Some(60)))), reset=Some(60))))
0xA0 -> Seq(
RegField.r(mp.addrWidth, lastPC,
RegFieldDesc("lastPC", "Last valid input PC.", reset=Some(0))))
) )
// Combine all regmap // Combine all regmap
val regmapFinal = val regmapFinal =
regmap0 ++ regmap0 ++
// Debug for control signal // Debug for control signal
RegmapUtil.countEvent(reg_pid_change, resetCounters, 0x20, "PidChange") ++ //RegmapUtil.countEvent(reg_pid_change, resetCounters, 0x20, "PidChange") ++
RegmapUtil.countEvent(reg_pid_change_monitored, resetCounters, 0x24, "PidChangeMonitored") ++ //RegmapUtil.countEvent(reg_pid_change_monitored, resetCounters, 0x24, "PidChangeMonitored") ++
// Internal State // Internal State
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 && isMonitoring, 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") ++
detectPatternTimer.regmap(0x200) ++ detectPatternTimer.regmap(0x200) ++
detectPatternPrime.regmap(0x300) ++ detectPatternPrime.regmap(0x300) ++
detectPatternRop.regmap(0x400) ++ detectPatternRop.regmap(0x400) ++
......
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