Model analyser ignores signals named "VCC" and "GND".

This commit is contained in:
hneemann 2020-01-01 11:16:36 +01:00
parent e56963dc9e
commit 06a3c1fd9d

View File

@ -180,6 +180,7 @@ public class ModelAnalyser {
private ArrayList<Signal> checkBinaryInputs(ArrayList<Signal> list) throws AnalyseException {
ArrayList<Signal> inputs = new ArrayList<>();
for (Signal s : list) {
if (!ignoreSignal(s)) {
final int bits = s.getValue().getBits();
if (bits == 1)
inputs.add(s);
@ -215,9 +216,14 @@ public class ModelAnalyser {
}
}
}
}
return inputs;
}
private boolean ignoreSignal(Signal s) {
return s.getName().equals("VCC") || s.getName().equals("GND");
}
private void checkClock(Node node) throws AnalyseException {
if (!getClock().hasObserver(node))
throw new AnalyseException(Lang.get("err_ffNeedsToBeConnectedToClock"));