TRUTH TABLE IN ABEL



We first start with the Truth Table method. Truth tables are an alternative method for describing both combinatorial and sequential circuits. A truth table consists of a truth table header and truth table entries. The truth table header defines the inputs and outputs of the function. The header is followed by a sequence of truth table entries that define the required output values for each possible set of input values. Hence the truth table is specified by listing all the input combinations we care about and their corresponding outputs. Notice how the number of bits must match precisely with the specification given at the beginning of the truth table ( 5 inputs--month (4) and leap (1) -> 4 outputs--days (4).) The month inputs alias allowed us to use decimal numbers for the month rather than binary values (this is why the order of the month inputs in the alias statement was important--high order bit to low order bit). Note also the use of .X. to specify a don't care input. This tells the ABEL compilers that for any value of that particular input the output values should be the same. Finally, note that we did not list all the possible input combinations. The presence of the .X.'s gave ABEL a hint that it should use the input combinations not listed as don't care conditions. However, in general, ABEL does not do this. To ensure that ABEL takes advantage of this sort of don't care information you can declare an output to be istype 'dc, com'.

We are now ready to compile our specification and see what the result is. Synario keeps track of all the steps required in compilation. Select the ABEL source in the "Sources" sub-window and then double-click on "Reduced Equations" in the "Process" sub-window of the navigator.

The resulting file is a5.eq1 and it contains, among other things, the following equations for our four outputs:

 EQUATIONS:

    d28 = (!m8 & !m4 & m2 & !m1 & !leap);
    d29 = (!m8 & !m4 & m2 & !m1 & leap);
 

d30 = (!m8 & m4 & !m1
# m8 & !m4 & m1);


d31 = (m8 & !m2 & !m1

# m8 & !m4 & !m1

# !m8 & m1);