Apply formatter, optional problems, save actions to machine project
[Mograsim.git] / net.mograsim.machine / src / net / mograsim / machine / mi / components / ModelMicroInstructionMemory.java
index 34e7e80..94a4d0e 100644 (file)
@@ -8,17 +8,17 @@ import net.mograsim.machine.mi.MicroInstructionMemoryDefinition;
 
 public abstract class ModelMicroInstructionMemory extends ModelMemory
 {
-       private final Pin addrPin, dataPin, clock;
+       private final Pin addrPin, dataPin;
        private CoreMicroInstructionMemory memory;
        private final MicroInstructionMemoryDefinition definition;
-       
+
        public ModelMicroInstructionMemory(LogicModelModifiable model, MicroInstructionMemoryDefinition definition, String name)
        {
-               super(model, 200, 100, name, "MPM", false);
+               super(model, 120, 150, name, "MPM", false);
                this.definition = definition;
-               addPin(addrPin = new Pin(model, this, "A", definition.getMemoryAddressBits(), PinUsage.INPUT, width / 2, 0));
-               addPin(dataPin = new Pin(model, this, "D", definition.getMicroInstructionDefinition().sizeInBits(), PinUsage.OUTPUT, 0, 30));
-               addPin(clock = new Pin(model, this, "C", 1, PinUsage.INPUT, 0, 60));
+               addPin(addrPin = new Pin(model, this, "A", definition.getMemoryAddressBits(), PinUsage.INPUT, getWidth(), 30));
+               addPin(dataPin = new Pin(model, this, "D", definition.getMicroInstructionDefinition().sizeInBits(), PinUsage.OUTPUT, getWidth(),
+                               50));
 
                init();
        }
@@ -27,7 +27,7 @@ public abstract class ModelMicroInstructionMemory extends ModelMemory
        {
                return definition;
        }
-       
+
        public Pin getAddressPin()
        {
                return addrPin;
@@ -38,16 +38,11 @@ public abstract class ModelMicroInstructionMemory extends ModelMemory
                return dataPin;
        }
 
-       public Pin getClockPin()
-       {
-               return clock;
-       }
-
        public CoreMicroInstructionMemory getCoreMemory()
        {
                return memory;
        }
-       
+
        public void setCoreModelBinding(CoreMicroInstructionMemory memory)
        {
                this.memory = memory;