|
The following rules apply to the Truth Table Statement:
The names in the table heading can be either single nodes or groups.
Every conceivable combination of input values need not be listed. You can
use an X
(don't care) to indicate that the output does not
depend on the input corresponding to the position of the X
.
The following example specifies that if a0
is high and f4
is low, the value of the other inputs is not important. Therefore, you can
specify the common portion of the input pattern (in this example, 0
), and
then use X
characters for the rest of the input pattern (in
this example, XXX
).
TABLE a0, f[4..1].q => f[4..1].d, control; 0, B"0000" => B"0001", 1; 0, B"0100" => B"0010", 0; 1, B"0XXX" => B"0100", 0; X, B"1111" => B"0101", 1; END TABLE;
The number of comma-separated items in a truth table row must equal the number of comma-separated items in the truth table heading.
The Defaults Statement assigns output values in cases when the actual inputs do not match the input values of the table.
When you use X (don't care) characters to specify a bit pattern, you must ensure that the pattern cannot assume the value of another bit pattern in the truth table. AHDL assumes that only one condition in a truth table is true at a time; therefore, overlapping bit patterns may cause unpredictable results. |
- PLDWorld - |
|
Created by chm2web html help conversion utility. |