make gate-returned events follow the structure
This commit is contained in:
parent
bf8d3c78a5
commit
f7ffb392b0
@ -148,11 +148,14 @@ void Simulation::simulate() {
|
|||||||
// if the wire value changes, evaluate gates
|
// if the wire value changes, evaluate gates
|
||||||
if(doesChange) {
|
if(doesChange) {
|
||||||
Gate * tmpGate;
|
Gate * tmpGate;
|
||||||
|
Event gateEvent;
|
||||||
int index = 0;
|
int index = 0;
|
||||||
while(true){
|
while(true){
|
||||||
tmpGate = output->getGate(index++);
|
tmpGate = output->getGate(index++);
|
||||||
if (tmpGate != nullptr) {
|
if (tmpGate != nullptr) {
|
||||||
e.push(tmpGate->evaluate(tmpEvent.getTime()));
|
gateEvent = tmpGate->evaluate(tmpEvent.getTime());
|
||||||
|
gateEvent.setNum(eventNum++);
|
||||||
|
e.push(gateEvent);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user