fix another feedback loop issue

This commit is contained in:
Joel Beckmeyer 2017-04-25 12:24:53 -04:00
parent ebd79657e7
commit 10df712a45
1 changed files with 1 additions and 1 deletions

View File

@ -143,6 +143,7 @@ void Simulation::simulate() {
output = tmpEvent.getOutput();
changed = output->doesChange(tmpEvent.getValue(), tmpEvent.getTime());
output->setValue(tmpEvent.getValue(), tmpEvent.getTime());
// if the wire value changes, evaluate gates
if(changed && !(tmpEvent.getTime() > 60)) {
@ -160,7 +161,6 @@ void Simulation::simulate() {
}
}
}
output->setValue(tmpEvent.getValue(), tmpEvent.getTime());
e.pop();
}
}