Instance[] pins = attrs.getPinInstances();
for (int i = 0; i < pins.length; i++) {
Instance pin = pins[i];
InstanceState pinState = subState.getInstanceState(pin);
if (Pin.FACTORY.isInputPin(pin)) {
Value newVal = superState.getPort(i);
Value oldVal = Pin.FACTORY.getValue(pinState);
if (!newVal.equals(oldVal)) {
Pin.FACTORY.setValue(pinState, newVal);
Pin.FACTORY.propagate(pinState);
}
} else { // it is output-only
Value val = pinState.getPort(0);
superState.setPort(i, val, 1);
}
}
}