Das Testvektor-Fenster
Das Testvektor-Fenster ähnelt dem Tabellen-Tab des Protokollierungsfensters. Sie können einen Testvektor aus einer Datei laden, und Logisim beginnt mit der Ausführung von Tests an der aktuellen Schaltung. Wie beim Protokollierungsfenster gibt es nur ein Testvektor-Fenster für das Projekt, und die Tabelle ändert sich, um die Schaltung widerzuspiegeln, die im Projektfenster simuliert wird. Beachten Sie jedoch, dass das Testvektor-Modul eine separate Kopie des Schaltungssimulators ausführt und daher die Simulation im Projektfenster nicht beeinträchtigt und auch nicht von ihr beeinflusst wird.
Für das Beispiel werden wir die untenstehende Schaltung testen. Diese Schaltung liefert die Ergebnisse von fünf Logikfunktionen aus zwei Eingängen. Sie enthält einen Fehler, da das untere NAND-Gatter ein AND-Gatter sein sollte.
Die Testvektor-Datei sieht so aus:
A B O_Nor O_Nand O_Xor O_Or O_And O_AB[2] 0 0 1 1 0 0 0 00 0 1 0 1 1 1 0 01 1 0 0 1 1 1 0 10 1 1 0 0 0 1 1 11
Um den Test auszuführen, wählen Sie das Menü | Simulieren |→| Testvektor | und verwenden Sie dann die Schaltfläche Vektor laden. Wählen Sie die von Ihnen erstellte Vektordatei aus. Die Simulation wird sofort ausgeführt und eine Tabelle mit dem Ergebnis angezeigt.
Alle falschen Ausgaben werden rot markiert. Fahren Sie mit der Maus über das rote Feld, um zu sehen, was die Ausgabe laut Testvektor hätte sein sollen. Zeilen mit falschen Ausgaben werden oben im Fenster sortiert.
Das Dateiformat ist einfach. Sie können das Protokollierungsmodul verwenden (mit "Kopfzeile einschließen" im Dateiausgabe-Tab ausgewählt), um zu beginnen, da das Protokollierungsmodul in den meisten Fällen dasselbe Format ausgibt wie das Testvektor-Modul.
Interactive Test Execution
Each row in the Test Vector window has two buttons that allow you to manually interact with individual tests:
- "Show" button (first column): This button previews the circuit state without checking outputs.
- Combinational tests (seq=0): Resets the circuit, sets the input values, and propagates signals. Only the clicked row is highlighted in green to show it was executed.
- Sequential tests (seq>0): Resets the circuit, then runs all prior sequential steps in the set (from seq 1 up to the target step), propagating after each step. All executed sequential steps are highlighted in green to show the execution path.
- "Set" button (second column): This button sets input values and may execute tests.
- Combinational tests (seq=0): Resets the circuit, applies the test inputs, then propagates signals. Only the clicked row is highlighted in green to indicate it was executed.
- Sequential tests (seq>0): Does NOT reset the circuit and does NOT run any other tests. Simply sets the input values for that single step only, then propagates signals. Only the clicked row is highlighted in green. This allows you to manually step through a sequence by setting individual step values without resetting or running previous steps.
- For either button, if you turn off Auto-Propagation in the Simulation menu, it will not propagate the last step in the sequence (or the only step in the combinational test), stopping after setting the input pins. This allows you to single-step the circuit through the propagation of that line.
Highlighting behavior:
- When the Show button is clicked on a combinational test, only that single row is highlighted in green.
- When the Show button is clicked on a sequential test, all sequential steps (seq > 0) up to and including the target step are highlighted in green.
- When the Set button is clicked, only the clicked row is highlighted in green, regardless of whether it's combinational or sequential.
- Highlighting is cleared when a new vector file is loaded or when the circuit simulator is reset.
Zurück: Testvektoren | Weiter: Testvektor-Dateiformat.