mirror of
https://github.com/Stone-Red-Code/StoneRed.LogicSimulator.git
synced 2026-09-04 09:06:29 +02:00
Switch gate watchers to notify on input mask changes, add DivideByNCounter
This commit is contained in:
@@ -84,7 +84,6 @@ public sealed class EventCircuitSimulator : SimulatorBase
|
||||
if (outputMasks[gateId] != oldOutput)
|
||||
{
|
||||
Propagate(gateId);
|
||||
NotifyGateWatchers(gateId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -103,6 +102,10 @@ public sealed class EventCircuitSimulator : SimulatorBase
|
||||
if (oldBit != outVal)
|
||||
{
|
||||
inputMasks[toGate] ^= 1 << bit;
|
||||
if (hasAnyWatchers)
|
||||
{
|
||||
NotifyGateWatchers(toGate);
|
||||
}
|
||||
Enqueue(toGate);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user