Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / am2900 / components / am2904 / ModelAm2904ShiftInstrDecode.java
index 96b6222..3e97cc6 100644 (file)
@@ -12,7 +12,7 @@ import net.mograsim.logic.core.types.Bit;
 import net.mograsim.logic.core.types.BitVector;
 import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
 import net.mograsim.logic.core.wires.CoreWire.ReadWriteEnd;
-import net.mograsim.logic.model.model.ViewModelModifiable;
+import net.mograsim.logic.model.model.LogicModelModifiable;
 import net.mograsim.logic.model.model.components.atomic.SimpleRectangularHardcodedModelComponent;
 import net.mograsim.logic.model.model.wires.Pin;
 import net.mograsim.logic.model.model.wires.PinUsage;
@@ -21,19 +21,19 @@ import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.
 
 public class ModelAm2904ShiftInstrDecode extends SimpleRectangularHardcodedModelComponent
 {
-       public ModelAm2904ShiftInstrDecode(ViewModelModifiable model, String name)
+       public ModelAm2904ShiftInstrDecode(LogicModelModifiable model, String name)
        {
-               super(model, "Am2904ShiftInstrDecode", name, "Shift \ninstruction\ndecode");
+               super(model, "Am2904ShiftInstrDecode", name, "Shift \ninstruction\ndecode", false);
                setSize(60, 80);
-               addPin(new Pin(this, "I", 5, PinUsage.INPUT, 0, 25), Position.RIGHT);
-               addPin(new Pin(this, "_SE", 1, PinUsage.INPUT, 0, 55), Position.RIGHT);
+               addPin(new Pin(model, this, "I", 5, PinUsage.INPUT, 0, 25), Position.RIGHT);
+               addPin(new Pin(model, 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, PinUsage.OUTPUT, 60, 5), Position.LEFT);
+               addPin(new Pin(model, this, "SIO0_MUX", 3, PinUsage.OUTPUT, 60, 5), Position.LEFT);
                // SIOn MUX:
                // 000: 0
                // 001: 1
@@ -43,28 +43,30 @@ public class ModelAm2904ShiftInstrDecode extends SimpleRectangularHardcodedModel
                // 101: MN
                // 110: IC
                // 111: IN xor IVOR
-               addPin(new Pin(this, "SIOn_MUX", 3, PinUsage.OUTPUT, 60, 15), Position.LEFT);
+               addPin(new Pin(model, 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, PinUsage.OUTPUT, 60, 25), Position.LEFT);
+               addPin(new Pin(model, 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, 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);
+               addPin(new Pin(model, this, "QIOn_MUX", 3, PinUsage.OUTPUT, 60, 35), Position.LEFT);
+               addPin(new Pin(model, this, "OEn", 1, PinUsage.OUTPUT, 60, 45), Position.LEFT);
+               addPin(new Pin(model, this, "OE0", 1, PinUsage.OUTPUT, 60, 55), Position.LEFT);
                // 00: SIO0
                // 01: QIO0
                // 1x: SIOn
-               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);
+               addPin(new Pin(model, this, "MC_MUX", 2, PinUsage.OUTPUT, 60, 65), Position.LEFT);
+               addPin(new Pin(model, this, "MC_EN", 1, PinUsage.OUTPUT, 60, 75), Position.LEFT);
+
+               init();
        }
 
        @Override