Fixed a bug causing CoreMemories using their own memories
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / mi / components / CoreMicroInstructionMemory.java
index a958dc2..12b44dd 100644 (file)
@@ -23,6 +23,8 @@ public class CoreMicroInstructionMemory extends BasicCoreComponent
                this.memory = memory;
                this.data = data;
                this.address = address;
+               memory.registerObserver(a -> update());
+               address.registerObserver(this);
        }
 
        public MicroInstructionMemory getMemory()