Added register for IR
authorDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 7 Oct 2019 00:25:43 +0000 (02:25 +0200)
committerDaniel Kirschten <daniel.kirschten@gmx.de>
Mon, 7 Oct 2019 00:26:05 +0000 (02:26 +0200)
plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/AbstractAm2900MachineDefinition.java
plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/InstrRegister.java [new file with mode: 0644]

index 665c9a3..0488e89 100644 (file)
@@ -4,6 +4,7 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
+import net.mograsim.logic.model.am2900.machine.registers.InstrRegister;
 import net.mograsim.logic.model.am2900.machine.registers.muInstrRegister;
 import net.mograsim.logic.model.am2900.machine.registers.am2901.Am2901RegisterGroup;
 import net.mograsim.logic.model.am2900.machine.registers.am2904.Am2904RegisterGroup;
@@ -28,7 +29,8 @@ public class AbstractAm2900MachineDefinition implements MachineDefinition
        {
                List<Register> unsortedRegistersModifiable = new ArrayList<>();
                unsortedRegistersModifiable.add(muInstrRegister.instance);
-               // TODO IR, PC/BZ...
+               unsortedRegistersModifiable.add(InstrRegister.instance);
+               // TODO PC/BZ...
                unsortedRegisters = Collections.unmodifiableList(unsortedRegistersModifiable);
                List<RegisterGroup> registerGroupsModifiable = new ArrayList<>();
                registerGroupsModifiable.add(Am2901RegisterGroup.instance);
diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/InstrRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/InstrRegister.java
new file mode 100644 (file)
index 0000000..8ab22a4
--- /dev/null
@@ -0,0 +1,14 @@
+package net.mograsim.logic.model.am2900.machine.registers;
+
+import net.mograsim.logic.model.am2900.machine.registers.Am2900Register;
+import net.mograsim.machine.registers.HighLevelStateBasedRegister;
+
+public class InstrRegister extends HighLevelStateBasedRegister implements Am2900Register
+{
+       public static final InstrRegister instance = new InstrRegister();
+
+       private InstrRegister()
+       {
+               super("IR", "ir.q", 16);
+       }
+}
\ No newline at end of file