Merge pull request #11 from MaisiKoleni/config-gh-actions
[Mograsim.git] / plugins / net.mograsim.logic.model.am2900 / src / net / mograsim / logic / model / am2900 / machine / Am2900MicroInstructionDefinition.java
index dc149c8..28f4def 100644 (file)
@@ -24,7 +24,7 @@ public class Am2900MicroInstructionDefinition implements MicroInstructionDefinit
                        .add("ADD", "SUBR", "SUBS", "OR", "AND", "NOTRS", "EXOR", "EXNOR").build();
        private static final MnemonicFamily am2901DestInstructions = new MnemonicFamilyBuilder(3).addX()
                        .add("QREG", "NOP", "RAMA", "RAMF", "RAMQD", "RAMD", "RAMQU", "RAMU").setDefault("NOP").build();
-       private static final IntegerClassification register = new IntegerClassification(0, 4);
+       private static final IntegerClassification register = new IntegerClassification(4);
        private static final BooleanClassification registerSelect = new BooleanClassification("MR", "IR");
        private static final BooleanClassification abus = new BooleanClassification(true, "H", "AB");
        private static final BooleanClassification dbus = new BooleanClassification(true, "H", "DB");
@@ -68,8 +68,8 @@ public class Am2900MicroInstructionDefinition implements MicroInstructionDefinit
                        .add("JZ", "CJS", "JMAP", "CJP", "PUSH", "JSRP", "CJV", "JRP", "RFCT", "RPCT", "CRTN", "CJPP", "LDCT", "LOOP", "CONT", "TWB")
                        .setDefault("CONT").build();
 
-       private static final IntegerClassification constant_12bit = new IntegerClassification(0, 12);
-       private static final IntegerClassification constant_16bit = new IntegerClassification(0, 16);
+       private static final IntegerClassification constant_12bit = new IntegerClassification(12);
+       private static final IntegerClassification constant_16bit = new IntegerClassification(16);
        private static final BooleanClassification hE = new BooleanClassification(true, "H", "E");
        private static final BooleanClassification hI = new BooleanClassification(true, "H", "I");
        private static final BooleanClassification hL = new BooleanClassification(true, "H", "L");
@@ -80,6 +80,10 @@ public class Am2900MicroInstructionDefinition implements MicroInstructionDefinit
                        dbus, am2904CarryInstructions, am2904ShiftInstructions, hL, hL, am2904StatusInstructions, ccen, am2910Instructions,
                        constant_12bit, hL, hE, hI, hE, hL, rW };
 
+       private static final String[] paramTitle = { "IE", "I", "KMUX", "K", "ALU Src", "ALU Func", "ALU Dest", "ALU RA", "ALU ASel", "ALU RB",
+                       "ALU BSel", "_ABus", "_DBus", "SU Cin", "SU Shift", "SU _CE\u00b5", "SU _CEM", "SU Op", "CU _CCEN", "CU I", "D", "BZ_LD",
+                       "BZ_ED", "BZ_INC", "BZ_EA", "IR_LD", "_MWE" };
+
        private static final String[] paramDesc = { "Allow interrupts?", "Interrupt instructions; omitted for simplicity",
                        "Get D-input from data bus/constant value", "Constant value", "Operand sources for ALU operation", "ALU operation",
                        "Destination of ALU calculation", "Register for A-operand", "Get A-operand from instruction register/micro instruction?",
@@ -102,6 +106,12 @@ public class Am2900MicroInstructionDefinition implements MicroInstructionDefinit
                return classes[index];
        }
 
+       @Override
+       public Optional<String> getParameterTitle(int index)
+       {
+               return Optional.of(paramTitle[index]);
+       }
+
        @Override
        public Optional<String> getParameterDescription(int index)
        {