Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science
6.111 -- Introductory Digital Systems Laboratory
Donald E. Troxel
January 30, 1998
WARP 4.2 is a program supplied by Cypress Semiconductor. You are free
to use it for any educational or personal purpose. Should you want to
use it in connection with any job (i.e., commercial activity), you
should pay Cypress their rather modest fee.
This rather short tutorial will not tell you all there is to know
about WARP 4.2. Rather it is aimed at getting you started by
supplying two relatively straightforward VHDL files. One of these
files implements a half adder. The other implements a full adder by
wiring two half adders and adding a two-input or.
What follows is an outline of the steps to compile a JEDEC file and
simulate a design of a full adder. This design is, of course, simple;
but it is done hierarchically to provide some sample VHDL code which
you may later edit to design some other digital combinational logic.
This is a series of commands to type to the unix prompt and mouse
clicks on buttons to make. It presumes that you have sourced the
appropriate warp.cshrc file. Normally this should be done
automatically for you on login to any of the sunpals or pal HP
machines in the digital laboratory, 38-600. You can verify that this
has been done by typing
which galaxy
This should tell you the location of the galaxy program which you will
execute.
First, make a directory and change to it and start up galaxy.
cd
mkdir beginner
cd beginner
galaxy&
This pops up a window and tells you the name of a project file that
will be created. Click on OK. This brings up the main window.
You may use any editor you wish to edit files. You can use emacs
or the galaxy text editor as you wish. If you use emacs then you can
copy the .emacs file in /mit/6.111/vhdl or, if you already have a
.emacs file, then you can modify it appropriately. To copy the .emacs
file, use the following command (which overwrites any existing file).
cp /mit/6.111/vhdl/.emacs .emacs
Copy 2 xxx.vhd files from /mit/6.111/warp/examples/beginner/ to your
present directory
cp /mit/6.111/warp/examples/beginner/*.vhd .
Certainly you can look at these files, but, at this point, do not
change anything!
Click on files->add all - two files should show up.
There are three blocks of buttons in the main galaxy window, edit,
compile, and synthesis options.
Use the edit buttons if you choose to use the galaxy editor;
otherwise, use emacs.
There are four buttons for the synthesis options. For now, at least,
leave the top two alone and accept the defaults. Use the ``Set top"
button to tell galaxy which file is the start of your design.
Use the ``Device" button to select a target device.
Click on fulladd.vhd and click on set top.
Click on device, then in the new window click on the upper left down
arrow and then click on the device C22V10 (or anything else you want
to choose). The only Cypress part we have available is the C372I but
the JEDEC files for a 22V10, GAL16V8, GAL20V8, etc. are usable to
program parts we have with the pal program.
Click on OK to get rid of the device window that popped up and use
what you have selected.
Now you are ready to compile. There are two buttons, ``Selected'' and
``Smart". It is pretty obvious what ``Selected" does. What is smart
about ``Smart" is that galaxy will look into the files and compile
anything it has to (has been modified since last compiled) for
synthesizing your design (as indicated by the ``Set top" button). It
will also compile the files in the right order so that circuits
defined in a file are compiled before they are used. If you do use
the ``Selected" button, then you must select the files in the right
order.
Click on ``Smart" and see what happens.
A galaxy editor window pops up and you get some information as to what
galaxy is doing. Wait until you get the message ``WARP done.".
Try some touches and reclick on the ``Smart" button and see what happens.
If you don't understand this, then skip it for now.
If you feel adventurous, then edit one or the other of the xxx.vhd
files and make some mistakes on purpose and see what comments you get
in the editor window.
One thing you do have to know about the galaxy editor is how to quit
it! Click on ``File" and then ``Close" to close the editor window.
Look at the files that have been produced. There should be exactly
one xxx.jed file and it can be used to program a 22v10 with the pal
software.
Look at the equations in fulladd.rpt.
Sometimes one gets timing information. For example, some timing
information is in fulladd.rpt for the device C372I.
You can program your device at this time with the JEDEC file you
produced. Optionally, you can simulate your design as embodied in the
JEDEC file to see if the logic is what you intended.
To simulate the JEDEC file, click on Tools and then on Nova. This
brings up a simulation window. In it, click on File, then Open and
select the JEDEC file, fulladd.jed, by clicking on it. Click on OK to
accept your choices.
The file is read in and some signals appear. These are the signals
defined in the entity in fulladd.vhd. You can modify which signals
are shown with the Views menu, but skip this for now.
Next you will create some waveforms for the inputs ina, inb, and inc.
Click on ``ina" and then click on ``Edit" and then ``Clock".
Accept the defaults by clicking on ``OK".
Click on ``inb" and then click on ``Edit" and then ``Clock".
Double both the clock period to 20 and the clock high time to 10.
Click on ``OK" to accept this clock.
Click on ``inc" and then click on ``Edit" and then ``lock".
Double both the clock period to 40 and the clock high time to 20.
Click on "OK" to accept this clock.
Finally, execute the simulation by clicking on "Simulate" and then
"Execute". Verify that the simulation results are what one wanted.
You can click on the "Views" button and then the "Zoom In (2X)" button
to avoid squinting at the waveforms.
When you are done, close the simulator window and quit galaxy (hint: read again how you quit the editor).
Francis Doughty