ModelSim /VHDL, ModelSim /VLOG, ModelSim /LNL, and ModelSim /PLUS are
produced by Model Technology Incorporated. Unauthorized copying, duplication,
or other reproduction is prohibited without the written consent of Model
Technology.
The information in this manual is subject to change without notice and does not
represent a commitment on the part of Model Technology. The program described
in this manual is furnished under a license agreement and may not be used or
copied except in accordance with the terms of the agreement. The online
documentation provided with this product may be printed by the end-user. The
number of copies that may be printed is limited to the number of licenses
purchased.
ModelSim is a registered trademark of Model Technology Incorporated. PostScript
is a registered trademark of Adobe Systems Incorporated. UNIX is a registered
trademark of AT&T in the USA and other countries. FLEXlm is a trademark of
Globetrotter Software, Inc. IBM, AT, and PC are registered trademarks, AIX and
RISC System/6000 are trademarks of International Business Machines
Corporation. Windows, Microsoft, and MS-DOS are registered trademarks of
Microsoft Corporation. OSF/Motif is a trademark of the Open Software Foundation,
Inc. in the USA and other countries. SPARC is a registered trademark and
SPARCstation is a trademark of SPARC International, Inc. Sun Microsystems is a
registered trademark, and Sun, SunOS and OpenWindows are trademarks of Sun
Microsystems, Inc. All other trademarks and registered trademarks are the
properties of their respective holders.
Copyright (c) 1990 -2001, Model Technology Incorporated.
All rights reserved. Confidential. Online documentation may be printed by licensed
customers of Model Technology Incorporated for internal business purposes only.
Model Technology Incorporated
10450 SW Nimbus Avenue / Bldg. R-B
Portland OR 97223-4347 USA
phone: 503-641-1340
fax: 503-526-5410
e-mail: support@model.com
home page: http://www.model.com
, sales@model.com
ii
Table of Contents
1 - Introduction (1-15)
Performance tools included with ModelSim SE . . . . . . . . . . . . . . . . . . . . 1-16
This documentation was written for ModelSim SE version 5.5 for UNIX and Microsoft
Windows 95/98/ME/NT/2000 (see note below for exception). If the ModelSim software
you are using is a later release, check the README file that accompanied the software.
Any supplemental information will be there.
Although this document covers both VHDL and Verilog simulation, you will find it a
useful reference for single HDL design work.
ModelSim SE User’s ManualIntroduction 1-15
Performance tools included with ModelSim SE
Performance tools included with ModelSim SE
All ModelSim SE versions include the followin g performance tools:
•Performance Analyzer
Identifies areas in your simulation where performance can be improved.
Note: Performance Analyzer will not operate on Windows 95.
•Code Coverage
Gives you graphical and report file feedback on how the source code is being executed.
(9-281)
(10-291)
ModelSim’s graphic interface
While your operating system interface provides the window-management frame,
ModelSim controls all internal-window features including menus, buttons, and scroll bars.
The resulting simulator interface remains consistent within these operating systems:
• SPARCstation with OpenWindows, OSF/Motif, or CDE
• IBM RISC System/6000 with OSF/Motif
• Hewlett-Packard HP 9000 Series 700 with HP VUE, OSF/Motif, or CDE
• Linux (Red Hat v. 6.0 or later) with KDE or GNOME
• Microsoft Windows 95/98/ME/NT/2000
Because ModelSim’s graphic interface is based on Tcl/TK, you also have the tools to build
your own simulation environment. Preference variables and configuration commands,
"Preference variables located in INI files"
give you control over the use and placement of windows, menus, menu options and
277)
buttons. See "Tcl and ModelSim"
For an in-depth look at ModelSim’s graphic interface see, Chapter 8 - ModelSim Graphic
Interface.
(B-396), and "Graphic interface commands" (8-
(16-369) for more information on Tcl.
1-16 Intr oductionModelSim SE User’s Manual
Standards supported
ModelSim VHDL supports both the IEEE 1076-1987 and 1076-1993 VHDL, the
1164-1993 Standard Multivalue Logic System for VHDL Interoperability, and the
1076.2-1996 Standard VHDL Mathematical Packages standards . A ny design devel oped
with ModelSim will be compatible with any other VHDL system that is compliant with
either IEEE Standard 1076-1987 or 1076-1993.
ModelSim Verilog is base d on the IEEE Std 1 364 Standard Hard ware Description Language Based on the Verilog Hardware Description Language. The Open Verilog
International Verilog LRM version 2.0 is also applicable to a large extent. Both PLI
(Programming Language Interface) and VCD (Value Change Dump) are supported for
ModelSim PE and SE users.
In addition, all products support SDF 1.0 through 3.0, VITAL 2.2b, VITAL’95 - IEEE
1076.4-19 95, and VITAL 2000.
Assumptions
We assume that you are familiar with the use of your operating system. You should also be
familiar with the window management functions of your graphic interface: either
OpenWindows, OSF/Motif, CDE, HP VUE, KDE, GNOME, or
Microsoft Windows 95/98/ME/NT/2000.
Standards supported
We also assume that you have a working knowledge of VHDL and Verilog. Although
ModelSim is an excellent tool to use while learning HDL concepts and practices, this
document is not written to support that goal. If you need more information about HDLs,
check out our Online References - www.model.com
Finally, we make the assumption that you have worked the appropriate lesson s in the
ModelSim Tutorial or the Quick Start and are therefore familiar with the basic functionality
of ModelSim. The M od e lSim Tutorial and Quick Start are both available from the
ModelSimHelp menu. The ModelSim Tutorial is also available from the Support page of
our web site : www.model.com
For installation instructions please refer to the Start Here for Mod elSim guide that was
shipped with the ModelSim CD. Start Here may also be downloaded from our
website: www.model.com
.
.
(1-22).
ModelSim SE User’s ManualIntroduction1-17
Sections in this document
Sections in this document
In addition to this introduction, you will find the following major sections in this document:
2 - Projects and system initialization (2-25)
This chapter provides a definition of a ModelSim "project" and discusses the use of a
new file extension for project files.
3 - Design libraries
(3-41)
To simulate an HDL design using ModelSim, you need to know how to create,
compile, maintain, and delete design libraries as described in this chapter.
4 - VHDL Simulation
(4-55)
This chapter is an overview of compilation and simulation for VHDL within the
ModelSim environment.
5 - Verilog Simulation
(5-73)
This chapter is an overview of compilation and simulation for Verilog within the
ModelSim environment.
6 - Mixed VHDL and Verilog Designs
(6-127)
ModelSim/Plus single-kernel simulation (SKS) allows you to simulate designs that are
written in VHDL and/or Verilog. This chapter outlines data mapping and the criteria
established to instantiate design units between HDLs.
7 - Datasets (saved simulations) and virtuals
(7-137)
This chapter describes datas ets and virtuals - both methods for viewing and organizing
simulation data in ModelSim.
8 - ModelSim Graphic Interface
(8-149)
This chapter describes the graphic interface available while operating ModelSim.
ModelSim’s graphic interface is designed to provide consistency throughout all
operating system environments.
9 - Performance Analyzer
(9-281)
This chapter describes how the ModelSim Performance Analyzer is used to easily
identify areas in your simulation where performance can be improved.
10 - Code Coverage (10-291)
This chapter describes the Code C overage feature. Code Cover age gives you graphical
and report file feedback on how the source code is being executed.
11 - Waveform Comparison
(11-301)
This chapter describes Waveform Comparison, a feature that lets you compare
simulations.
12 - Standard Delay Format (SDF) Timing Annotation
(12-325)
This chapter discusses ModelSim’s implementation of SDF (Standard Delay Format)
timing annotation. Included are sections on VITAL SDF and Verilog SDF, plus
troubleshooting.
1-18 Intr oductionModelSim SE User’s Manual
Command reference
13 - Value Change Dump (VCD) Files
(13-341)
This chapter explains Model Technology’s Verilog VCD implementation for
ModelSim. The VCD usage is extended to include VHDL designs.
14 - Logic Modeling SmartModels
(14-353)
This chapter describes the use of th e Sm artM odel Li br ary an d S martModel Windows
with ModelSim.
15 - Logic Modeling Hardware Models
(15-363)
This chapter describes the use the Logic Modeling Hardware Modeler w ith ModelSim.
16 - Tcl and ModelSim
(16-369)
This chapter provides an overview of Tcl (tool command language) as used with
ModelSim. Additional Tcl and Tk (Tcl’s toolkit) informatio n can be found thr ough
several Tcl online references
A - Technical Support, Updates, and Licensing
(16-370).
(A-385)
This appendix describes how and where to get technical support and updates and
licensing for ModelSim. It also contains links to the Model Technology web site and
references to books, organizations, and companies involved in EDA and simulation.
B - ModelSim Variables
(B-391)
This appendix describes environment, system and preference variables used in
ModelSim.
C - ModelSim Shortcuts
This appendix describes ModelSim keyboard and mouse shortcuts.
D - Using the FLEXlm License Manager
This appendix covers Model Technology’s application of FLEXlm for ModelSim
licensing.
E - Tips and Techniques
This appendix contains an extended collection of ModelSim usage examples taken
from our manuals, and tech support solutions.
F - What’s new in ModelSim
This appendix lists new features and changes in the various versions of ModelSim.
Command reference
The complete command reference for all ModelSim c ommands is located in the ModelSim
Command Reference. Command Reference cross reference page numbers are prefixed with
"CR" (e.g.,"ModelSim Commands"
(C-409)
(D-417)
(E-425)
(F-447)
(CR-9)).
ModelSim SE User’s ManualIntroduction1-19
Text conventions
Text conventions
Text conventions used in this manual include:
italic textprovides emphasis and sets off filenames, path names, and
bold textindicates commands, command options, menu choices,
design unit names
package and library logical names, as well as variables and
dialog box s election
monospace type
The right angle (>) is used to connect menu choices when traversing menus as
path separa t orsexamples wil l show either UNIX or Windows path
UPPER CASEdenotes file types used by ModelSim (e.g., DO, WLF, INI,
What is an "HDL item"
Because ModelSim works with both VHDL and Verilog, “HDL” refers to either VHDL or
Verilog when a specific language reference is not needed. Depending on the context, “HDL
item” can refer to any of the following:
Verilogfunction, module instantiation, named fork, named begin, net,
monospace type is used for program and command examples
in: File > Save
separators - use separators appropriate for your operating
system when trying the examples
MPF, PDF, etc.)
statement, generic, package, signal, or variable
task, or register variable
1-20 Intr oductionModelSim SE User’s Manual
Where to find our documentation
ModelSim documentation is available from our website at
model.com/support/documentation.asp
DocumentFormatHow to get it
Where to find our documentation
or in the following formats and locations:
Start Here for ModelSim SE
(installation & support
reference)
ModelSim SE Quick Guide
(command and feature
quick-reference)
ModelSim SE TutorialPDF, HTMLselect Main window > Help > SE Documentation; also available
ModelSim SE User’s
Manual
ModelSim SE Command
Reference
ModelSim Foreign
Language Int erface
Reference
ModelSim Command HelpASCIItype
Tcl Man Pages (Tcl
manual)
papershipped with ModelSim
PDFselect Main window > Help > SE Documentation; also available
from the Support page of our web site: www.model.com
papershipped with ModelSim
PDF select Main window > Help > SE Documentation, also available
from the Support page of our web site: www.model.com
from the Support page of our web site: www.model.com
PDF, HTMLselect Main win dow > Help > SE Documentation
PDF, HTMLselect Main win dow > Help > SE Documentation
PDF, HTMLselect Main win dow > Help > SE Documentation
help [command name] at the prompt in the Main window
HTMLselect Main window > Help > Tcl Man Pages, or find
contents.htm in \modeltech\tcl_help_html
technotesASCIIselect Main window > He lp > Technotes, or located in the
\modeltech\docs\technotes directory
Download a free PDF reader with Search
Model Technology’s PDF documentation requires an Adobe Acrobat Reader fo r viewing .
The Reader may be installed from the ModelSim CD. It is also available withou t cost from
Adobe at http:
take advantage of the index file supplied with our documentation; the index makes
searching for key words much faster.
ModelSim SE User’s ManualIntroduction1-21
//www.adobe.com. Be sure to download the Acrobat Reader with Search to
Online References - www.model.com
Online References - www.model.com
The Model Technology w eb site includes li nks to support, softwar e d ownl oad s, an d many
EDA information sources. Check the links below for the most current information.
Latest version email
Place your name on our list for email notification of new releases and updates.
model.com/support/register_news_list.asp
News
Current news of Model Technology within the EDA industry.
model.com/news_events/default.asp
Partners
Model Technology’s value added partners, OEM partners, FPGA partners, ASIC
partners, and training partners.
model.com/partners/default.asp
Products
A complete collection of Model Technology product information.
model.com/products/default.asp
Technical Documents
Technical notes, application notes, FAQs.
model.com/resources/techdocs.asp
Sales
Locate ModelSim sales contacts anywhere in the world.
model.com/contact_us.asp
Support
Model Technology email support and software downloads.
model.com/support/default.asp
1-22 Intr oductionModelSim SE User’s Manual
Comments
Comments
Comments and questions about this manual and ModelSim software are welcome. Call,
write, fax or email:
Model Technology Incorporated
10450 SW Nimbus Avenue, Bldg. R-B
Portland, OR 97223-4347 USA
phone: 503-641-1340
fax: 503-526-5410
email: manuals@model.com
home page: http://www.model.com
ModelSim SE User’s ManualIntroduction1-23
1-24 I ntroductionM odelSim SE User’s Manual
2 - Projects and system initialization
Chapter contents
Introduction . . . . . . . . . . . . . . . . 2-26
What are projects?. . . . . . . . . . . . . . 2-26
What are the benefits of projects?. . . . . . . . . . 2-26
How do proje cts differ in version 5.5? . . . . . . . . 2-27
Getting started with projects . . . . . . . . . . . . 2-28
Step 1 — Create a new project . . . . . . . . . . 2-29
Step 2 — Add files to the project . . . . . . . . . . 2-31
This chapter discusses ModelSim projects. Projects greatly simplify the process of
compiling and simulating a design and are a great tool for getting started with ModelSim.
This chapter also includes a section on ModelSim initialization.
ModelSim SE User’s ManualProjects and system initialization 2-25
Introduction
Introduction
What are projects?
Projects are collection entities for HDL designs under specification or test. At a minimum
projects have a root directory, a work libr ary, and "metadata" which are stored in a .mpf file
located in a project’s root directory. The metadata include compiler switch settings, compile
order, and fil e mappings. Projects may also consist of:
• HDL source files or references to source files
• other files such as READMEs or other project documentation
• local libraries
• references to global libraries
What are the benefits of pr ojects?
Projects offer benefits to both new and advanced users. Projects
• simplify interaction with ModelSim; you don’t need to understand the intricacies of
compiler switches and library mappings
• eliminate the need to remember a conceptual model of the design; the compile order is
maintained for you in the project
• remove the necessity to re-establish compiler switches and settings at each session; these
are stored in the project metadata as are mappings to HDL source files
• allow users to share libraries without copying f iles to a local directory; you can establish
references to source files that are stored remotely or locally
• allow you to change individual parameters across multiple files; in previous versions you
could only set parameters one file at a time
• enable "what-if" analysis; you can copy a project, manipulate the settings, and rerun it to
observe the new results
• reload .ini variable settings every time the project is opened; in previous versions you h ad
to quit ModelSim and restart the program to read in a new .ini file
2-26 Pr ojects and system initializationModelSim SE User’s Manual
How do projects differ in version 5.5?
Projects have improved a great deal from earlier versions. Some of the key differences
include:
• A new interface eliminates the need to write custom scripts.
• You don’t have to copy files into a specific directory; you can establish references to files
in any location.
• You don’t have to specify compiler switches; the automatic defaults will work for many
designs. However, if you do want to customi ze the settings, you do it through a dialog
box rather than by writing a script.
• All metadata (compiler settings, compile order, file mappings) are stored in the project
.mpf file.
Important: Due to the significant changes, projects created in versions prior to 5.5 cannot
be converted automatically. If you created a project in an earlier version, you will need to
recreate it in version 5.5. With the new interface even the most complex p roject should take
less than 15 minutes to recreate. Follow the instructions in the ensuing pages to recreate
your project.
Introduction
ModelSim SE User’s ManualProjects and system initialization2-27
Getting started with projects
Getting started with projects
This section describes the four basic steps to working with a project. For a discussion of
more advanced project features, see
"Customizing project settings" (2-34).
Step 1 — Create a new project
This creates a .mpf file and a working library.
Step 2 — Add files to the project (2-31)
Projects can reference or include HDL source files and any other files you want to
associate with the project. You can copy files into the project directory or simply create
mappings to files in other locations.
Step 3 — Compile the files (2-32)
This checks syntax and semantics and creates the pseudo machine code ModelSim uses
for simulation.
Step 4 — Simulate a design (2-33)
This specifies the design unit you want to simulate and opens a structure page in the
workspace.
(2-29)
2-28 Pr ojects and system initializationModelSim SE User’s Manual
Step 1 — Create a new project
1Select Create a Project from the Welcome to ModelSim screen that opens the first time
you start ModelSim. If this screen is not available, you can enable it by selecting Help >
Enable Welcome (Main window).
Getting started with projects
You can also use the File > New > Project (Main window) command to create a new
project.
2
Clicking the Create a Project button opens the Create Project dialog box.
ModelSim SE User’s ManualProjects and system initialization2-29
Getting started with projects
3Specify a Project Name and Project Location. The location is where the pro ject .mpf file
and any copied source files will be stored. You can leave the Default Library Name set to
"work," or specify a different name if desired. The name that is specified will be used to
create a working library subdirectory within the Project Location.
After selecting OK, you will see a blank Project page in the workspace area of the Main
window. You can hide or show the workspace at any time using the View > Hide/Show Workspace command.
workspace
The name of the current project is shown at the bottom left corner of the Main window.
2-30 Pr ojects and system initializationModelSim SE User’s Manual
Loading...
+ 450 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.