From 09e9df3bebbcc49bd4edc77de1bc4cde609271e5 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Fri, 15 Nov 2019 01:21:44 +0100 Subject: [PATCH] Switched to using logical U for mnemonic X to avoid glitches in Am2900 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Wir machen den Benutzern also ein U für ein X vor. --- .../machine/mi/parameters/BooleanClassification.java | 6 +++--- .../mograsim/machine/mi/parameters/IntegerImmediate.java | 6 +++--- .../net/mograsim/machine/mi/parameters/MnemonicFamily.java | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/BooleanClassification.java b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/BooleanClassification.java index fb94a303..f52e966b 100644 --- a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/BooleanClassification.java +++ b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/BooleanClassification.java @@ -2,7 +2,7 @@ package net.mograsim.machine.mi.parameters; import static net.mograsim.logic.core.types.BitVector.SINGLE_0; import static net.mograsim.logic.core.types.BitVector.SINGLE_1; -import static net.mograsim.logic.core.types.BitVector.SINGLE_X; +import static net.mograsim.logic.core.types.BitVector.SINGLE_U; import net.mograsim.machine.mi.parameters.MicroInstructionParameter.ParameterType; @@ -12,7 +12,7 @@ public class BooleanClassification extends MnemonicFamily public BooleanClassification(boolean defaultValue, String trueName, String falseName) { - super(defaultValue ? trueName : falseName, new MnemonicPair("X", SINGLE_X), new MnemonicPair(trueName, SINGLE_1), + super(defaultValue ? trueName : falseName, new MnemonicPair("X", SINGLE_U), new MnemonicPair(trueName, SINGLE_1), new MnemonicPair(falseName, SINGLE_0)); this.trueName = trueName; this.falseName = falseName; @@ -20,7 +20,7 @@ public class BooleanClassification extends MnemonicFamily public BooleanClassification(String trueName, String falseName) { - super("X", new MnemonicPair("X", SINGLE_X), new MnemonicPair(trueName, SINGLE_1), new MnemonicPair(falseName, SINGLE_0)); + super("X", new MnemonicPair("X", SINGLE_U), new MnemonicPair(trueName, SINGLE_1), new MnemonicPair(falseName, SINGLE_0)); this.trueName = trueName; this.falseName = falseName; } diff --git a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerImmediate.java b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerImmediate.java index dea11d46..97db7e4a 100644 --- a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerImmediate.java +++ b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/IntegerImmediate.java @@ -1,6 +1,6 @@ package net.mograsim.machine.mi.parameters; -import static net.mograsim.logic.core.types.Bit.X; +import static net.mograsim.logic.core.types.Bit.U; import java.math.BigInteger; @@ -16,7 +16,7 @@ public final class IntegerImmediate implements MicroInstructionParameter */ public IntegerImmediate(IntegerClassification owner, BigInteger value, int bits) { - this(owner, value == null ? BitVector.of(X, bits) : BitVector.from(value, bits)); + this(owner, value == null ? BitVector.of(U, bits) : BitVector.from(value, bits)); } public IntegerImmediate(IntegerClassification owner, BitVector value) @@ -67,7 +67,7 @@ public final class IntegerImmediate implements MicroInstructionParameter public boolean isX() { - return value.equals(BitVector.of(X, value.length())); + return value.equals(BitVector.of(U, value.length())); } /** diff --git a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java index fbdaf764..87046c8f 100644 --- a/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java +++ b/plugins/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/MnemonicFamily.java @@ -1,6 +1,6 @@ package net.mograsim.machine.mi.parameters; -import static net.mograsim.logic.core.types.Bit.X; +import static net.mograsim.logic.core.types.Bit.U; import java.util.Arrays; import java.util.LinkedList; @@ -182,7 +182,7 @@ public class MnemonicFamily implements ParameterClassification public MnemonicFamilyBuilder addX() { - pairs.add(new MnemonicPair("X", BitVector.of(X, bits))); + pairs.add(new MnemonicPair("X", BitVector.of(U, bits))); return this; } -- 2.17.1