Pins now have a PinUsage
[Mograsim.git] / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / am2900 / components / am2904 / GUIAm2904ShiftInstrDecode.java
index 51b6da0..48d6f7f 100644 (file)
@@ -14,6 +14,7 @@ import net.mograsim.logic.core.wires.Wire.ReadWriteEnd;
 import net.mograsim.logic.model.model.ViewModelModifiable;
 import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedGUIComponent;
 import net.mograsim.logic.model.model.wires.Pin;
+import net.mograsim.logic.model.model.wires.PinUsage;
 import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
 import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.PinNamesParams.Position;
 
@@ -23,15 +24,15 @@ public class GUIAm2904ShiftInstrDecode extends SimpleRectangularHardcodedGUIComp
        {
                super(model, name, "Shift \ninstruction\ndecode");
                setSize(60, 80);
-               addPin(new Pin(this, "I", 5, 0, 25), Usage.INPUT, Position.RIGHT);
-               addPin(new Pin(this, "_SE", 1, 0, 55), Usage.INPUT, Position.RIGHT);
+               addPin(new Pin(this, "I", 5, PinUsage.INPUT, 0, 25), Position.RIGHT);
+               addPin(new Pin(this, "_SE", 1, PinUsage.INPUT, 0, 55), Position.RIGHT);
                // SIO0 MUX:
                // 000: 0
                // 001: 1
                // 01x: SIOn
                // 10x: QIOn
                // 11x: MC
-               addPin(new Pin(this, "SIO0_MUX", 3, 60, 5), Usage.OUTPUT, Position.LEFT);
+               addPin(new Pin(this, "SIO0_MUX", 3, PinUsage.OUTPUT, 60, 5), Position.LEFT);
                // SIOn MUX:
                // 000: 0
                // 001: 1
@@ -41,28 +42,28 @@ public class GUIAm2904ShiftInstrDecode extends SimpleRectangularHardcodedGUIComp
                // 101: MN
                // 110: IC
                // 111: IN xor IVOR
-               addPin(new Pin(this, "SIOn_MUX", 3, 60, 15), Usage.OUTPUT, Position.LEFT);
+               addPin(new Pin(this, "SIOn_MUX", 3, PinUsage.OUTPUT, 60, 15), Position.LEFT);
                // QIO0 MUX:
                // 000: 0
                // 001: 1
                // 01x: SIOn
                // 10x: QIOn
                // 11x: MC
-               addPin(new Pin(this, "QIO0_MUX", 3, 60, 25), Usage.OUTPUT, Position.LEFT);
+               addPin(new Pin(this, "QIO0_MUX", 3, PinUsage.OUTPUT, 60, 25), Position.LEFT);
                // QIOn MUX:
                // 000: 0
                // 001: 1
                // 01x: SIO0
                // 10x: QIO0
                // 11x: MN
-               addPin(new Pin(this, "QIOn_MUX", 3, 60, 35), Usage.OUTPUT, Position.LEFT);
-               addPin(new Pin(this, "OEn", 1, 60, 45), Usage.OUTPUT, Position.LEFT);
-               addPin(new Pin(this, "OE0", 1, 60, 55), Usage.OUTPUT, Position.LEFT);
+               addPin(new Pin(this, "QIOn_MUX", 3, PinUsage.OUTPUT, 60, 35), Position.LEFT);
+               addPin(new Pin(this, "OEn", 1, PinUsage.OUTPUT, 60, 45), Position.LEFT);
+               addPin(new Pin(this, "OE0", 1, PinUsage.OUTPUT, 60, 55), Position.LEFT);
                // 00: SIO0
                // 01: QIO0
                // 1x: SIOn
-               addPin(new Pin(this, "MC_MUX", 2, 60, 65), Usage.OUTPUT, Position.LEFT);
-               addPin(new Pin(this, "MC_EN", 1, 60, 75), Usage.OUTPUT, Position.LEFT);
+               addPin(new Pin(this, "MC_MUX", 2, PinUsage.OUTPUT, 60, 65), Position.LEFT);
+               addPin(new Pin(this, "MC_EN", 1, PinUsage.OUTPUT, 60, 75), Position.LEFT);
        }
 
        @Override