Tutorial WINCUPL

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

Atmel –WinCupl Tutorial 1.

Estimated Time for Completion: 20 minutes

Objective: Familiarity with Wincupl2 Design Environment.

1. Install Wincupl2 either from a CD or from the Atmel Website [download file
SETUPEX.EXE]. You should install Wincupl on the local drive of your PC {C:\ or D:\}.

2. Start Wincupl from the Start menu’s Program list.

3. Open the C:\Wincupl2\Examples\Atmel Folder and open the File Barrel22.PLD

4. The Wincupl Development Environment thus includes the Main Source file for a
Given Project in the Editor Window, a Message Window which shows Messages
generated in the Compilation process and a Project window on the right side which shows
a list of files generated by the compilation process.

5. The Project window displays all of the files associated with the open project or design
file in a tree control. Double clicking any file within the window will open that file in the
editor. You can close the project by closing the project window. If you open a design file
rather than opening it as a project, you can display the project window at any time by
choosing Project from the view menu.

The Editor window provides a full text editor for creating and editing design source and
other text files.

The Messages window displays the output from the compiler consisting of both status
information and error messages generated by the compiler.
6. Click on the Options Button.
The Options Menu offers the following commands:

Compiler Sets the CUPL compiler options.


Devices Opens the device Selection window.
Simulator Sets the simulator options.
WinCUPL Sets the options for the WinCUPL environment.

7. Click on the Compiler command under the Options menu. Look carefully at the
different Tabs and select the Output Files Tab. Verify that there is a Check ( √ ) for
Fuse Plot and Equations under the Doc File Options option.
You can now click on the OK button.

Take a minute to look at the other TAB settings as well.

8. Click on the Devices option button under the Options menu.


This window lists each Package type and the list of Atmel EPLDs supported.

The bottom half of this window shows the Device mnemonic and a Check box ( √ ) for
Device in file. Deselect (remove the check mark) from the Device in file box and instead
select the ATF22V10B device. Compare the device mnemonic with the Header section
of your source file in the Editor window.
9. Next click on the RUN button and select Device dependent compile button. Proceed to
compile the file.

Device Dependent Compile (Run menu):


This command compiles the design using the specified device. You may specify a device
either with the DEVICE statement in the header section or by selecting a device on the
Devices Tab of the Options dialog.

10. If your compilation is successful, proceed to double click on the Barrel22.SI file. This
opens a window “Open with Winsim..”

11. Click on Yes button. This opens the WINSIM [WinSiM functional simulator]. Also take
a minute to look at the OPTIONS button and SIMULATOR options.
[You can also click on the Device Dependent Simulate Option from the Run Option
Dialog in order to compile and simulate. Note: If you do not want to run the WinSIM and
click on the NO option, it opens the .SI file in the Editor Window.]

12. This opens the WinSIM window. Click on the Simulator Options button and then
Proceed to simulate your Design.

13. Congratulations !! This completes an Introduction to Atmel-WinCUPL !!!


Exercise 1
Objective: Use Atmel-Wincupl to compile a Design file.

1. Use Atmel-Wincupl to open the Wincupl\Examples\Atmel\Gates example.

2. Use File…Save As….. to Save the Project in C:\Test\Training. Rename the file as
Test1500.PLD [Click on the New Folder button to create a New Directory ]

3. If the Project Window is not visible, you can Click on View..Project option

4. Click on Options… Devices Tab and select the ATF1500A. Change the Pin Numbers in
your Source File for Signal Nand to Pin 20. Compile your Design.

5. The next Step is to create a Simulation file for this Design. Click on the WinSim Icon to
intialize WINSIM.

6. After the WinSim Window is open, click on File…New button.

7. Click on the Design File and Open the C:\Test\Training\Test1500.PLD file.


8. This will allow you to create a Simulation file (.SI) with the same header information
and Signal names.

9. Click on the Signal ….Add Signal button to add signals a, b and NAND . Use the
Active High Polarity and after you have added these 3 signals, click on the Done
button in the same Dialog box.

10. Click on Signal button in the main WINSIM window and then click on the Add vector
button. This opens a Dialog box:

11. Add 4 vectors. The next step is Setting Signals to a specific stimulus. Click on Help
button and then go to the “Setting Signals” in the WinSIM Procedures section to see
how the Stimulus for a signal can be set. Note: You need to Set the stimulus only for
signals a and b. Nand signal can be left undefined.

12. After the signals have been set as shown in the Screen shot you can run the WinSIM
Simulator. The results of Simulation are as shown below:

Congratulations !!

You can now use Atmel-Wincupl to Design in PLDs.

You might also like