next up previous

Massachusetts Institute of Technology
Department of Electrical Engineering and Computer Science

6.111 -- Introductory Digital Systems Laboratory

A Beginner's Guide to WARP

Donald E. Troxel
January 30, 1998
Revised 03/6/98
Revised 08/29/98
Revised 01/09/99

The current version of WARP is 4.3 with service pack 1.

WARP 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 add the line

(load-library ``/mit/6.111/lib/elisp/.emacs")

to your .emacs file in your home directory if you already have one. If you do not have one already then you may copy the "standard" one, for example,

cp /mit/6.111/lib/elisp/.emacs.standard .emacs

Copy 2 xxx.vhd files from /mit/6.111/vhdl/warp/examples/beginner/ to your present directory

     cp /mit/6.111/vhdl/warp/examples/beginner/*.vhd .
     chmod u+w *.vhd

This should give you copies of procedures.vhd and count.vhd. The chmod instruction is to allow you to modify the files. It is not really necessary at first. It is included so that you may experiment with modifications of your choice. Actually, you should use the chmod command like this anytime you copy files from the 6.111 directory so that you can edit the files as desired.

Certainly you can look at these files, but, at this point, do not change anything!

Click on files tex2html_wrap_inline22 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.

It is helpful to know how to quit the galaxy editor. Of course, you could hide it behind another window before or after iconifying it but if you quit the galaxy editor then the window really will disappear! Click on ``File" and then ``Close" to close the editor window. It also will go away when you quit galaxy.

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 (or your selected device) 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 ``Clock". 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).


next up previous

Francis Doughty
Mon Feb 1 15:44:43 EST 1999