Created gate-based implementations of an incrementer for 4, 12, 16 bit
[Mograsim.git] / plugins / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / examples / ModelComponentTestbench.java
index eb3f0b2..4efc6f7 100644 (file)
@@ -27,6 +27,7 @@ public class ModelComponentTestbench
        {
                Am2900Loader.setup();
                ModelComponent comp = new StrictAm2900MachineDefinition().createNew(model).getAm2900();
+//             ModelComponent comp = IndirectModelComponentCreator.createComponent(model, "inc12");
 
                List<String> inputPinNames = new ArrayList<>();
                List<String> outputPinNames = new ArrayList<>();
@@ -43,14 +44,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());
                }