X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.model.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fexamples%2FGUIComponentTestbench.java;h=f2acc618f90e6317d47ab6a23bd63da0623506c6;hb=e3d7905ec00f7515817ab9921724fd0eb51f79e7;hp=362524bfbd6a09d1c9be5c3005a9e6b14a792b9f;hpb=ed9c53e1fac04d87ccfd5ab701e2381f18863bab;p=Mograsim.git diff --git a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java index 362524bf..f2acc618 100644 --- a/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java +++ b/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/GUIComponentTestbench.java @@ -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)));