logo资料库

Modelsim最新官方教程.pdf

第1页 / 共205页
第2页 / 共205页
第3页 / 共205页
第4页 / 共205页
第5页 / 共205页
第6页 / 共205页
第7页 / 共205页
第8页 / 共205页
资料共205页,剩余部分请下载后查看
Bookcase
Table of Contents
List of Figures
List of Tables
Chapter 1 Introduction
Assumptions
Where to Find ModelSim Documentation
Download a Free PDF Reader With Search
Mentor Graphics Support
Before you Begin
Example Designs
Chapter 2 Conceptual Overview
Design Optimizations
Basic Simulation Flow
Project Flow
Multiple Library Flow
Debugging Tools
Chapter 3 Basic Simulation
Create the Working Design Library
Compile the Design Units
Optimize the Design
Load the Design
Run the Simulation
Set Breakpoints and Step through the Source
Chapter 4 Projects
Create a New Project
Add Objects to the Project
Changing Compile Order (VHDL)
Compile the Design
Optimize for Design Visibility
Load the Design
Organizing Projects with Folders
Add Folders
Moving Files to Folders
Simulation Configurations
Chapter 5 Working With Multiple Libraries
Creating the Resource Library
Creating the Project
Linking to the Resource Library
Verilog
VHDL
Linking to a Resource Library
Permanently Mapping VHDL Resource Libraries
Chapter 6 Simulating SystemC Designs
Setting up the Environment
Preparing an OSCI SystemC design
Compiling a SystemC-only Design
Mixed SystemC and HDL Example
Viewing SystemC Objects in the GUI
Setting Breakpoints and Stepping in the Source Window
Examining SystemC Objects and Variables
Removing a Breakpoint
Chapter 7 Analyzing Waveforms
Loading a Design
Add Objects to the Wave Window
Zooming the Waveform Display
Using Cursors in the Wave Window
Working with a Single Cursor
Working with Multiple Cursors
Saving and Reusing the Window Format
Chapter 8 Creating Stimulus With Waveform Editor
Compile and Load the Design
Create Graphical Stimulus with a Wizard
Edit Waveforms in the Wave Window
Save and Reuse the Wave Commands
Exporting the Created Waveforms
Simulating with the Test Bench File
Importing an EVCD File
Chapter 9 Debugging With The Schematic Window
Exploring Connectivity
Viewing Source Code from the Schematic
Unfolding and Folding Instances
Tracing Events
Chapter 10 Debugging With The Dataflow Window
Exploring Connectivity
Tracing Events
Tracing an X (Unknown)
Displaying Hierarchy in the Dataflow Window
Chapter 11 Viewing And Initializing Memories
View a Memory and its Contents
Navigate Within the Memory
Export Memory Data to a File
Initialize a Memory
Interactive Debugging Commands
Chapter 12 Analyzing Performance With The Profiler
View Performance Data in Profile Windows
View Source Code by Clicking in Profile Window
View Profile Details
Filtering the Data
Creating a Performance Profile Report
Chapter 13 Simulating With Code Coverage
Viewing Coverage Data
Coverage Statistics in the Source Window
Toggle Statistics in the Objects Window
Excluding Lines and Files from Coverage Statistics
Creating Code Coverage Reports
Chapter 14 Comparing Waveforms
Creating the Reference Dataset
Creating the Test Dataset
Comparing the Simulation Runs
Viewing Comparison Data
Comparison Data in the Wave Window
Comparison Data in the List Window
Saving and Reloading Comparison Data
Chapter 15 Automating Simulation
Creating a Simple DO File
Running in Command-Line Mode
Using Tcl with the Simulator
Chapter 16 Getting Started With Power Aware
Create a Working Location
Compile the Source Files of the Design
Annotate Power Intent
Specifying Power Aware Options
Simulate the Power Aware Design
Analyze Results
Results from Test 1 (power_down_normal)
Results from Test 2 (power_down_no_iso)
Results from Test 3 (power_down_no_clk_gate)
Results from Test 4 (sram_PWR)
Index
End-User License Agreement
Documentation Feedback
ModelSim® SE Tutorial Software Version 10.2c © 1991-2013 Mentor Graphics Corporation All rights reserved. This document contains information that is proprietary to Mentor Graphics Corporation. The original recipient of this document may duplicate this document in whole or in part for internal business purposes only, provided that this entire notice appears in all copies. In duplicating any part of this document, the recipient agrees to make every reasonable effort to prevent the unauthorized use and distribution of the proprietary information.
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 OF 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 HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. U.S. GOVERNMENT LICENSE RIGHTS: The software and documentation were developed entirely at private expense and are commercial computer software and commercial computer software documentation within the meaning of the applicable acquisition regulations. Accordingly, pursuant to FAR 48 CFR 12.212 and DFARS 48 CFR 227.7202, use, duplication and disclosure by or for the U.S. Government or a U.S. Government subcontractor is subject solely to the terms and conditions set forth in the license agreement provided with the software, except for provisions which are contrary to applicable mandatory federal laws. TRADEMARKS: The trademarks, logos and service marks ("Marks") used herein are the property of Mentor Graphics Corporation or other parties. No one is permitted to use these Marks without the prior written consent of Mentor Graphics or the owner of the Mark, as applicable. The use herein of a third- party Mark is not an attempt to indicate Mentor Graphics as a source of a product, but is intended to indicate a product from, or associated with, a particular third party. A current list of Mentor Graphics’ trademarks may be viewed at: www.mentor.com/trademarks. Mentor Graphics Corporation 8005 S.W. Boeckman Road, Wilsonville, Oregon 97070-7777 Telephone: 503.685.7000 Toll-Free Telephone: 800.592.2210 Website: www.mentor.com SupportNet: supportnet.mentor.com/ Send Feedback on Documentation: supportnet.mentor.com/doc_feedback_form
Table of Contents Chapter 1 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assumptions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Where to Find ModelSim Documentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Download a Free PDF Reader With Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mentor Graphics Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Before you Begin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 2 Conceptual Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Design Optimizations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Basic Simulation Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Project Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Multiple Library Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Debugging Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3 Basic Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create the Working Design Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compile the Design Units . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optimize the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Load the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Run the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Set Breakpoints and Step through the Source . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 4 Projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create a New Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add Objects to the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Changing Compile Order (VHDL) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compile the Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optimize for Design Visibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Load the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Organizing Projects with Folders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add Folders. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Moving Files to Folders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulation Configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ModelSim SE Tutorial, v10.2c 13 13 13 14 14 15 15 17 17 18 19 19 20 23 23 25 26 27 28 30 33 33 34 36 37 38 38 39 39 41 42 3
Table of Contents Chapter 5 Working With Multiple Libraries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating the Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linking to the Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Verilog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VHDL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Linking to a Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Permanently Mapping VHDL Resource Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 6 Simulating SystemC Designs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting up the Environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preparing an OSCI SystemC design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compiling a SystemC-only Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Mixed SystemC and HDL Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing SystemC Objects in the GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Breakpoints and Stepping in the Source Window . . . . . . . . . . . . . . . . . . . . . . . . . Examining SystemC Objects and Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Removing a Breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7 Analyzing Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loading a Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Add Objects to the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Zooming the Waveform Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Cursors in the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with a Single Cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Working with Multiple Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Saving and Reusing the Window Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 8 Creating Stimulus With Waveform Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compile and Load the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Create Graphical Stimulus with a Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Edit Waveforms in the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Save and Reuse the Wave Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Exporting the Created Waveforms. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Simulating with the Test Bench File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Importing an EVCD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 45 47 48 48 49 50 51 53 54 54 57 58 61 62 65 66 67 68 68 69 70 70 72 73 75 76 77 79 82 83 85 86 Chapter 9 89 Debugging With The Schematic Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 Exploring Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing Source Code from the Schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Unfolding and Folding Instances . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Tracing Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 4 ModelSim SE Tutorial, v10.2c
Table of Contents Chapter 10 Debugging With The Dataflow Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 Exploring Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Tracing Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Tracing an X (Unknown) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Displaying Hierarchy in the Dataflow Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Chapter 11 Viewing And Initializing Memories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125 View a Memory and its Contents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 Navigate Within the Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 Export Memory Data to a File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 Initialize a Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134 Interactive Debugging Commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 Chapter 12 Analyzing Performance With The Profiler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 View Performance Data in Profile Windows. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 View Source Code by Clicking in Profile Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 View Profile Details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 Filtering the Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Creating a Performance Profile Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Chapter 13 Simulating With Code Coverage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 Viewing Coverage Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 Coverage Statistics in the Source Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 Toggle Statistics in the Objects Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Excluding Lines and Files from Coverage Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162 Creating Code Coverage Reports. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163 Chapter 14 Comparing Waveforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Creating the Reference Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 Creating the Test Dataset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 Comparing the Simulation Runs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 Viewing Comparison Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 Comparison Data in the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172 Comparison Data in the List Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 Saving and Reloading Comparison Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 Chapter 15 Automating Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Creating a Simple DO File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 Running in Command-Line Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 Using Tcl with the Simulator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 ModelSim SE Tutorial, v10.2c 5
Table of Contents Chapter 16 Getting Started With Power Aware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185 Create a Working Location . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Compile the Source Files of the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186 Annotate Power Intent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 Specifying Power Aware Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Simulate the Power Aware Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188 Analyze Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Index End-User License Agreement 6 ModelSim SE Tutorial, v10.2c
List of Figures Figure 2-1. Basic Simulation Flow - Overview Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-2. Project Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 2-3. Multiple Library Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-1. The Create a New Library Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-2. work Library Added to the Library Window . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-3. Compile Source Files Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-4. Verilog Modules Compiled into work Library . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-5. The Design Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-6. The Object Window and Processes Window . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-7. Using the Popup Menu to Add Signals to Wave Window . . . . . . . . . . . . . . . . . Figure 3-8. Waves Drawn in Wave Window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-9. Setting Breakpoint in Source Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-10. Setting Restart Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-11. Blue Arrow Indicates Where Simulation Stopped. . . . . . . . . . . . . . . . . . . . . . . Figure 3-12. Values Shown in Objects Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 3-13. Parameter Name and Value in Source Examine Window . . . . . . . . . . . . . . . . Figure 4-1. Create Project Dialog - Project Lab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-2. Adding New Items to a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-3. Add file to Project Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-4. Newly Added Project Files Display a ’?’ for Status . . . . . . . . . . . . . . . . . . . . . . Figure 4-5. Compile Order Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-6. Library Window with Expanded Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-7. Structure(sim) window for a Loaded Design . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-8. Adding New Folder to Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-9. A Folder Within a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-10. Creating Subfolder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-11. A folder with a Sub-folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-12. Changing File Location via the Project Compiler Settings Dialog. . . . . . . . . . Figure 4-13. Simulation Configuration Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 4-14. A Simulation Configuration in the Project window . . . . . . . . . . . . . . . . . . . . . Figure 4-15. Transcript Shows Options for Simulation Configurations . . . . . . . . . . . . . . . . Figure 5-1. Creating New Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 5-2. Compiling into the Resource Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 5-3. VHDL Simulation Warning Reported in Main Window . . . . . . . . . . . . . . . . . . Figure 5-4. Specifying a Search Library in the Simulate Dialog. . . . . . . . . . . . . . . . . . . . . . Figure 6-1. The SystemC File After Modifications. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 6-2. Editing the SystemC Header File.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 6-3. The ringbuf.h File.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 6-4. The test_ringbuf.cpp File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 6-5. The test_ringbuf Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ModelSim SE Tutorial, v10.2c 18 19 20 24 25 26 26 27 28 29 29 30 31 31 32 32 34 35 35 36 37 38 39 40 40 40 41 41 43 44 44 46 47 49 51 56 57 59 60 61 7
List of Figures 62 Figure 6-6. SystemC Objects in the work Library. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Figure 6-7. Active Breakpoint in a SystemC File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Figure 6-8. Simulation Stopped at Breakpoint . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 Figure 6-9. Stepping into a Separate File. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Figure 6-10. Output of show Command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 Figure 6-11. SystemC Primitive Channels in the Wave Window . . . . . . . . . . . . . . . . . . . . . 67 Figure 7-1. Panes of the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 Figure 7-2. Zooming in with the Mouse Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 Figure 7-3. Working with a Single Cursor in the Wave Window . . . . . . . . . . . . . . . . . . . . . 72 Figure 7-4. Renaming a Cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 Figure 7-5. Interval Measurement Between Two Cursors. . . . . . . . . . . . . . . . . . . . . . . . . . . 73 Figure 7-6. A Locked Cursor in the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Figure 8-1. Initiating the Create Pattern Wizard from the Objects Window . . . . . . . . . . . . . 78 Figure 8-2. Create Pattern Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 Figure 8-3. Specifying Clock Pattern Attributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Figure 8-4. The clk Waveform. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 Figure 8-5. The reset Waveform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Figure 8-6. Edit Insert Pulse Dialog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 Figure 8-7. Signal reset with an Inserted Pulse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Figure 8-8. Edit Stretch Edge Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 Figure 8-9. Stretching an Edge on the clk Signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Figure 8-10. Deleting an Edge on the clk Signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84 Figure 8-11. The Export Waveform Dialog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 Figure 8-12. The counter Waveform Reacts to Stimulus Patterns. . . . . . . . . . . . . . . . . . . . . 85 Figure 8-13. The export Test Bench Compiled into the work Library . . . . . . . . . . . . . . . . . 86 Figure 8-14. Waves from Newly Created Test Bench. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Figure 8-15. EVCD File Loaded in Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Figure 8-16. Simulation results with EVCD File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Figure 9-1. Schematic View Indicator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Figure 9-2. A Signal in the Schematic Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Figure 9-3. Expand Net to > Readers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Figure 9-4. The p Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Figure 9-5. Right Pointing Arrow Indicates Readers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 Figure 9-6. Expanding the View to Display Readers of strb Signal . . . . . . . . . . . . . . . . . . . 95 Figure 9-7. Select test signal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Figure 9-8. The test Net Expanded to Show All Drivers. . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Figure 9-9. Signal oen Expanded to Readers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Figure 9-10. Sprout oen in the s0 Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Figure 9-11. Signal Values Overlapped. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 Figure 9-12. Signal Values After Regenerate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Figure 9-13. Code Preview Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Figure 9-14. Folded Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Figure 9-15. Unfolded Instance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Figure 9-16. Contents of Unfolded Instance s2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 Figure 9-17. Instance s2 Refolded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 8 ModelSim SE Tutorial, v10.2c
分享到:
收藏