Implemented Am2910's Instruction PLA
[Mograsim.git] / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / examples / GUIComponentTestbench.java
index 362524b..f2acc61 100644 (file)
@@ -5,13 +5,13 @@ import java.util.Comparator;
 import java.util.List;
 
 import net.mograsim.logic.model.SimpleLogicUIStandalone;
+import net.mograsim.logic.model.am2900.components.am2910.GUIAm2910InstrPLA;
 import net.mograsim.logic.model.model.ViewModelModifiable;
 import net.mograsim.logic.model.model.components.GUIComponent;
 import net.mograsim.logic.model.model.components.atomic.GUIBitDisplay;
 import net.mograsim.logic.model.model.components.atomic.GUIManualSwitch;
 import net.mograsim.logic.model.model.wires.GUIWire;
 import net.mograsim.logic.model.model.wires.Pin;
-import net.mograsim.logic.model.serializing.IndirectGUIComponentCreator;
 
 public class GUIComponentTestbench
 {
@@ -23,7 +23,8 @@ public class GUIComponentTestbench
        @SuppressWarnings("unused") // for GUIWires being created
        public static void createTestbench(ViewModelModifiable model)
        {
-               GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "GUIAm2901", "Am2901");
+//             GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "GUIAm2901", "Am2901");
+               GUIComponent comp = new GUIAm2910InstrPLA(model, "Am2910");
 
                // guess which pins are outputs and which are inputs
                // TODO this code exists four times... but it seems too "hacky" to put it in a helper class
@@ -35,6 +36,9 @@ public class GUIComponentTestbench
                        else
                                outputPinNames.add(p.name);
 
+               outputPinNames.remove("R=0");
+               inputPinNames.add("R=0");
+
                inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
                outputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));