X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.logic.model.am2900%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fmodel%2Fexamples%2FModelComponentTestbench.java;h=2a72e4a4d1e30a1f45991ec1354e4490828b58c6;hb=0072642bcbf00c26d9a96796257c0caec0390e22;hp=297075a8daf6728f23a9a19ee8a7bb8cca2d35eb;hpb=d094b43f1697af4586f135790919f866cc53a9a5;p=Mograsim.git diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java index 297075a8..2a72e4a4 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/examples/ModelComponentTestbench.java @@ -6,7 +6,7 @@ import java.util.List; import net.mograsim.logic.model.SimpleLogicUIStandalone; import net.mograsim.logic.model.am2900.Am2900Loader; -import net.mograsim.logic.model.am2900.machine.Am2900MachineDefinition; +import net.mograsim.logic.model.am2900.machine.StrictAm2900MachineDefinition; import net.mograsim.logic.model.model.LogicModelModifiable; import net.mograsim.logic.model.model.components.ModelComponent; import net.mograsim.logic.model.model.components.atomic.ModelBitDisplay; @@ -26,7 +26,7 @@ public class ModelComponentTestbench public static void createTestbench(LogicModelModifiable model) { Am2900Loader.setup(); - ModelComponent comp = new Am2900MachineDefinition().createNew(model).getAm2900(); + ModelComponent comp = new StrictAm2900MachineDefinition().createNew(model).getAm2900(); List inputPinNames = new ArrayList<>(); List outputPinNames = new ArrayList<>(); @@ -43,14 +43,14 @@ public class ModelComponentTestbench for (int i = 0; i < inputPinNames.size(); i++) { String pinName = inputPinNames.get(i); - ModelManualSwitch sw = new ModelManualSwitch(model, comp.getPin(pinName).logicWidth); + ModelManualSwitch sw = new ModelManualSwitch(model, comp.getPin(pinName).logicWidth, pinName); sw.moveTo(0, 20 * i); new ModelWire(model, comp.getPin(pinName), sw.getOutputPin()); } for (int i = 0; i < outputPinNames.size(); i++) { String pinName = outputPinNames.get(i); - ModelBitDisplay bd = new ModelBitDisplay(model, comp.getPin(pinName).logicWidth); + ModelBitDisplay bd = new ModelBitDisplay(model, comp.getPin(pinName).logicWidth, pinName); bd.moveTo(200, 20 * i); new ModelWire(model, comp.getPin(pinName), bd.getInputPin()); }