Die Testvektor-Funktion unterstützt sowohl kombinatorische als auch sequenzielle Schaltungstests. Standardmäßig sind Tests kombinatorisch: Die Schaltung wird vor jedem Test zurückgesetzt, sodass jeder Test unabhängig ist.
Für sequenzielle Schaltungen können Sie Testsequenzen mit den speziellen
Spaltenköpfen <set> und <seq> angeben:
<seq>-Werts innerhalb jedes <set> ausgeführt. Tests mit <seq> von 0
oder fehlend werden als kombinatorisch behandelt (Schaltung wird zwischen Tests zurückgesetzt, auch wenn sie
dasselbe Set teilen).Hier ist ein Beispiel für einen sequenziellen Testvektor:
# Sequential test for a counter Clock Reset Count <set> <seq> 0 0 0 1 1 1 0 0 1 2 0 0 1 1 3 1 0 1 1 4 0 0 2 1 5 1 0 2 1 6 0 1 0 2 1
In diesem Beispiel haben die ersten sechs Tests alle <set> 1 mit <seq>
-Werten 1-6, sodass sie eine Sequenz bilden, die in Reihenfolge läuft (seq 1, dann 2, dann 3, usw.)
ohne Zurücksetzen zwischen den Schritten. Der letzte Test hat <set> 2, sodass er eine
neue Sequenz startet und die Schaltung vor der Ausführung zurückgesetzt wird.
Note also that Clock could be an input pin here. But it could also be a labeled clock component (see below).
<set>-Nummer (> 0) gehören zur gleichen Sequenz<seq>-Werts ausgeführt (seq 1, dann 2, dann 3, usw.)<set>-Nummer)<seq> = 0 or missing must also have <set> = 0 or missing and are always combinational (reset between tests)In a sequential test, the first step begins with a reset. In every step after the first, it begins with a simulation tick. Any Clock components in the simulation will be updated by that tick and their signals will be propagated along with any input pin values for that step. You may add a column to the test to show the ticks. The column will be checked against the clock in the circuit as if it were an output pin to verify it describes the clocks behavior. Here is an example for a simple positive edge-triggered D flip-flop test with a standard clock:
<clk> D Q NotQ <set> <seq> 0 0 0 1 1 1 1 0 0 1 1 2 0 1 0 1 1 3 1 1 1 0 1 4 0 1 1 0 1 5 1 1 1 0 1 6 0 0 1 0 1 7
The <clk> header is a special name for an unlabeled clock component. You may also label the clock and use the label as the column header (see earlier example).
We recommend that when using a Clock, you should not change the values of memory inputs during the same step that the clock makes a triggering transition. Doing so may allow an input signal to reach the component at near the same time as the clock signal giving surprising behavior. In the example above, the D input does not change in steps with a rising edge of the clock.
Hier ist ein vollständiges Beispiel, das alle Funktionen kombiniert:
# Mixed combinational and sequential tests A B C Out <clk> <set> <seq> 0 0 0 0 0 0 0 0 0 1 1 0 0 0 1 1 0 1 0 1 1 0 1 0 0 1 1 2 1 1 1 1 0 1 3 0 0 0 <DC> 0 2 1 1 0 1 <float> 1 2 2
In diesem Beispiel:
<DC> for the output, so any output value passes.<float> for the output, expecting a floating value.Thus the execution might look like this:
Zurück: Spezielle Werte | Weiter: Kommandozeilen-Verwendung.