1 package net.mograsim.machine.mi.parameters;
3 import net.mograsim.logic.core.types.BitVector;
4 import net.mograsim.machine.mi.parameters.MicroInstructionParameter.ParameterType;
6 public class BooleanClassification extends MnemonicFamily
8 String trueName, falseName;
10 public BooleanClassification(boolean defaultValue, String trueName, String falseName)
12 super(defaultValue ? trueName : falseName, new MnemonicPair(trueName, BitVector.SINGLE_1),
13 new MnemonicPair(falseName, BitVector.SINGLE_0));
14 this.trueName = trueName;
15 this.falseName = falseName;
18 public Mnemonic get(boolean value)
20 return get(value ? trueName : falseName);
24 public ParameterType getExpectedType()
26 return ParameterType.BOOLEAN_IMMEDIATE;
30 public int getExpectedBits()