From cc7a2bb3bae8084335c9ef342e9b15803a2e57a6 Mon Sep 17 00:00:00 2001 From: hneemann Date: Sat, 13 May 2017 09:47:32 +0200 Subject: [PATCH] minor documentation/tooltip changes --- README.md | 11 +- README_de.md | 12 +- src/main/dig/74xx/counter.dig | 1124 +++++++++-------- .../de/neemann/digital/core/element/Keys.java | 2 +- src/main/resources/lang/lang_de.xml | 2 + src/main/resources/lang/lang_en.xml | 2 + 6 files changed, 589 insertions(+), 564 deletions(-) diff --git a/README.md b/README.md index b216629ec..cd5691922 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,8 @@ Below I would like to explain briefly the reasons which led me to start a new de ### Switch On ### -Logisim has difficulties with the "switching on" of a circuit. A simple master-slave flip-flop +In Logisim there is no real switching on" of a circuit. The circuit is working also while you are modifying it. +This causes sometimes an unexpected behaviour. A simple master-slave flip-flop can not be realized with Logisim, since the circuit is not switched on, there is no settling time to bring the circuit to a stable condition after its completion. A master-slave flip-flop can only be implemented with a reset input. This @@ -66,9 +67,11 @@ the outputs of the gate are not updated instantly. Only when all gates involved the outputs of all gates are updated. All gates seem to change synchronously, i.e. they seem to have all the exact same gate delay time. However, an undesirable feature of this approach is that even a simple RS flip-flop might not be able to -reach a stable state. -For that reason, another mode is used during settling time: Each time a -gate undergoes a change at one of its inputs all gate inputs are read and their outputs are updated immediately. +reach a stable state. The same problem Logisim has. + +To solve that problem, the "switching on" is introduced and a different simulation mode is used during the +settling time right after switching on the circuit: +Each time a gate undergoes a change at one of its inputs all gate inputs are read and their outputs are updated immediately. This happens gatewise in random order until no further changes occur and the circuit reaches a stable state. The gates appear to have random delay times now. This way, a master-slave flip-flop reaches a stable state after "switch on", however, the final state is still undefined. diff --git a/README_de.md b/README_de.md index aab4612ba..499c4d567 100644 --- a/README_de.md +++ b/README_de.md @@ -55,7 +55,8 @@ starten: ### Einschalten ### -Logisim hat Schwierigkeiten mit dem "Einschalten" einer Schaltung. Ein einfaches Master-Slave Flipflop +In Logisim gibt es kein echtes "Einschalten" einer Schaltung. die Schaltung ist auch aktiv, während sie verändert wird. +Dies kann zu unerwartetem Verhalten führen: Ein einfaches Master-Slave JK-Flipflop lässt sich mit Logisim nicht realisieren, da die Schaltung nicht "eingeschaltet" wird, gibt es keine Stabilierungsphase nach dessen Abschluss sich die Schaltung in einem stabilen Zustand befindet. Ein Master-Slave Flipflop lässt sich nur mit einem Reset-Eingang simulieren, und dieser muss auch betätigt werden, um die @@ -67,9 +68,12 @@ Gatter eine Änderung an einem seiner Eingänge erfährt, werden zwar die Eingä werden die Ausgänge des Gatters nicht aktualisiert. Erst wenn alle betroffenen Gatter die Änderungen an ihren Eingängen eingelesen haben, werden die Ausgänge aller Gatter aktualisiert. Alle Gatter scheinen vollkommen synchron umzuschalten. Sie scheinen alle die exakt gleiche Gatterlaufzeit zu haben. -Dieser Ansatz führt jedoch dazu, dass sich schon ein einfaches RS-Flipflop unter Umständen nicht stabilisieren kann. -Während der Einschaltphase wird daher ein anderer Modus verwendet: Alle Gatter lesen ihre Eingänge ein und -aktualisieren sofort ihre Ausgänge. Dies geschieht Gatter für Gatter in zufälliger Reihenfolge der Gatter, bis es keine +Dieser Ansatz führt jedoch dazu, dass sich schon ein einfaches RS-Flipflop unter Umständen nicht stabilisieren kann. +Dies ist das selbe Problem welches auch bei Logisim auftritt. + +Um dieses Problem zu lösen, wird während der Einschaltphase wird ein anderer Simulationsmodus verwendet: +Alle Gatter lesen ihre Eingänge ein und aktualisieren sofort ihre Ausgänge. +Dies geschieht Gatter für Gatter in zufälliger Reihenfolge der Gatter, bis es keine Veränderungen mehr gibt und die Schaltung sich stabilisiert hat. Auf diese Weise stabilisiert sich auch ein Master-Slave Flipflop nach dem "einschalten", jedoch ist der sich einstellende Endzustand nicht definiert. diff --git a/src/main/dig/74xx/counter.dig b/src/main/dig/74xx/counter.dig index fd3d6dc39..a905216ed 100644 --- a/src/main/dig/74xx/counter.dig +++ b/src/main/dig/74xx/counter.dig @@ -10,103 +10,83 @@ 7447.dig - - - rotation - - - - + + Seven-Seg - + Ground - + 7447.dig - - - rotation - - - - + + Seven-Seg - + Ground - + 7447.dig - - - rotation - - - - + + Seven-Seg - + Ground - + VDD - + VDD - + VDD - - - - VDD - - + Ground - - + + + rotation + + + + 74162.dig - - - rotation - - - - + + VDD - + Clock @@ -124,690 +104,724 @@ 2 - + VDD - + 74162.dig - - - rotation - - - - + + VDD - + VDD - + 74162.dig - - - rotation - - - - + + VDD - + VDD - + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - + - - + + - - + + - - + + - - + + - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - + + - - + + - - + + - - + + + + + + \ No newline at end of file diff --git a/src/main/java/de/neemann/digital/core/element/Keys.java b/src/main/java/de/neemann/digital/core/element/Keys.java index e011b310e..c69991b62 100644 --- a/src/main/java/de/neemann/digital/core/element/Keys.java +++ b/src/main/java/de/neemann/digital/core/element/Keys.java @@ -69,7 +69,7 @@ public final class Keys { * Background Color of nested circuits */ public static final Key BACKGROUND_COLOR - = new Key<>("Color", new Color(255, 255, 0, 64)); + = new Key<>("backgroundColor", new Color(255, 255, 0, 64)); /** * The input splitting of a splitter diff --git a/src/main/resources/lang/lang_de.xml b/src/main/resources/lang/lang_de.xml index cfb402a85..36968cd8d 100644 --- a/src/main/resources/lang/lang_de.xml +++ b/src/main/resources/lang/lang_de.xml @@ -497,6 +497,8 @@ Sind evtl. die Namen der Variablen nicht eindeutig? Anzahl der Daten-Bits die verwendet werden. Farbe Die Farbe des Elementes. + Hintergrundfarbe + Hintergrundfarbe der Schaltung, wenn sie eingebettet wird. Wird für DILs nicht verwendet. Timeout Zyklen Wenn nach dieser Anzahl von Takten kein Break eingegangen ist, wird ein Fehler erzeugt Daten diff --git a/src/main/resources/lang/lang_en.xml b/src/main/resources/lang/lang_en.xml index 0a1866443..3d87b6b58 100644 --- a/src/main/resources/lang/lang_en.xml +++ b/src/main/resources/lang/lang_en.xml @@ -487,6 +487,8 @@ The names of the variables may not be unique. Number of data bits used. Color The Color of the element. + Background color + Background color of the circuit when it is embedded in another circuit. Is not used for DIL packages. Timeout cycles If this amount of cycles is reached without a break signal, an error is created. Data