Fix halt loop (#1094)

This commit is contained in:
wborgeaud 2023-06-13 10:42:37 +02:00 committed by GitHub
parent 01efa0130e
commit ec07255f01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -171,7 +171,7 @@ fn simulate_cpu<F: RichField + Extendable<D>, const D: usize>(
loop {
// If we've reached the kernel's halt routine, and our trace length is a power of 2, stop.
let pc = state.registers.program_counter;
let in_halt_loop = pc == halt_pc0 || pc == halt_pc1;
let in_halt_loop = state.registers.is_kernel && (pc == halt_pc0 || pc == halt_pc1);
if in_halt_loop && !already_in_halt_loop {
log::info!("CPU halted after {} cycles", state.traces.clock());
}