ESPRESSO: Logic Minimization Software

This gives basic instructions on downloading espresso, creating an input file, and interpreting the results. You will use this program again next semester in ECE 221.

1. Download espresso

Click here to download the executable file espresso.exe . Save the file in the folder of your choice. (Try Internet Explorer if other browsers give you a problem.) I created a subfolder called espresso in my ECE 110 folder. You can also get the example files ex1.txt and ex2.txt. (Right click and then save the file.)

2. Open a DOS window

Espresso is a DOS program that must run in a DOS window. To open a DOS window in Windows XP, click Start, Programs, Accessories, C:\ Command Prompt. In older versions of Windows, click Start, Programs, MS-DOS prompt. Do not go to MS-DOS Mode.

You will see a prompt indicating the current folder (directory). You will then have to move to the directory where the program is located by using the cd (change directory) command. In the DOS window, type the path to the folder. I have my folders arranged in the hierarchy C:, courses, ece110, espresso. Therefore, I would type

cd C:\courses\ece110\espresso

You should get a prompt indicating that you are in the desired directory.

3. Create an input file

Espresso requires a text file that defines the truth table for a function. You can create the file using Notepad. Here is an example for a four-input function.

# example input file 1 ex1.txt
.i 4
.o 1
.ilb A B C D
.ob F
0 0 0 0 0
0 0 0 1 0
0 0 1 0 0
0 0 1 1 0
0 1 0 0 0
0 1 0 1 0
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
1 0 1 0 0
1 0 1 1 0
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
.e

COMMENTS ABOUT THE INPUT FILE
.i 4 (Input variables = 4)
.o 1 (Output variables = 1)
.ilb A B C D (Input variable names)
.ob F (Output variable name)
0 0 0 0 0 (Truth table row, 4 inputs and output)
.e (Signifies the end of the input file.)

4. Run the program

To run espresso, type espresso filename. The name of my example file is ex1.txt, so to run it I would type espresso ex1.txt in the DOS window. The output will then appear in the window.

5. Interpret the output

This is the output file:

# example file 1
.i 4
.o 1
.ilb A B C D
.ob F
.p 2
100- 1
011- 1
.e

Interpretation:
.p 2 (Indicates that there are two terms in the output expression)
100- 1 ( this term is AB'C'. notation: B' is B inverse, so this is read as A and not B and not C)
011- 1 ( this term is A'BC)

The logic expression is therefore F = AB'C' + A'BC. In the output lines,1 is the variable, 0 is the inverse, and - means the variable is not involved.

Tip: specifying the truth table entries only where the function is 1 is sufficient to define the entire truth table:

# example file 1 again -- only outputs that are 1's are required
.i 4
.o 1
.ilb A B C D
.ob F
0 1 1 0 1
0 1 1 1 1
1 0 0 0 1
1 0 0 1 1
.e

Here is another example. Only outputs that are 1's are indicated; in all other truth table entries the function is 0.

# example file 2
.i 4
.o 1
.ilb A B C D
.ob F
0 0 0 0 1
0 0 0 1 1
0 1 0 0 1
0 1 0 1 1
1 1 0 1 1
.e

Here is the output file:

# example file 2
.i 4
.o 1
.ilb A B C D
.ob F
.p 2
-101 1
0-0- 1
.e

The result is F = BC'D + A'C'.

6. Write the output to a file

In the DOS command window, you can have the program write the output to a file. For example

espresso ex2.txt > output2

will direct the output to the ASCII file output2. You can then print the file output2.

These are links to further documentation:

http://www.csl.cornell.edu/courses/ece314/espressotutorial.pdf
http://bear.ces.cwru.edu/eecs_cad/man_octtools_espresso.html