import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.components.atomic.ModelBitDisplay;
import net.mograsim.logic.model.model.components.atomic.ModelManualSwitch;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.components.atomic.ModelBitDisplay;
import net.mograsim.logic.model.model.components.atomic.ModelManualSwitch;
import net.mograsim.logic.model.model.wires.ModelWire;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.wires.PinUsage;
import net.mograsim.logic.model.model.wires.ModelWire;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.wires.PinUsage;
-// ModelComponent comp = new StrictAm2900MachineDefinition().createNew(model).getAm2900();
- ModelComponent comp = IndirectModelComponentCreator.createComponent(model, "xnor");
+// ModelComponent comp = new Am2900ExpertMachineDefinition().createNew(model).getAm2900();
+ ModelComponent comp = IndirectModelComponentCreator.createComponent(model, "ram5_12");
outputPinNames.add(p.name);
inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
outputPinNames.add(p.name);
inputPinNames.sort(Comparator.comparing(comp::getPin, Comparator.comparing(Pin::getRelY)));
String pinName = inputPinNames.get(i);
ModelManualSwitch sw = new ModelManualSwitch(model, comp.getPin(pinName).logicWidth, pinName);
sw.moveTo(0, 20 * i);
String pinName = inputPinNames.get(i);
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++)
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, pinName);
bd.moveTo(200, 20 * i);
String pinName = outputPinNames.get(i);
ModelBitDisplay bd = new ModelBitDisplay(model, comp.getPin(pinName).logicWidth, pinName);
bd.moveTo(200, 20 * i);