Modelsim SE User's Manual
Total Page:16
File Type:pdf, Size:1020Kb
ModelSim® Advanced Verification and Debugging SE User’s Manual Version 6.0b Published: 15/Nov/04 UM-2 This document is for information and instruction purposes. Mentor Graphics reserves the right to make changes in specifications and other information contained in this publication without prior notice, and the reader should, in all cases, consult Mentor Graphics to determine whether any changes have been made. The terms and conditions governing the sale and licensing of Mentor Graphics products are set forth in written agreements between Mentor Graphics and its customers. No representation or other affirmation of fact contained in this publication shall be deemed to be a warranty or give rise to any liability of Mentor Graphics whatsoever. MENTOR GRAPHICS MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS MATERIAL INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OR MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. MENTOR GRAPHICS SHALL NOT BE LIABLE FOR ANY INCIDENTAL, INDIRECT, SPECIAL, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING BUT NOT LIMITED TO LOST PROFITS) ARISING OUT OF OR RELATED TO THIS PUBLICATION OR THE INFORMATION CONTAINED IN IT, EVEN IF MENTOR GRAPHICS CORPORATION HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. RESTRICTED RIGHTS LEGEND 03/97 U.S. Government Restricted Rights. The SOFTWARE and documentation have been developed entirely at private expense and are commercial computer software provided with restricted rights. Use, duplication or disclosure by the U.S. Government or a U.S. Government subcontractor is subject to the restrictions set forth in the license agreement provided with the software pursuant to DFARS 227.7202-3(a) or as set forth in subparagraph (c)(1) and (2) of the Commercial Computer Software - Restricted Rights clause at FAR 52.227-19, as applicable. Contractor/manufacturer is: Mentor Graphics Corporation 8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777. This is an unpublished work of Mentor Graphics Corporation. Contacting ModelSim Support Telephone: 503.685.0820 Toll-Free Telephone: 877-744-6699 Website: www.model.com Support: www.model.com/support ModelSim SE User’s Manual UM-3 Table of Contents 1 - Introduction (UM-21) ModelSim tool structure and verification flow . UM-22 ModelSim simulation task overview . UM-23 Basic steps for simulation . UM-24 Step 1 - Collecting Files and Mapping Libraries . UM-24 Step 2 - Compiling the design with vlog/vcom/sccom . UM-25 Step 3 - Loading the design for simulation . UM-26 Step 4 - Simulating the design . UM-26 Step 5- Debugging the design . UM-26 ModelSim modes of operation . UM-27 Command-line mode . UM-27 Batch mode . UM-28 ModelSim graphic interface overview . UM-29 Standards supported . UM-30 Assumptions . UM-30 Sections in this document . UM-31 What is an "object" . UM-34 Text conventions . UM-34 Where to find our documentation . UM-35 Download a free PDF reader with Search . UM-35 Technical support and updates . UM-36 2 - Projects (UM-37) Introduction . UM-38 What are projects? . UM-38 What are the benefits of projects? . UM-38 Project conversion between versions . UM-39 Getting started with projects . UM-40 Step 1 — Creating a new project . UM-40 Step 2 — Adding items to the project . UM-41 Step 3 — Compiling the files . UM-43 Step 4 — Simulating a design . UM-44 Other basic project operations . UM-44 The Project tab . UM-45 Sorting the list . UM-45 Changing compile order . UM-46 Auto-generating compile order . UM-46 Grouping files . UM-47 Creating a Simulation Configuration . UM-48 Optimization Configurations . UM-49 ModelSim SE User’s Manual UM-4 Table of Contents Organizing projects with folders . UM-50 Adding a folder . UM-50 Specifying file properties and project settings . UM-52 File compilation properties . UM-52 Project settings . UM-54 Accessing projects from the command line . UM-55 3 - Design libraries (UM-57) Design library overview . UM-58 Design unit information . UM-58 Working library versus resource libraries . UM-58 Archives . UM-59 Working with design libraries . UM-60 Creating a library . UM-60 Managing library contents . UM-61 Assigning a logical name to a design library . UM-62 Moving a library . UM-63 Setting up libraries for group use . UM-63 Specifying the resource libraries . UM-64 Verilog resource libraries . UM-64 VHDL resource libraries . UM-64 Predefined libraries . UM-64 Alternate IEEE libraries supplied . UM-65 Rebuilding supplied libraries . UM-65 Regenerating your design libraries . UM-66 Maintaining 32-bit and 64-bit versions in the same library . UM-66 Referencing source files with location maps . UM-67 Using location mapping . UM-67 Pathname syntax . UM-68 How location mapping works . UM-68 Mapping with Tcl variables . UM-68 Importing FPGA libraries . UM-69 Protecting source code using -nodebug . UM-70 4 - VHDL simulation (UM-71) Compiling VHDL files . UM-73 Creating a design library . UM-73 Invoking the VHDL compiler . UM-73 Dependency checking . UM-73 Range and index checking . UM-74 Subprogram inlining . UM-74 Differences between language versions . UM-75 Simulating VHDL designs . UM-78 Simulator resolution limit . UM-78 Default binding . UM-79 ModelSim SE User’s Manual UM-5 Delta delays . UM-80 Simulating with an elaboration file . UM-82 Overview . UM-82 Elaboration file flow . UM-82 Creating an elaboration file . UM-83 Loading an elaboration file . UM-83 Modifying stimulus . UM-84 Using with the PLI or FLI . UM-84 Syntax . UM-84 Example . UM-85 Checkpointing and restoring simulations . UM-86 Checkpoint file contents . UM-86 Controlling checkpoint file compression . UM-87 The difference between checkpoint/restore and restart . UM-87 Using macros with restart and checkpoint/restore . UM-87 Using the TextIO package . UM-88 Syntax for file declaration . UM-88 Using STD_INPUT and STD_OUTPUT within ModelSim . UM-89 TextIO implementation issues . UM-90 Writing strings and aggregates . UM-90 Reading and writing hexadecimal numbers . UM-91 Dangling pointers . UM-91 The ENDLINE function . UM-91 The ENDFILE function . UM-91 Using alternative input/output files . UM-92 Flushing the TEXTIO buffer . UM-92 Providing stimulus . UM-92 VITAL specification and source code . UM-93 VITAL packages . ..