improved test case help text

This commit is contained in:
hneemann 2017-09-13 21:49:56 +02:00
parent f80fde69f5
commit f022b48133
2 changed files with 52 additions and 53 deletions

View File

@ -1056,7 +1056,9 @@ Mehrere Ausdrücke können durch "," oder ";" getrennt werden.
Sollen die Ausdrücke benannt werden, kann die let-Anweisung verwendet Sollen die Ausdrücke benannt werden, kann die let-Anweisung verwendet
werden: "let U=A+B, let V=A*B"</string> werden: "let U=A+B, let V=A*B"</string>
<string name="msg_testVectorHelpTitle">Testvektoren</string> <string name="msg_testVectorHelpTitle">Testvektoren</string>
<string name="msg_testVectorHelp"><![CDATA[<html><body> <string name="msg_testVectorHelp"><![CDATA[<html>
<head><style>pre { background-color: #E0E0E0;}</style></head>
<body>
<p>Die erste Zeile muss, durch ein Leerzeichen getrennt, die <p>Die erste Zeile muss, durch ein Leerzeichen getrennt, die
Ein- und Ausgänge auflisten. In den folgenden Zeilen stehen dann die Sollwerte. Ein- und Ausgänge auflisten. In den folgenden Zeilen stehen dann die Sollwerte.
Dabei steht ein 'X' für Don't Care, und ein 'Z' für hochohmig. Dabei steht ein 'X' für Don't Care, und ein 'Z' für hochohmig.
@ -1065,19 +1067,17 @@ Taktzyklus durchgeführt, und erst daran anschließend werden die Werte verglich
Auf diese Weise können Schaltwerke einfacher getestet werden. Auf diese Weise können Schaltwerke einfacher getestet werden.
Eine Zeile, die mit einem Doppelkreuz ('#') beginnt ist ein Kommentar.</p> Eine Zeile, die mit einem Doppelkreuz ('#') beginnt ist ein Kommentar.</p>
<p>Ein Test für einen 2-Bit Zähler könnte damit wie folgt aussehen:</p> <p>Ein Test für einen 2-Bit Zähler könnte damit wie folgt aussehen:</p>
<p>
<code> <pre>
C Q1 Q0<br/> C Q1 Q0
0 0 0<br/> 0 0 0
C 0 1<br/> C 0 1
C 1 0<br/> C 1 0
C 1 1<br/> C 1 1
C 0 0 C 0 0
</code> </pre>
</p>
<p> <p>Gestartet werden die Tests über Start->Tests ausführen.</p>
Gestartet werden die Tests über Start->Tests ausführen.
</p>
<p> <p>
Um vereinfacht sehr viele Tests durchzuführen existiert die 'repeat([n])' Anweisung: Um vereinfacht sehr viele Tests durchzuführen existiert die 'repeat([n])' Anweisung:
Beginnt eine Zeile mit 'repeat([n])' werden [n] Testzeilen erzeugt. Dabei kann die Beginnt eine Zeile mit 'repeat([n])' werden [n] Testzeilen erzeugt. Dabei kann die
@ -1088,13 +1088,12 @@ bits([bits],[value]) Anweisung. Mit dieser werden [bits] Bits des Wertes [value]
<p>Im folgenden ein Beispiel, welches einen 4-Bit Addierer testet:</p> <p>Im folgenden ein Beispiel, welches einen 4-Bit Addierer testet:</p>
<p> <pre>
<code> C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0
C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0<br/> repeat(256) 0 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15))
repeat(256) 0 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15))<br/>
repeat(256) 1 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15)+1) repeat(256) 1 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15)+1)
</code> </pre>
</p>
<p>Die Eingangssignale sind das Carry-In (C_i-1) und die acht Eingangsbits A_3-A_0 <p>Die Eingangssignale sind das Carry-In (C_i-1) und die acht Eingangsbits A_3-A_0
und B_3-B_0. Erzeugt werden die jeweils 4 Eingangsbits mit der 'bits'Anweisung. und B_3-B_0. Erzeugt werden die jeweils 4 Eingangsbits mit der 'bits'Anweisung.
Das Ergebnis (C_i,S_3-S_0) wird ebenfalls durch eine 'bits'-Anweisung erzeugt. Das Ergebnis (C_i,S_3-S_0) wird ebenfalls durch eine 'bits'-Anweisung erzeugt.
@ -1104,17 +1103,16 @@ Eingangskonfigurationen abdecken.</p>
<p>Sollen mehrere Zeilen wiederholt werden, oder werden geschachtelte Schleifen benötigt, <p>Sollen mehrere Zeilen wiederholt werden, oder werden geschachtelte Schleifen benötigt,
kann die loop-Anweisung verwendet werden. Das obige Beispiel könnte man also kann die loop-Anweisung verwendet werden. Das obige Beispiel könnte man also
auch wie folgt umsetzen:</p> auch wie folgt umsetzen:</p>
<p>
<code> <pre> C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0
C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0<br/> loop(a,16)
loop(a,16)<br/> loop(b,16)
loop(b,16)<br/> 0 bits(4,a) bits(4,b) bits(5,a+b)
0 bits(4,a) bits(4,b) bits(5,a+b)<br/> 1 bits(4,a) bits(4,b) bits(5,a+b+1)
1 bits(4,a) bits(4,b) bits(5,a+b+1)<br/> end loop
end loop<br/>
end loop end loop
</code> </pre>
</p>
</body></html>]]></string> </body></html>]]></string>
</resources> </resources>

