import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.core.wires.CoreWire.ReadEnd;
import net.mograsim.logic.model.model.LogicModelModifiable;
import net.mograsim.logic.model.model.components.ModelComponent;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.wires.PinUsage;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
import net.mograsim.logic.model.model.wires.Pin;
import net.mograsim.logic.model.model.wires.PinUsage;
import net.mograsim.logic.model.modeladapter.LogicCoreAdapter;
setSize(width, (logicWidth - 1) * heightPerPin);
double inputHeight = (logicWidth - 1) * heightPerPin;
for (int i = 0; i < logicWidth; i++, inputHeight -= 10)
setSize(width, (logicWidth - 1) * heightPerPin);
double inputHeight = (logicWidth - 1) * heightPerPin;
for (int i = 0; i < logicWidth; i++, inputHeight -= 10)
- addPin(new Pin(model, this, "I" + i, 1, PinUsage.TRISTATE, 0, inputHeight));
- addPin(this.outputPin = new Pin(model, this, "O", logicWidth, PinUsage.TRISTATE, width, (logicWidth - 1) * heightPerPin / 2));
+ addPin(new Pin(model, this, "O" + i, 1, PinUsage.TRISTATE, 0, inputHeight));
+ addPin(this.outputPin = new Pin(model, this, "I", logicWidth, PinUsage.TRISTATE, width, (logicWidth - 1) * heightPerPin / 2));
+ @Override
+ public Pin getPin(String name)
+ {
+ Pin pin = getPinOrNull(name);
+ return pin == null ? getPin(name.replace('O', 'i').replace('I', 'O').replace('i', 'I')) : pin;
+ }
+