CoreWire#forceValues didn't notify fused wires
[Mograsim.git] / net.mograsim.logic.core / src / net / mograsim / logic / core / wires / CoreWire.java
index 7d81f6d..f130cd4 100644 (file)
@@ -124,7 +124,9 @@ public class CoreWire
         */
        public void forceValues(BitVector values)
        {
-               setNewValues(values);
+               bitsWithoutFusions = values.getBits();
+               invalidateCachedValuesForAllFusedWires();
+               notifyObservers();
        }
 
        /**
@@ -445,6 +447,7 @@ public class CoreWire
                        feedSignals(BitVector.of(newValues));
                }
 
+               // TODO what if this is called multiple times at the same simulation time? (happens in component unit tests)
                public void feedSignals(BitVector newValues)
                {
                        if (newValues.length() != width)