Sei sulla pagina 1di 2

WinCUPL Guide

http://www.personal.utulsa.edu/~theodore-manikas/EE2161/Labs/Lab...

EE 2161 Developing CUPL code for PEEL's using WinCUPL


WinCUPL is the software from ATMEL. It is used to develop, compile, and simulate CUPL programs. CUPL is an HDL (Hardware Description Language) used to program ATMEL PLD's (PEEL's). The CUPL source file is compiled into a *.JED file which is then programmed onto the PLD. Note: the first time that you start WinCUPL for a particular PC, you may be asked for a company name and serial number. For the lab PC's (U376), enter the following information: Company name: University of Tulsa Serial number: 60008009 If you are running WinCUPL that you have installed on your own PC, please use the information that you received from Atmel when you registered your software. To create a CUPL file, do the following: 1. Start the WinCUPL program. 2. To develop new CUPL program, select File, New, Design File from menu bar. 3. A Design Properties window will appear. Fill in the following fields: a. Name: program name b. Designer: your name c. Device: p22v10 d. (you may ignore the other fields) 4. You will be prompted by successive windows for number of input pins, output pins, and pinnodes. Ignore these (Cancel) as we will do these manually. 5. Create and save your CUPL source file - this will be a *.PLD file. Note: use Save As to store program in your directory - otherwise WinCUPL will save in its own directory as default. 6. To compile, select Run, Device Dependent Compile. A window will appear to tell you if the results were successful. If not, look at the message window to figure out what needs to be fixed. To simulate your CUPL code, do the following: 1. Utilities, WinSim will get you the WinSim window. 2. File, New to get Design Properties window. Fill in the same info as before, then click on Design File. 3. In the Open window, select your *.PLD file that you just created and complied. 4. Click on OK 5. Signal, Add Signal to add your signals to the simulation. The signals will appear in alphabetical order: it is recommended that you add your input signals first, then your output signals, to allow you to compare waveforms. 6. Save your file - this will be a *.SI file. 7. Open the SI file using View, Source to edit the simulation file and create test vectors. 8. Simulator, Run Simulator to simulate. A window will appear to tell you if the results were successful. If not, look at the waveform window to figure out what needs to be fixed. Errors will be noted in red. Note: an alternate to simulate your CUPL code is the following (do if above procedure doesn't work): 1. Create a *.SI file using an editor such as Notepad or Word. Save the file as a text file with the same name as your *.PLD file, but with an *.SI extension. For example, the CUPL code file lab2a.pld should have a simulation file named lab2a.si.

1 of 2

8/22/2011 11:34 AM

WinCUPL Guide

http://www.personal.utulsa.edu/~theodore-manikas/EE2161/Labs/Lab...

2. 3. 4. 5.

6. 7. 8. 9.

Close the file and go into My Documents (or where you saved the file). On the menu bar, select Tools, then select Folder Options on the menu. On the Folder Options window, click on the View tab. Look for the box labeled Hide File Extensions for Known File Types . If this box has a check in it, click on the box to remove the check. This will allow you to see all your file extensions. Click on Okay. Find the simulation file that you just saved - it will have a *.si.txt extension. Rename this file to have a .si extension only so that WinSIM will recognize this file as a simulation file. Now open WinSim using Utilities, WinSim. File, Open to select your *.SI file. Simulator, Run Simulator to simulate. A window will appear to tell you if the results were successful. If not, look at the waveform window to figure out what needs to be fixed. Errors will be noted in red.

Printing your results: You may print the SI and Waveform directly from WinSim using the Print command. However, WinCUPL has a bug that won't allow you to do this for your PLD file. Therefore, it is recommended that you open your PLD file using WordPad. This page last updated 28 Feb 2008

2 of 2

8/22/2011 11:34 AM

Potrebbero piacerti anche