X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fstandard%2Fmemory%2FCoreWordAddressableMemory.java;fp=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fstandard%2Fmemory%2FCoreWordAddressableMemory.java;h=6dc5da2d044d48021ad0ea7c0b5f3ed32ba2a174;hb=d7f31fafc300b0c7fd1265574507c37a697aadab;hp=882b031ac194296e18b69fe3e9f43486dc1e14c5;hpb=4294019fb99a78ffa6802c0765e4efb7f96bd880;p=Mograsim.git diff --git a/net.mograsim.machine/src/net/mograsim/machine/standard/memory/CoreWordAddressableMemory.java b/net.mograsim.machine/src/net/mograsim/machine/standard/memory/CoreWordAddressableMemory.java index 882b031a..6dc5da2d 100644 --- a/net.mograsim.machine/src/net/mograsim/machine/standard/memory/CoreWordAddressableMemory.java +++ b/net.mograsim.machine/src/net/mograsim/machine/standard/memory/CoreWordAddressableMemory.java @@ -45,14 +45,14 @@ public class CoreWordAddressableMemory extends BasicCoreComponent throw new IllegalArgumentException( String.format("Bit width of address wire does not match main memory definition. Expected: %d Actual: %d", definition.getMemoryAddressBits(), address.width())); + this.memory = memory; this.data = data; this.rWBit = rWBit; this.address = address; + memory.registerObserver(a -> update()); data.registerObserver(this); rWBit.registerObserver(this); address.registerObserver(this); - - this.memory = memory; } @Override