From: Daniel Kirschten Date: Mon, 7 Oct 2019 00:25:43 +0000 (+0200) Subject: Added register for IR X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=112d36c78a7f1b7c2ad4932d819c7436453ab820;p=Mograsim.git Added register for IR --- diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/AbstractAm2900MachineDefinition.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/AbstractAm2900MachineDefinition.java index 665c9a3a..0488e894 100644 --- a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/AbstractAm2900MachineDefinition.java +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/AbstractAm2900MachineDefinition.java @@ -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 unsortedRegistersModifiable = new ArrayList<>(); unsortedRegistersModifiable.add(muInstrRegister.instance); - // TODO IR, PC/BZ... + unsortedRegistersModifiable.add(InstrRegister.instance); + // TODO PC/BZ... unsortedRegisters = Collections.unmodifiableList(unsortedRegistersModifiable); List 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 index 00000000..8ab22a4e --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/InstrRegister.java @@ -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