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=27b696057a139d5d184cbb142092709af8595489;hb=75a5c5c00f48382a8631ce19714719706bc3c4ee;hp=5781322317696b5b766b7ef30bd23abb2be78081;hpb=04448211bafbc461be637384b3f0d09628f1c403;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 57813223..27b69605 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 @@ -25,8 +25,7 @@ public class GUIComponentTestbench @SuppressWarnings("unused") // for GUIWires being created public static void createTestbench(ViewModelModifiable model) { - GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, - "class:net.mograsim.logic.model.am2900.components.am2904.RegCTInstrDecode"); + GUIComponent comp = IndirectGUIComponentCreator.createComponent(model, "file:components/am2904/GUIAm2904muSR.json"); // 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 @@ -42,7 +41,7 @@ public class GUIComponentTestbench outputPinNames.add(p.name); } else for (Pin p : comp.getPins().values()) - if (p.getRelX() == 0) + if (p.getRelX() < comp.getWidth()) inputPinNames.add(p.name); else outputPinNames.add(p.name);