From f430c331e21b61d3e1a720cdb0638ca3d8bca711 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Mon, 7 Oct 2019 01:40:37 +0200 Subject: [PATCH] Added Am2904 registers --- .../META-INF/MANIFEST.MF | 3 +++ .../machine/AbstractAm2900MachineDefinition.java | 4 +++- .../registers/am2904/Am2904RegisterGroup.java | 15 +++++++++++++++ .../machine/registers/am2904/msr/MCRegister.java | 14 ++++++++++++++ .../machine/registers/am2904/msr/MNRegister.java | 14 ++++++++++++++ .../registers/am2904/msr/MOVRRegister.java | 14 ++++++++++++++ .../machine/registers/am2904/msr/MSRRegister.java | 14 ++++++++++++++ .../registers/am2904/msr/MSRRegisterGroup.java | 13 +++++++++++++ .../machine/registers/am2904/msr/MZRegister.java | 14 ++++++++++++++ .../registers/am2904/musr/muCRegister.java | 14 ++++++++++++++ .../registers/am2904/musr/muNRegister.java | 14 ++++++++++++++ .../registers/am2904/musr/muOVRRegister.java | 14 ++++++++++++++ .../registers/am2904/musr/muSRRegister.java | 14 ++++++++++++++ .../registers/am2904/musr/muSRRegisterGroup.java | 14 ++++++++++++++ .../registers/am2904/musr/muZRegister.java | 14 ++++++++++++++ 15 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/Am2904RegisterGroup.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MCRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MNRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MOVRRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegisterGroup.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MZRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muCRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muNRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muOVRRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegister.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegisterGroup.java create mode 100644 plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muZRegister.java diff --git a/plugins/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF b/plugins/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF index 302a687f..bf9b692a 100644 --- a/plugins/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF +++ b/plugins/net.mograsim.logic.model.am2900/META-INF/MANIFEST.MF @@ -11,6 +11,9 @@ Export-Package: net.mograsim.logic.model.am2900, net.mograsim.logic.model.am2900.machine, net.mograsim.logic.model.am2900.machine.registers, net.mograsim.logic.model.am2900.machine.registers.am2901, + net.mograsim.logic.model.am2900.machine.registers.am2904, + net.mograsim.logic.model.am2900.machine.registers.am2904.msr, + net.mograsim.logic.model.am2900.machine.registers.am2904.musr, net.mograsim.logic.model.examples Bundle-RequiredExecutionEnvironment: JavaSE-11 Require-Bundle: org.eclipse.osgi, 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 3469b2db..7ad92b4b 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 @@ -5,6 +5,7 @@ import java.util.Collections; import java.util.List; import net.mograsim.logic.model.am2900.machine.registers.am2901.Am2901RegisterGroup; +import net.mograsim.logic.model.am2900.machine.registers.am2904.Am2904RegisterGroup; import net.mograsim.logic.model.model.LogicModelModifiable; import net.mograsim.machine.ISASchema; import net.mograsim.machine.MachineDefinition; @@ -28,7 +29,8 @@ public class AbstractAm2900MachineDefinition implements MachineDefinition unsortedRegisters = Collections.unmodifiableList(unsortedRegistersModifiable); List registerGroupsModifiable = new ArrayList<>(); registerGroupsModifiable.add(Am2901RegisterGroup.instance); - // TODO Am2904, Am2910 + registerGroupsModifiable.add(Am2904RegisterGroup.instance); + // TODO Am2910 registerGroups = Collections.unmodifiableList(registerGroupsModifiable); } diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/Am2904RegisterGroup.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/Am2904RegisterGroup.java new file mode 100644 index 00000000..9f30a458 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/Am2904RegisterGroup.java @@ -0,0 +1,15 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904; + +import net.mograsim.logic.model.am2900.machine.registers.am2904.msr.MSRRegisterGroup; +import net.mograsim.logic.model.am2900.machine.registers.am2904.musr.muSRRegisterGroup; +import net.mograsim.machine.registers.SimpleRegisterGroup; + +public class Am2904RegisterGroup extends SimpleRegisterGroup +{ + public static final Am2904RegisterGroup instance = new Am2904RegisterGroup(); + + private Am2904RegisterGroup() + { + super("Am2904", MSRRegisterGroup.instance, muSRRegisterGroup.instance); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MCRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MCRegister.java new file mode 100644 index 00000000..8fc2540e --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MCRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class MCRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final MCRegister instance = new MCRegister(); + + private MCRegister() + { + super("C", "am2904.msr.q2", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MNRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MNRegister.java new file mode 100644 index 00000000..4df3e84c --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MNRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class MNRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final MNRegister instance = new MNRegister(); + + private MNRegister() + { + super("N", "am2904.msr.q3", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MOVRRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MOVRRegister.java new file mode 100644 index 00000000..9243edb1 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MOVRRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class MOVRRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final MOVRRegister instance = new MOVRRegister(); + + private MOVRRegister() + { + super("OVR", "am2904.msr.q4", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegister.java new file mode 100644 index 00000000..f25260fc --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class MSRRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final MSRRegister instance = new MSRRegister(); + + private MSRRegister() + { + super("MSR", "am2904.msr.q", 4); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegisterGroup.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegisterGroup.java new file mode 100644 index 00000000..015a3c08 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MSRRegisterGroup.java @@ -0,0 +1,13 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.machine.registers.SimpleRegisterGroup; + +public class MSRRegisterGroup extends SimpleRegisterGroup +{ + public static final MSRRegisterGroup instance = new MSRRegisterGroup(); + + private MSRRegisterGroup() + { + super("MSR", MSRRegister.instance, MZRegister.instance, MCRegister.instance, MNRegister.instance, MOVRRegister.instance); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MZRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MZRegister.java new file mode 100644 index 00000000..691f86dc --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/msr/MZRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.msr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class MZRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final MZRegister instance = new MZRegister(); + + private MZRegister() + { + super("Z", "am2904.msr.q1", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muCRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muCRegister.java new file mode 100644 index 00000000..9c0a45b2 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muCRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class muCRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final muCRegister instance = new muCRegister(); + + private muCRegister() + { + super("C", "am2904.musr.q2", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muNRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muNRegister.java new file mode 100644 index 00000000..f0d4c9bd --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muNRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class muNRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final muNRegister instance = new muNRegister(); + + private muNRegister() + { + super("N", "am2904.musr.q3", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muOVRRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muOVRRegister.java new file mode 100644 index 00000000..54bac108 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muOVRRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class muOVRRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final muOVRRegister instance = new muOVRRegister(); + + private muOVRRegister() + { + super("OVR", "am2904.musr.q4", 1); + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegister.java new file mode 100644 index 00000000..0134c9c9 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class muSRRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final muSRRegister instance = new muSRRegister(); + + private muSRRegister() + { + super("\u00b5SR", "am2904.musr.q", 4); // 00b5 = micro symbol + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegisterGroup.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegisterGroup.java new file mode 100644 index 00000000..396af05f --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muSRRegisterGroup.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.machine.registers.SimpleRegisterGroup; + +public class muSRRegisterGroup extends SimpleRegisterGroup +{ + public static final muSRRegisterGroup instance = new muSRRegisterGroup(); + + private muSRRegisterGroup() + { + super("\u00b5SR", muSRRegister.instance, muZRegister.instance, muCRegister.instance, muNRegister.instance, muOVRRegister.instance); + // 00b5 = micro symbol + } +} \ No newline at end of file diff --git a/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muZRegister.java b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muZRegister.java new file mode 100644 index 00000000..22fe0d44 --- /dev/null +++ b/plugins/net.mograsim.logic.model.am2900/src/net/mograsim/logic/model/am2900/machine/registers/am2904/musr/muZRegister.java @@ -0,0 +1,14 @@ +package net.mograsim.logic.model.am2900.machine.registers.am2904.musr; + +import net.mograsim.logic.model.am2900.machine.registers.Am2900Register; +import net.mograsim.machine.registers.HighLevelStateBasedRegister; + +public class muZRegister extends HighLevelStateBasedRegister implements Am2900Register +{ + public static final muZRegister instance = new muZRegister(); + + private muZRegister() + { + super("Z", "am2904.musr.q1", 1); + } +} \ No newline at end of file -- 2.17.1