diff --git a/src/main/java/de/neemann/digital/core/element/ElementTypeDescription.java b/src/main/java/de/neemann/digital/core/element/ElementTypeDescription.java index b6309e6fa..638b77483 100644 --- a/src/main/java/de/neemann/digital/core/element/ElementTypeDescription.java +++ b/src/main/java/de/neemann/digital/core/element/ElementTypeDescription.java @@ -60,8 +60,8 @@ public class ElementTypeDescription { */ public ElementTypeDescription(String name, ElementFactory elementFactory, PinDescription... inputPins) { this.name = name; - this.shortName = null; langKey = "elem_" + name; + this.shortName = Lang.getNull(langKey + "_short"); this.elementFactory = elementFactory; this.inputPins = new PinDescriptions(inputPins).setLangKey(getPinLangKey()); for (PinDescription p : inputPins) diff --git a/src/main/java/de/neemann/digital/core/flipflops/FlipflopD.java b/src/main/java/de/neemann/digital/core/flipflops/FlipflopD.java index ee3fb6c52..509fd5d69 100644 --- a/src/main/java/de/neemann/digital/core/flipflops/FlipflopD.java +++ b/src/main/java/de/neemann/digital/core/flipflops/FlipflopD.java @@ -25,8 +25,7 @@ public class FlipflopD extends Node implements Element { .addAttribute(Keys.BITS) .addAttribute(Keys.LABEL) .addAttribute(Keys.DEFAULT) - .addAttribute(Keys.VALUE_IS_PROBE) - .setShortName("D"); + .addAttribute(Keys.VALUE_IS_PROBE); private final int bits; private final boolean isProbe; diff --git a/src/main/java/de/neemann/digital/core/flipflops/FlipflopJK.java b/src/main/java/de/neemann/digital/core/flipflops/FlipflopJK.java index 17cd5c586..9e1976033 100644 --- a/src/main/java/de/neemann/digital/core/flipflops/FlipflopJK.java +++ b/src/main/java/de/neemann/digital/core/flipflops/FlipflopJK.java @@ -24,8 +24,7 @@ public class FlipflopJK extends Node implements Element { .addAttribute(Keys.ROTATE) .addAttribute(Keys.LABEL) .addAttribute(Keys.DEFAULT) - .addAttribute(Keys.VALUE_IS_PROBE) - .setShortName("JK"); + .addAttribute(Keys.VALUE_IS_PROBE); private final Boolean isProbe; private final String label; diff --git a/src/main/java/de/neemann/digital/core/flipflops/FlipflopRS.java b/src/main/java/de/neemann/digital/core/flipflops/FlipflopRS.java index e81b4437a..a1e5bb324 100644 --- a/src/main/java/de/neemann/digital/core/flipflops/FlipflopRS.java +++ b/src/main/java/de/neemann/digital/core/flipflops/FlipflopRS.java @@ -23,8 +23,7 @@ public class FlipflopRS extends Node implements Element { = new ElementTypeDescription("RS_FF", FlipflopRS.class, input("S"), input("C"), input("R")) .addAttribute(Keys.ROTATE) .addAttribute(Keys.LABEL) - .addAttribute(Keys.VALUE_IS_PROBE) - .setShortName("RS"); + .addAttribute(Keys.VALUE_IS_PROBE); private final boolean isProbe; private final String label; diff --git a/src/main/java/de/neemann/digital/core/flipflops/FlipflopT.java b/src/main/java/de/neemann/digital/core/flipflops/FlipflopT.java index 67620d2cc..bd5adbb4c 100644 --- a/src/main/java/de/neemann/digital/core/flipflops/FlipflopT.java +++ b/src/main/java/de/neemann/digital/core/flipflops/FlipflopT.java @@ -23,8 +23,7 @@ public class FlipflopT extends Node implements Element { = new ElementTypeDescription("T_FF", FlipflopT.class, input("C")) .addAttribute(Keys.ROTATE) .addAttribute(Keys.LABEL) - .addAttribute(Keys.VALUE_IS_PROBE) - .setShortName("T"); + .addAttribute(Keys.VALUE_IS_PROBE); private final boolean isProbe; private final String label; diff --git a/src/main/java/de/neemann/digital/core/memory/LookUpTable.java b/src/main/java/de/neemann/digital/core/memory/LookUpTable.java index c6316ce55..e8fa29f34 100644 --- a/src/main/java/de/neemann/digital/core/memory/LookUpTable.java +++ b/src/main/java/de/neemann/digital/core/memory/LookUpTable.java @@ -32,8 +32,7 @@ public class LookUpTable extends Node implements Element { .addAttribute(Keys.ROTATE) .addAttribute(Keys.BITS) .addAttribute(Keys.INPUT_COUNT) - .addAttribute(Keys.DATA) - .setShortName("LUT"); + .addAttribute(Keys.DATA); private final DataField data; private final ObservableValue output; diff --git a/src/main/java/de/neemann/digital/core/memory/RAMDualPort.java b/src/main/java/de/neemann/digital/core/memory/RAMDualPort.java index 5885b2df5..31530c4d5 100644 --- a/src/main/java/de/neemann/digital/core/memory/RAMDualPort.java +++ b/src/main/java/de/neemann/digital/core/memory/RAMDualPort.java @@ -27,8 +27,7 @@ public class RAMDualPort extends Node implements Element, RAMInterface { .addAttribute(Keys.ROTATE) .addAttribute(Keys.BITS) .addAttribute(Keys.ADDR_BITS) - .addAttribute(Keys.LABEL) - .setShortName("RAM"); + .addAttribute(Keys.LABEL); private final DataField memory; private final ObservableValue output; diff --git a/src/main/java/de/neemann/digital/core/memory/RAMSinglePort.java b/src/main/java/de/neemann/digital/core/memory/RAMSinglePort.java index 3d2eba137..f26a68c2e 100644 --- a/src/main/java/de/neemann/digital/core/memory/RAMSinglePort.java +++ b/src/main/java/de/neemann/digital/core/memory/RAMSinglePort.java @@ -28,8 +28,7 @@ public class RAMSinglePort extends RAMDualPort { .addAttribute(Keys.ROTATE) .addAttribute(Keys.BITS) .addAttribute(Keys.ADDR_BITS) - .addAttribute(Keys.LABEL) - .setShortName("RAM"); + .addAttribute(Keys.LABEL); /** * Creates a new instance diff --git a/src/main/java/de/neemann/digital/core/memory/Register.java b/src/main/java/de/neemann/digital/core/memory/Register.java index 0b75b2d8d..23e8486f1 100644 --- a/src/main/java/de/neemann/digital/core/memory/Register.java +++ b/src/main/java/de/neemann/digital/core/memory/Register.java @@ -23,8 +23,7 @@ public class Register extends Node implements Element { .addAttribute(Keys.ROTATE) .addAttribute(Keys.BITS) .addAttribute(Keys.LABEL) - .addAttribute(Keys.VALUE_IS_PROBE) - .setShortName("Reg"); + .addAttribute(Keys.VALUE_IS_PROBE); private final int bits; private final boolean isProbe; diff --git a/src/main/resources/lang/lang_de.xml b/src/main/resources/lang/lang_de.xml index c89b80d41..255143c62 100644 --- a/src/main/resources/lang/lang_de.xml +++ b/src/main/resources/lang/lang_de.xml @@ -97,6 +97,7 @@ Es kann dann ein Programm bis zum nächsten BRK-Befehl ausgeführt werden.Overflow Ausgang. Hat der Zähler das Maximum erreicht hat wird dieser Ausgang für eine Taktdauer 1. Gibt den gezählten Wert aus. D-FlipFLop + D Ein Baustein zum Speichern von zwei Zuständen (ein Bit). Der an Eingang D anliegende Wert wird abgespeichert wenn Eingang C auf 1 wechselt. Das zu speichernde Bit. Takt des Flipflops. Wechselt dieser Wert auf 1, wird der an D anliegende Wert abgespeichert. @@ -137,6 +138,7 @@ Es können sowohl komplette Takte als auch einzelne Gatter-Veränderungen angeze An diesem Ausgang wird der anliegende Wert ausgegeben. Ein Eingang der genutzt werden kann, um eine Verbindung zu einem eingebettetem Element herzustellen. JK-FlipFlop + JK Bietet die Funktionen zum Speichern (J=K=0), Setzen (J=1, K=0), Rücksetzen (J=0, K=1) und Wechseln (J=K=1). Übernommen werden die Eingänge bei einer steigenden Flanke am Eingang C. Der Setzen-Eingang des Flipflops. @@ -148,6 +150,7 @@ Es können sowohl komplette Takte als auch einzelne Gatter-Veränderungen angeze Eine Leuchtdiode welche beispielsweise zur Visualisierung eines Ausgangswertes verwendet werden kann. Nimmt ein Bit entgegen. Leuchtet wenn der Eingang auf 1 gesetzt ist. LED Eingang. LED leuchtet wenn Eingang auf 1 gesetzt ist. LookUpTable + LUT Erzeugt einen Ausgabewert aus einer Tabelle. Auf diese Weise kann jedes kombinatorische Gatter erzeugt werden. Die Konfiguration der LookUpTable, wie Anzahl der Bits pro Eingang und Anzahl der Eingänge, kann im Attribute-Dialog eingestellt werden. Eingang {0}. Dieser Eingang legt, in Kombination mit den anderen Eingängen, die Addresse des gewünschten Ausgabewertes fest. @@ -183,6 +186,7 @@ Es können sowohl komplette Takte als auch einzelne Gatter-Veränderungen angeze Ein Messwert, welcher im Messwertgraphen dargestellt werden kann. Hier wird der Messwert angeschlossen. RAMDualPort + RAM Die Adresse, an der gelesen und geschrieben wird. Der Takt. Eine steigende Flanke aktiviert das Speichern. Die Daten die gespeichert werden sollen @@ -192,6 +196,7 @@ Es können sowohl komplette Takte als auch einzelne Gatter-Veränderungen angeze Ein RAM Modul mit getrennten Daten-Anschlüssen für Lesen und Schreiben. Es gibt einen Eingang für das Beschreiben und einen Ausgang für das Auslesen der gespeicherten Daten. RAMSinglePort + RAM Die Adresse, an der gelesen und geschrieben wird. Der Takt. Eine steigende Flanke aktiviert das Speichern. Der bidirektionale Datenanschluß. @@ -216,6 +221,7 @@ Die gesammte Speichergröße beträgt damit damit dx*dy*2 Speicherzellen.Hier wird das Datenwort ausgegeben, wenn am "Select"-Eingang eine 1 anliegt. Ist dieser Pin high (1) ist der Ausgang aktiviert. Ist er low (0) ist der Ausgang hochohmig. RS-FlipFlop + RS Ein Baustein welcher ein einzelnes Bit über einen unbestimmten Zeitraum abspeichern kann. Bietet die Funktionen "Setzen" und "Rücksetzen". Der Setzen-Eingang. Mit diesem Eingang wird das gespeicherte Bit gesetzt. @@ -261,6 +267,7 @@ Die gesammte Speichergröße beträgt damit damit dx*dy*2 Speicherzellen.Ausgang gibt das Ergebnis der Substraktion aus. Ausgang gibt 1 aus wenn bei der Substraktion ein Überlauf aufgetreten ist. T-FlipFlop + T Ein Baustein mit einem Eingang. Wechselt den Status der Ausgänge mit jeder 1 am Eingang. Dieser Eingang nimmt ein Bit entgegen und wechselt jedes mal die Ausgänge wenn er auf 1 gesetzt wird (toggle). Gibt den gespeicherten Wert aus. diff --git a/src/main/resources/lang/lang_en.xml b/src/main/resources/lang/lang_en.xml index 3334d258e..3d426923a 100644 --- a/src/main/resources/lang/lang_en.xml +++ b/src/main/resources/lang/lang_en.xml @@ -96,6 +96,7 @@ Returns the counted value. Overflow output. This pin is set to 1 if the counter has an overflow and returns to zero. D-FlipFlop + D A component used to save two states (one bit). The bit on pin D is stored on a rising edge of pin C. Input of the bit to be stored. Control pin to store a bit. The bit on input D is stored on a rising edge of this pin. @@ -133,7 +134,8 @@ Input This connection outputs the given value. A input which can be used to connect the circuit if it is included in an other circuit. - JK_FF + JK-Flipflop + JK Has the possibility to store (J=K=0), set (J=1, K=0), reset (J=0, K=1) or toggle (J=K=1) the stored value. The input values act with a rising edge at input C. The set input of the flipflop. The Clock input. A rising edge initiates a state change. @@ -144,6 +146,7 @@ A simple LED can be used to visualize an output value. Accepts a single bit. Lights up when the input is set to 1. LED Input. LED shines when input is set to 1. LookUpTable + LUT Input {0}. This input in combination with all other inputs define the address of the stored value to be returned. Returns the stored value at the address set via the inputs. Gets the output value from a stored table. @@ -180,6 +183,7 @@ A measurement value which can be shown in the data graph. The measurement value. RAMDualPort + RAM The address to read and write Clock The data to be stored in the RAM @@ -188,6 +192,7 @@ If this input is high when the clock becomes high, the the data is stored. A RAM module with separate inputs for storing and output for reading the stored data. RAMSinglePort + RAM The address to read and write. Clock The bidirectional data connection. @@ -210,6 +215,7 @@ The selected data word. Only readable if "select" input is high. If the input is high, the output is activated. If it is low, the data output is in high Z state. RS-FlipFlop + RS A component to save a single bit for an undefined duration. Provides the functions "set" and "reset" the stored bit. The set input. @@ -255,6 +261,7 @@ Output returns the result of the substraction. Output returns 1 if an overflow occured. T-FlipFlop + T A component with one input. Toggles the state of the output on a rising edge at the input. Clock. A rising edgt toggles the output. Returns the stored value.