- // TODO force this to happen without any Timeline updates in the meantime.
- // Maybe make it a requirement of setHighLevelState that the Timeline is "halted" during a call?
- BitVector newStateCasted = (BitVector) newState;
- if (wireQ.hasLogicModelBinding())
- wireQ.forceWireValues(newStateCasted);
- // We set both wires because then both outputs go to their correct state at the same time, and to avoid problems when not both
- // inputs are 1
- if (wire_Q.hasLogicModelBinding())
- wire_Q.forceWireValues(newStateCasted.not());
- } else
+ case "q":
+ if (wireQ != null)
+ {
+ // TODO force this to happen without any Timeline updates in the meantime.
+ // Maybe make it a requirement of setHighLevelState that the Timeline is "halted" during a call?
+ Bit newStateCasted = (Bit) newState;
+ BitVector newStateVector = BitVector.of(newStateCasted);
+ if (wireQ.hasLogicModelBinding())
+ wireQ.forceWireValues(newStateVector);
+ // We set both wires because then both outputs go to their correct state at the same time, and to avoid problems when not
+ // both
+ // inputs are 1
+ if (wire_Q.hasLogicModelBinding())
+ wire_Q.forceWireValues(newStateVector.not());
+ }
+ break;
+ default: