Skip to content

Commit 5cb2aa0

Browse files
committed
Comments
1 parent 8ab411e commit 5cb2aa0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

protocols/src/scheduler.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,14 +387,16 @@ impl<'a> Scheduler<'a> {
387387
// Advance the simulator whenever a `step()` statement was
388388
// encountered this cycle.
389389
// This must happen even when all threads have completed and
390-
// the `next_threads`` queue is empty, so that the waveform
390+
// the `next_threads` queue is empty, so that the waveform
391391
// records a timestep for every `step()` statement in the protocol.
392392
// (Example: combinational adders which only contain one `step()`.
393393
// Without the following if-statement, the waveform would contain
394394
// 0 timesteps.)
395395
if self.step_happened_this_cycle {
396396
info!("Stepping...");
397397
self.evaluator.sim_step();
398+
// Reset flag to ensure that simulator is stepped exactly
399+
// once during each cycle
398400
self.step_happened_this_cycle = false;
399401
}
400402

0 commit comments

Comments
 (0)