View File

@ -1038,7 +1038,9 @@ Multiple expressions can be separated by "," or ";".
If you want to name the expressions you can use the If you want to name the expressions you can use the
let-command: "let U=A+B, let V=A*B"</string> let-command: "let U=A+B, let V=A*B"</string>
<string name="msg_testVectorHelpTitle">Test vectors</string> <string name="msg_testVectorHelpTitle">Test vectors</string>
<string name="msg_testVectorHelp"><![CDATA[<html><body> <string name="msg_testVectorHelp"><![CDATA[<html>
<head><style>pre { background-color: #E0E0E0;}</style></head>
<body>
<p>The first line has to contain the names of inputs and outputs. <p>The first line has to contain the names of inputs and outputs.
The following lines contain the expected values. The following lines contain the expected values.
A 'X' represents a don't care, and a 'Z' represents a high Z value. A 'X' represents a don't care, and a 'Z' represents a high Z value.
@ -1048,14 +1050,14 @@ A line which starts with a number sign ('#') is a comment.</p>
<p>So a test for a 2-bit counter could look like this:</p> <p>So a test for a 2-bit counter could look like this:</p>
<p><code> <pre>
C Q1 Q0<br/> C Q1 Q0
0 0 0<br/> 0 0 0
C 0 1<br/> C 0 1
C 1 0<br/> C 1 0
C 1 1<br/> C 1 1
C 0 0 C 0 0
</code></p> </pre>
<p>The tests are executed by Run->Run Tests.</p> <p>The tests are executed by Run->Run Tests.</p>
<p> <p>
@ -1068,13 +1070,12 @@ and these are to be set together to a binary value, this can be done with the
<p>The following is an example that tests a 4-bit adder:</p> <p>The following is an example that tests a 4-bit adder:</p>
<p> <pre>
<code> C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0
C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0<br/> repeat(256) 0 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15))
repeat(256) 0 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15))<br/>
repeat(256) 1 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15)+1) repeat(256) 1 bits(4,n>>4) bits(4,n) bits(5,(n>>4)+(n&15)+1)
</code> </pre>
</p>
<p>The input signals are the carry-in (C_i-1) and the eight input bits A_3-A_0 and B_3-B_0. <p>The input signals are the carry-in (C_i-1) and the eight input bits A_3-A_0 and B_3-B_0.
The 4 input bits are generated with the 'bits' instruction. The result (C_i, S_3-S_0) is also generated The 4 input bits are generated with the 'bits' instruction. The result (C_i, S_3-S_0) is also generated
by a 'bits' instruction. by a 'bits' instruction.
@ -1082,17 +1083,17 @@ This happens once with C_i-1 = 0 and in the next line with C_i-1 = 1.
In this way, 512 test rows are generated which cover all possible input configurations.</p> In this way, 512 test rows are generated which cover all possible input configurations.</p>
<p>If multiple rows are to be repeated, or if nested loops are required, the loop <p>If multiple rows are to be repeated, or if nested loops are required, the loop
statement can be used. The above example could also be implemented as follows:</p> statement can be used. The above example could also be implemented as follows:</p>
<p>
<code> <pre>
C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0<br/> C_i-1 A_3 A_2 A_1 A_0 B_3 B_2 B_1 B_0 C_i S_3 S_2 S_1 S_0
loop(a,16)<br/> loop(a,16)
loop(b,16)<br/> loop(b,16)
0 bits(4,a) bits(4,b) bits(5,a+b)<br/> 0 bits(4,a) bits(4,b) bits(5,a+b)
1 bits(4,a) bits(4,b) bits(5,a+b+1)<br/> 1 bits(4,a) bits(4,b) bits(5,a+b+1)
end loop<br/> end loop
end loop end loop
</code> </pre>
</p>
</body></html>]]></string> </body></html>]]></string>
</resources> </resources>