From: Fabian Stemmler Date: Tue, 27 Aug 2019 13:55:03 +0000 (+0200) Subject: Merge branch 'development' of X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=61621670ab3ea56eea6571cc9bba5e015c9f0861;p=Mograsim.git Merge branch 'development' of https://gitlab.lrz.de/lrr-tum/students/eragp-misim-2019.git into development Conflicts: net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java --- 61621670ab3ea56eea6571cc9bba5e015c9f0861 diff --cc net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java index 62785be6,3724a426..3deccb09 --- a/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java +++ b/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java @@@ -16,12 -16,12 +16,12 @@@ public class MnemonicFamily implements { this.values = values; if(values.length == 0) - vectorLenght = 0; + vectorLength = 0; else { - vectorLength = values[0].getValue().width(); - vectorLenght = values[0].getValue().length(); ++ vectorLength = values[0].getValue().length(); for(int i = 1; i < values.length; i++) - if(values[i].getValue().width() != vectorLength) - if(values[i].getValue().length() != vectorLenght) ++ if(values[i].getValue().length() != vectorLength) throw new IllegalArgumentException("MnemonicFamily is not of uniform vector length!"); } byText = Arrays.stream(values).collect(Collectors.toMap(m -> m.getText(), m -> m)); diff --cc net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java index f98def90,b9362a09..3b3f1a23 --- a/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java +++ b/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java @@@ -8,10 -8,7 +8,10 @@@ public interface ParameterClassificatio * Determines whether a {@link MicroInstructionParameter} is part of this class of parameters. * @return true if the classification contains the Parameter, false otherwise */ - public boolean conforms(MicroInstructionParameter param); + public default boolean conforms(MicroInstructionParameter param) + { - return param.getType().equals(getExpectedType()) && param.getValue().width() == getExpectedBits(); ++ return param.getType().equals(getExpectedType()) && param.getValue().length() == getExpectedBits(); + } /** * @return The type of the parameters in this classification.