From 008b2fa47db4d04941a2bd6d512a204d76cbfea8 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sun, 22 Jan 2023 12:33:01 -0800 Subject: Add deadman timer (only ten cycles!) based on time between interruptable points. --- uarch/core.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'uarch/core.cpp') diff --git a/uarch/core.cpp b/uarch/core.cpp index 503e286..ce58df2 100644 --- a/uarch/core.cpp +++ b/uarch/core.cpp @@ -364,6 +364,9 @@ bail_out: if (interrupt || oldctlregs != ctlregs) if (!restarttr.has_value()) restarttr = infra::pt::toplevel(); + cycles_since_progress = 0; + } else { + assert(++cycles_since_progress < 10); } if (restarttr.has_value()) { -- cgit v1.2.3