1 package net.mograsim.logic.model.am2900.machine;
3 import net.mograsim.logic.core.types.Bit;
4 import net.mograsim.logic.core.types.BitVector;
5 import net.mograsim.machine.mi.MicroInstructionDefinition;
6 import net.mograsim.machine.mi.parameters.BooleanClassification;
7 import net.mograsim.machine.mi.parameters.IntegerClassification;
8 import net.mograsim.machine.mi.parameters.MnemonicFamily;
9 import net.mograsim.machine.mi.parameters.MnemonicFamily.MnemonicPair;
10 import net.mograsim.machine.mi.parameters.ParameterClassification;
12 public class Am2900MicroInstructionDefinition implements MicroInstructionDefinition
14 private final static MnemonicFamily am2910Instructions = new MnemonicFamily(new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
15 private final static MnemonicFamily am2904StatusInstructions = new MnemonicFamily(
16 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
17 private final static MnemonicFamily am2904ShiftInstructions = new MnemonicFamily(
18 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
19 private final static MnemonicFamily am2904CarryInstructions = new MnemonicFamily(
20 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
21 private final static MnemonicFamily am2901DestInstructions = new MnemonicFamily(
22 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
23 private final static MnemonicFamily am2901FuncInstructions = new MnemonicFamily(
24 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
25 private final static MnemonicFamily am2901SrcInstructions = new MnemonicFamily(
26 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
27 private final static MnemonicFamily interruptInstructions = new MnemonicFamily(
28 new MnemonicPair("X", BitVector.of(Bit.ZERO, 4))/* TODO */);
29 private final static BooleanClassification hL = new BooleanClassification("H", "L");
30 private final static BooleanClassification registerSelect = new BooleanClassification("MR", "IR");
31 private final static IntegerClassification register = new IntegerClassification(4);
33 private final static ParameterClassification[] classes = { new BooleanClassification("R", "W"), hL, new BooleanClassification("H", "E"),
34 new BooleanClassification("H", "I"), new BooleanClassification("H", "E"), hL, new IntegerClassification(11), am2910Instructions,
35 new BooleanClassification("PS", "C"), am2904StatusInstructions, hL, hL, am2904ShiftInstructions, am2904CarryInstructions,
36 new BooleanClassification("H", "DB"), new BooleanClassification("H", "AB"), registerSelect, register, registerSelect, register,
37 am2901DestInstructions, am2901FuncInstructions, am2901SrcInstructions, new IntegerClassification(16),
38 new BooleanClassification("D", "K"), interruptInstructions, new BooleanClassification("Dis", "IE") };
41 public ParameterClassification[] getParameterClassifications()
47 public ParameterClassification getParameterClassification(int index)
49 return classes[index];