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 / Modelram5_12.java
index 6658f81..53c9960 100644 (file)
@@ -15,7 +15,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;
@@ -24,16 +24,18 @@ import net.mograsim.logic.model.snippets.symbolrenderers.PinNamesSymbolRenderer.
 
 public class Modelram5_12 extends SimpleRectangularHardcodedModelComponent
 {
-       public Modelram5_12(ViewModelModifiable model, String name)
+       public Modelram5_12(LogicModelModifiable model, String name)
        {
-               super(model, "ram5_12", name, "RAM\n5 x 12 Bit");
+               super(model, "ram5_12", name, "RAM\n5 x 12 Bit", false);
                setSize(40, 40);
-               addPin(new Pin(this, "A", 3, PinUsage.INPUT, 10, 0), Position.BOTTOM);
-               addPin(new Pin(this, "B", 3, PinUsage.INPUT, 30, 0), Position.BOTTOM);
-               addPin(new Pin(this, "WE", 1, PinUsage.INPUT, 0, 5), Position.RIGHT);
-               addPin(new Pin(this, "C", 1, PinUsage.INPUT, 0, 15), Position.RIGHT);
-               addPin(new Pin(this, "Y", 12, PinUsage.OUTPUT, 0, 30), Position.RIGHT);
-               addPin(new Pin(this, "D", 12, PinUsage.INPUT, 20, 40), Position.TOP);
+               addPin(new Pin(model, this, "A", 3, PinUsage.INPUT, 10, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "B", 3, PinUsage.INPUT, 30, 0), Position.BOTTOM);
+               addPin(new Pin(model, this, "WE", 1, PinUsage.INPUT, 0, 5), Position.RIGHT);
+               addPin(new Pin(model, this, "C", 1, PinUsage.INPUT, 0, 15), Position.RIGHT);
+               addPin(new Pin(model, this, "Y", 12, PinUsage.OUTPUT, 0, 30), Position.RIGHT);
+               addPin(new Pin(model, this, "D", 12, PinUsage.INPUT, 20, 40), Position.TOP);
+
+               init();
        }
 
        @Override