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 / Modelsel4_12.java
index 3d26c19..7cce14a 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,21 @@ import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.
 
 public class Modelsel4_12 extends SimpleRectangularHardcodedModelComponent
 {
-       public Modelsel4_12(ViewModelModifiable model, String name)
+       public Modelsel4_12(LogicModelModifiable model, String name)
        {
-               super(model, "sel4_12", name, "4-way SEL\n12 bit");
+               super(model, "sel4_12", name, "4-way SEL\n12 bit", false);
                setSize(80, 40);
-               addPin(new Pin(this, "SA", 1, PinUsage.INPUT, 0, 5), Position.RIGHT);
-               addPin(new Pin(this, "SB", 1, PinUsage.INPUT, 0, 15), Position.RIGHT);
-               addPin(new Pin(this, "SC", 1, PinUsage.INPUT, 0, 25), Position.RIGHT);
-               addPin(new Pin(this, "SD", 1, PinUsage.INPUT, 0, 35), Position.RIGHT);
-               addPin(new Pin(this, "A", 12, PinUsage.INPUT, 10, 0), Position.BOTTOM);
-               addPin(new Pin(this, "B", 12, PinUsage.INPUT, 30, 0), Position.BOTTOM);
-               addPin(new Pin(this, "C", 12, PinUsage.INPUT, 50, 0), Position.BOTTOM);
-               addPin(new Pin(this, "D", 12, PinUsage.INPUT, 70, 0), Position.BOTTOM);
-               addPin(new Pin(this, "Y", 12, PinUsage.OUTPUT, 40, 40), Position.TOP);
+               addPin(new Pin(model, this, "SA", 1, PinUsage.INPUT, 0, 5), Position.RIGHT);
+               addPin(new Pin(model, this, "SB", 1, PinUsage.INPUT, 0, 15), Position.RIGHT);
+               addPin(new Pin(model, this, "SC", 1, PinUsage.INPUT, 0, 25), Position.RIGHT);
+               addPin(new Pin(model, this, "SD", 1, PinUsage.INPUT, 0, 35), Position.RIGHT);
+               addPin(new Pin(model, this, "A", 12, PinUsage.INPUT, 10, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "B", 12, PinUsage.INPUT, 30, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "C", 12, PinUsage.INPUT, 50, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "D", 12, PinUsage.INPUT, 70, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "Y", 12, PinUsage.OUTPUT, 40, 40), Position.TOP);
+
+               init();
        }
 
        @Override