Skip to content

Commit

Permalink
Fix single stepping in multicore systems
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonWin committed Apr 4, 2024
1 parent f88f824 commit efe5c6c
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/vcml/core/processor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -336,15 +336,14 @@ bool processor::processor_thread_sync() {
if (is_stepping())
num_cycles = 1;

if (is_running())
if (is_running()) {
num_cycles = simulate_cycles(num_cycles);
else
if (is_stepping() && num_cycles > 0)
notify_singlestep();
if (num_cycles == 0)
wait(quantum - local_time());
} else
wait(num_cycles * clock_cycle());

if (is_stepping() && num_cycles > 0)
notify_singlestep();
if (is_running() && num_cycles == 0)
wait(quantum - local_time());
} while (!needs_sync());

sync();
Expand Down

0 comments on commit efe5c6c

Please sign in to comment.