diff --git a/src/NandGate.cpp b/src/NandGate.cpp index 13f9dc6..7f428dd 100644 --- a/src/NandGate.cpp +++ b/src/NandGate.cpp @@ -1,4 +1,5 @@ #include "NandGate.h" +#include NandGate::NandGate(int d, Wire * wire1, Wire * wire2, Wire * wire3) { @@ -10,6 +11,7 @@ NandGate::NandGate(int d, Wire * wire1, Wire * wire2, Wire * wire3) Event NandGate::evaluate(int evTime) { + cout << evTime << " " << in1->getValue(evTime) << " " << in2->getValue(evTime) << endl; if (in1->getValue(evTime) == 0 || in2->getValue(evTime) == 0) { return Event(1, evTime + delay, out); } diff --git a/src/Simulation.cpp b/src/Simulation.cpp index c05520f..37026bd 100644 --- a/src/Simulation.cpp +++ b/src/Simulation.cpp @@ -207,3 +207,4 @@ int Simulation::getDelay(string d) d.resize(d.size() - 2); return atoi(d.c_str()); } +