Max+Plus II Getting Started
Max+Plus II Getting Started
Max+Plus II Getting Started
II
GETTING
STARTED
MAX+PLUS II
Programmable Logic Development System
Getting Started
Altera Corporation
101 Innovation Drive
San Jose, CA 95134
(408) 544-7000
P25-04803-03
Altera, MAX, MAX+PLUS, FLEX, and FLEX Ability are registered trademarks of Altera Corporation. The following are
trademarks of Altera Corporation: Classic, MAX 5000, MAX 5000A, FLEX 6000, MAX 7000, MAX 7000E, MAX 7000S, FLEX 8000,
FLEX 8000A, MAX 9000, MAX 9000A, FLEX 10K, FLEX 10KA, MAX+PLUS II, PLDshell Plus, FastTrack, AHDL, MPLD, Turbo
Bit, BitBlaster, ByteBlaster, MegaCore, OpenCore, PLS-ES, EP610, EP610I, EP600I, EP910, EP910I, EP900I, EP1810, EP1800I,
EPM5032, EPM5064, EPM5128, EPM5128A, EPM5130, EPM5192, EPF6016, EPM7032, EPM7032V, EPM7064, EPM7064S,
EPM7096, EPM7128E, EPM7128S, EPM7160E, EPM7192E, EPM7192S, EPM7256E, EPM7256S, EPC1, EPC1064, EPC1064V,
EPC1213, EPC1441, EPF8282A, EPF8282AV, EPF8452A, EPF8636A, EPF8820A, EPF81188A, EPF81500A, EPM9320, EPM9320A,
EPM9400, EPM9480, EPM9560, EPM9560A, EPF10K10, EPF10K20, EPF10K30, EPF10K40, EPF10K50, EPF10K50V, EPF10K70,
EPF10K100, EPF10K100A, EPF10K130V, EPF10K250A. Product design elements and mnemonics are Altera Corporation
copyright. Altera Corporation acknowledges the trademarks of other organizations for their respective products or services
mentioned in this document, specifically: UNIX is a trademark of AT&T Bell Laboratories. Verilog is a registered trademark of
Cadence Design Systems, Incorporated. Data I/O is a registered trademark of Data I/O Corporation. FLEXlm is a registered
trademark of Globetrotter Software, Inc. HP is a registered trademark of Hewlett-Packard Company. IBM is a registered
trademark and IBM PC and IBM RISC System/6000 are trademarks of International Business Machines Corporation. Intel is a
registered trademark, and Pentium is a trademark of Intel Corporation. Mentor Graphics is a registered trademark of Mentor
Graphics Corporation. Microsoft, MS-DOS, and Windows are registered trademarks and Windows NT and Windows 95 are
trademarks of Microsoft Corporation. Adobe and Acrobat are registered trademarks of Adobe Systems Incorporated. OrCAD is
a trademark of OrCAD Systems Corporation. SPARCstation is a trademark of SPARC International, Inc. and is licensed
exclusively to Sun Microsystems, Inc. Sun Workstation and Solaris are registered trademarks, and Sun, SunOS, and
OpenWindows are trademarks of Sun Microsystems, Incorporated. Synopsys is a registered trademark of Synopsys, Inc.
Viewlogic Powerview is a registered trademark of Viewlogic Systems, Incorporated. Xilinx is a registered trademark of Xilinx,
Inc. Altera acknowledges the trademarks of other organizations for their respective products or services mentioned in this
document.
Altera reserves the right to make changes, without notice, in the devices or the device specifications identified in this document.
Altera advises its customers to obtain the latest version of device specifications to verify, before placing orders, that the
information being relied upon by the customer is current. Altera warrants performance of its semiconductor products to current
specifications in accordance with Alteras standard warranty. Testing and other quality control techniques are used to the extent
Altera deems such testing necessary to support this warranty. Unless mandated by government requirements, specific testing of
all parameters of each device is not necessarily performed. In the absence of written agreement to the contrary, Altera assumes
no liability for Altera applications assistance, customers product design, or infringement of patents or copyrights of third parties
by or arising from use of semiconductor devices described herein. Nor does Altera warrant or represent any patent right,
copyright, or other intellectual property right of Altera covering or relating to any combination, machine, or process in which such
semiconductor devices might be or are used.
Alteras products are not authorized for use as critical components in life support devices or systems without the express written
approval of the president of Altera Corporation. As used herein:
1. Life support devices or systems are devices or systems that (a) are intended for surgical implant into the body or (b) support or
sustain life, and whose failure to perform, when properly used in accordance with instructions for use provided in the labeling,
can be reasonably expected to result in a significant injury to the user.
2. A critical component is any component of a life support device or system whose failure to perform can be reasonably expected
to cause the failure of the life support device or system, or to affect its safety or effectiveness.
Products mentioned in this document are covered by one or more of the following U.S. patents: 5,650,734; 5,642,262; 5,642,082;
5,633,830; 5,631,576; 5,621,312; 5,614,840; 5,612,642; 5,608,337; 5,606,276; 5,606,266; 5,604,453; 5,598,109; 5,598,108; 5,592,106;
5,592,102; 5,590,305; 5,583,749; 5,581,501; 5,574,893; 5,572,717; 5,572,148; 5,572,067; 5,570,040; 5,567,177; 5,565,793; 5,563,592;
5,561,757; 5,557,217; 5,555,214; 5,550,842; 5,550,782; 5,548,552; 5,548,228; 5,543,732; 5,543,730; 5,541,530; 5,537,295; 5,537,057;
5,525,917; 5,525,827; 5,523,706; 5,523,247; 5,517,186; 5,498,975; 5,495,182; 5,493,526; 5,493,519; 5,490,266; 5,488,586; 5,487,143;
5,486,775; 5,485,103; 5,485,102; 5,483,178; 5,481,486; 5,477,474; 5,473,266; 5,463,328; 5,444,394; 5,438,295; 5,436,575; 5,436,574;
5,434,514; 5,432,467; 5,414,312; 5,399,922; 5,384,499; 5,376,844; 5,375,086; 5,371,422; 5,369,314; 5,359,243; 5,359,242; 5,353,248;
5,352,940; 5,350,954; 5,349,255; 5,341,308; 5,341,048; 5,341,044; 5,329,487; 5,317,212; 5,317,210; 5,315,172; 5,309,046; 5,301,416;
5,294,975; 5,285,153; 5,280,203; 5,274,581; 5,272,368; 5,268,598; 5,266,037; 5,260,611; 5,260,610; 5,258,668; 5,247,478; 5,247,477;
5,243,233; 5,241,224; 5,237,219; 5,220,533; 5,220,214; 5,200,920; 5,187,392; 5,166,604; 5,162,680; 5,144,167; 5,138,576; 5,128,565;
5,121,006; 5,111,423; 5,097,208; 5,091,661; 5,066,873; 5,045,772; 4,969,121; 4,930,107; 4,930,098; 4,930,097; 4,912,342; 4,903,223;
4,899,070; 4,899,067; 4,871,930; 4,864,161; 4,831,573; 4,785,423; 4,774,421; 4,713,792; 4,677,318; 4,617,479; 4,609,986; 4,020,469 and
certain foreign patents.
U.S. and European patents pending
Copyright 1997 Altera Corporation. All rights reserved.
Printed on Recycled Paper
Contents
Preface
MAX+PLUS II Documentation.......................................................................xxiv
MAX+PLUS II Documents ......................................................................xxiv
MAX+PLUS II Help...................................................................................xxv
How to Use MAX+PLUS II Documentation ..........................................xxv
Documentation Conventions ........................................................................ xxvii
Terminology ............................................................................................ xxvii
Typographic Conventions .................................................................... xxviii
Key Combinations ..................................................................................... xxx
Backus-Naur Form..................................................................................... xxx
MAX+PLUS II Help Updates..........................................................................xxxi
Sample Files......................................................................................................xxxii
About MAX+PLUS II Getting Started ........................................................ xxxiii
Section 1
MAX+PLUS II Installation
Altera Corporation
iii
Altera Corporation
Contents
Altera Corporation
Contents
MAX+PLUS II Tutorial
Introduction........................................................................................................ 156
Project Description..................................................................................... 157
Design Entry & Project Processing ................................................... 157
Project Verification & Device Programming................................... 159
Tutorial Overview...................................................................................... 160
Tutorial Files ........................................................................................ 160
Command Shortcuts ........................................................................... 160
Getting Help ............................................................................................... 162
Context-Sensitive Help....................................................................... 162
Search Index......................................................................................... 163
Session 1: Start a MAX+PLUS II Session ........................................................ 165
Session 2: Create a Graphic Design File ......................................................... 168
1. Create a New File................................................................................... 168
2. Specify the Project Name ...................................................................... 170
3. Select a Palette Tool ............................................................................... 171
4. Enter Logic Function Symbols ............................................................. 172
5. Set & Show Guidelines.......................................................................... 174
6. Move a Symbol....................................................................................... 176
7. Enter Input & Output Pins ................................................................... 176
8. Name the Pins......................................................................................... 177
9. Connect the Symbols ............................................................................. 179
10. Connect Nodes & Buses by Name..................................................... 182
11. Save the File & Check for Basic Errors.............................................. 183
12. Create a Default Symbol ..................................................................... 184
13. Close the File......................................................................................... 184
Session 3: Create Two Text Design Files ........................................................ 185
1. Create a New File & Specify the Project Name ................................. 186
2. Turn on Syntax Coloring ...................................................................... 186
3. Enter the Design Name, Inputs & Outputs........................................ 187
4. Declare a Register................................................................................... 189
5. Enter Boolean Equations....................................................................... 190
6. Enter an If Then Statement ................................................................... 192
7. Check for Syntax Errors & Create a Default Symbol........................ 193
8. Copy auto_max.tdf & Create a Default Symbol................................ 193
Session 4: Create a Waveform Design File..................................................... 196
1. Create a New File & Specify the Project Name ................................. 197
2. Create Input, Output & Buried Nodes ............................................... 198
Altera Corporation
vii
Altera Corporation
Contents
Appendix B
Appendix C
ix
Printer Fonts................................................................................................295
Glossary ................................................................................................................297
Index .....................................................................................................................343
Altera Corporation
Contents
Illustrations
Figure
1-1
1-2
1-3
1-4
1-5
1-6
1-7
1-8
1-9
1-10
1-11
1-12
1-13
2-1
2-2
2-3
2-4
2-5
2-6
2-7
2-8
2-9
Altera Corporation
Page
Sample License File............................................................................... 21
Attaching the Software Guard to a PC............................................... 47
MAX+PLUS II Authorization Code Dialog Box ............................... 48
Default Switch Settings on the LP6 Card........................................... 55
Removing the Expansion Slot Cover.................................................. 55
Locking the Board in Place .................................................................. 56
Master Programming Unit................................................................... 58
Installing the Adapter........................................................................... 59
Releasing the Adapter .......................................................................... 60
Connecting the FLEX Download Cable ............................................. 61
Connecting the BitBlaster to the Serial Port on the Computer ....... 62
BitBlaster and 10-Pin Female Connector............................................ 63
ByteBlaster Parallel Port Download Cable ........................................ 65
MAX+PLUS II Design Environment .................................................. 75
MAX+PLUS II Applications ................................................................ 76
MAX+PLUS II Manager Window....................................................... 79
MAX+PLUS II Menu in the MAX+PLUS II Manager Window ..... 81
Display of Multiple MAX+PLUS II Applications & Help............... 85
MAX+PLUS II Help Menu................................................................... 89
MAX+PLUS II Design Entry Methods ............................................... 96
MAX+PLUS II Assign Menu ............................................................... 97
MAX+PLUS II Graphic Editor........................................................... 103
xi
2-10
2-11
2-12
2-13
2-14
2-15
2-16
2-17
2-18
2-19
2-20
2-21
2-22
2-23
2-24
2-25
2-26
3-1
3-2
3-3
3-4
3-5
3-6
xii
Altera Corporation
Contents
Tables
Table
1-1
1-2
1-3
1-4
1-5
1-6
1-7
2-1
2-2
2-3
2-4
B-1
C-1
Altera Corporation
Page
UNIX Workstation Software Requirements...................................... 15
Commands for Mounting the CD-ROM............................................ 16
MAX+PLUS II Programming Hardware Configurations ............... 53
LP6 Card I/O Addresses ..................................................................... 57
BitBlaster Baud Rate Dipswitch Settings ........................................... 63
MAX+PLUS II System Directory Structure....................................... 69
MAX+PLUS II Working Directory Structure.................................... 70
MAX+PLUS II Applications ................................................................ 83
MAX+PLUS II Help Menu Items........................................................ 89
MAX+PLUS II Help Window Buttons............................................... 92
Altera Programming Hardware ....................................................... 150
Altera Support Services...................................................................... 282
Serial Ports ........................................................................................... 290
xiii
xiv
Altera Corporation
Preface
MAX+PLUS II
Fundamentals
This section describes the MAX+PLUS II manual and on-line help
documentation and conventions. You should be familiar with this
information before using MAX+PLUS II documentation.
Altera Corporation
xv
MAX+PLUS II Documentation
MAX+PLUS II documentation is designed for the novice as well as for the
experienced user. It includes manuals and extensive, illustrated Help.
MAX+PLUS II Documents
MAX+PLUS II systems include the following documents:
xvi
MAX+PLUS II
Getting Started
MAX+PLUS II
AHDL
MAX+PLUS II
VHDL
MAX+PLUS II
Verilog HDL
MAX+PLUS II
Help Poster
Altera Corporation
These Software Interface Guides are also available from Alteras world-wide
web site at http://www.altera.com.
1
MAX+PLUS II Help
Your primary source of information on MAX+PLUS II is the complete online help. All of the information necessary to enter, compile, and verify a
design and to program an Altera device is available in MAX+PLUS II Help.
Help also provides introductions to all MAX+PLUS II applications,
guidelines for designing circuits with MAX+PLUS II, pin and logic cell
numbers for each Altera device package, and summaries of other Altera
documents, such as application notes, that can assist you with logic design.
xvii
xviii
Altera Corporation
Documentation Conventions
MAX+PLUS II manuals and MAX+PLUS II Help use the following
conventions to make it easy for you to find and interpret information.
Terminology
The following terminology is used throughout MAX+PLUS II Help and
manuals:
Term:
Meaning:
Button 1
Button 2
point to
press
click
double-click
choose
select
Altera Corporation
xix
Typographic Conventions
MAX+PLUS II documentation uses the following typographic conventions:
xx
Visual Cue:
Meaning:
bold
Initial Capitals
Subheading Title
italics
Bold Italics
Altera Corporation
Visual Cue:
Meaning:
Courier font
Special symbols
Altera Corporation
Enter key
Low-to-high transition
High-to-low transition
xxi
Key Combinations
Key combinations and sequences appear in the following format:
Format Cue:
Meaning:
Key1+Key2
Key1,Key2
Backus-Naur Form
The Backus-Naur Form (BNF) defines the syntax of the text file formats and
message variables. BNF uses the following notation:
xxii
Characters:
Meaning:
::=
is defined as
<...>
[...]
Optional items
{ ... }
...|...
:n:n
italics
Courier font
Altera Corporation
Altera Corporation
Between MAX+PLUS II software releases, check the Altera worldwide web page for additional news and information, including
help from the Atlas solutions database. Go to
http://www.altera.com.
xxiii
Sample Files
A variety of sample design files are copied to your hard disk when you
install MAX+PLUS II. The installation procedure automatically creates
subdirectories for these files.
1
xxiv
Altera Corporation
Altera Corporation
xxv
xxvi
Altera Corporation
Section
1
MAX+PLUS II
Installation
This section describes how to install MAX+PLUS II software and
programming hardware on PCs and UNIX workstations.
Altera Corporation
Altera Corporation
Altera Corporation
Register the first time you run the MAX+PLUS II software: a Fax
Registration Form appears automatically to allow you to register. You
can also access this form at any later time by choosing the Register
button in the Authorization Code dialog box (Options menu) in
MAX+PLUS II.
Fill out the registration card attached to the STOP, PLEASE READ
THIS FIRST card that is included with your MAX+PLUS II system.
Fill out the Workstation Registration and License File Request Form
included with your software to both register your software and obtain
the license file required to install and run MAX+PLUS II for UNIX
workstations.
This form asks you for the ID of the license server. The license server
is the computer that will run the two Altera license daemons (lmgrd
and alterad).
To determine the ID of the license server, type one of the following
commands:
Command:
# /usr/bin/hostid 9
# /usr/ucb/hostid 9
# /usr/bin/uname -i 9
Altera Corporation
Command:
# /usr/bin/uname -m 9
Altera Corporation
Installing MAX+PLUS II on a PC
The following instructions describe the requirements and procedures for
installing the MAX+PLUS II software on a PC or compatible computer
running Microsoft Windows 95 or Windows NT. This section covers the
following topics:
Go to the read.me file for specific information about disk space and memory
requirements in the current version of MAX+PLUS II.
Go to the Users Guide for your version of Microsoft Windows for more
information about fonts.
Altera Corporation
Altera Corporation
2.
Boot the computer from the hard disk and start Windows.
3.
or:
v
4.
5.
If you wish, you can choose to leave the MAX+PLUS II Help files on
the CD-ROM and have MAX+PLUS II access them from there. To
have MAX+PLUS II access the Help files from the CD-ROM, follow
these steps during installation:
a.
b.
c.
After the Install program has finished, insert the following line
in the [system] section of the maxplus2.ini file in your
MAX+PLUS II system directory:
HELP_FILE_DIR=<CD-ROM drive>:\help 9
6.
7.
b.
c.
8.
Once you have successfully installed MAX+PLUS II, the read.me file
appears automatically. You should check the read.me file for
important information on the MAX+PLUS II software. After checking
the read.me file, exit from Windows.
Altera Corporation
9.
If you are using Windows 95, edit the setting for the files variable
in your config.sys file, which is usually located in the top-level
directory of your c: drive, as follows:
files=50 9
10.
The Install program may modify your autoexec.bat file, which also is
usually in the top-level directory of your c: drive, to make
MAX+PLUS II run properly. You should examine this file to check
whether it is compatible with other software on your system. The
Install program saves the original file as autoexec.bak.
11.
Remove the CD-ROM from the drive and reboot your computer
before starting MAX+PLUS II.
Altera Corporation
is required for systems that include the LP6 Logic Programmer Card; and
the Altera ByteBlaster driver is required for systems that include the
ByteBlaster. Both the Altera Programmer driver and the Altera ByteBlaster
driver must be installed separately from MAX+PLUS II.
1
2.
Select Unlisted or Updated Driver from the List of Drivers list box and
choose OK. The Install Driver dialog box opens.
3.
4.
Select Altera Programmer from the list box and choose OK. The Altera
Programming Hardware Setup dialog box opens.
5.
Select the appropriate bus type from the Bus Type list box. If you do
not know the correct bus type, select (E)ISA.
6.
Select an unused I/O base address in your PC for your LP6 Logic
Programmer Card from the Physical Address drop-down list box. The
Programmer Card uses 16 contiguous I/O addresses, starting at the
selected base address. Altera Programmer Cards are shipped with the
default address 280 hex. For more information about changing the
I/O address of the Programmer Card, see Changing the LP6 Card
Address Location on page 56.
7.
To install the driver at the current address, choose OK. The System
Setting Change dialog box is displayed.
Altera Corporation
11
b.
Select Altera Programmer from the Installed Drivers list box, then
choose the Setup button to open the Altera Programmer Driver
Setup dialog box and edit the drivers I/O address.
8.
a.
b.
c.
If you wish to install another driver (e.g., for the ByteBlaster), choose
the Dont Restart Now button in the System Setting Change dialog
box and repeat the steps above to install another driver. Otherwise,
choose the Restart Now button in the System Setting Change dialog
box to reboot your computer.
12
1.
2.
Select Altera ByteBlaster from the list box and choose OK.
Altera Corporation
3.
To install the driver at the current address, choose OK. The System
Setting Change dialog box is displayed.
4.
Altera Corporation
13
14
Altera Corporation
Software Requirements
SunOS 4.1.3 or higher
OpenWindows 3.0 or higher
Solaris 2.5 or higher
2.
Altera Corporation
15
2.
Commands to type
Sun SPARCstation
SunOS 4.1.3+
# mkdir /cdrom 9
# mount -t hsfs -o ro /dev/sr0 /cdrom 9
# cd /cdrom 9
Sun SPARCstation
Solaris 2.5+
16
Altera Corporation
Commands to type
# mkdir /cdrom 9
# /etc/mount -t cdfs /dev/dsk/<SCSI ID of the CD-ROM
drive>s0 /cdrom 9
# cd /cdrom 9
#
#
#
#
mkdir /cdrom 9
crfs -v cdrfs -p ro -dcd0 -m /cdrom -Ano -tn 9
mount -v cdrfs -r /dev/cd0 /cdrom 9
cd /cdrom 9
Altera Corporation
17
System Type
-----------------Sun SPARCstation
Sun SPARCstation
HP 9000 Series 700/800
IBM RISC System/6000
Operating System
------------------------SunOS 4.1.3+ (Solaris 1.x)
Solaris 2.5+ (SunOS 5.5+)
HP-UX 10.20+
AIX 4.1+
18
Altera Corporation
Would you like to install or modify your network license file? (y/n)
If you type y 9, you will be prompted for license file information
during the installation phase. If you type n 9, the installation program
skips the license file installation. You can also install a network license
file manually, as described in Installing the Network Licensing File
on page 21.
Would you like to install the MAX+PLUS II Sample/Tutorial files? (y/n)
Type n 9 to skip installation of the MAX+PLUS II Sample/Tutorial
files.
Type y 9 to install the sample files and the files for the chiptrip
tutorial described in Section 3: MAX+PLUS II Tutorial.
If you type y 9, the following prompt is displayed:
Altera Corporation
19
Type the full pathname of the working directory where the MAX+PLUS II
Sample/Tutorial files will be installed (default: /usr/max2work):
Press 9 to accept the default directory. Otherwise, type the name of
the desired directory and press 9.
Would you like to install third-party interfaces? (y/n)
If you selected multiple platforms at the earlier prompt and type y 9,
the following prompt is displayed:
Enter third-party installation platform type
(choose one of: solaris sunos)
(default: solaris):
Press 9 to accept the default platform. Otherwise, type the name of the
desired third-party installation platform, then press 9.
Some or all of the following information is displayed:
CD-ROM directory:
Install system files:
MAX+PLUS II system directory:
Platforms to install:
License server platform:
Install Help:
Install/modify license file:
Install sample/tutorial files:
MAX+PLUS II working directory:
Install third-party interfaces:
Third-party interface platform:
20
Altera Corporation
When you register your MAX+PLUS II system, Altera provides you with a
Node Authorization form that includes the license file required to run
MAX+PLUS II on your workstation. Go to Registering MAX+PLUS II
Software on page 4 for instructions.
Figure 1-1 shows a sample license file.
SERVER
SERVER
SERVER
DAEMON
FUTURE
Server ID
number
Optional port
number
Feature
name
Altera Corporation
Daemon
name
Expiration
date
Number of
licenses
requested
Authorization
code
21
If you receive a license.dat file from Altera, go through the following steps:
v
or:
v
Would you like to install or modify your network license file? (y/n)
The installation program displays the following prompt:
MAX+PLUS II License File Installation
Copyright (c) Altera Corporation 1997
Type the full pathname of the system directory where MAX+PLUS II has
been installed (default:/usr/maxplus2)
Press 9 to accept the default directory. Otherwise, type the name of
the desired directory and press 9.
Choose one of the following options:
1.
2.
22
Altera Corporation
maxplus2
maxplus2vhdl
Quit
(Choose 1, 2, or Q):
<feature number> 9
Enter the software expiration date [<default expiration date>]:
<expiration date> 9
Enter the maximum number of users: <number of users> 9
Enter the authorization code: <authorization code> 9
Is the information correct? (y/n/q)
If you think the information you entered may not be correct, type n 9.
The license file installation starts again from the beginning, to allow
you to accept or change each of your original responses.
To quit the license installation, type q 9.
Altera Corporation
23
If you chose to install the third-party interfaces, go to Installing the ThirdParty Interface Files, next. Otherwise, go to Unmounting the CD-ROM
on page 25.
Installing the Third-Party Interface Files
If you chose to install the third-party interface files, the installation program
displays the following prompt:
Third-Party Interfaces Installation:
1.
2.
3.
4.
5.
6.
7.
Cadence-Composer
Cadence-Concept
Mentor Graphics
Synopsys
Viewlogic
All
Quit
x
x
x
x
x
Mbytes
Mbytes
Mbytes
Mbytes
Mbytes
24
Altera Corporation
2.
Configure the user (client) environment so that users can find the
MAX+PLUS II software installed on the file server, and the
MAX+PLUS II software can find the license server.
Altera Corporation
25
2.
3.
2.
26
Altera Corporation
b.
3.
After saving the changes to each users .cshrc file, type the following
commands:
# cd 9
# source .cshrc 9
Altera Corporation
27
2.
3.
2.
b.
3.
After saving the changes to each users .cshrc file, type the following
commands:
# cd 9
# source .cshrc 9
28
Altera Corporation
2.
3.
Set options to allow remote (NFS) file systems access to the local file
systems /usr/maxplus2 directory.
4.
Altera Corporation
b.
c.
d.
29
e.
or:
v
2.
b.
30
Altera Corporation
After saving the changes to each users .cshrc file, type the following
commands:
# cd 9
# source .cshrc 9
2.
Altera Corporation
If the file server, license server, and user workstations are separate
workstations, mount the /usr/maxplus2 directory on the user
workstation with NFS by typing the following commands:
31
# mkdir /usr/maxplus2 9
# /etc/mount <file server name>:/usr/maxplus2 /usr/
maxplus2 9
2.
b.
3.
After saving the changes to each users .cshrc file, type the following
commands:
# cd 9
# source .cshrc 9
32
Altera Corporation
2.
Start the license manager daemon on all license servers before starting
MAX+PLUS II. Type the following command on each license server:
# /usr/maxplus2/adm/max2protd /usr/maxplus2 9
To invoke the license manager daemon automatically during start-up,
add the following lines to the /etc/rc.local file on each license server:
Altera Corporation
33
4.
34
Cause:
Action:
verify that the directory has been mounted correctly, type the
following commands on the license server:
# cd /usr/maxplus2/adm 9
# ls -l 9
The ls command output must include the following lines, which
list the max2protd, lmgrd, and alterad daemons:
-rwxr-xr-x 1 root 278528 jun 01 13:03 alterad
-rwxr-xr-x 1 root 81920 jun 01 13:04 lmgrd
-rwxr-xr-x 1 root
568 jun 01 11:02 max2protd
The dates and file sizes may be different, but the three named files
must be present. If the named files are not displayed, the directory
has not been mounted correctly. Refer to the Configuring the File
Server & User Environment section for your computer for
instructions on how to mount the /usr/maxplus2 directory.
Message: license daemon: execl failed
Cause:
Action:
Altera Corporation
35
Action:
2.
3.
36
Altera Corporation
5.
Action:
Altera Corporation
37
38
Option:
Action:
RESERVE
INCLUDE
EXCLUDE
GROUP
Altera Corporation
Option:
Action:
TIMEOUT
NOLOG
To set any number of options, you must create an options file and list its
pathname as the fourth field on the DAEMON line for alterad.
An options file consists of lines in the following format:
RESERVE <number> <feature> {USER | HOST | DISPLAY | GROUP}
<name>
INCLUDE <feature> {USER | HOST | DISPLAY | GROUP} <name>
EXCLUDE <feature> {USER | HOST | DISPLAY | GROUP} <name>
GROUP <name> <list of users>
TIMEOUT <feature> <timeout in seconds>
NOLOG {IN | OUT | DENIED | QUEUED}
Lines in an options file that begin with the pound character (#) are ignored
and can be used as comments.
In the following example, the options file, called local.options, reserves a
copy of the compile feature for user robert, three copies for user dalia,
and a copy for anyone on a computer with the hostname mainline. The file
also causes QUEUED messages to be omitted from the logfile and prevents
user lori from using the compile feature.
RESERVE 1 compile USER robert
RESERVE 3 compile USER dalia
RESERVE 1 compile HOST mainline
EXCLUDE compile USER lori
NOLOG QUEUED
If these options are included in the file /usr/local/flexlm/options/
local.options, the license file DAEMON line must be specified as follows:
DAEMON alterad /usr/maxplus2/adm/alterad
/usr.local.flexlm/options/local.options 9
Altera Corporation
39
lmgrd
lmstat
lmdown
lmremove
lmreread
lmver
lmhostid
lmgrd
The lmgrd utility is the main daemon program for FLEXlm. When it is
active, it looks for a license file containing all required feature information.
Usage:
lmgrd [-2] [-b] [-c <license file>] [-d] [-l <log file>] [-p]
[-s <interval>] [-t <timeout value>] [-i <feature>]
40
Option:
Action:
-2
-b
-c <license file>
-d
Altera Corporation
Option:
Action:
-l <log file>
-p
-s <interval>
-t <timeout value>
-i <feature>
Altera recommends that you use the -p option when starting the
lmgrd utility to provide security.
lmstat
The lmstat utility helps monitor the status of all network licensing activities,
including:
Active daemons
Users of individual features
Users of features served by a specific daemon
Usage:
lmstat [-a] [-S <daemon>] [-f <feature>] [-s <server>]
[-t <timeout value>] [-c <license file>] [-A]
[-l <regular expression>]
Altera Corporation
41
Option:
Action:
-a
-S <daemon>
-f <feature>
-s <server>
-t <timeout value>
-c <license file>
-A
-l <reg. expression>
lmdown
The lmdown utility instructs lmgrd and alterad to shut down. The license
daemons write out their last messages to the log file, close the file, and exit.
All licenses that have been given out by those daemons are rescinded, so that
the next time a program verifies the license, the license is not valid.
Usage:
lmdown [-c <license file>]
42
Altera Corporation
Option:
Action:
-c <license file>
See also lmgrd on page 40, lmstat on page 41, and lmreread on
page 44.
lmremove
The lmremove utility allows the System Administrator to remove a single
users license for a specified feature. This utility is required if the licensed
user was running the software on a node that subsequently crashed, causing
the license to become unusable. The lmremove utility allows the license to
return to the pool of available licenses.
Usage:
lmremove [-c <license file>] <feature> <user> <host> [<display>]
Option:
Action:
-c <license file>
Altera Corporation
43
lmreread
The lmreread utility allows the System Administrator to tell the license
daemon to reread the license file and start any new daemons that have been
added. This utility is useful if the data in the license file has changed. The
new data can be loaded into the license daemon without shutting it down
and restarting it. In addition, all pre-existing daemons will be signaled to
reread the license file for changes in licensing information.
The lmreread utility uses the license filename from the command line (or the
default filename, if no license filename is specified) to find the alterad
daemon. The lmreread utility then gives alterad the command to reread the
license file because the data in the file has changed. The alterad daemon
always rereads the original file that it loaded. If the path to the license file
read by alterad must be changed, the System Administrator must shut down
alterad and restart with the new license file path.
The System Administrator cannot use lmreread if the SERVER node names
or port numbers have been changed in the license file. In this case, the
daemon must be shut down and restarted for the changes to take effect.
The lmreread utility does not change any option information specified in an
options file. If the new license file specifies a different options file, the
information is ignored. If the options file needs to be reread, the System
Administrator must shut down the daemon and restart it.
Usage:
lmreread [-c <license file>]
44
Option:
Action:
-c <license file>
Altera Corporation
lmver
The lmver utility reports the FLEXlm version of a library or binary file.
Usage:
lmver <filename>
lmhostid
The lmhostid utility reports the host ID of a system.
Usage:
lmhostid
The following lines show sample output of lmhostid:
lmhostid-Copyright(C)1989,1990 Highland Software, Inc.
The FLEXlm host ID of this machine is "69021c89"
Altera Corporation
45
Locate a parallel printer port (i.e., an LPT port) on the computer. If you
have a printer connected to this port, disconnect it temporarily.
2.
Insert the 25-pin male connector end of the Software Guard into the
25-pin female connector of the parallel printer port, as shown in
Figure 1-2.
1
46
1.
2.
Altera Corporation
s rIdI
plu
Gua
Xt+
are
A
w
M of
S
Software Guard
25-pin female
connector
3.
4.
If you suspect that your Software Guard is faulty or damaged, contact the
Altera Applications Department. Go to Appendix B: Altera Support Services for
more information about technical support.
Altera Corporation
47
The steps required to specify the authorization code depend on whether you
have a Software Guard or license file-based MAX+PLUS II system
installation.
48
1.
2.
Altera Corporation
3.
4.
Choose OK.
If the dialog box indicates that MAX+PLUS II cannot locate the license.dat
file, choose Browse to open the License File dialog box and locate a suitable
license.dat file.
2.
Altera Corporation
49
3.
Type the authorization code for your megafunction using upper- and
lower-case letters, exactly as provided by Altera or the AMPP vendor,
in the License Authorization Code box.
4.
Once you enter the appropriate information and choose OK, you can fully
compile the megafunction in MAX+PLUS II to generate output netlist files
and programming files.
50
Altera Corporation
2.
3.
2.
3.
4.
5.
Altera Corporation
6.
Once you have installed the Adobe Acrobat Reader, you can read the
following Software Interface Guide files in the \lit directory:
Document:
Filename:
ac_sig.pdf
am_sig.pdf
av_sig.pdf
as_sig.pdf
52
Altera Corporation
Hardware/Application
PC
The LP6 Programmer Card and the Master Programming Unit (MPU) base
unit and its adapters.
PC
The FLEX Download Cable, which is used in conjunction with the LP6 Logic
Programmer Card, MPU, and a Configuration EPROM programming
adapter to download configuration data to FLEX 10K, FLEX 8000,
FLEX 6000, and MAX 7000S devices in-system.
PC or UNIX
workstation
PC
Altera Corporation
53
2.
3.
2.
3.
Ensure that all four dipswitches on the LP6 card are turned on, as
shown in Figure 1-4.
1
54
The default I/O address of the LP6 card is 280 hex. If you
must change this address because of an addressing conflict,
refer to Changing the LP6 Card Address Location on
page 56 for dipswitch settings for other I/O addresses.
Altera Corporation
OFF
4.
Select any convenient empty expansion slot for the LP6 card. If the
expansion slot is covered, remove the screw that holds the expansion
slot cover and remove the cover. See Figure 1-5.
Expansion
slot cover
Rear panel
5.
Insert the card into the expansion slot and fasten the retaining bracket
with the screw from the slot cover. See Figure 1-6.
Altera Corporation
55
Rear panel
6.
56
Altera Corporation
Dipswitch Setting
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
(1=ON; 0=OFF)
2
3
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
0
0
1
1
1
1
0
0
0
0
1
1
1
1
4
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
Altera Corporation
57
START
PRES
S TO R
ELEA
SE AD
APTE
On the rear panel of your PC, connect the 25-pin flat ribbon cable of
the PL-MPU base unit to the Logic Programmer card.
1
58
2.
Install the adapter by sliding the two tabs at the top of the adapter into
the slots provided on the base unit. Be sure to use the appropriate
adapter for the device you want to program. See Figure 1-8.
3.
Carefully lower and align the other end of the adapter, so that the
connector in the adapter is inserted into the socket on the base unit.
Press down firmly.
4.
Altera Corporation
START
Press down on the front of the unit, while holding down the other end.
See Figure 1-9.
2.
Altera Corporation
59
START
PRES
S TO R
ELEA
SE AD
APTE
60
1.
2.
Altera Corporation
9-Pin Connector
3.
Connect the other end of the FLEX Download Cable to the 10-pin male
header on the target printed circuit board.
Altera Corporation
Connect the BitBlaster to the serial port on the computer. Figure 1-11
shows a typical serial port on a PC.
61
Figure 1-11. Connecting the BitBlaster to the Serial Port on the Computer
BITBLA
STER
2.
62
Connect the other end of the BitBlaster to the 10-pin male header on
the target printed circuit board. See Figure 1-12.
Altera Corporation
Receptacle
for pin 1
Status lights
ERRO
BUSY
DONE
ER
POW
ER
LAST
BITB
25-pin
female port
to 10-pin
male header
on circuit
board
Baud rate dipswitches
3.
4.
You must ensure that the baud rate of the BitBlaster, your computers
serial port, and the baud rate set in MAX+PLUS II are the same. If
necessary, you can change the BitBlasters baud rate by setting the
dipswitches on the side panel. Dipswitch settings are listed in
Table 1-5.
Altera Corporation
Dipswitches 1 through 3
(1 = ON; 0 = OFF)
1
0
1
0
1
0
1
0
1
1
0
0
1
1
0
0
1
1
1
1
0
0
0
0
63
64
1.
Become root.
2.
3.
Devices
b.
TTY
c.
d.
tty0 or tty1 (the name of the serial port you are currently using)
e.
4.
Select the Entry Field for STTY attributes for RUN TIME.
5.
Append ,clocal to the end of the text string in the Entry Field.
6.
7.
Append ,clocal to the end of the text string in the Entry Field.
8.
Press 9.
Altera Corporation
2.
B Y T EB
Altera Corporation
LAST
ER
65
3.
66
Altera Corporation
The maxplus2.ini file can be stored in one of several locations: for a singleuser PC installation, it is stored in the MAX+PLUS II system directory
(\maxplus2); on a UNIX workstation, it is stored in your home directory. If
you use a network copy of MAX+PLUS II, or if a single computer is used by
several engineers, you must create a local copy of the maxplus2.ini file. You
must then set up an environment variable that specifies the location of the
file.
To set up a local copy of the maxplus2.ini file on a PC:
1.
Copy the existing maxplus2.ini file to the desired drive and directory.
You can also open the file in MAX+PLUS II with the Open command
(File menu) and save it to the desired drive and directory with the
Save As command (File menu).
2.
b.
Altera Corporation
67
c.
d.
or:
v
b.
or:
v
68
Altera Corporation
Description
.\adm
.\bin
.\common
.\drivers
.\edc
.\fonts
.\hp
.\lmf
.\max2inc
Contains Include Files (.inc) with Function Prototypes for Alteraprovided macrofunctions. Function Prototypes list the ports
(pinstubs) for macrofunctions that can be implemented in Altera
Hardware Description Language (AHDL) Text Design Files (.tdf).
.\max2lib\edif
Altera Corporation
69
Description
.\max2lib\mega_lpm
.\max2lib\mf
.\max2lib\prim
.\rs6000
.\solaris
.\sunos
Contains the altera library with the maxplus2 package. This package
includes all MAX+PLUS II primitives, megafunctions, and
macrofunctions supported by VHDL.
Contains the std library with the standard and textio packages
defined in the IEEE Standard VHDL Language Reference Manual.
Note:
(1) nn represents 87 or 93, indicating VHDL 1987 or 1993 support.
The \max2work directory contains tutorial and sample files and includes
the subdirectories described in Table 1-7:
Description
.\ahdl
Contains the sample files used to illustrate How to Use AHDL topics in
MAX+PLUS II Help and in the MAX+PLUS II AHDL manual.
.\chiptrip
Contains all files for the chiptrip tutorial project described in this manual.
.\edif
Contains all sample files used to illustrate EDIF features in MAX+PLUS II Help.
.\tutorial
Contains the read.me file for the chiptrip tutorial. You should create the files for the
chiptrip project in this subdirectory.
70
Altera Corporation
Description
.\vhdl
Contains the sample files used to illustrate How to Use VHDL topics in
MAX+PLUS II Help and in the MAX+PLUS II VHDL manual.
.\verilog
Contains the sample files used to illustrate How to Use Verilog HDL topics in
MAX+PLUS II Help and in the MAX+PLUS II Verilog HDL manual.
Altera Corporation
71
72
Altera Corporation
Section
2
MAX+PLUS II
A Perspective
This section gives an overview of MAX+PLUS II and describes all
MAX+PLUS II applications.
Altera Corporation
73
74
Altera Corporation
Design Entry
MAX+PLUS II Graphic Editor
MAX+PLUS II Symbol Editor
MAX+PLUS II Text Editor
MAX+PLUS II Waveform Editor
MAX+PLUS II Floorplan Editor
AHDL
VHDL
Verilog HDL
Other Industry-Standard
CAE Design Entry Tools
Design Verification
MAX+PLUS II Simulator
MAX+PLUS II Waveform Editor
MAX+PLUS II Timing Analyzer
Other Industry-Standard
CAE Design Verification Tools
MAX+PLUS II
Compiler
Device Programming
MAX+PLUS II Programmer
Data I/O
Other Industry-Standard
Programmers
Altera Corporation
75
Project Processing
MAX+PLUS II
Text Editor
MAX+PLUS II
Graphic Editor
MAX+PLUS II
Waveform Editor
MAX+PLUS II
Symbol Editor
MAX+PLUS II
Floorplan Editor
Project Verification
MAX+PLUS II
Simulator
MAX+PLUS II Compiler
Compiler Netlist
Extractor (includes
all netlist readers)
Database
Builder
Logic
Synthesizer
Functional, Timing,
or Linked SNF
Extractor
Partitioner
Fitter
Design
Doctor
Assembler
MAX+PLUS II
Message Processor
&
Hierarchy Display
Device Programming
MAX+PLUS II
Waveform Editor
MAX+PLUS II
Programmer
MAX+PLUS II
Timing Analyzer
76
Altera Corporation
Altera Corporation
77
2.
3.
Assign a device family for the project. You can either allow the
Compiler to select a device for you or assign a specific device.
4.
5.
78
6.
7.
Choose the Program button to program an EPROM- or EEPROMbased device, or choose the Configure button to configure an SRAMbased device.
Altera Corporation
Starting MAX+PLUS II
You can start MAX+PLUS II in one of two ways:
v
or:
v
Altera Corporation
Toolbar
MAX+PLUS II
Manager
menu bar
Project
directory
Project
name
Maximize
button
79
80
Altera Corporation
Altera Corporation
81
In addition, you can enter, edit, and delete the types of resource, device, and
parameter assignments that control project compilation, including logic
synthesis, partitioning, and fitting. These functions are available regardless
of whether any project design file or application window is open. For
information on these functions, go to Global MAX+PLUS II Design Entry
Features on page 97.
82
Altera Corporation
MAX+PLUS II Applications
MAX+PLUS II software consists of 11 application programs and the
MAX+PLUS II Manager. Different design entry applications can be active
simultaneously, allowing you to switch between them with a click of the
mouse or a menu command. At the same time, you can run one of the
background applicationsi.e., the Compiler, Simulator, Timing Analyzer,
or Programmer. Commands shared by the various applications function in
the same way, making your logic design task easier.
You can easily minimize an application window into an icon without closing
the application, and restore it later. This feature allows you to keep your
screen uncluttered without impairing your efficiency.
Table 2-1 describes the MAX+PLUS II applications and shows their icons.
Application
Hierarchy Display Displays the current hierarchy of files as
a hierarchy tree with branches that represent subdesigns. You
can tell at a glance whether a design file is a schematic, text, or
waveform design; which files are currently open; and which
user-editable ancillary files are available for the project. You can
also directly open or close one or more files in a hierarchy tree
and enter resource assignments for them.
Graphic Editor Lets you enter a schematic logic design in a
true what-you-see-is-what-you-get (WYSIWYG) environment.
While the Altera-provided primitives, megafunctions, and
macrofunctions serve as your basic building blocks, you can also
use custom symbols.
abcde
abcde
abc
abcd
Altera Corporation
Text Editor The Text Editor lets you create and edit textbased logic design files written in AHDL, VHDL, and
Verilog HDL. With the Text Editor, you can also create, view,
and edit other ASCII files used with MAX+PLUS II applications.
Although you can create HDL files with other text editors, the
MAX+PLUS II Text Editor allows you to take advantage of
context-sensitive help, syntax coloring, and AHDL, VHDL, and
Verilog HDL templates.
83
Application
Waveform Editor Serves a dual role: as a design entry tool
and as a tool for entering test vectors and viewing simulation
results.
Floorplan Editor Lets you assign logic to physical device pin
and logic cell resources in a graphical environment. You can edit
pin placements in a device package view and assign signals to
individual logic cells in a more detailed Logic Array Block (LAB)
view. You can also view the results of the last compilation.
Compiler Processes logic projects targeted for Altera Classic,
MAX 5000, MAX 7000, MAX 9000, FLEX 6000, FLEX 8000, and
FLEX 10K device families. It performs most tasks automatically.
However, you can customize all or part of the compilation
process.
Simulator Enables you to test the logical operation and
internal timing of your logic circuit. Functional simulation,
timing simulation, and linked multi-device simulation are
available.
Timing Analyzer Analyzes the performance of your logic
circuit after it has been synthesized and optimized by the
Compiler.
Programmer Lets you program, configure, verify, examine,
and test Altera devices.
84
Altera Corporation
Figure 2-5 shows a display of multiple windows: the Hierarchy Display and
Waveform Editor windows, and a MAX+PLUS II Help topic.
Altera Corporation
85
Design Files
A design file is a graphic, text, or waveform file created with the
MAX+PLUS II Graphic, Text, or Waveform Editor, or with another
industry-standard schematic or text editor or an EDIF, VHDL, or Verilog
HDL netlist writer. It contains logic for a MAX+PLUS II project and is
compiled by the Compiler. The Compiler can automatically process the
following design files:
Ancillary Files
Ancillary files are files that are associated with a MAX+PLUS II project but
are not part of the project hierarchy tree. Most ancillary files do not contain
design logic. Some of these files are generated automatically by a
MAX+PLUS II application, others are user-entered. Examples of ancillary
files are Assignment & Configuration Files (.acf), Symbol Files (.sym),
Report Files (.rpt), and Vector Files (.vec).
86
Altera Corporation
Projects
A project consists of all files in a design hierarchy, including ancillary input
and output files. The project name is the name of the top-level design file,
without the filename extension. MAX+PLUS II performs compilation,
simulation, timing analysis, and programming on one project at a time,
although you can always edit files belonging to another project. For
example, as you compile project1, you may edit a TDF that is part of
project2 and save it; however, if you wish to compile it, you must first
specify project2 as the project name.
You should place each project into a separate subdirectory of the
MAX+PLUS II working directory \max2work. (On a UNIX workstation,
this directory is a subdirectory of the /usr directory.)
Altera Corporation
87
MAX+PLUS II Help
88
Altera Corporation
Table 2-2 describes all Help menu items and, when appropriate, shows the
icons that represent them in the Help documentation.
Icon
Altera Corporation
89
Icon
Table 2-1 shows all
application icons
1.
2.
3.
90
AHDL
VHDL
Altera Corporation
Icon
Verilog
Old-Style Macrofunctions An alphabetical list of oldstyle macrofunction categories. You can choose one of the
categories listed to display all macrofunction names in that
category. If you choose a specific macrofunction, its
description, default signal logic levels, AHDL Function
Prototype, VHDL Component Declaration, and function
table are displayed.
Altera Corporation
abc
91
Icon
92
Function
Contents
Index
Back
Glossary
History
Shows the last 40 topics you have viewed. You can read a topic
again by double-clicking Button 1 on it. (Available only in
Windows NT 3.51.)
Altera Corporation
Step 2:
i
Step 3:
Step 4:
1.
2.
3.
Step 5:
Altera Corporation
93
94
Altera Corporation
Design Entry
All tools necessary for creating a logic design are readily accessible in
MAX+PLUS II. MAX+PLUS II accelerates your design entry with a set of
standard logic functions, including primitives, megafunctions, LPM
functions, and old-style 74-series-type macrofunctions. It also provides
numerous basic and advanced editing features that make logic entry and
debugging easier.
MAX+PLUS II provides three design entry editorsthe Graphic, Text, and
Waveform Editors. It also includes two auxiliary editorsthe Floorplan and
Symbol Editorsthat facilitate design entry.
MAX+PLUS II supports a variety of design entry methods:
EDIF netlist files and Xilinx netlist files generated by other industrystandard EDA tools can be imported into the MAX+PLUS II
environment.
Schematic and text design files created with MAX+PLUS (DOS) and
files created with Alteras A+PLUS and SAM+PLUS software
packages can be integrated into the MAX+PLUS II environment.
Altera Corporation
95
edit the symbols or create your own custom symbols with the Symbol
Editor, and use them in any schematic design file.
In a hierarchical project, you can freely mix Graphic Design Files (.gdf),
Text Design Files (.tdf), VHDL Design Files (.vhd), Verilog Design Files (.v),
EDIF Input Files (.edf), and OrCAD Schematic Files (.sch) at any level of the
hierarchy. However, Waveform Design Files (.wdf), Xilinx Netlist Format
Files (.xnf), Altera Design Files (.adf), and State Machine Files (.smf) must
be either at the lowest level of a project hierarchy or be the only design file
in a project. See Project Hierarchy on page 125.
See Figure 2-7.
MAX+PLUS II
Graphic Editor
MAX+PLUS II
Text Editor
MAX+PLUS II
Symbol Editor
MAX+PLUS II
Floorplan Editor
.sch
.wdf
.tdf
.vhd
.v
.edf
.xnf
.adf
.smf
Text
File
Text
File
Text
File
Text
File
Text
File
Text
File
Text
File
Imported from
industry-standard
EDA tools
96
to the
MAX+PLUS II
Compiler
TopLevel
File
.gdf
MAX+PLUS II
Waveform Editor
Imported from
A+PLUS or
SAM+PLUS
Altera Corporation
Altera Corporation
97
98
Altera Corporation
You can assign a specific device and its package type, speed grade,
and operating temperature. You can also assign an AUTO device
and allow the Compiler to select a device from a target device family.
This automatic device selection process can be controlled by
specifying both the range and number of devices to use from the target
device family. If a project is too large to fit into a specified device, you
can also specify the type and number of additional devices.
Go to the current Altera Data Book and individual device data sheets for
complete information on all devices.
Go to Devices & Adapters in MAX+PLUS II Help for pin locations for all
currently available Altera device packages.
Back-Annotation
After you have entered your entire project, you can compile your project
with MAX+PLUS II, then preserve, i.e., back-annotate, the resource
assignments that the Compiler made during the most recent compilation so
that you can produce the same fit with subsequent compilations.
Altera Corporation
99
100
Altera Corporation
Node Location
You can select a node in an ancillary file or the current floorplan, and locate
it instantly in the original design file with the Find Node in Design File
command (Utilities menu). Similarly, you can select a node or clique in a
design or ancillary file and locate it instantly in the floorplan for a project
with Find Node in Floorplan or Find Clique in Floorplan (Utilities menu).
The Find Node in Floorplan and Find Clique in Floorplan commands are
also available in the Hierarchy Display.
Altera Corporation
101
Hierarchy Traversal
You can move up, down, or to the top of the current hierarchy.
MAX+PLUS II opens the selected file or brings it to the front, and
automatically starts the appropriate editor.
Timing Analysis
You can tag nodes as sources and destinations for timing analysis, and
calculate point-to-point propagation delays, setup and hold time
requirements, and the maximum Clock frequency for each Clock signal in a
project. You can also completely cut off a node so that only the signal path
that leads to the node is included in the analysis.
Print
You can print all or part of the current file, specify the printer or plotter, and
determine the printer configuration.
102
Altera Corporation
Selection tool
Orthogonal Line
tool
Workspace
Maximize button
Text tool
Diagonal Line tool
Arc tool
Circle tool
Bus
Node
Symbols
Altera Corporation
103
A Graphic Design File (.gdf) or OrCAD Schematic File (.sch) created with
the Graphic Editor can include any combination of primitive, megafunction,
and macrofunction symbols. Symbols may represent any type of design file,
including other GDFs and OrCAD Schematic Files, AHDL Text Design
Files (.tdf), VHDL Design Files (.vhd), Verilog Design Files (.v), Waveform
Design Files (.wdf), EDIF Input Files (.edf), Xilinx Netlist Format
Files (.xnf), Altera Design Files (.adf), and State Machine Files (.smf).
The following features highlight the Graphic Editors versatility:
104
The smart Selection tool shown in Figure 2-9 makes design entry
easy. This tool allows you to move and copy items and enter new
symbols. When you move the Selection tool over a pinstub or the end
of a line, it changes automatically to an orthogonal line-drawing tool;
when you click on text, such as a pin or node name, it changes
automatically into a text editing tool.
Symbols are connected with signal lines, called nodes, or with bus
lines that represent multiple logically grouped nodes. When you
assign a name to a node, you can connect it to other nodes or symbols
by name only. Buses are connected by name: a graphical connection is
optional.
You can customize the ports used in each separate instance of a megaor macrofunction symbol, and optionally invert them. Any bit of a bus
port can be inverted. A NOT bubble appears automatically to
indicate an inverted port.
You can view probe, pin, location, chip, clique, timing, local routing,
logic option, and parameter assignments on each symbol. To facilitate
simulation, you can also create connected pin group assignments that
specify the external device connections between pins.
Altera Corporation
Altera Corporation
105
A Symbol File has the same name as the design file it represents, with the
extension .sym. The Create Default Symbol command, available from the
File menu of the Graphic, Text, and Waveform Editors, creates the symbol
for any design file.
106
Altera Corporation
You can enter and edit pinstubs and pinstub names for input, output,
and bidirectional pins, and specify whether pinstub names should be
displayed when the symbol is entered in a Graphic Editor file.
You can choose to display the full pinstub name in a symbol or change
the visible pinstub name, for example, to make it more compact or
informative. Therefore, the full port name and the name displayed in
a Graphic Editor file can be different.
You can insert comments or helpful notes in a symbol. They will also
appear when the symbol is entered in a Graphic Editor file.
Altera Corporation
107
The MAX+PLUS II Text Editor, shown in Figure 2-11, is a flexible tool for
entering Text Design Files (.tdf) in the Altera Hardware Description
Language (AHDL), VHDL Design Files (.vhd) in the Very High Speed
Integrated Circuit (VHSIC) Hardware Description Language (VHDL), and
Verilog Design Files (.v) in the Verilog HDL. You can also view, enter, and
edit any other ASCII file with the MAX+PLUS II Text Editor. You open a
new, untitled Text Editor window with the New command (File menu), or,
if no Text Editor window is open, by choosing Text Editor from the
MAX+PLUS II menu.
Although you can use any ASCII text editor to create AHDL, VHDL, and
Verilog HDL design files, only the MAX+PLUS II Text Editor gives you the
advantage of the unique design entry, compilation, and debugging features
available in MAX+PLUS II.
108
Altera Corporation
Because AHDL, VHDL, Verilog HDL, and the Text Editor are
completely integrated into the MAX+PLUS II system, you can process
an AHDL, VHDL, or Verilog HDL file with the Compiler, and the
Message Processor automatically locates any syntax errors in the Text
Editor. The Text Editor also provides templates for AHDL, VHDL,
and Verilog HDL language constructs. (See Altera Hardware
Description Language on page 117, VHDL on page 119, and
Verilog HDL on page 121.)
You can turn on the syntax coloring feature to allow you to clearly
view language syntax in AHDL, VHDL, Verilog HDL, and a variety of
text-based ancillary files.
You can use the drag-and-drop editing feature to move selected text
to a new location within the file.
You can manually edit Assignment & Configuration Files (.acf) that
specify probe, resource, and device assignments, as well as project
configuration settings for the Compiler, Simulator, and Timing
Analyzer.
You can create Vector Files (.vec) that are used as the input for
simulation, functional testing, or waveform design entry. You can also
create Command Files (.cmd) for use with the MAX+PLUS II
Simulator, as well as EDIF Command Files (.edc) and Library
Mapping Files (.lmf) for use with the MAX+PLUS II Compiler. You
can also edit any other ASCII file.
Altera Corporation
109
The MAX+PLUS II Text Editor provides many other features. For example,
you can find, cut, copy, paste, insert, and delete text; select different text
fonts and sizes; set tab stops; and use automatic indentation.
110
Altera Corporation
Time field
Node handle
shows the I/O
type of the node.
Name field
Type field shows
the logic that
drives the node.
Appears in WDF
only.
Value field
Reference
cursor
Grid
111
112
You can create or edit a node to have an I/O type that represents an
input pin, output pin, or buried logic.
When you create a WDF, you can specify the type of logic that drives
each node as pin input, registered, combinatorial, or state machine.
You can specify a default high (1), low (0), undefined (X), or highimpedance (Z) logic level on a logic node, or any default state name on
a state machine-type node.
You can easily add any or all nodes from the Simulator Netlist
File (.snf) for a fully optimized, compiled project to an SCF to simplify
test vector creation.
You can combine from 2 to 256 nodes to create a new group (bus), or
undo grouping to expand a group into its original members. Groups
can also be combined into other groups. The group value can be
displayed in binary, decimal, hexadecimal, or octal radix, with or
without conversion to Gray code.
You can define and optionally display a drawing grid for aligning
logic level transitions either before or after they are created.
Altera Corporation
Altera Corporation
113
The color
legend shows
the colors used
to identify
unassigned
pins, logic cells,
and I/O cells.
Zoom In button
Zoom Out button
Fit In Window
button
114
The Device View shows all pins on a device package and their
functions.
The LAB View shows the interior of the device, including all Logic
Array Blocks (LABs) and the individual logic cells within each LAB. In
Altera Corporation
devices that include Embedded Array Blocks (EABs), you can view
individual embedded cells within each EAB. In MAX 9000,
FLEX 6000, FLEX 8000, and FLEX 10K devices, I/O cell locations are
also displayed. In addition, pins are displayed around the edges of the
device packages.
The Floorplan Editor provides a list of unassigned node and pin names in
your project. Each name has a handle that you can drag to an individual pin,
logic cell, I/O cell, or embedded cell in the Device View or LAB View
display. You can also drag a node or pin with an existing assignment back
to the list of unassigned nodes or to a different location on the device.
You can also make a more general assignment to the assignment bin for
an entire LAB, EAB, or a device, and then allow the Compiler to select the
most appropriate location within the LAB or device. In MAX 9000,
FLEX 6000, FLEX 8000, and FLEX 10K devices, you can also assign nodes
and pins to row and column bins. Each generic assignment bin displays a
number showing the number of nodes or pins assigned to it.
The following list highlights MAX+PLUS II Floorplan Editor features:
You can view and edit your current assignments, which are stored in
the projects Assignment & Configuration File (.acf). You can also
display a non-editable (read-only) view of the results of the last
compilation, which are stored in the Fit File (.fit), regardless of
whether fitting was successful. Any items with illegal assignments are
highlighted in the list of unassigned node and pin names. Nodes that
have been placed but not routed are indicated in red.
You can automatically display the fan-in and fan-out of any selected
item(s), or the paths between multiple selected items. You can also
view detailed routing statistics for selected item(s) and for the most
congested area of a chip.
A Report File (.rpt) equation viewer allows you to select one or more
items in the window and view their equations and the names of all
nodes and pins that feed or are fed by any of the selected item(s). You
Altera Corporation
115
can select a fan-in or fan-out node and view its equation, tracing signal
paths throughout the floorplan.
If multiple items are assigned to a single location, you can view a list
of all items and select a single item to edit.
You can assign the same pin name to the output of one device and the
input of another to control partitioning in a multi-device project.
116
Altera Corporation
Design Name
State Machine
You can use any ASCII text editor to create TDFs. However, when you enter
AHDL files with the MAX+PLUS II Text Editor, you can take advantage of
the unique design entry, compilation, and debugging features available only
in MAX+PLUS II editors. For example, you can take advantage of AHDL
templates; use syntax coloring to easily view different sections of the file; get
context-sensitive help about AHDL syntax elements, keywords, and
statements, as well as Altera-provided primitives, megafunctions, and
macrofunctions; make resource and device assignments; and use the
MAX+PLUS II automatic error location feature during and after
compilation.
Altera Corporation
117
118
Altera Corporation
VHDL
VHDL
You can use any ASCII text editor to create VHDL Design Files (.vhd).
However, when you enter VHDL Design Files with the MAX+PLUS II Text
Editor, you can take advantage of the unique design entry, compilation, and
debugging features available only in MAX+PLUS II editors. For example,
you can take advantage of VHDL templates; use MAX+PLUS II contextsensitive help to learn about Altera-provided primitives, megafunctions,
and macrofunctions; use syntax coloring to easily view different sections of
the file; make resource and device assignments; and use the MAX+PLUS II
automatic error location feature during and after compilation.
Altera Corporation
119
VHDL Design Files can contain any combination of MAX+PLUS IIsupported constructs. They can also contain Altera-provided primitives,
megafunctions, and macrofunctions, i.e., lower-level design files, as well as
user-defined mega- and macrofunctions.
The MAX+PLUS II Compiler can generate VHDL Output Files (.vho)
containing a projects post-synthesis functional and timing information.
These files can be exported to an industry-standard simulator for
simulation. Timing information can also be written to Standard Delay
Format (SDF) Output Files (.sdo).
120
Altera Corporation
Verilog HDL
Verilog
You can use any ASCII text editor to create Verilog Design Files (.v).
However, when you enter Verilog Design Files with the MAX+PLUS II Text
Editor, you can take advantage of the unique design entry, compilation, and
debugging features available only in MAX+PLUS II editors. For example,
you can take advantage of Verilog HDL templates; use MAX+PLUS II
Altera Corporation
121
122
Altera Corporation
Primitives
Primitivesbuffer, flipflop, latch, input/output, and logic primitivesare
basic functional blocks used to design circuits with MAX+PLUS II. They can
be used in GDFs, and in AHDL, VHDL, and Verilog HDL design files.
Primitives in HDL design files are a subset of the primitive symbols used in
GDFs. Other primitive functions can be represented by logical operators,
ports, and various statements. AHDL Function Prototypes for primitives are
built into the MAX+PLUS II software. VHDL Component Declarations for
primitives are provided in the maxplus2 package in the altera library.
In a Graphic Editor schematic, you can create a primitive array, in which a
single primitive connected to one or more named bus lines represents a
series of identical primitives. During project processing, the Compiler
automatically translates a primitive array into the correct number of
individual primitives. Primitive arrays provide an alternative to using
parameterized functions.
Megafunctions
Megafunctions are complex or high-level building blocks that can be used
together with primitives and other mega- and macrofunctions to create a
logic design.
Altera Corporation
123
Old-Style Macrofunctions
Old-style macrofunctions are high-level building blocks that can be used
together with primitives and mega- and macrofunctions to create a logic
design. They can be used freely in GDFs and in all HDL design files. When
the Compiler analyzes the complete logic circuit, it automatically uses any
available device-family-specific macrofunction logic, and removes all
unused gates and flipflops to ensure optimum design efficiency. All
macrofunction inputs also have default input signal levels so that unused
pins can be left unconnected.
Many macrofunctions have bus equivalents, which are functionally identical
to the macrofunction, but have input and output pins that are grouped into
buses.
Old-style macrofunctions are not inherently parameterized. However, some
Altera-specific parameters can be applied to macrofunctions to determine
their style of implementation.
1
124
Altera Corporation
Project Hierarchy
The MAX+PLUS II Hierarchy Display shows a hierarchical logic design as a
hierarchy tree where lower-level design files are represented as branches.
Different design entry methods can be mixed in a single project. See
Figure 2-17.
User-editable
ancillary files
Connection
arrow
Branch
button
Hierarchy
branch
When you open the Hierarchy Display, it shows the full hierarchy of design
filescalled a hierarchy treefor the current project or another hierarchy
of design files. If one or more files in the hierarchy are open, the top of its file
icon displays a highlighted bar. The Hierarchy Display shows the entire
hierarchy of design files, as well as all user-editable ancillary files for the toplevel design file, if the project has been compiled with the Compiler Netlist
Extractor module.
The Hierarchy Display features make it easy for you to move between the
different types of files for a project. For example, you can open and close one
or more files in the Hierarchy Display window; the appropriate editors are
then automatically opened or closed. You can also zoom in and out to
various display scales to see all or part of the hierarchy, or choose a compact
display to view as many branches as possible of a large hierarchy tree.
Altera Corporation
125
126
You can easily open an editor window onto any design or ancillary file
in the current hierarchy.
When a file is open, a highlighted bar is displayed over the file icon.
The highlighting disappears when you close the file.
You can select a design file and view its physical implementation in
the LAB View of the Floorplan Editor.
You can select a design file and enter resource assignments for the
entire file. This behavior is analogous to entering assignments on a
symbol in a Graphic Editor file.
You can print the current hierarchy tree or any combination of project
design files and ancillary files.
Altera Corporation
Project Processing
MAX+PLUS II processes projects for Altera Classic, MAX 5000, MAX 7000,
MAX 9000, FLEX 6000, FLEX 8000, and FLEX 10K devices. MAX+PLUS II
compiles projects automatically, but you can also make detailed processing
specifications. Figure 2-18 shows how MAX+PLUS II compiles projects.
MAX+PLUS II Compiler
Database
Compiler
Netlist
Extractor
(includes
all netlist
readers)
Logic
Synthesizer
Database
Builder
Partitioner
Fitter
Design
Doctor
.rpt
.cnf
Functional,
Timing, or
Linked
SNF
Extractor
.hif
.fit
.tdo
.aco
EDIF,
VHDL &
Verilog
Netlist
Writers
Assembler
.edo
.vho
.vo
.sdo
.snf
.ndb
.pof
.sof
.jed
.hex
.ttf
Utilization
Report
.mmf
Altera Corporation
Error
Report
to MAX+PLUS II or other
industry-standard
programming hardware
127
MAX+PLUS II Compiler
The MAX+PLUS II Compiler consists of a series of modules and a utility that
check a project for errors, synthesize the logic, fit the project into one or more
Altera devices, and generate output files for simulation, timing analysis, and
device programming. The Compiler links the MAX+PLUS II design entry
applicationsthe Graphic, Text, Waveform, Symbol, and Floorplan
Editorswith the post-processing Timing Analyzer, Simulator, and
Programmer applications. Figure 2-19 shows the MAX+PLUS II Compiler
window.
128
Altera Corporation
State Machine Files (.smf) that contain a state machine design created
for use with Alteras A+PLUS or SAM+PLUS software. The
MAX+PLUS II Compiler automatically translates an SMF into an
Altera Design File (.adf) and a Compiler Netlist File (.cnf) during
compilation.
Altera Corporation
129
Assignment and configuration information from preversion 5.0 releases of MAX+PLUS IIwhich was stored in
TDFs, Probe & Resource Assignment Files (.prb), and
<project name>.ini filescan be converted automatically to
the ACF format.
Include Files (.inc) that are imported into an AHDL Text Design
File (.tdf) by an AHDL Include Statement. The Include File replaces
the Include Statement that calls it. Include Files can contain Function
Prototype, Define, Parameters, or Constant Statements. The Compiler
also uses AHDL Function Prototypes in Include Files to process logic
functions in Verilog Design Files (.v).
Library Mapping Files (.lmf) used to map cells in EDIF Input Files and
OrCAD Schematic Files to corresponding MAX+PLUS II logic
functions.
Compilation Process
The Compiler first extracts information that defines the hierarchical
connections between a projects design files and checks the project for basic
design entry errors. It creates an organizational map of the project and then
combines all design files into a fully flattened database that can be processed
efficiently.
The Compiler applies a variety of techniques to increase the efficiency of
your project and minimize device resource usage. If your project is too large
to fit into a single device, the Compiler can automatically partition it into
multiple devices from the same device family, while minimizing the number
of connections between devices. A Report File (.rpt) then shows how a
project will be implemented in one or more devices.
The Compiler also creates programming files that the MAX+PLUS II
Programmer or another industry-standard programmer uses to program
one or more Altera devices.
130
Altera Corporation
While the Compiler can compile a project with minimal assistance, it also
allows you to customize design processing to your exact specifications. For
example, you can specify a default project logic synthesis style and other
project-wide logic synthesis settings that tailor logic synthesis to your needs,
enter project-wide timing requirements, specify precisely how to divide a
large project into multiple devices, and set various device options on a
project-wide basis. You can also choose how many pins and logic cells must
remain unused during the current compilation to reserve additional logic
capacity for future use.
The hourglass empties and flips, indicating that the Compiler is active.
During partitioning and fitting, the Compilers Stop button turns into
a Stop/Show Status button, which you can choose to open a dialog
box that shows the projects current partitioning and fitting status.
The Compiler can run in the background. You can minimize it while it is
processing a project, and continue working on other files. A progress bar
under the minimized Compiler icon allows you to keep an eye on the
compilation progress while you focus your attention on a different task.
Altera Corporation
131
Compiler Netlist Extractor (Including Built-In EDIF Netlist Reader, VHDL Netlist
Reader, Verilog Netlist Reader & XNF Netlist Reader)
The Compiler Netlist Extractor converts each design file in the project into
one or more binary Compiler Netlist Files (.cnf). Because the Compiler
Netlist Extractor resolves the values of any parameters used in
parameterized functions, the contents of a CNF can change in a subsequent
compilation if the parameter values change. The Compiler Netlist Extractor
also creates a Hierarchy Interconnect File (.hif) that documents the
hierarchical connections between the project files, and provides the
information necessary to show the projects hierarchy tree in the Hierarchy
Display. In addition, the Compiler Netlist Extractor generates the Node
Database File (.ndb) that contains project node names for the resource
assignment database.
132
Altera Corporation
The built-in EDIF, VHDL, Verilog HDL, and XNF netlist readers
automatically translate the design information in EDIF Input Files (.edf),
VHDL Design Files (.vhd), Verilog Design Files (.v), and Xilinx Netlist
Format Files (.xnf), respectively, into a MAX+PLUS II-compatible format.
The EDIF Netlist Reader processes EDIF Input Files with the help of Library
Mapping Files (.lmf) that map logic functions provided with other industrystandard EDA tools to MAX+PLUS II functions. The XNF Netlist Reader
optionally generates a Text Design Export File (.tdx) that contains the AHDL
equivalent of a Xilinx Netlist Format File (.xnf) so that you can easily edit
your project in AHDL.
Database Builder
The Database Builder uses the HIF to link the CNFs that describe the project.
Based on HIF data, the Database Builder copies each CNF into a single, fully
flattened project database. The database thus preserves the electrical
connectivity of the project.
As it creates the database, the Database Builder examines the logical
completeness and consistency of the project, and checks for boundary
connectivity and syntactical errors (e.g., a node without a source or
destination). Most errors are detected and can be easily corrected at this
stage of processing. Each Compiler module subsequently processes and
updates this database.
The first time the Compiler processes a project, all design files of that project
are compiled. You can use the Compilers smart recompile feature to
create an expanded project database that helps to accelerate subsequent
compilations. This database allows you to change physical device resource
assignments, such as pin and logic cell assignments, and recompile the
project without rebuilding the database and resynthesizing the project logic.
With the total recompile feature, you can choose between recompiling
only those files that have been edited since the last compile or fully
recompiling the project.
Altera Corporation
133
Logic Synthesizer
The Logic Synthesizer module applies a number of algorithms that reduce
resource usage and remove redundant logic to ensure that the logic cell
structure is used as efficiently as possible for the architecture of the target
device family. This Compiler module also applies logic synthesis techniques
to help implement user-specified timing and other implementation
requirements. In addition, the Logic Synthesizer searches the logic for
unconnected nodes. If it finds an unconnected node, it removes the
primitives associated with that node.
A large number of logic options, as well as three ready-made synthesis
styles, are available to help you guide the outcome of logic synthesis.
You can enter timing assignments and logic option assignments, and define
logic synthesis styles, in any MAX+PLUS II application. You can specify
global default logic synthesis and timing options for an entire project, and
entire additional logic option and timing assignments on individual logic
functions.
134
Altera Corporation
Fitter
Using the database updated by the Partitioner, the Fitter matches the
requirements of the project with the known resources of one or more
devices. It assigns each logic function to the best logic cell location and
selects appropriate interconnection paths and pin assignments. The Fitter
attempts to match your resource assignmentsi.e., the pin, logic cell, I/O
cell, embedded cell, chip, clique, device, local routing, timing, and connected
pin assignments in the projects Assignment & Configuration File (.acf)
with the available resources. The Fitter provides options to allow you to
customize its fitting techniques to help achieve a fit, for example, by
automatically inserting logic cells or limiting fan-in. If it cannot find a fit, the
Fitter issues a message and gives you the option of ignoring some or all of
your assignments or terminating compilation.
Regardless of whether a fit is achieved, the Fitter generates a Report
File (.rpt) that documents fitting information on project partitioning, input
and output pin names, project timing, and unused resources for each device
in the project. You can optionally include Report File sections that show user
assignments, file hierarchy, logic cell interconnections, and equations.
The Compiler also automatically generates a Fit File (.fit) that documents
resource and device assignments for the entire project, as well as routing
information. Regardless of whether a successful fit was achieved, you can
view the fitting, partitioning, and routing information from the Fit File with
the Floorplan Editor. You can also back-annotate Fit File assignments to the
projects ACF for editing.
You can optionally direct the Fitter to generate AHDL Text Design Output
Files (.tdo) for the fully optimized, fitted project. Since one file is generated
for each device in a multi-device project, you can split your project into
multiple single-device projects if you wish to lock down the logic in some
of the devices. You can then edit the logic for a single device, save the TDO
File for that device as a Text Design File (.tdf), and recompile the logic for
that device while maintaining the logic synthesis results of a previous
compilation.
Altera Corporation
135
136
Altera Corporation
Altera Corporation
137
138
Altera Corporation
Automatically highlights
the source of an error or
warning; if a message
has multiple sources,
you can locate each
source in succession.
Altera Corporation
Displays information
about the cause of the
message and how to
correct it.
139
140
You can locate the source of a message in the project design files and
ancillary files (e.g., in a Simulator Channel File), or locate to the
floorplan for the project.
When you list signal paths with the List Paths button in the
MAX+PLUS II Timing Analyzer, the Message Processor displays
messages that show all propagation delays between a pair of nodes.
You can print the current messages or save the messages in an ASCII
Message Text File (.mtf).
Altera Corporation
Project Verification
MAX+PLUS II provides three applicationsthe MAX+PLUS II Simulator,
Timing Analyzer, and Waveform Editorto help you test the logic of a
compiled project. See Figure 2-21.
.cmd
.hex
.mif
.vec
.vec
MAX+PLUS II Simulator
.scf
MAX+PLUS II
Waveform Editor
from the
MAX+PLUS II
Compiler
.log
.hst
.sif
.tbl
.tbl
.snf
Command
Log
Command
History
Table
Output
MAX+PLUS II
Timing Analyzer
.tao
Altera Corporation
141
MAX+PLUS II Simulator
The MAX+PLUS II Simulator tests the logical operation and internal timing
of a project, allowing you to model a circuit design before it is programmed
into a device. You can run the Simulator either in interactive mode or in
batch mode. Figure 2-22 shows the Simulator window.
Progress bar
To simulate a project, you must first compile it and instruct the Compiler to
generate a Simulator Netlist File (.snf) for functional, timing, or linked
multi-project simulation. The functional, timing, or linked SNF for the
current project is then loaded automatically when you open the Simulator.
142
Altera Corporation
Functional Simulation
When the MAX+PLUS II Compiler creates a functional SNF, it generates the
SNF before it synthesizes the project. Consequently, in a functional
simulation, all nodes in the project can be simulated.
During functional simulation, the Simulator ignores all propagation delays.
Because there are no delays in the functional SNF, output logic levels change
at the same time as the input vectors.
Timing Simulation
When the MAX+PLUS II Compiler creates a timing SNF, it generates the
SNF after the project has been fully synthesized and optimized. Therefore, a
timing SNF contains only those nodes that have not been eliminated during
logic synthesis.
Altera Corporation
143
The Simulator uses the information from the timing SNF, which contains
hardware information from Device Model Files (.dmf) provided with
MAX+PLUS II, to simulate the project.
If a project has been partitioned into two or more devices, the Compiler
creates an SNF for the project as a whole and for each device. However,
timing simulation is performed for the entire project only.
You can accelerate timing simulation by instructing the Compiler to
generate an optimized SNF containing dynamic models that represent
various types of combinatorial logic. The Compilers processing time
increases when it generates the optimized SNF; however, the resulting SNF
can reduce simulation time, because the Simulator can refer to a
representative dynamic model instead of interpreting all logic in a
combinatorial network.
Simulator Highlights
Together with other MAX+PLUS II applications, the Simulator lets you
perform the following tasks:
144
Altera Corporation
Monitor the project for register setup and hold time violations.
List the name and logic level of any combination of nodes and groups
and initialize node and group logic levels before simulation.
Log Simulator commands to an ASCII Log File (.log) with the same
format as the Command File (.cmd) used for batch-mode simulation,
and use the Log File to repeat an earlier simulation. You can also
record Simulator commands and their output in an ASCII History
File (.hst).
Altera Corporation
145
Input node
handle
Output node
handle
Buried group
handle
H shows that
the group radix
is HEX.
Group waveform shows
group value.
To simulate a project, you must provide input vectors. With an SCF, you can
describe simulation input vectors as waveforms, which are a graphical
alternative to the ASCII Vector File (.vec) input for the Simulator.
146
Altera Corporation
You create an SCF containing the input vector waveforms that will drive
simulation, and the buried node and output node names to be simulated.
Buried and output nodes have undefined logic levels, or can be edited to
include expected logic values. The Waveform Editor can use the Simulator
Netlist File (.snf) to create a default SCF that contains some or all nodes and
groups in the compiled project. You can edit this SCF to meet your
specifications or you can create an SCF from scratch. In addition, you can
import a Vector File to automatically create its graphical waveform
equivalent.
With the Waveform Editor, you can view and interpret the outputs of
simulation in an SCF. The Simulator generates an SCF automatically if a
Vector File is the source of input vectors; otherwise, the SCF that was the
source of vectors is simply updated during simulation. Buried logic and
output node waveforms are overwritten with logic levels based on
simulation inputs.
Altera Corporation
147
The Timing Analyzer uses the network and timing information from a
timing Simulator Netlist File (.snf) generated by the Compiler. The Timing
Analyzer can also use a linked SNF that links the timing SNFs of other
projects.
148
Altera Corporation
The Delay Matrix shows the shortest and longest propagation delay
paths between multiple source and destination nodes in a project.
The Setup/Hold Matrix shows the minimum required setup and hold
times from input pins to the data, Clock, Clock Enable, Latch Enable,
address, and Write Enable inputs to flipflops, latches, and
asynchronous RAM.
With the Timing Analyzer, you can tag multiple source and destination
nodes so that they are included in an analysis. You can tag these nodes
directly in design files in the Graphic, Text, and Waveform Editors, and in
the project floorplan with the Floorplan Editor. You can also use the default
timing tagging available for each type of analysis. Moreover, you can specify
maximum and minimum delays, and completely cut off a signal path from
the timing analysis so that only the signal that leads to the node is included
in the analysis. You can also exclude I/O pin feedback, Clear, and Preset
signal delay paths from the analysis, and restrict the number of paths to list
per Clock in a Registered Performance analysis.
After the Timing Analyzer completes an analysis, you can select a source or
destination node and list all delay paths associated with it. The Message
Processor automatically opens and lists the paths for the selected node, so
that you can locate a specific path in the original design file or in the project
floorplan.
You can save the results of a timing analysis to a Timing Analyzer Output
File (.tao).
Altera Corporation
149
Device Programming
Altera provides all hardware and software necessary for programming,
configuring, and verifying Altera devices. The hardware includes an add-on
Logic Programmer card (for 486- or Pentium-based PCs) that drives the
Altera Master Programming Unit (MPU). The MPU performs continuity
checking to ensure adequate electrical contact between the programming
adapter and the device. With the appropriate programming adapter, the
MPU also supports functional testing, so that you can apply vectors created
for simulation to a programmed device to verify its functionality.
Altera also supports in-system programmability (ISP) and in-circuit
reconfiguration (ICR) with the FLEX Download Cable (for PCs), the
ByteBlaster parallel download cable (for PCs), and the BitBlaster serial
download cable (for PCs and UNIX workstations). The FLEX Download
Cable can connect any Configuration EPROM programming adapter, which
is installed on the MPU, to target FLEX devices in a prototype system. The
ByteBlaster connects a parallel port (i.e., printer port), and the BitBlaster
serial download cable connects a standard RS-232 port (called a COM port
on a PC), to devices mounted on system boards. These cables allow you to
program or configure one or more ICR- or ISP-compatible devices in a FLEX
chain or a JTAG chain. See Table 2-4.
ByteBlaster
Download Cable
150
In-System
Programming/
Configuration
BitBlaster Download
Cable
FLEX 6000,
FLEX 8000 &
FLEX 10K
Devices
FLEX Download
Cable
MAX 7000
Devices
(excluding
MAX 7000S)
Classic &
MAX 5000
Devices
Logic Programmer
card, PL-MPU
Master Programming
Unit, and devicespecific adapters
UNIX
Workstations
Programming
Hardware
Option
PCs
Altera Corporation
.vec
Information for
multi-device JTAG
or FLEX chains
.jcf
Master
Programming
Unit (MPU)
.fcf
from the
MAX+PLUS II
Compiler
START
Altera
Device
PRES
S TO RE
LEAS
E ADAP
TER
.pof
.jed
.sof
MAX+PLUS II
Programmer
R
ERRO
BUSY
DONE
ER
POW
B ITB
ER
LAST
BitBlaster
B YTEB
LAST
ER
ByteBlaster
.jed
.plf
Session
Log
Altera Corporation
.svf
.jam
.pof
.sbf
.hex
.rbf
.ttf
151
MAX+PLUS II Programmer
The MAX+PLUS II Programmer, shown in Figure 2-26, uses programming
files generated by the Compiler to program Altera devices. It allows you to
program, configure, verify, examine, blank-check, and functionally test
devices.
152
Altera Corporation
An SRAM Object File (.sof) to configure Altera FLEX 6000, FLEX 8000,
and FLEX 10K devices.
A JTAG Chain File (.jcf) that describes the order in which POFs, SOFs,
and JEDEC Files for multiple devices on a circuit board are to be
programmed or configured in a chain of multiple devices that are
connected by JTAG circuitry.
A FLEX Chain File (.fcf) that describes the order in which SOFs for
multiple FLEX devices on a circuit board are to be configured in a
FLEX chain.
The Programmer and Compiler can also generate Hexadecimal (IntelFormat) Files (.hex), Tabular Text Files (.ttf), Serial Bitstream Files (.sbf),
Raw Binary Files (.rbf), Serial Vector Format Files (.svf), and Jam Files (.jam)
for configuring and programming ISP- and ICR-compatible devices in other
programming environments.
You start device programming or configuration by choosing the Program or
Configure button. If any errors or problems are detected during
programming or configuration, the Message Processor window lists
messages and provides immediate help on how to correct an error.
The MAX+PLUS II Programmer can perform the following tasks:
Programs POF or JEDEC File data into a blank Classic, MAX 5000,
MAX 7000, or MAX 9000 device to produce a working device. In
multi-device JTAG chain mode, multiple devices are programmed
with additional information from a JCF.
Altera Corporation
153
154
Creates and reads JCFs and FCFs that detail the order of devices that
will be programmed or configured in a multi-device JTAG or FLEX
chain, respectively.
Converts a POF into JEDEC File format or vice versa, and optionally
saves functional testing vectors in the file, so that you can program
and test a device with other industry-standard programming
hardware and software.
Turns the Security Bit on or off before project data is programmed into
a device. When the Security Bit is on, the device cannot be
interrogated. EPROM-based devices also cannot be reprogrammed.
Altera Corporation
Section
3
MAX+PLUS II
Tutorial
This tutorial demonstrates the basic features of MAX+PLUS II.
Altera Corporation
155
Introduction
MAX+PLUS II is easyeasy to learn, easy to use, and very easy to like. This
tutorial introduces you to the basic features of the fully integrated
MAX+PLUS II design environment, so youll be able to create your own
logic designs in record time. Once you start using MAX+PLUS II, the on-line
help (always just a mouse-click away) can fill in all the details.
In this tutorial, you will create a design (called a project in MAX+PLUS II)
named chiptrip, a simple driving simulator. After you enter and compile the
chiptrip project, you will simulate it. In the simulation sessions, you will
guide your vehicle through an imaginary street map. Your challenge will
be to drive from your company to Altera using the most direct route without
getting tickets from the police. Once you finish the simulation task, your
final step will be to program your completed project into an Altera device.
156
Altera Corporation
The tutorial is divided into four sections: creating the actual logic circuit,
compiling it, simulating it with multiple sets of inputs, and then
programming an Altera device. To accommodate your level of expertise and
to make sure that you experience some driving pleasure on the way
(remember Fahrvergngen?), all files for this project are provided in the
\max2work\chiptrip directory. Thus, you can choose to go through every
single step of the tutorial or take one or more shortcuts by copying the readymade files to your working directory. Since the tutorial is divided into
logical chunks, you can stop at any time and continue later. Have a good
trip!
Project Description
The chiptrip tutorial takes you through all major steps of design entry,
compilation, simulation, and programming for a hierarchical project.
The time_cnt.tdf file, the clock in your car, counts the number of
clock pulses required for the vehicle to reach Altera.
Altera Corporation
157
chiptrip.gdf
tick_cnt.gdf
time_cnt.tdf
auto_max.tdf
speed_ch.wdf
8count.gdf
After you have created the design files, you must successfully compile your
project to generate the files you need to simulate chiptrip and program a
device.
158
Altera Corporation
MPLD
Residential Street: Normal speed
only; any acceleration results in a
speeding ticket.
RPT
EPLD
EPM
YC
Your Company
GDF
CNF
On expressways, you can go as fast as you like without worrying about any
police officers stopping you. On commercial roads, you can accelerate once
without getting a speeding ticket, but you will definitely get caught the
second time. If you accelerate at all on residential streets, however, you will
get a ticket right away. Just remember, in this design logic universe, police
officers are everywhere, they always know when you are speeding, and you
cant talk them out of giving you a ticket.
After you practice simulating your project with multiple sets of input
vectors and analyzing its timing to your satisfaction, you can then program
the chiptrip project into an Altera device.
Altera Corporation
159
Tutorial Overview
The chiptrip tutorial is designed to help you become an expert
MAX+PLUS II user quickly and easily. The tutorial is modular, so you can
complete the sessions at your own pace; work through one session at a time,
or the whole tutorial in one sitting. You can also adapt the tutorial to your
level of expertise. For example, if you feel comfortable with the various
design entry methods, you can skip one or more of the sessions and move
straight on to compiling and simulating your project. In addition, Sessions 5
and 9 introduce you to command shortcuts that can help you develop more
efficient design entry skills.
Tutorial Files
All tutorial files are copied to your hard disk during MAX+PLUS II
installation. The MAX+PLUS II working directory, which has the default
name \max2work, contains the chiptrip and tutorial subdirectories. The
\max2work\chiptrip subdirectory contains all design files, as well as userand MAX+PLUS II-generated files for this tutorial. To prevent changes to
the original files, you should create your project in the \max2work\tutorial
subdirectory. If you do not wish to create an entire design file from scratch,
you can simply copy the desired file from the \max2work\chiptrip
subdirectory into the \max2work\tutorial subdirectory without running
the risk of accidentally overwriting the original tutorial files installed on
your hard disk. You can copy files with the appropriate copying command
for your operating system, or open a file in MAX+PLUS II and choose Save
As (File menu) to save a copy of the file in a different directory.
1
1.
2.
Command Shortcuts
Many MAX+PLUS II commands have a variety of shortcuts. These shortcuts
are often context-sensitive, that is, the options available depend on the
position of the mouse pointer or on the item(s) selected on screen. Although
you can use shortcuts at any stage of the tutorial process, Sessions 5 and 9
provide you with specific alternative steps to help speed up design entry.
160
Altera Corporation
You can experiment with these shortcuts and determine which one(s) you
prefer. The shortcuts will help you develop an efficient and personalized
method for working with the MAX+PLUS II software.
1
Shortcut Method:
1
Mouse Button 1
Mouse Button 2
A
Keyboard
Toolbar/Palette
Altera Corporation
Description:
Button 1 shortcuts, which are executed by doubleclicking, are context-sensitive. For example, in the
Graphic Editor, you can open the Enter Symbol
dialog box by simply double-clicking Button 1 in a
blank space in the window. In contrast, doubleclicking Button 1 on a macrofunction symbol opens
the macrofunction that the symbol represents.
Button 1 corresponds to the left button on a two- or
three-button mouse.
Button 2 shortcuts, which are executed by clicking to
display a pop-up menu, are also context-sensitive.
These shortcuts allow you to execute a task by
pointing to a selection, pressing Button 2, and
choosing a command as you work. For instance, you
can cut a selected object or a section of text out of a file
by clicking Button 2 on the selected item and choosing
Cut from the pop-up menu. Button 2 corresponds to
the right button on a two-button mouse or the middle
and right buttons on a three-button mouse.
Keyboard shortcuts allow you to perform a task
instantly. For example, typing Ctrl+P is a keyboard
shortcut for the Print command. Keyboard shortcuts
are listed in the pull-down menus and in
MAX+PLUS II Help.
Toolbar and tool palette shortcut buttons are available
on the top and left sides of the window. For example,
choosing the Zoom In button on the tool palette is a
shortcut for the Zoom In command.
161
Getting Help
Throughout the tutorial, you can follow the footprints ( f ) for useful
references to MAX+PLUS II Help. On-line help provides the most up-todate and complete information on all MAX+PLUS II features. Two of the
easiest ways to get on-line help are by using the context-sensitive help
feature and the search index.
Context-Sensitive Help
Context-sensitive help gives you instant help when you need it. You can
access context-sensitive help in three ways:
162
Method:
Description:
F1 key
Altera Corporation
Search Index
MAX+PLUS II Help includes an extensive on-line index to help you find
information fast. To search for a Help topic:
1.
If you are in MAX+PLUS II, choose Search for Help on (Help menu).
or:
If you are already in Help, choose the Index button at the top of the
Help window (called Search in Windows NT 3.51).
The Help Topics dialog box is displayed. (In Windows NT 3.51, the
Search dialog box, which functions in a similar manner, appears
instead of the Help Topics dialog box.)
2.
Altera Corporation
163
164
3.
4.
Select a topic name from the list and choose the Display button or
double-click Button 1 on a topic name to display the topic.
Altera Corporation
Altera Corporation
165
Maximize
button
Toolbar
Tool palette
(not used in all
applications)
Status bar
166
b.
Turn the Show Toolbar and/or Show Status Bar options on or off
by clicking Button 1 on their checkboxes.
c.
Choose OK.
Altera Corporation
The toolbar displays buttons and drop-down list boxes that provide
quick access to frequently used commands. (Additional buttons are
available on the tool palette in some applications.) The status bar
provides a brief description of a highlighted menu command or an
item in the toolbar or tool palette when you move the mouse pointer
over it.
1
3.
Altera Corporation
167
2.
3.
4.
Choose OK.
An untitled Graphic Editor window opens, as shown in the following
illustration:
168
Altera Corporation
Maximize button
Selection tool
Text tool
Orthogonal Line
tool
Arc tool
Zoom In button
Zoom Out button
Fit in Window
button
Toggle Connection
Dot button
Rubberbanding On
button
Rubberbanding Off
button
5.
6.
To save the file, choose Save As (File menu). The Save As dialog box
is displayed, as shown in the following illustration:
Altera Corporation
169
7.
8.
9.
Choose Project Name (File menu). The Project Name dialog box is
displayed:
Shows current
project name.
Shows current
directory path.
Lists all design
files and
programming
files in the
current
directory.
Lists all
subdirectories.
2.
170
Altera Corporation
3.
4.
Choose OK.
The MAX+PLUS II title bar changes to display the new project name:
MAX+plus II Manager - d:\max2work\tutorial\tick_cnt
1
The pointer changes into a +-shaped pointer if you select the Orthogonal,
Diagonal, Arc, or Circle tool. If you select the Text tool, the pointer is an
inverted t that changes into an I-shaped pointer when it passes over
editable text.
Altera Corporation
171
The Selection tool is a smart tool. When this tool is selected, the arrowshaped Selection pointer automatically changes into the Orthogonal Line
drawing or Text Editing pointer when it passes over different objects in the
Graphic Editor window:
When the Selection pointer passes over the end of a line, a connection
dot, or a symbol pinstub, it changes into the +-shaped Orthogonal
Line drawing pointer, which allows you to draw lines and enter or
delete connection dots. This smart behavior means that you need to
select a line drawing tool from the tool palette only if you wish to draw
lines in empty space.
When the pointer passes over empty space, over the middle of a line
or symbol, or over text, the Selection pointer has normal selection
behavior, which allows you to select, move, and copy objects in the
window.
172
Altera Corporation
SHORTCUTS
2.
3.
Choose OK. The 8count symbol is entered with its top left corner at
the insertion point. The 8count macrofunction is an 8-bit up/down
binary counter. In tick_cnt.gdf, four bits of the 8count macrofunction
will be used to count the number of tickets received by the driver.
4.
Repeat steps 1 through 3 to enter the NOR2 and GND primitives to the
left of the 8count symbol.
1
Altera Corporation
173
Rubberbanding
On button
Rubberbanding
Off button
Choose h from the toolbar and click Button 1 on the 8count, NOR2, or GND
symbols for information on each. On-line help provides complete
information on all Altera-provided primitives, megafunctions, and
macrofunctions.
You can also get help on megafunctions, primitives, and macrofunctions by
choosing Megafunctions/LPM, Primitives, or Old-Style Macrofunctions,
respectively, from the Help menu.
Altera Corporation
2.
3.
Choose OK.
4.
Zoom In button
Zoom Out Button
Fit in Window
button
Guidelines spaced
15 grid units apart.
Altera Corporation
As you edit your schematic, you can change the window display
to view larger or smaller portions of the file by choosing the
Zoom In, Zoom Out, and Fit in Window buttons on the tool
palette, as shown in the previous illustration.
175
6. Move a Symbol
To move and align the 8count symbol:
1.
2.
While pressing Button 1, drag the symbol and position the top left
corner of 8count at the closest guideline intersection. An outline of
the symbol moves with the pointer so that you can position it
accurately.
3.
You can move any symbol, graphic, or block of text that can be
selected with Button 1 in the MAX+PLUS II Graphic or Symbol
Editor by dragging it with the Selection pointer.
176
1.
2.
Press Ctrl and then press Button 1 on the INPUT symbol. While
holding Ctrl and Button 1 down, drag the mouse down to create a
copy of the symbol and place it below the original. (The symbol is
copied but not placed on the Clipboard.)
3.
4.
Repeat step 1 to enter the OUTPUT symbol below the 8count symbol.
Altera Corporation
Altera Corporation
If you did not enter the symbols in the described sequence, your
symbol ID numbers will differ from those in the illustration. These
differences will not cause any errors.
177
2.
Type get_ticket1. The new name replaces the default pin name.
The get_ticket1 signal will be used to enable the counter. When it
goes high, the count value will increment by one.
1
3.
You can also use the Text tool to edit and enter text. Doubleclick Button 1 to select the entire name, or drag Button 1 to
select a portion of the name you wish to edit.
Name:
Description:
INPUT:5
get_ticket2
Same as get_ticket1.
INPUT:6
clk
178
Altera Corporation
Go to Pin & Node Names and Bus Names using Search for Help on
(Help menu).
With the Selection pointer, move symbols so they line up with the
appropriate pinstubs or other symbols, as shown in the preceding
illustration.
2.
Choose the solid line style from the top of the Line Style submenu
(Options menu). This line style is the recommended line style for
nodes.
Altera Corporation
179
3.
4.
5.
While pressing Button 1, drag the mouse to draw a line that connects
to the uppermost input pinstub on the NOR2 gate.
6.
Release Button 1.
1
If you need to delete a line, click Button 1 on the line to select it and
press the Del or Backspace key.
7.
180
To:
NOR2 input
GN input of 8count
GND
QA output of 8count
QB output of 8count
Same as QA
QC output of 8count
Same as QA
QD output of 8count
Same as QA
The line that extends from the ticket[3..0] output pin should be a bus
line. To change the line into a bus line:
1.
Point to the line that extends from the output pin named
ticket[3..0] and click Button 1 to select the line.
2.
Choose the bus line style, i.e., the thick line style, from the Line Style
submenu (Options menu).
Bus line
Single-range bus
pin name creates
an array of 4 pins.
Choose h from the toolbar and click Button 1 on the bus line to go to
Buses in MAX+PLUS II Help.
Altera Corporation
181
b.
2.
With the Selection pointer, select the node that extends from the QA
pinstub of the 8count symbol by clicking Button 1 on the line. A small
square insertion point appears below the line to show the insertion
point for the name.
3.
4.
182
Repeat steps 1 through 3 for the remaining nodes and the bus:
Pinstub/Pin Name:
Node/Bus Name:
QB
QC
QD
ticket[3..0]
ticket1
ticket2
ticket3
ticket[3..0]
Altera Corporation
Once you have assigned these names, the nodes ticket3, ticket2,
ticket1, and ticket0 are automatically connected to the bus
ticket[3..0] by name, even though they are not physically connected.
Choose Project Save & Check from the File menu. The file is saved
and the MAX+PLUS II Compiler window opens; the Compiler Netlist
Extractor module checks the file for errors, updates the Hierarchy
Display, and displays a message indicating the number of errors and
warnings.
2.
Altera Corporation
183
3.
184
Altera Corporation
Altera Corporation
185
Choose New (File menu), select Text Editor file, and choose OK to open
an untitled Text Editor window (see 1. Create a New File on
page 168).
2.
3.
4.
5.
186
Altera Corporation
2.
3.
Altera Corporation
187
SHORTCUTS
or:
v
4.
5.
6.
7.
8.
188
Choose h from the toolbar, then choose a menu command for more
information on these commands.
Altera Corporation
The ports enable and clk are inputs, and the ports time[7..0] are
outputs, of time_cnt.tdf.
Choose h from the toolbar and click Button 1 on the SUBDESIGN keyword
in the file to go to Subdesign Section in MAX+PLUS II AHDL Help.
4. Declare a Register
You can create a register with a Register Declaration in the Variable Section.
In this example, you will declare eight instances of a D flipflop with the
names count[7..0].
To declare the registers:
1.
2.
3.
Altera Corporation
189
4.
5.
While the template text is still selected, choose Increase Indent (Edit
menu) to indent the text to the right.
6.
7.
190
Altera Corporation
1.
2.
3.
4.
5.
Type END;.
Boolean
equations
Once you have defined the group, square brackets ([]) are a shorthand way
of specifying the entire range. The first equation connects the subdesigns
clk input to the flipflops Clock ports. The second equation sets the time[]
inputs equal to the count[] variables.
Altera Corporation
191
Place the cursor after count[]; and press 9 twice to add white space
for readability.
2.
If necessary, press Tab to align the cursor with the Boolean equations,
then choose AHDL Template (Templates menu).
3.
4.
5.
Boolean
equations
If Then
Statement
If the enable signal is high, the If Then Statement assigns the value
count[].q + 1 to count[].d; if enable is low, count[].d remains
unchanged.
192
Altera Corporation
Choose Project Save & Check (File menu). See 11. Save the File &
Check for Basic Errors on page 183.
2.
Go back to the time_cnt.tdf file by choosing its name from the bottom
of the Window menu or by choosing Text Editor from the
MAX+PLUS II menu.
3.
4.
Enter the TDF as shown in Figure 3-3 or copy auto_max.tdf from the
\max2work\chiptrip subdirectory into the \max2work\tutorial
subdirectory.
1
Altera Corporation
If you copy the file, set your tab stops to four spaces with
Tab Stops (Options menu) to view the columns of text in
proper alignment.
193
2.
Change the project name to auto_max, save and check the file for
errors, and create a default symbol for auto_max.tdf as described
above in 7. Check for Syntax Errors & Create a Default Symbol.
3.
Close auto_max.tdf.
NORTH
EAST
WEST
SOUTH
=
=
=
=
B"00";
B"01";
B"10";
B"11";
SUBDESIGN auto_max
(
dir[1..0], accel, clk, reset
speed_too_fast, at_altera, get_ticket
)
VARIABLE
street_map : MACHINE
%
OF BITS (q2,q1,q0)
%
WITH STATES (
yc,
%
mpld,
%
epld,
%
gdf,
%
cnf,
%
rpt,
%
epm,
%
altera );
%
BEGIN
street_map.clk
= clk;
% input pin "clk" connects to state machine clk
%
street_map.reset = reset; % input pin "reset" connects to state machine reset%
% File outputs default to GND unless otherwise specified
%
TABLE
% Present
% State
Inputs
Next
State
Outputs
%
%
194
Altera Corporation
EAST,
EAST,
NORTH,
NORTH,
WEST,
NORTH,
WEST,
NORTH,
NORTH,
EAST,
EAST,
SOUTH,
NORTH,
WEST,
WEST,
SOUTH,
EAST,
EAST,
NORTH,
NORTH,
SOUTH,
SOUTH,
WEST,
WEST,
WEST,
SOUTH,
WEST,
SOUTH,
X,
0
1
1
0
0
1
1
0
1
0
1
0
X
0
1
X
0
1
0
1
0
1
0
1
0
0
1
1
X
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
=>
cnf,
cnf,
mpld,
epm,
gdf,
altera,
yc,
mpld,
mpld,
epld,
epm,
yc,
mpld,
rpt,
rpt,
gdf,
epm,
epm,
altera,
altera,
cnf,
cnf,
epld,
rpt,
rpt,
epld,
yc,
gdf,
altera,
0,
1,
0,
0,
0,
0,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
1,
0;
1;
0;
0;
0;
1;
1;
0;
1;
0;
1;
0;
0;
0;
1;
0;
0;
1;
0;
1;
0;
1;
0;
1;
0;
0;
1;
0;
0;
END TABLE;
END;
Altera Corporation
195
196
Altera Corporation
Choose New (File menu), select Waveform Editor file, select the .wdf
extension in the drop-down list box, and choose OK to open an
untitled Waveform Editor window. You must create the file with the
.wdf extension to take advantage of design entry features in the
Waveform Editor.
2.
3.
4.
5.
Altera Corporation
197
Selection tool
Text tool
Waveform
Editing tool
Zoom In button
Zoom Out button
Fit in Window
button
Overwrite State
Name button
198
Altera Corporation
Finally, you will create the get_ticket node that defines the output
expected from your specified combination of inputs.
To create the nodes:
1.
Specifies an initial
logic level of 0, 1, X,
or Z for a node, or an
initial state name for a
state machine node.
Specifies the I/O
type of the node.
Specifies the type
of logic that drives
the node.
Specifies Clock,
Reset (i.e., Clear),
and Preset inputs to
a registered or state
machine node.
2.
3.
4.
5.
In the bottom half of the dialog box, select Pin Input under Node Type.
6.
Choose OK. The new node appears in the topmost blank space in the
window.
7.
Repeat steps 1 through 6 to create the reset and clk input nodes.
Press F1 when the Insert Node dialog box is displayed to get help on the
dialog box.
Altera Corporation
199
8.
Repeat steps 1 through 7 to create the two output nodes speed and
get_ticket with the following characteristics:
Node
Name:
Default
Value:
I/O
Type:
Node
Type:
Secondary
Inputs:
speed
Buried Node
Machine
Output Pin
Registered
Reset=reset
Clock=clk
Clock=clk
get_ticket
Field resizing
handles
Node handle
shows the I/O
type of the node.
Zoom In button
Zoom Out button
Type field shows
the logic that
drives the node.
Appears in WDFs
only.
Value field
200
Altera Corporation
Choose Grid Size (Options menu). The Grid Size dialog box is
displayed.
2.
Type 30ns to set the grid at 30 nanosecond intervals. The time unit
must immediately follow the time value (i.e., with no space in
between).
3.
Choose OK.
1
4.
As you edit your waveforms, you can change the window display
to view larger or smaller portions of the file by clicking Button 1
on the Zoom In, Zoom Out, and Fit in Window buttons on the
tool palette, as shown in the illustration on page 198.
Click Button 1 in the Value field of the speed node to select the entire
waveform.
Altera Corporation
201
2.
3.
4.
Choose OK. The entire waveform is overwritten with the state name
legal.
5.
If necessary, scroll or zoom out to display the grid line at 300 ns.
See the following illustration:
Reference
cursor
handle
6.
202
Click Button 1 on the Waveform Editing tool in the tool palette on the
left side of the window, as shown in the illustration on page 198, to
select it. The Selection pointer changes into the Waveform Editing
pointer.
Altera Corporation
7.
Zoom in or out or scroll the window to display the interval from 300
to 540 ns. If you drag to the edge of the window, the file scrolls
automatically.
8.
Refer to the Time field to find your exact mouse pointer location. With
the Waveform Editing pointer, press Button 1 at 300 ns on the speed
node, and drag the mouse until the interval from 300 to 540 ns is
selected. If you drag to the edge of the window, the file scrolls
automatically.
1
9.
10.
11.
Choose OK. The selected interval is overwritten with the state name
warning.
12.
Altera Corporation
203
Fit in Window
button
Overwrite
Undefined (X)
button
204
Altera Corporation
2.
3.
4.
5.
Click Button 1 on the Selection tool on the tool palette to activate the
Selection pointer. The state machine interval is automatically
deselected, and the Reference cursor moves to the beginning of the
interval.
SHORTCUTS
Pressing the Esc key changes the current tool into the Selection tool.
The time at the cursor location is displayed both at the top of the
cursor and in the Reference field. The logic levels or state names at this
location are shown in the Value field. A dash (-) may appear instead
of a value in the Value field if the field is too narrow to display the
logic level.
Altera Corporation
205
6.
With the Selection tool, select the interval from 630 to 690 ns (two grid
units). Choose the Overwrite Undefined (X) command (Edit menu) or
choose the Overwrite Undefined (X) button from the tool palette, as
shown in the illustration on page 204. The undefined interval
corresponds to the state machine transition from ticket to legal
(i.e., speed moves from the state ticket to legal regardless of the
value of accel_in).
The accel_in node waveform appears as shown in the following
illustration:
206
7.
8.
Select the entire clk node by clicking Button 1 on its node handle or
node name, or in the Value field.
9.
10.
11.
Altera Corporation
Overwrite
Clock button
SHORTCUTS
or:
v
12.
Altera Corporation
207
208
1.
2.
3.
Press the . key or click Button 1 on the right cursor movement button
next to the Reference field, as shown in the previous illustration, to
move the Reference cursor to the next higher logic level transition.
You can also choose Find Next Transition (Utilities menu).
Altera Corporation
4.
Choose h from the toolbar and click Button 1 on the Reference cursor
handle.
Choose Project Save & Check (File menu). See 11. Save the File &
Check for Basic Errors on page 183.
2.
3.
4.
Double-click Button 1 on the document icon (or box) to close the file.
Altera Corporation
209
auto_max
dir [1..0]
DIR [1..0]
accel
SPEED_TOO_FAST
AT_ALTERA
ACCEL
GET_TICKET
CLK
GLOBAL
at_altera
get_ticket1
ACCEL_IN
RESET
GET_TICKET
get_ticket2
CLK
RESET
clock
reset
time_cnt
enable
ENABLE
time [7..0]
TIME [7..0]
CLK
at_altera
get_ticket1
Connection dot
get_ticket2
at_altera
tick_cnt
GET_TICKET1
GET_TICKET2
TICKET [3..0]
ticket [3..0]
CLK
210
Altera Corporation
If you skipped the previous tutorial sessions and did not create
the four lower-level design files, you can copy the design files and
their corresponding Symbol Files from the \max2work\chiptrip
subdirectory into your \max2work\tutorial subdirectory. (On a
UNIX workstation, the max2work directory is a subdirectory of
the /usr directory.)
To create chiptrip.gdf:
1.
2.
SHORTCUTS
Choose the Project Set Project to Current File button from the
toolbar at the top of the window.
or:
v
3.
Altera Corporation
Type Ctrl+Shift+J.
Design File:
Tutorial Session:
tick_cnt
auto_max
time_cnt
speed_ch
tick_cnt.gdf
auto_max.tdf
time_cnt.tdf
speed_ch.wdf
Session 2
Session 3
Session 3
Session 4
b.
c.
211
SHORTCUTS
or:
v
4.
SHORTCUTS
dir[1..0]
accel
clock
reset
enable
time[7..0]
at_altera
ticket[3..0]
or:
v
With any palette tool, press Button 2 on the pin symbol, choose
Edit Pin Name from the pop-up menu, and type the pin name.
1
5.
SHORTCUTS
212
If you press 9 after you edit a pin name, the next pin
name below it is automatically selected for editing.
Altera Corporation
or:
v
6.
SHORTCUTS
With any palette tool, press Button 2 on a node or bus line and
choose the desired line style from the Line Style submenu.
With the Selection tool or any drawing tool, click Button 1 on the
intersection of two nodes to define an insertion point.
b.
or:
v
or:
v
7.
Altera Corporation
213
Symbol:
Pinstub/Pin Name:
Node Name:
auto_max:1
auto_max:1
at_altera (output pin)
speed_ch:2
tick_cnt:3
tick_cnt:3
AT_ALTERA
GET_TICKET
at_altera
GET_TICKET
GET_TICKET1
GET_TICKET2
at_altera
get_ticket1
at_altera
get_ticket2
get_ticket1
get_ticket2
SHORTCUTS
With any palette tool, click Button 1 on the node or bus line to
dene an insertion point and type the desired name.
or:
v
or:
v
214
With the Text tool, type a name on a node or bus line, or type a
name in a blank space, then use the Selection pointer to drag
the name onto a line to associate the name with the line.
Altera Corporation
SHORTCUTS
or:
v
8.
Altera Corporation
215
216
Altera Corporation
Progress bar
Module box
The modules and icons displayed on your screen may differ from
those in the illustration, depending on how MAX+PLUS II was set
up before you started the tutorial. The Compilers Processing and
Interfaces menus contain commands for turning different
modules and utilities on and off.
Altera Corporation
217
2.
If the MAX 7000 family is not already selected, select MAX7000 in the
Device Family drop-down list box.
3.
4.
Choose OK.
218
Altera Corporation
To turn on the Design Doctor utility and specify a set of design rules for the
analysis:
1.
2.
Altera Corporation
219
3.
Choose Global Project Device Options (Assign menu). The Classic &
MAX Global Project Device Options dialog box is displayed:
2.
220
Altera Corporation
2.
Altera Corporation
221
If the module boxes for the EDIF, VHDL, and/or Verilog Netlist
Writer are displayed, turn these modules off with the EDIF
Netlist Writer, VHDL Netlist Writer, and/or Verilog Netlist
Writer commands (Interfaces menu).
222
Altera Corporation
1.
2.
Altera Corporation
223
2.
3.
224
Altera Corporation
Message
Processor
window
Allows you to
scroll through all
messages. The
total number of
messages
generated and
the number of
the currently
selected
message are
displayed.
Automatically
highlights the
source of an
error or warning.
If a message has
multiple sources,
you can locate
each source in
succession.
As shown in the illustration, the Design Doctor has given the chiptrip
project a clean bill of health, and the Compiler has selected the
EPM7032LC44-6 device (an EPM7032-6 device in a 44-pin plastic J-lead chip
carrier package) for the project.
Altera Corporation
225
SHORTCUTS
1.
2.
Click Button 1 on the first message or on the right side of the Message
button to select the first message: Info: State 'altera' in the
state machine '|auto_max:1|street_map' is never
exited.
3.
4.
226
Altera Corporation
5.
If the message has multiple sources, you can locate the additional
sources by choosing Locate again.
6.
Once you finish viewing the design file(s), close the design editor
window(s) to return to the Message Processor window.
Select a message.
2.
3.
Altera Corporation
Once you finish viewing the Help topic, close the Help window and
return to the Compiler window.
227
228
Once you finish viewing the Report File, close it to return to the
Compiler window.
3.
Each file in the project hierarchy tree is represented in the Hierarchy Display
by its filename and a file icon that indicates the file type. A bar at the top of
a file icon indicates an open file.
See the following illustration:
Filename
Connection arrow
Hierarchy branch
Branch button. Used to hide or display lowerlevel branches in the current hierarchy.
Choose h from the toolbar and click Button 1 on any item in the window
to go to MAX+PLUS II Hierarchy Display Help on that item.
Altera Corporation
229
2.
230
You can select multiple files by pressing the Shift key while
clicking Button 1 on file icons.
3.
Choose Close Editor (File menu). The chiptrip.gdf file is closed and
the bar above its icon disappears.
4.
Altera Corporation
Altera Corporation
231
232
1.
2.
3.
Altera Corporation
The color
legend shows
the colors used
to identify
unassigned and
assigned pins,
logic cells, and
I/O cells.
Zoom In button
Zoom Out button
Fit in Window
button
Last Compilation
Floorplan button
Current
Assignments
Floorplan
button
SHORTCUTS
Altera Corporation
233
2.
Turn on the Chips, Logic Cells, Pins & Devices option under BackAnnotate to ACF to back-annotate all assignments.
3.
Choose OK. MAX+PLUS II copies the pin, logic cell, chip, and device
assignments from the Fit File into the ACF, overwriting the previous
assignments.
4.
234
1.
Choose Find Text (Utilities menu). The Find Text dialog box is
displayed.
2.
3.
4.
Turn on the Pin & Node Names option under Types of Text to Find.
Altera Corporation
5.
6.
7.
With Button 1, drag the selected clock pin assignment from pin 43 to
an unassigned I/O pin of your choice. The assignment is shown in
gray at its new location, as shown in the following illustration:
The assignment
and location of a
selected item are
displayed in the
Selected
Node(s) &
Pin(s) field.
Reassigned
Clock pin in a
new location.
Altera Corporation
235
236
1.
2.
3.
4.
Choose the Edit Pin Assignments & LCELLs button. The Edit Pin
Assignments & LCELLs dialog box is displayed:
a.
b.
Altera Corporation
c.
5.
6.
7.
8.
SHORTCUTS
2.
Altera Corporation
Go to the LAB View and select one or more logic cells, pins, or
assignment bins.
237
The Floorplan Editor displays the fan-in (pink) and/or fan-out (blue)
routing lines that apply to the selected item(s). The following illustration
shows the fan-in and fan-out of the selected |speed_ch:2|speed~1 node
at LC4 (logic cell 4):
Current Assignments
Floorplan button
Last Compilation
Floorplan button
Show Node
Fan-In button
Show Path
button
Show Node
Fan-Out button
Fan-in and fan-out lines are updated automatically when you move an
assignment. In addition, if you move a node to a new location, the
assignment color changes if the Show Moved Nodes in Gray command
(Options menu) is turned on.
You can also choose to view only the signal paths between two or more
items, without additional fan-in and fan-out information:
v
This command allows you to view only the connections between the
selected nodes, and is especially useful for tracing critical timing paths.
When Show Path is turned on, Show Node Fan-In and Show Node
Fan-Out are turned off automatically, and vice versa.
SHORTCUTS
238
Choose the Show Path button on the tool palette, as shown in the previous
illustration.
Altera Corporation
To display detailed routing statistics for one or more logic cells, pins, or
assignment bins:
1.
2.
SHORTCUTS
Altera Corporation
239
Choose Full Screen (Layout menu) to allow more room to display the
chip.
2.
Choose Report File Equation Viewer (Layout menu). The Report File
Equation Viewer window appears at the bottom of the Floorplan
Editor window.
3.
Click Button 1 on the time2 pin in the Floorplan Editor window. The
text time2@31(I/O) appears in balloon text when the mouse pointer
is over the correct pin (pin 31).
1
240
Altera Corporation
The number
shows how
many nodes
feed or are
fed by the
selected item.
4.
SHORTCUTS
time2 pin
Altera Corporation
241
Simulation Overview
Your logic circuit has compiled without errors. However, only a simulation
will confirm that it behaves exactly as you desire. Skipping simulation is like
buying a car without taking it for a test drive: you may be reasonably sure
that it works, but does it actually fit your particular needs?
1
If you have not purchased the simulation tools for MAX+PLUS II,
please proceed to Session 12: Analyze Timing on page 266.
What is Simulation?
Design entry and compilation are only part of the design process. Simulation
is equally important, if not more so. Successful compilation only guarantees
that a programming file will be created for your project, not that the project
will perform as you expect. Yet, many designers avoid simulation because
they think it is too slow, or too difficult to learn. Learning to simulate with
MAX+PLUS II, however, is as easy as learning design entry and
compilation. Since simulation provides the quickest, easiest way to verify
your projects performance, you can save both time and effort.
You simulate a project to verify that it functions correctly. Simulation allows
you to thoroughly test your project to ensure that it responds correctly in
every possible situation before you program it into a device.
During simulation, you supply input vectors to the MAX+PLUS II
Simulator. The Simulator uses these inputs to create the output signals that
a programmed device would produce under the same conditions. In a
typical simulation session, you create multiple sets of input vectors to check
the resulting outputs.
Depending on the kind of information you need, you can perform
functional, timing, or linked multi-project simulation with MAX+PLUS II.
Functional simulation tests only the logical operation of a project, while
timing simulation tests both the logical operation and the worst-case timing
of the target device(s). Linked simulation combines the functional and
timing information from multiple projects to allow you to perform a boardlevel-type simulation. In this tutorial, you will perform a timing simulation.
242
Altera Corporation
MPLD
Residential Street: Normal speed
only; any acceleration results in a
speeding ticket.
RPT
EPLD
EPM
YC
Your Company
GDF
CNF
As in real life, there are rules for handling your car (the laws of physics) and
for driving on each type of road (the laws of the state). Needless to say, there
are also plenty of consequences if you break the rules.
Altera Corporation
243
As you drive, the clock input ticks off the time units, and the enable input
allows your time counter to count. By keeping enable high, you can time
yourself and see how long it takes to get across town.
The Roads
You can travel along three types of roads, as shown in Figure 3-5. Residential
roads are narrow, with houses on both sides, and children playing in the
street. Dont be lulled by the peaceful suburban vista, however; these roads
are notorious speed-traps. If you accelerate just once, the police will give you
a ticket.
Commercial streets, such as the one leading to Altera via CNF and EPM, are
in typical downtown business areas. You can speed once and get a warning.
If you speed a second time, however, you will get a ticket.
The expressway has five spacious lanes in each direction. Traffic speeds
along and backups are rare. (This condition does not reflect reality: if you do
visit Altera and find yourself on U.S. Highway 101, find a pleasant radio
station.) Accelerate at will. Dont worrythe police will not stop you.
Simulation Goals
You will set up your simulation inputs to navigate your vehicle from a
starting point to a final destination. Sessions 9 through 11 will guide you
through a zigzag route on the logic circuit map to show you the basics. Once
you see how easy it is to navigate your car with these basic inputs, you can
create your own simulation inputs to complete your challenge of driving to
Altera as quickly as possible with the fewest tickets. As in real life, there are
many routes to the same destination. Its up to you to find the one that suits
you best.
244
Altera Corporation
MPLD
Residential Street: Normal speed
only; any acceleration results in a
speeding ticket.
RPT
EPLD
EPM
YC
Your Company
GDF
CNF
Once you practice creating and editing input vectors and simulating
chiptrip.scf, you will be ready to create your own SCFfinish.scfto drive
from your company to Altera as fast as you can while getting as few tickets
as possible. The basic steps you learn while creating, editing, and simulating
chiptrip.scf are the same steps you can use to create finish.scf.
1
Altera Corporation
If you take a wrong turn or want to take a shortcut, you can copy
chiptrip.scf or finish.scf from the \max2work\chiptrip
subdirectory into your \max2work\tutorial subdirectory. (On a
UNIX workstation, the maxplus2 directory is a subdirectory of the
/usr directory.)
245
246
1.
Choose New from the File menu, select Waveform Editor file, select the
.scf extension in the drop-down list box, and choose OK to create a
new, untitled file.
2.
3.
Choose End Time (File menu) and type an end time of 800ns for the
file. The end time determines when the Simulator will stop applying
input vectors during simulation.
4.
Choose Grid Size (Options menu), type 50ns, and choose OK.
5.
Choose Enter Nodes from SNF (Node menu). The Enter Nodes from
SNF dialog box is displayed:
Altera Corporation
SHORTCUTS
Turn off the Group option under Type. (The Inputs and Outputs options
should remain turned on.)
7.
Choose List to list the available input (I) and output (O) nodes.
8.
Press Button 1 on the topmost node in the Available Nodes & Groups box
and drag the mouse down to select the reset, enable, dir1, dir0,
clock, and accel input nodes.
9.
Choose the right direction button (=>) to copy the selected nodes into
the Selected Nodes & Groups box.
10.
11.
Altera Corporation
247
12.
Under Type, turn off the Inputs and Outputs options and turn on the
Group option.
13.
14.
Select the following three buried (B) groups in the Available Nodes &
Groups box: |time_cnt:4|count[7..0],
|auto_max:1|street_map, and |speed_ch:2|speed. You can
press Ctrl while clicking Button 1 to select names that are not adjacent
to each other in the list.
1
248
15.
Choose the right direction button (=>) to copy the selected groups into
the Selected Nodes & Groups box.
16.
Choose OK. The Waveform Editor overwrites the untitled file with
the selected nodes and groups. All input node waveforms have
default low (0) logic levels, and all output and buried node waveforms
have default undefined (X) logic levels, as shown in the following
illustration:
Altera Corporation
Field resizing
handles
Input node
handle
Output node
handle
Buried group
handle
H shows that
the group radix
is HEX.
17.
18.
19.
Altera Corporation
249
SHORTCUTS
250
Under Type, turn off the Inputs and Outputs options. The Group option
should remain turned on.
3.
4.
Altera Corporation
5.
6.
Choose OK. The added group appears in the blank space you selected.
2.
Drag the mouse up. A horizontal line that represents the moved
item(s) shifts up and down as you move the pointer.
3.
Move the line between the at_altera output node and the
time_cnt:4|count[7..0] buried group, and release Button 1. The
ticket[3..0] group moves between them.
Altera Corporation
251
Overwrite High
button
Overwrite Clock
button
252
With the Selection tool, click Button 1 on the Value field for the
enable input node and choose Overwrite High (1) from the Edit
menu to overwrite the entire waveform with a high logic level. A high
logic level allows the clock in your car to count the Clock pulses
required for the vehicle to reach Altera.
Altera Corporation
SHORTCUTS
or:
v
2.
Overwrite high intervals from 200 to 400 ns on dir1 and 200 to 500 ns
on dir0. These input signals provide information to direct your
vehicle north, south, east, and north again along the zigzag route to
Altera.
3.
To create a Clock waveform at the current grid size (50 ns), select the
whole clock waveform by clicking Button 1 on the Value field, and
choose Overwrite Clock (Edit menu). The Overwrite Clock dialog
box is displayed. Choose OK to accept the default value.
SHORTCUTS
or:
v
Both the reset and accel inputs remain at low (0) logic levels. Since the
accel signal remains low throughout, your vehicle will not accelerate
during the chiptrip.scf simulation.
Altera Corporation
253
2.
254
Altera Corporation
Altera Corporation
255
The Simulator Netlist File (.snf) for the current project (chiptrip) is loaded
automatically when you open the Simulator. In addition, chiptrip.scf, the
Simulator Channel File (.scf) created in Session 9, is loaded automatically
because it has the same filename as the project.
See the following illustration:
Shows the name of the SCF or Vector File that
contains input vectors for simulation. When you first
open the Simulator, an SCF or Vector File with the
same name as the project is loaded automatically.
Progress bar
256
Altera Corporation
Specifies the
source of input
vectors.
Output is saved
automatically to an
SCF.
Overwrites an existing
History and/or Log
File, if any exists. If
New is not turned on,
and the specified file
exists, simulation
history or commands
are appended to the
file.
Turns on the
History File and/or
Log File.
Lists all files in the
current directory
with the designated
extension.
Altera Corporation
257
Turn on the History (.hst) and Log (.log) options under Output Files. The
filenames chiptrip.hst and chiptrip.log appear automatically in the
History (.hst) and Log (.log) boxes.
3.
Choose OK.
258
Altera Corporation
2.
Choose OK.
The messages displayed in the message box are also recorded in the History
File chiptrip.hst. The simulation coverage percentage indicates how many
nodes in the project changed logic levels during the simulation. The
Simulator also creates the Log File chiptrip.log. You can view both files with
the MAX+PLUS II Text Editor or another standard text editor. Session 11:
Analyze Simulation Outputs on page 261 describes how to open and view
the History and Log Files.
Altera Corporation
259
Choose Create Table File (File menu). The Create Table File dialog
box is displayed:
2.
Choose OK.
3.
The Simulator displays a message stating that the Table File was
generated successfully. Choose OK.
You can view the Table File with the MAX+PLUS II Text Editor or another
standard text editor. Session 11: Analyze Simulation Outputs, next,
describes how to open and view the Table File.
260
Altera Corporation
Now that you have simulated the output node waveforms, their logic levels
are defined. The following illustration shows the outputs MAX+PLUS II
creates in chiptrip.scf after simulation. Try scrolling left and right, or use the
Zoom In and Zoom Out commands (View menu) to examine the file.
Altera Corporation
261
The correct
directional
inputs result in
successful
traversal of
zigzag route.
Your directional input signals, dir1 and dir0, and the clock pulses create
the outputs in auto_max:1|street_map waveform that represent your
vehicles progress along the zigzag route to Altera. The states on the
street_map output change at each Clock cycle in the following pattern: yc,
rpt, mpld, epld, gdf, cnf, epm, and altera. (Refer to the map in
Figure 3-6 on page 245.) Because the accel acceleration input remains low
throughout the SCF, the speed_ch:2|speed output reflects a legal state,
and the ticket[3..0] group has a low (0) logic level, i.e., no speeding
tickets.
To view the exact time at each logic level transition:
262
1.
2.
Altera Corporation
3.
The time at the Reference cursor location is displayed both at the top of the
cursor and in the Reference field. Each transition shows the exact time and
location of the signals change in logic level or state.
2.
Select Text Editor files and choose the .hst, .log, or .tbl extension in the
drop-down list box.
3.
Altera Corporation
263
Simulation
results are
saved in
Vector File
format.
264
Altera Corporation
Once you successfully drive from your company to Altera by creating and
simulating finish.scf, you might try one of the following challenges, or plot
your own itinerary:
Altera Corporation
265
Description:
Delay Matrix
Registered Performance
Analyzes registered logic for a performancelimiting delay, minimum Clock period, and
maximum circuit frequency.
Setup/Hold Matrix
You will use the timing Simulator Netlist File (.snf) generated in Session 6:
Compile the Project on page 216 to analyze the propagation delays in the
chiptrip project. This session includes the following steps:
1.
2.
3.
4.
5.
6.
266
Altera Corporation
2.
3.
The Timing Analyzer automatically loads the timing SNF for the chiptrip
project.
See the following illustration:
The current project is
loaded automatically.
When default
timing tagging is
used, source and
destination
nodes are not
shown until the
Timing Analyzer
has been run.
Altera Corporation
267
The Timing Analyzer automatically tags all input pins as timing sources
and all output pins as timing destinations for Delay Matrix analysis. The
names of nodes with this default timing analysis tagging are not visible
until after the analysis is run. Each of the three analysis modes has its own
display and appropriate default timing analysis tagging for nodes.
You can tag specific nodes for analysis in the Timing Analyzer; in the
Floorplan Editor; or in the original project design files in the Graphic, Text,
and Waveform Editors. The Timing Analysis Source and Timing Analysis
Destination commands are provided in all of these MAX+PLUS II
applications.
Turn on the Cut Off I/O Pin Feedback command (Options menu).
When this command is turned on, the Timing Analyzer uses
bidirectional I/O pins only as source and destination nodes; feedback
from within the device is excluded.
2.
Turn off the Cut Off Clear & Preset Paths command (Options menu).
When this command is turned off, the Timing Analyzer calculates
paths that travel through the Clear and Preset inputs to D flipflops. If
a design does not use Clear or Preset signals, or if you do not wish to
display paths that travel through Clear and Preset inputs to D
flipflops, you can turn this command on.
3.
268
Altera Corporation
The path between each pair of nodes is displayed in a cell in the Delay
Matrix, as shown in the following illustration:
Delay times may differ from those in the illustration shown above
when you analyze the project. Timing Analyzer results are based
on the latest device performance data given in the Device Model
Files (.dmf) provided with MAX+PLUS II.
If the shortest and longest routes through the project are different, both
delay times are displayed in a cell. If the two figures are different, the circuit
contains a potential logic race condition. When source and destination nodes
are separated by the D input to a flipflop in the original design file, the delay
is calculated through the Clock or Preset input, not the D input.
Altera Corporation
269
2.
Turn on the List Only Longest Path command (Options menu). When
this command is turned on before you choose the List Paths button,
the Timing Analyzer displays only the longest delay path in the
Message Processor window.
3.
Choose the List Paths button. The Message Processor window opens
and lists the longest delay path between the clock and at_altera
nodes.
4.
5.
270
Altera Corporation
2.
Turn on the Locate in Floorplan Editor option. The Locate All button
becomes active (i.e., undimmed).
3.
4.
Altera Corporation
271
Show Path
button
5.
Once you finish viewing the Floorplan Editor, close the Floorplan
Editor window and return to the Timing Analyzer.
2.
3.
Click Button 1 on the right side of the Locate button to locate the first
of four sources for the message. MAX+PLUS II automatically opens
the file chiptrip.gdf in a Graphic Editor window and highlights the
clock input pin.
4.
Locate each of the other three sources by clicking Button 1 on the right
side of the Locate button. MAX+PLUS II automatically opens the
appropriate design editor for each successive message source.
You can close any open editor window(s) and the Message Processor and
return to the Timing Analyzer to select other cells, list delay path messages,
and locate the paths in either the Floorplan Editor or the source design files
for the project.
272
Altera Corporation
Altera Corporation
273
Specifies the
source of input
vectors for
functional testing.
Turns on the
Programmer
Log File.
The Programmer
automatically echoes
the current project
name plus the default
file extension.
2.
274
If necessary, turn on the Log (.plf) option under Output File. The
filename chiptrip.plf appears automatically in the Log (.plf) box.
Altera Corporation
3.
Choose OK.
2.
3.
Altera Corporation
275
276
Try creating the subdesigns with different design entry methods, e.g.,
create the speed_ch subdesign as a Text Design File (.tdf).
Compile the chiptrip project for different devices. For example, try the
EPM9320 device and run a new timing analysis.
Compile and simulate the project for different speed grades of the
same device.
Altera Corporation
Appendix
A
MAX+PLUS II
Command-Line Mode
You can operate the MAX+PLUS II Compiler, Timing Analyzer, and
Simulator from the command prompt under UNIX, Microsoft Windows NT,
and Microsoft Windows 95.
Altera Corporation
277
278
Batch Option:
Action:
-h or -help
-v or -version
-c or -compile
-ta_delay
-ta_setup
-ta_reg
-s or -simulate
-i or -ignore_errors
Altera Corporation
The <I/O options> are shown below. For each option, the <filename> defaults
to <project name> if you specify empty quotation marks ("").
I/O Option:
Action:
-tao "<filename>"
-scf "<filename>"
-vec "<filename>"
-cmd "<filename>"
-tbl "<filename>"
-hst "<filename>"
You can use > or >> to redirect MAX+PLUS II warning and error
messages to an ASCII file. (In UNIX, use >! and >>! instead of >
and >> if the noclobber variable is set.)
The following example compiles the upcntr project; compiles the chiptrip
project; runs a timing analysis on chiptrip in Registered Performance mode;
and simulates chiptrip using test.scf as the source of vectors:
maxplus2 -c upcntr -c -ta_reg -s -scf "test.scf" chiptrip 9
Altera Corporation
279
280
Altera Corporation
Appendix
B
Altera Support
Services
Alteras support team is dedicated to resolving your technical issues
quickly. Altera responds to your questions promptly and efficiently via
telephone, fax, or e-mail. Applications Engineers are located at Altera
headquarters in San Jose, California, and at locations around the world.
The Altera Applications, Literature, and Marketing Departments offer the
following services:
Altera Corporation
Product information
Technical support
Technical publications
Training courses
281
Description
Up-to-date information on Altera
products is available from the Altera
Marketing Department between the
hours of 8:00 a.m. and 5:00 p.m. Pacific
Time, Monday through Friday.
Notes:
(1) Alteras e-mail, world-wide web (WWW) site, bulletin board service (BBS), and File Transfer
Protocol (FTP) site are available 24 hours a day.
(2) The BBS requires a Bell Standard 212, CCITT standard, or compatible modem at up to
14,400 bps, using 8 data bits, 1 stop bit, and no parity.
282
Altera Corporation
Training Courses
Description
Altera produces a variety of technical
literature to help you select and design with
programmable logic, including application
notes and data sheets.
Altera also provides News & Views, a
quarterly newsletter that includes the latest
information on Altera products, technical
articles written by Altera Applications
Engineers, and a question and answer
section that addresses many commonly
asked questions. All registered users of
Altera products receive News & Views.
Notes:
(1) Alteras e-mail, world-wide web (WWW) site, bulletin board service (BBS), and File Transfer
Protocol (FTP) site are available 24 hours a day.
(2) The BBS requires a Bell Standard 212, CCITT standard, or compatible modem at up to
14,400 bps, using 8 data bits, 1 stop bit, and no parity.
Altera Corporation
283
284
Altera Corporation
Appendix
C
Additional
Workstation
Configuration
Information
This section describes how to change additional workstation configuration
items that control the appearance of MAX+PLUS II windows, serial port
configuration, screen height and width, printer ports, and fonts.
Altera Corporation
285
Description:
Desktop background
MAX+PLUS II workspace
MAX+PLUS II application
workspace
WindowText=0 0 0
Window text
Menu=255 255 255
Window background
MenuText=0 0 0
Menu text
ActiveTitle=0 0 128
Active window title bar
InactiveTitle=255 255 255
Inactive window title bar
TitleText=255 255 255
Title bar text in an active window
ActiveBorder=192 192 192
Active window border
InactiveBorder=192 192 192 Inactive window border
WindowFrame=0 0 0
Window frame
ScrollBar=192 192 192
Scroll bar background
ButtonFace=192 192 192
Button front surface
ButtonShadow=128 128 128
Shadow (i.e., darker edges) of an
unpressed button
Background=192 192 192
AppWorkspace=255 255 255
Window=255 255 255
286
Altera Corporation
Component = R G B Value:
Description:
ButtonText=0 0 0
GrayText=128 128 128
Hilight=0 0 128
HilightText=255 255 255
InactiveTitleText=0 0 0
ButtonHilight=255 255 255
The following table shows the RGB values of the 16 standard colors
normally available on a color monitor. You can edit the colors in the
[colors] section of your win.ini file using these values to change the color
of the various window components. The availability of other colors depends
on the capabilities of your workstations display system.
Color:
Red:
Green:
Blue:
White
Light Gray
Dark Gray
Black
Red
Dark Red
Green
Dark Green
Blue
Dark Blue
Yellow
Dark Yellow
Magenta
Dark Magenta
Cyan
Dark Cyan
255
192
128
0
255
128
0
0
0
0
255
128
255
128
0
0
255
192
128
0
0
0
255
128
0
0
255
128
0
0
255
128
255
192
128
0
0
0
0
0
255
128
0
0
255
128
255
128
Altera Corporation
287
Environment Variables
MAX+PLUS II uses environment variables to configure various options and
locate its files. MAX+PLUS II initializes them when it is installed, but you
may wish to change them to optimize your system performance.
If you are using the C shell, environment variables are located in your .cshrc
file, and have the following format:
setenv <environment variable> <value>
288
Altera Corporation
If you are using the Bourne or Korn Shell, environment variables are located
in your .profile file, and have the following format:
set <environment variable>=<value>
MAX2_HOME
The MAX2_HOME variable specifies the name of the MAX+PLUS II home
directory. The default is /usr/maxplus2. You should use this variable only if
the system displays an error message indicating that MAX+PLUS II files
cannot be found when you start the program.
MAX2_PLATFORM
The MAX2_PLATFORM variable specifies the name of the platform used to
run MAX+PLUS II. You should use this variable only if the following error
message is displayed when you start the program: Unable to determine the
type of system you are using.
The following table lists the supported MAX+PLUS II platform names and
corresponding variable values:
Platform Name:
Variable Value:
sunos
solaris
hp
rs6000
Altera Corporation
289
MWCOM1
MWCOM2
MWCOM3
MWCOM4
/dev/tty0
/dev/tty1
/dev/tty1
/dev/tty1
/dev/ttya
/dev/ttyb
/dev/ttyc
/dev/ttyd
dev/term/0
dev/term/1
dev/term/2
dev/term/3
/dev/ttyd00
/dev/ttyd01
/dev/ttyd02
/dev/ttyd03
You can change the default mapping to reassign a COM port to one of the
UNIX serial ports. For example, MWCOM1=/dev/ttyc binds the ttyc serial
port to COM1, replacing the default port ttya.
MWFONT_CACHE_DIR
The MWFONT_CACHE_DIR variable specifies the name of the MAX+PLUS II
font cache directory. The default directory is /<users home directory>/
windows.
MWLOOK
The MWLOOK variable controls the initial look and feel of the
MAX+PLUS II software on the workstation. MWLOOK may take the following
values:
Value:
Effect:
motif
windows
290
Altera Corporation
MWRGB_DB
The MWRGB_DB variable specifies the full pathname to the file rgb.txt, which
maps color names to 24-bit RGB color values in the X server. If MWRGB_DB is
not used, the program looks for rgb.txt in the following directories, in order:
1.
2.
3.
4.
/usr/openwin/lib
/lib
/usr/X/lib
/usr/lib/X11
MWSYSTEM_FONT
The MWSYSTEM_FONT variable specifies the default system font used by
MAX+PLUS II. If this variable is not used, the default font is Helvetica. To
change the system font, set this variable to an existing X font name. For more
information, see Fonts on page 292.
MWUNIX_SHARED_MEMORY
The MWUNIX_SHARED_MEMORY variable determines whether or not
MAX+PLUS II may use UNIX shared memory when it shares data with
another program.
If MWUNIX_SHARED_MEMORY is set to true, MAX+PLUS II can use UNIX
shared memory, which may improve its speed performance. If it is set to
false (the default value), MAX+PLUS II uses shared memory in the
X server when it shares data with another program. This shared memory
allows data exchanges between programs that run on different machines,
but which are displayed on the same X server.
Altera Corporation
291
MWWM
The MWWM variable determines which window manager is used on the
system. MWWM may take the following values:
Value:
Effect:
MWM
OLWM
TWM
Fonts
MAX+PLUS II installs the fonts necessary for normal operation. By default,
these fonts are located in the /<users home directory>/maxplus2/fonts
directory.
292
1.
2.
3.
Altera Corporation
4.
5.
b.
or:
v
Altera Corporation
293
Font Aliases
The [FontSubstitutes] section of the win.ini file in the <users home
directory>/windows directory provides aliases for font names. These aliases
are used to bind the MAX+PLUS II font names to the font names available
under the X server.
The following example shows the default font substitution list:
[FontSubstitutes]
Helv=helvetica
MS Sans Serif=ms sans serif
Tms Rmn=times
MS Serif=times
Times New Roman=times
Arial=helvetica
Printers
MAX+PLUS II uses its own Postscript printer driver to support Postscript
printers under UNIX.
294
Altera Corporation
[ports]
lpt1:=lp -c "%s"
lpt2:=lp -c -dps1700 "%s"
lpt3:=
...
The [ports] section lists the communication and printer ports
available to MAX+PLUS II. The Windows LPTn: variables are
equated to UNIX commands. In this example, LPT1 and LPT2 are
equated to the print command lp. MAX+PLUS II prints its output to
an intermediate Postscript file, which is then substituted for the term
%s. The term -dps1700 in the example refers to a UNIX printer
named ps1700 that should be defined in the UNIX printcap file.
[PrinterPorts]
Apple LaserWriter II NT=PSCRIPT,LPT1:,15,90
Postscript Printer QMS=PSCRIPT,LPT2:,15,90
The [PrinterPorts] section lists the active and inactive output
devices that can be accessed by the printer drivers, specifies the ports
to which the output devices are connected, and specifies time-out
values. In the example, the Apple LaserWriter II NT printer is
connected to the PSCRIPT queue, and is connected to LPT1.
MAX+PLUS II ignores the time-out values.
Printer Fonts
You can use the [PSFontSubstitutes] section of the win.ini file to
specify aliases for actual printer fonts to match the fonts in MAX+PLUS II.
The following example shows the default font substitute list:
[PSFontSubstitutes]
Helv=Helvetica
helvetica=Helvetica
MS Sans Serif=Helvetica
Tms Rmn=Times Roman
MS Serif=Times Roman
Times New Roman=Times Roman
Arial=Helvetica
courier=Courier
Altera Corporation
295
296
Altera Corporation
Glossary
This glossary defines selected terms used in MAX+PLUS II documentation.
1 Choose Glossary (Help menu) to view the full MAX+PLUS II glossary on-line.
Altera Corporation
297
Glossary
Glossary
Glossary
Glossary
298
Altera Corporation
Glossary
B
back-annotation The process of copying
device and resource assignments made by
the Compiler, which are stored in the Fit
File (.fit), into the Assignment &
Configuration File (.acf) for a project. The
back-annotation process preserves the
current fit in future compilations.
Glossary
Glossary
Compiler
Programmer
Simulator
Timing Analyzer
ACF Reader
Waveform Editor Import Vector File
command (File menu)
MAX+PLUS II Project Archive
command (File menu)
300
Glossary
Example: a[3..0],dout[6..4],z3
The first name in the series of names in a
single-range, dual-range, or sequential
name is the most significant bit (MSB) of
Altera Corporation
301
Glossary
C
chip A group of logic functions defined as
a single, named unit. A chip is assigned to
an actual device by either the user or the
Compiler.
You can make chip assignments on logic
functions in design files. Items that are
assigned to the same chip are placed in the
same device during compilation. The term
device always refers to an actual
programmable logic device, whereas the
term chip always refers to a group of logic
functions.
When the Compiler processes a project,
each chip name is assigned to a
corresponding programming file for a
particular device.
Classic An Altera device family based on
Alteras original EPROM-based EPLD
architecture. MAX+PLUS II provides
support for the following Classic devices:
EP600I, EP610, EP610I, EP900I, EP910,
EP910I, EP1800I, and EP1810 devices.
Clear An input signal that resets a
register. A synchronous Clear signal resets
on each rising or falling Clock edge. An
asynchronous Clear signal resets
regardless of the Clock signal.
clique A group of logic functions defined
as a single, named unit. The Compiler
attempts to keep clique members together
when it fits the project. A clique
assignment allows you to group all logic on
a speed-critical path, thus improving
performance.
If possible, all clique members are assigned
to the same LAB. If the clique members will
not fit into a single LAB, they are placed in
302
Glossary
Altera Corporation
303
Glossary
Glossary
D
database A flattened representation of all
design files in a MAX+PLUS II project
hierarchy. The database is used internally
by Compiler modules during compilation.
decimal The base 10 number system
(radix). Decimal digits are 0 through 9.
In AHDL,VHDL, and Verilog HDL no
special notation is needed to indicate
decimal digits.
default Simulator Channel File (.scf) A
Simulator Channel File (.scf) that can
contain all nodes and groups that are in the
Simulator Netlist File (.snf) for a project. It
is created automatically with the Enter
Nodes from SNF command (Node menu)
in the Waveform Editor.
default timing tagging The Timing
Analyzer provides the following default
node tagging for timing analysis:
Analysis Mode: Default Tagging:
Delay Matrix
Setup/Hold
Matrix
Registered
Performance
304
Altera Corporation
Glossary
Option:
Device Family:
Enable LOCK
Output
JTAG User Code
Low-Voltage I/O
Release Clears
Before Tri-States
FLEX 10K
Security Bit
Turbo Bit
Use Low-Voltage
Configuration
EPROM
User Code
Option:
Device Family:
Auto-Restart
Configuration on
Frame Error
Disable Start-Up
Time-Out
Enable Chip-Wide
Output Enable
Enable Chip-Wide
Reset
Enable DCLK
Output in User
Mode
Enable INIT_DONE
Output
Enable JTAG
Support
FLEX 6000,
FLEX 8000, and
FLEX 10K
FLEX 8000
Altera Corporation
User-Supplied
Start-Up Clock
Glossary
Glossary
FLEX 10K
All
FLEX 6000,
FLEX 8000, and
FLEX 10K
Classic, MAX 5000,
MAX 7000, and
MAX 9000
Classic, MAX 5000,
MAX 7000, and
MAX 9000 (Logic Cell
Turbo Bit can be
applied to all logic
cells in a MAX 7000
or MAX 9000 device.)
FLEX 6000 and
FLEX 10K
MAX 7000S and
MAX 9000
FLEX 6000,
FLEX 8000, and
FLEX 10K
305
E
EAB
EC
Altera Corporation
Glossary
Altera Corporation
F
family-specific mega- or macrofunction An
Altera-provided mega- or macrofunction
that contains logic optimized for the
architecture of a specific device family.
The functionality of a family-specific megaor macrofunction is always the same,
regardless of the device family for which it
is designed. However, the actual
primitives and nodes used within the
mega- or macrofunction file can vary from
family to family to take advantage of
different device architectures, thus
providing higher performance and/or
more efficient implementation.
307
Glossary
Glossary
Glossary
Altera Corporation
Glossary
Glossary
310
G
GDF
Glossary
H
hard logic function A logic function in a
design file that is not removed during
standard logic synthesis and therefore can
be assigned to a physical resource such as a
specific device, pin, logic cell, or I/O cell.
311
Glossary
Glossary
Notation
AHDL
VHDL
Verilog HDL
Examples:
H"123AECF" (AHDL)
16#FF# (VHDL)
'h837FF (Verilog HDL)
312
Altera Corporation
Glossary
I
I/O cell An I/O cell is a register (also
known as an I/O element) that exists on the
periphery of a FLEX 10K, FLEX 8000, or
Altera Corporation
Glossary
Glossary
Glossary
JCF
315
Glossary
Glossary
K
keyword Words that are reserved for
implementing syntax in files used as inputs
to MAX+PLUS II, including AHDL Text
Design Files (.tdf), Assignment &
Configuration Files (.acf), Command Files
(.cmd), EDIF Command Files (.edc),
Library Mapping Files (.lmf), VHDL
Design Files (.vhd), Verilog Design
Files (.v) and Vector Files (.vec). For
example, the keyword OF cannot be used
as an unquoted symbolic name in an
AHDL file.
L
LAB
316
Altera Corporation
Glossary
Glossary
Glossary
Logic Level:
0
1
X
318
2.
Glossary
M
macrocell see logic cell.
macrofunction A high-level building block
that can be used together with gate and
flipflop primitives and/or megafunctions
in MAX+PLUS II design files.
1 In general, Altera recommends using
megafunctions in preference to
equivalent macrofunctions in all new
projects. Megafunctions are easier to
scale to different sizes and offer more
efficient logic synthesis and device
implementation.
Altera provides a library of over 300 oldstyle macrofunctions in the \maxplus2\
max2lib directory and its subdirectories
Altera Corporation
Glossary
Glossary
LSB
Glossary
Altera Corporation
Glossary
MTF
Glossary
Item:
single-range
group (bus)
name
Name Character
Exception:
filename
Altera Corporation
323
Glossary
Glossary
Name Character
Exception:
Item:
Name Character
Exception:
1 1.
324
Meaning:
INPUT
Altera Corporation
Glossary
Type:
Meaning:
COMB
REG
MACH
Normal logic synthesis style The Alteraprovided style that directs the Logic
Synthesizer to optimize your project for
minimum silicon resource usage.
The Normal style attempts to use device
resources as efficiently as possible, without
adding excessive timing delays.
Notation
AHDL
VHDL
Verilog HDL
Examples:
Q"4671223" (AHDL)
8#4671223# (VHDL)
'o4671223 (Verilog HDL)
one-hot encoding A type of binary coding
in which one and only one bit of a value is
set to 1. For example, the four legal values
0001, 0010, 0100, and 1000 together
Glossary
Glossary
325
326
P
parameter or parameterized A parameter is
an attribute of a megafunction or
macrofunction that determines the logic
created or used to implement the function,
i.e., a characteristic that determines the
size, behavior, or silicon implementation of
a function. The parameter information can
be used to determine the actual primitives
and other subdesigns needed to implement
the logic of the function.
A parameterized function is a function
whose behavior is controlled by one or
more parameters. Some logic functions,
Altera Corporation
Glossary
Glossary
Glossary
POF
Hierarchy Display
Graphic, Symbol, and Text Editors
Compilation support for Classic,
MAX 5000, MAX 7000/7000E/7000S,
EPF8282, EPF8452, EPM9320, and
EPF10K10 devices
EDIF Interfaces (input and output)
Verilog HDL and VHDL output
Timing Analyzer
Message Processor
Programmer
see Programmer Object File.
328
Altera Corporation
Glossary
Altera Corporation
329
Glossary
Glossary
330
Altera Corporation
Glossary
331
Glossary
Glossary
S
SCF
332
segment
Glossary
SIF
SOF
Fast I/O
Global Signal
Hierarchical Synthesis
Insert Additional Logic Cell
Minimization (Full and Partial)
NOT Gate Push-Back
Parallel Expanders
Slow Slew Rate
SOFT Buffer Insertion
Turbo Bit (including logic cell Turbo
Bit)
Use LPM for AHDL Operators
XOR Synthesis
334
Altera Corporation
Glossary
Altera Corporation
Maximum 32 characters
length:
Legal
a-z, A-Z, 0-9, and
characters: underscore (_)
An unquoted subdesign
name cannot be a reserved
AHDL identifier or keyword.
Quoted subdesign name (AHDL):
Maximum 32 characters
length:
Legal
a-z, A-Z, 0-9, dash (-), and
characters: underscore (_)
Identifier (VHDL):
Maximum 32 characters
length:
Legal
a-z, A-Z, 0-9, and underscore
characters: (_)
An identifier cannot begin
with a digit or an underscore,
cannot end with an
underscore, and cannot have
two underscores (_ _) in
succession. It cannot be a
keyword.
Identifier (Verilog HDL):
Maximum 32 characters
length:
Legal
a-z, A-Z, 0-9, and
characters: underscore (_)
An identifier cannot begin
with a digit. Identifiers are
case-sensitive. Verilog HDL
keywords cannot be used.
335
Glossary
Glossary
T
super-project and sub-project A superproject consists of a top-level design file
that contains symbols or instances
representing multiple, individual projects.
A sub-project is any individual project that
serves as part of a super-project. You can
use any super-project as a sub-project in a
higher-level super-project.
SVF File
337
Abbreviation for:
ns
ms
us
s
mhz
nanosecond
millisecond
microsecond
second
megahertz
Altera Corporation
Altera Corporation
MAX 5000
MAX 7000
MAX 9000
FLEX 6000
FLEX 8000
FLEX 10K
V
variable A name that represents a node. In
AHDL, a variable can also represent a state
machine or an instance of a primitive,
megafunction, or macrofunction and is
declared in the Variable Section. In VHDL,
variables have a single current value, and
are declared and used only in processes
and subprograms. A VHDL variable is
declared with a Variable Declaration; the
value of a variable can be modified with a
Variable Assignment Statement.
VCC A high-level input voltage
represented as a high (1) logic level in
binary group values.
339
Altera Corporation
340
Altera Corporation
X
Xilinx Netlist Format (XNF) File (.xnf) A
netlist file (with the extension .xnf)
generated by Xilinx software. XNF Files
that are generated by running the Xilinx
LCA2XNF utility can be compiled directly
by the MAX+PLUS II Compiler. An XNF
File can define all logic in a project, or be
incorporated at the bottom level in a
hierarchical project.
W
Waveform Design File (.wdf) A graphical
waveform design file (with the extension
.wdf) created with the MAX+PLUS II
Waveform Editor. This file represents logic
with high (1), low (0), undefined (X), and
high-impedance (Z) waveforms. It can also
341
Altera Corporation
342
Altera Corporation
Index
Nonalphabetic
.cshrc file 26, 28, 30, 32, 68, 288
.profile file 68, 288
.xinitrc file 288
/usr/lib/x11/fonts directory 292
/usr/max2work directory
see max2work directory
/usr/maxplus2 directory
see maxplus2 directory
/windows directory 294
\lit directory xvii, xviii, 51
Numerics
8count macrofunction 173
A
A+PLUS 95
About MAX+PLUS II command 92
ACF 97, 109, 115, 130, 135, 234
adapters
installing 58
releasing 59
adders 118
ADF 95, 96, 129
Adobe Acrobat Reader 51
AHDL
auto_max.tdf file 193
Boolean equations 190
general description 117
If Then Statement 192
Logic Section 190
megafunction support 124
primitives 123
Register Declaration 189
state machines 193
Subdesign Section 187
templates 109, 117
time_cnt.tdf file 186
used with Text Editor 108
Variable Section 189
Altera Corporation
AHDL command 90
AHDL Template command 187, 189
Altera Design File (.adf) 95, 96, 129
altera library 123
Altera Megafunction Partner Program
(AMPP) authorization codes 49
Altera Programmer driver 11
alterad daemon 4, 34, 35, 37, 39
AMPP authorization codes 49
Analyze Timing command 268
ancillary file definition 86
anti-virus software 8
Applications Department 282
Arc tool 171
Assembler module 137
Assignment & Configuration File (.acf) 97,
109, 115, 130, 135, 234
assignments
back-annotating 99
bins 115
device 98
logic option 99
parameters 100
resource 98, 114
viewing 104
Authorization Code command 48, 80
auto_max.tdf file 157, 193
autoexec.bat file 68
Auto-Indent command 188
B
Back button 92
Back-Annotate Project command 234
back-annotation 99
Backus-Naur Form xxii
backward compatibility, A+PLUS &
SAM+PLUS 95
balloon text 116
Basic Tools command 90
BBS 282, 283
343
BitBlaster
baud rate dipswitch settings 63
capabilities 150
installation 61
bldfamily utility 292
BNF see Backus-Naur Form
Boolean equations (AHDL) 190
branch buttons 126
breakpoints 145
bulletin board service (BBS) 282, 283
bus lines 181
buses
connecting 104, 182
creating 112
naming 182
Button 2 menus 102, 161
ByteBlaster
capabilities 150
installation 65
Windows NT driver installation 11
C
CD-ROM
mounting 16
running help from the CD-ROM 19
unmounting 25
chip assignments 98
chiptrip project
see tutorial
chiptrip.gdf file 210
chiptrip.scf file 245
chiptrip.tbl file 260
chkdsk command 7
Circle tool 171
Classic devices 74, 153
Clear signal 100, 138, 149, 268
clique assignments 98
cliques, finding 101
Clock signal 100, 112, 138, 149, 206
Close command 184
Close Editor command 230
CMD file 109, 145, 257
CNF 132
Color Palette command 286
344
D
Database Builder module 133
decoders 118
Decrease Indent command 188
default SCF 143, 147, 246
Delay Matrix 149, 266
Delay Matrix command 267
delimiters, finding 109
Design Doctor command 219
Altera Corporation
Index
E
e-mail 282, 283
EDIF Command File (.edc) 109, 129
EDIF Input File (.edf) 96, 129, 133
EDIF Netlist Reader module 133
EDIF Netlist Writer module 136, 137
EDIF Output File (.edo) 136, 137
Edit Node/Bus Name command 214
Edit Pin Assignments & LCELLs dialog
box 236
Edit Pin Name command 212
electronic mail 282, 283
Embedded Array Block (EAB) 98, 100
embedded cells, assignments 98
End Time command 246
Enter Nodes from SNF command 246
Enter Symbol dialog box 172
environment variables 13, 67, 288
Altera Corporation
F
F1 key 162
fan-in & fan out, viewing 115
FCF 153
feedback 268
file icons 125
file server configuration
see installation, UNIX workstation
files
checking for basic errors 183
closing 184, 230
creating 168, 257, 260
opening 226, 228
organization 69
printing 126
saving 169, 183
Find Clique in Floorplan command 101
Find Next Transition command 208
Find Node in Design File command 101
Find Node in Floorplan command 101
Find Text command 234
finish.scf file 265
Fit File (.fit) 115, 135, 234
Fit in Window command 175, 201
Fitter module 135
FLEX Chain File (.fcf) 153
FLEX Download Cable 60, 150
FLEX 10K devices 74, 138, 153
FLEX 6000 devices 74, 138, 153
FLEX 8000 devices 74, 138, 153
floating-point emulation, disabling 13
Floorplan Editor
general description 114
tutorial sessions 231, 266
Floorplan Editor command 232, 237
fMAX 99, 100
345
G
GDF 96, 129, 168, 210
glitch monitoring 145
Global Project Device Options command
220
Global Project Logic Synthesis command
220
global signals 100
Glossary button 92
Glossary command 91
GND pins 115
Golden Rules command 90
Graphic Design File (.gdf) 96, 129, 168, 210
Graphic Editor
general description 103
tutorial sessions 168, 210
Graphic Editor command 103
Gray code 112
Grid Size command 201, 246
groups
creating 112
initializing 145
moving 251
GUARD_PORT variable 47
Guideline Spacing command 175
H
Hardware Setup command 58, 63, 66
Help
commands 89
context-sensitive 94, 109, 162
Help window buttons 92
icons 89
on command shortcuts 94
346
Help (continued)
running from the CD-ROM 19
searching for a topic 94, 163
where to start 93
Help on Message button 140, 162, 227
Help Topics dialog box 92, 163
Hexadecimal (Intel-format) File (.hex) 129,
137, 143, 153
Hierarchy Display
general description 125
tutorial session 229
Hierarchy Display command 229
Hierarchy Interconnect File (.hif) 132
hierarchy traversal 102
HIF 132
History button 92
History File (.hst) 145, 257, 263
hold times 145, 149, 258
How to Use Help command 92
How to Use MAX+PLUS II Help
command 92
HP 9000 Series 700/800 workstations
see installation, UNIX workstation
HST file 145, 257, 263
I
I/O cells 98, 100
I/O pin feedback 149, 268
I/O types 112
IBM RISC System/6000 workstations
see installation, UNIX workstation
icons
file 125
MAX+PLUS II applications 83
MAX+PLUS II help 89
If Then Statement (AHDL) 192
Include File (.inc) 101, 118, 130
Increase Indent command 188
indenting text 188
inittab file 34
Inputs/Outputs command 257, 274
Insert Node command 199, 250
install program 7
install.cd program 15
Altera Corporation
Index
installation, PC
see also network licensing
Adobe Acrobat Reader 51
BitBlaster installation 61
ByteBlaster installation 65
determining free disk space 7
file organization 69
FLEX Download Cable installation 60
Master Programming Unit
installation 53
MegaCore/AMPP authorization
codes 49
NEC 9801 steps 13
read.me file 3
site license 49
Software Guard installation 46
software installation 7
software registration 4
system requirements 6
uninstalling 10
Windows NT drivers 11
installation, UNIX workstation
see also network licensing
additional configuration information
285
Adobe Acrobat Reader 51
BitBlaster installation 61
configuring file server and user
environment 25
file organization 69
mounting the CD-ROM 16
network licensing file 21
printer installation 294
read.me file 3
software installation 15
specific steps for HP 9000 Series
700/800 29
specific steps for IBM RISC
System/6000 31, 64
specific steps for SPARCstation
running Solaris 2.5+ 27
specific steps for SPARCstation
running SunOS 4.1.3+ 26
system requirements 14
unmounting the CD-ROM 25
Altera Corporation
Interlink program 46
Introduction command 90
Iomega Zip and Ditto drives 46
iterative logic generation (AHDL) 118
J
Jam Files (.jam) 153
JEDEC File (.jed) 137, 153
JTAG Chain File (.jcf) 153
jumps 88
K
keyboard shortcuts 161
L
LAB View 114, 232
LAB View command 232, 271
Last Compilation Floorplan command
232, 237, 271
Latch Enable signal 149
Library Mapping File (.lmf) 109, 133
Library of Parameterized Modules (LPM)
103, 118, 124
license file
installing 21
sample file 21
license server configuration
FLEXlm utilities 40
setup 33
troubleshooting 34
license.dat file
FLEXlm 40, 42, 43, 44
MAX+PLUS II 24, 37, 43
Line Style commands 179, 181, 212
lines
deleting 180
drawing 179
linked multi-project simulation 144
Linked SNF Extractor module 136
List Only Longest Path command 270
List Paths button 140, 270
\lit directory xvii, xviii, 51
347
M
macrofunctions, general description 124
Marketing Department 282
Master Programming Unit (MPU) 53, 57,
59, 150
matrix, delay 149
MAX 9000 devices 74, 153
MAX 5000 devices 74, 153
MAX 7000 devices 74, 153
MAX+PLUS (DOS) 95
348
MAX+PLUS II
application icons 83
command-line mode 277
design entry 95
device programming 150
error detection & location 139
exiting 167
general description 74
global features 97
help description 88
project processing 127
project verification 141
starting 79, 165
MAX+PLUS II Manager, general
description 81
MAX+PLUS II manuals
documentation conventions xix
help updates xxiii
list of documents xvi
MAX+PLUS II Table of Contents
command 89
max2protd script 34, 37
max2work directory 87, 160
Maximize button 167
maxplus2 directory
.\fonts directory 69, 292
.\max2inc directory 69
.\max2lib directory 69, 123
.\vhdl87 directory 70, 123
.\vhdl93 directory 70, 123
overall structure 69
maxplus2.ini file 13, 19, 47, 67
MAXPLUS2_INI environment variable 13,
67
MegaCore authorization codes 49
MegaCore/AMPP Licenses dialog box 49
megafunctions, general description 123
Megafunctions/LPM command 91
memory 145, 291
Memory Initialization Files (.mif) 129, 143
Message button 226, 271, 272
Message Processor
general description 139
tutorial session 216
Message Processor command 226, 270
Altera Corporation
Index
N
names
buses 182
nodes 182
pins 177
pinstubs 107
NDB file 132
NEC 9801 computers 13
network licensing
configuring the license server 33
FLEXlm utilities 40
license file installation 21
PLS-ES site licenses 49
sample license file 21
specifying the license file in
MAX+PLUS II 48
troubleshooting license installation 34
New command 103, 168
Altera Corporation
O
old-style macrofunctions
see macrofunctions
Old-Style Macrofunctions command 91
one-hot state machine encoding 100
Open command 263
OpenCore megafunctions 91
open-drain pins 100
OpenLook 292
OrCAD Schematic File (.sch) 96, 104, 129
Orthogonal Line tool 171, 179
oscillation monitoring 145
Output Enable signal 100
Override User Assignments dialog box
236
Overwrite Clock command 206, 253
Overwrite High (1) command 252
Overwrite State Name command 202, 203
Overwrite Undefined (X) command 206
349
P
palette tools
Graphic Editor 104, 171, 179
Waveform Editor 202
parallel port 150
parameter assignments 100
parameters
default values 107
in AHDL 118
in macrofunctions 124
in megafunctions 124
Partitioner module 134
Partitioner/Fitter Status dialog box 224
PC installation
see installation, PC
PDF files xvii, 51
pins
assignments 98
entering 176
naming 177
pinstubs 107
PLE3-12A programming unit 57
PLF 154
PL-MPU programming unit 57
POF 137, 153, 273
pop-up menus 102, 161
Portable Document File (PDF) files xvii, 51
ports, inverting 104
PRB file 130
Preferences command 166
Preset signal 100, 138, 149, 268
primitives 123
Primitives command 91
Print button 92
printcap file 295
printing, UNIX workstations 294
Probe & Resource Assignment File (.prb)
130
probe assignments 98
Procedures command 90
product information 282
.profile file 68, 288
Program button 153, 275
350
Programmer
general description 152
input & output files 154
tutorial session 273
Programmer command 273
Programmer Log File (.plf) 154, 274
Programmer Object File (.pof) 137, 153, 273
project compilation, general description
127
project definition 87
Project Name command 170
project name, specifying 170, 171
<project name>.ini file 130
Project Save & Check command 183
Project Set Project to Current File
command 171
propagation delays 140, 148
listing 270
locating 271, 272
publications 283
R
race conditions 138
radixes 112
RAM (asynchronous) 149
RAM initialization 145
Raw Binary File (.rbf) 138, 153
rc command 37
rc.local command 37
rc.local file 33
READ.ME command 91
read.me file xxiii, 3
Reference cursor 262
Register Declaration 189
register packing 100
Registered Performance 266
Registered Performance Display 149
registers 112, 118
registration, software 4
Report File (.rpt) 115, 130, 135, 222, 228
Report File Equation Viewer 240
Report File Equation Viewer command
271
Report File Settings command 223
Altera Corporation
Index
S
SAM (HP) 29
SAM+PLUS 95
sample files xxiv
Save As command 169
SBF 138, 153
SCF 111, 143, 146, 154, 245, 265
SCH file 96, 104, 129
SDF Output File (.sdo) 120, 122, 137
Search button 92
Search dialog box 92, 163
Search for Help on command 89, 163
Security Bit 100, 154, 220
segmented hypergraphics 88
Selection tool 104, 171, 179, 202
Sentinel driver 11
Serial Bitstream File (.sbf) 138, 153
serial port 150, 289
Serial Vector Format File (.svf) 153
setup & hold times 145, 149, 258
Setup/Hold Matrix 149, 266
Shift+F1 keys 94, 162
shortcuts 161
Shortcuts command 90
Show Grid command 201
Show Guidelines command 175
Show Moved Nodes in Gray command
235, 238
Show Node Fan-In command 237, 241
Show Node Fan-Out command 237, 241
Show Path command 238, 271
SIF 145
Altera Corporation
Simulator
general description 142
tutorial session 255
Simulator Channel File (.scf) 111, 143, 146,
154, 245, 265
Simulator command 256
Simulator Initialization File (.sif) 145
Simulator Netlist File (.snf) 112, 136, 142,
147, 148
site license 49
smart recompile 133
Smart Recompile command 218
SmartDrive 9
SMF 95, 96, 129
Snap to Grid command 201
SNF 112, 136, 142, 147, 148
SOF 137, 153
Software Guard installation 46
software installation
see installation
Software Interface Guides xvii, 51
software registration 4
Solaris 2.5+ operating system
see installation, UNIX workstation
speed_ch.wdf file 158, 196
SRAM Object File (.sof) 137, 153
Standard Delay Format (SDF) Output File
(.sdo) 120, 122, 137
Start button 223
State Machine File (.smf) 95, 96, 129
state machines
creating 111, 118
in AHDL 193
in WDFs 198, 201
one-hot encoding 100
simulating 144
state names 202
status bar 166
Subdesign Section 187
SunOS 4.1.3+ operating system
see installation, UNIX workstation
support services 281
SVF file 153
Symbol Editor command 106
Symbol Editor, general description 106
351
T
Tab Stops command 188, 193
Table File (.tbl) 112, 143, 260, 263
Tabular Text File (.ttf) 137, 153
TAO file 149
tCO 99, 100
TDF 96, 108, 117, 129, 135, 185
TDO file 118, 135
TDX file 118, 133
technical publications 283
technical support 282
templates 109, 117, 119, 122, 187
text
changing font & size 188
indenting 188
templates 109, 117, 119, 122, 187
Text Design Export File (.tdx) 118, 133
Text Design File (.tdf) 96, 108, 117, 129, 135,
185
Text Design Output File (.tdo) 118, 135
Text Editor
general description 108
tutorial sessions 185, 261
Text Editor command 108
Text Size commands 182, 188, 215
Text tool 171
352
Index
tutorial (continued)
Timing Analyzer session 266
Waveform Editor sessions 196, 245, 261
virus-detection software 8
visible pinstub names 107
VO file 136, 137
vsafe.com 8
U
W
UNIX workstation installation
see installation, UNIX workstation 14
/usr/lib/x11/fonts directory 292
/usr/max2work directory
see max2work directory
/usr/maxplus2 directory
see maxplus2 directory
V
V file 108, 121, 129
Variable Section 189
VCC pins 115
Vector File (.vec) 109, 143, 146, 154
Verilog Design File (.v) 108, 121, 129
Verilog HDL
general description 121
megafunction support 124
primitives 123
templates 109, 122
used with Text Editor 108
Verilog HDL command 91
Verilog Netlist Reader 133
Verilog Netlist Writer module 136, 137
Verilog Output File (.vo) 136, 137
VHD file 96, 108, 119, 129, 133
VHDL
general description 119
megafunction support 124
primitives 123
templates 109, 119
used with Text Editor 108
VHDL command 90
VHDL Design File (.vhd) 96, 108, 119, 129,
133
VHDL Netlist Reader 133
VHDL Netlist Writer module 136, 137
VHDL Output File (.vho) 120, 122, 136, 137
VHO file 120, 122, 136, 137
Altera Corporation
X
Xilinx Netlist Format File (.xnf) 96, 129, 133
.xinitrc file 288
XNF Netlist Reader 133
Z
Zip drive (Iomega) 46
Zoom In & Zoom Out commands 175, 201
353