X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fmi%2Fcomponents%2FCoreMicroInstructionMemory.java;fp=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fmi%2Fcomponents%2FCoreMicroInstructionMemory.java;h=a958dc20f711f424603d69866d58b6764eb23a1e;hb=4ba119cab03498736851e6f3f32eec1957839a2e;hp=eb4720995112128c18421e5252034158ba1ff6fd;hpb=18751c233058925190cf9c1e6bbd1e764f68bf43;p=Mograsim.git diff --git a/net.mograsim.machine/src/net/mograsim/machine/mi/components/CoreMicroInstructionMemory.java b/net.mograsim.machine/src/net/mograsim/machine/mi/components/CoreMicroInstructionMemory.java index eb472099..a958dc20 100644 --- a/net.mograsim.machine/src/net/mograsim/machine/mi/components/CoreMicroInstructionMemory.java +++ b/net.mograsim.machine/src/net/mograsim/machine/mi/components/CoreMicroInstructionMemory.java @@ -13,10 +13,9 @@ import net.mograsim.machine.mi.MicroInstructionMemory; public class CoreMicroInstructionMemory extends BasicCoreComponent { - private final ReadWriteEnd data; - private final ReadEnd address; - private final MicroInstructionMemory memory; - + private final ReadWriteEnd data; + private final ReadEnd address; + private final MicroInstructionMemory memory; public CoreMicroInstructionMemory(Timeline timeline, int processTime, MicroInstructionMemory memory, ReadWriteEnd data, ReadEnd address) { @@ -46,9 +45,9 @@ public class CoreMicroInstructionMemory extends BasicCoreComponent @Override protected TimelineEventHandler compute() { - if(!address.hasNumericValue()) + if (!address.hasNumericValue()) { - return e -> data.feedSignals(Bit.U.toVector(data.width()));//TODO don't always feed U, but decide to feed X or U. + return e -> data.feedSignals(Bit.U.toVector(data.width()));// TODO don't always feed U, but decide to feed X or U. } long addressed = address.getUnsignedValue(); BitVector storedData = memory.getCell(addressed).toBitVector();