logo资料库

ISE仿真器使用教程.pdf

第1页 / 共62页
第2页 / 共62页
第3页 / 共62页
第4页 / 共62页
第5页 / 共62页
第6页 / 共62页
第7页 / 共62页
第8页 / 共62页
资料共62页,剩余部分请下载后查看
ISE Simulator (ISim)
Revision History
Table of Contents
About This Tutorial
About the ISE Simulator (ISim) In-Depth Tutorial
Tutorial Contents
Tutorial Flows
Using ISim from ISE Project Navigator
Using ISim Standalone
Additional Resources
Overview of the ISE Simulator (ISim)
Overview of ISim
vhpcomp, vlogcomp
fuse
Simulation Executable
isimgui.exe
Using ISE Simulator from ISE Project Navigator
Overview of ISim ISE Integrated Flow
Getting Started
Software Requirements
Installing the Tutorial Design Files
Design Description
Functional Blocks
Design Self-Checking Test Bench
Simulating the Design
Creating a Project in ISE Project Navigator
Launching a Behavioral Simulation
What’s Next?
Running ISE Simulator (ISim) Standalone
Overview of ISim Standalone Flow
Getting Started
Software Requirements
Installing the Tutorial Design Files
Design Description
Functional Blocks
Design Self-Check Test Bench
Preparing the Simulation
Creating an ISim Project File
Building the Simulation Executable
Simulating the Design
Using ISE Simulator (ISim) Graphical User Interface
Overview of ISim Graphical User Interface
Exploring the User Interface
Examining the Design
Adding Signals
Running the Simulation for a Specified Time
Restarting the Simulation
Adding Groups
Adding Dividers
Adding Signals from Sub-Modules
Changing Signal and Wave Window Properties
Saving the Wave Window Configuration
Using Markers
Using Cursors
Using Multiple Wave Configurations
Debugging the Design
Viewing Source Code
Using Breakpoints and Stepping
Fixing Bugs in the Design
Verifying Bug Fix
What’s Next
ISE Simulator (ISim) [Guide Subtitle] In-Depth Tutorial [optional] UG682 (v1.0) April 27, 2009 [optional] UG682 (v1.0) April 27, 2009
Xilinx is disclosing this user guide, manual, release note, and/or specification (the "Documentation") to you solely for use in the development of designs to operate with Xilinx hardware devices. You may not reproduce, distribute, republish, download, display, post, or transmit the Documentation in any form or by any means including, but not limited to, electronic, mechanical, photocopying, recording, or otherwise, without the prior written consent of Xilinx. Xilinx expressly disclaims any liability arising out of your use of the Documentation. Xilinx reserves the right, at its sole discretion, to change the Documentation without notice at any time. Xilinx assumes no obligation to correct any errors contained in the Documentation, or to advise you of any corrections or updates. Xilinx expressly disclaims any liability in connection with technical support or assistance that may be provided to you in connection with the Information. THE DOCUMENTATION IS DISCLOSED TO YOU “AS-IS” WITH NO WARRANTY OF ANY KIND. XILINX MAKES NO OTHER WARRANTIES, WHETHER EXPRESS, IMPLIED, OR STATUTORY, REGARDING THE DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT OF THIRD-PARTY RIGHTS. IN NO EVENT WILL XILINX BE LIABLE FOR ANY CONSEQUENTIAL, INDIRECT, EXEMPLARY, SPECIAL, OR INCIDENTAL DAMAGES, INCLUDING ANY LOSS OF DATA OR LOST PROFITS, ARISING FROM YOUR USE OF THE DOCUMENTATION. © 2009 Xilinx, Inc. XILINX, the Xilinx logo, Virtex, Spartan, ISE, and other designated brands included herein are trademarks of Xilinx in the United States and other countries. All other trademarks are the property of their respective owners. ISE ISim In-Depth Tutorial www.xilinx.com UG682 (v1.0) April 27, 2009
Revision History The following table shows the revision history for this document. Date Version Revision 04/27/09 1.0 Initial Xilinx release. UG682 (v1.0) April 27, 2009 www.xilinx.com ISE ISim In-Depth Tutorial
ISE ISim In-Depth Tutorial www.xilinx.com UG682 (v1.0) April 27, 2009
Table of Contents Revision History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii Preface: About This Tutorial About the ISE Simulator (ISim) In-Depth Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Tutorial Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Tutorial Flows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Using ISim from ISE Project Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Using ISim Standalone . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .viii Additional Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii Chapter 1: Overview of the ISE Simulator (ISim) Overview of ISim . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 vhpcomp, vlogcomp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 fuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Simulation Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 isimgui.exe . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 Chapter 2: Using ISE Simulator from ISE Project Navigator Overview of ISim ISE Integrated Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Installing the Tutorial Design Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Design Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Functional Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Design Self-Checking Test Bench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Simulating the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Creating a Project in ISE Project Navigator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Using New Project Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Creating VHDL Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Moving VHDL files to a Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Launching a Behavioral Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Setting Behavioral Simulation Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Launching Behavioral Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 What’s Next? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 3: Running ISE Simulator (ISim) Standalone Overview of ISim Standalone Flow. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Getting Started. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Installing the Tutorial Design Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Design Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Functional Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Design Self-Check Test Bench . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 ISE Simulator (ISim) In-Depth Tutorial UG682 (v1.0) April 27, 2009 www.xilinx.com v
Preparing the Simulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Creating an ISim Project File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Building the Simulation Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Using fuse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Simulating the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Running the Simulation Executable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Chapter 4: Using ISE Simulator (ISim) Graphical User Interface Overview of ISim Graphical User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Exploring the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Main Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Instances and Processes Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Source Files Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Objects Panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Text Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Breakpoints Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Console Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Examining the Design. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Adding Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Running the Simulation for a Specified Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Restarting the Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Adding Groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Adding Dividers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Adding Signals from Sub-Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Changing Signal and Wave Window Properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Changing the Signal Name Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Changing the Signal Radix Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Changing the Signal Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Floating the Wave Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Saving the Wave Window Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Using Markers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Using Cursors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Zooming In . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Measuring Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Using Multiple Wave Configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Debugging the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Viewing Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Using Breakpoints and Stepping . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Setting Breakpoints. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Stepping through Source Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Fixing Bugs in the Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Verifying Bug Fix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 What’s Next . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 vi www.xilinx.com ISE Simulator (ISim) In-Depth Tutorial UG682 (v1.0) April 27, 2009
Preface About This Tutorial About the ISE Simulator (ISim) In-Depth Tutorial The ISim In-Depth Tutorial provides Xilinx PLD designers with a detailed introduction of the ISE Simulator (ISim) software. After you have completed the tutorial, you will have a thorough understanding of how to analyze and debug your design via HDL simulation using ISim. Note: This tutorial is designed for running the ISim software on a Windows environment. Some modifications may be required to run certain steps successfully in other operating systems. Tutorial Contents This tutorial covers the following topics: Chapter 1, “Overview of the ISE Simulator (ISim),” introduces the ISim software environment, including the ISim compilers, linker, simulation executable and Graphical User Interface. Chapter 2, “Using ISE Simulator from ISE Project Navigator,” explains how to launch a functional simulation through the ISE Project Navigator software. Chapter 3, “Running ISE Simulator (ISim) Standalone,” guides you through a typical procedure for launching a functional simulation using the ISim compiler, linker and simulation executable outside of the ISE Project Navigator environment. Chapter 4, “Using ISE Simulator (ISim) Graphical User Interface,” introduces you to the ISim GUI by examining, debugging, and verifying a functional simulation. Tutorial Flows This tutorial presents two flows in which ISim can be used for performing a functional (Behavioral) simulation. • Using ISim from ISE® Project Navigator • Using ISim Standalone Using ISim from ISE Project Navigator In this flow you will launch ISim via one of the simulation processes available in the ISE Project Navigator. This flow works best when an ISE Project Navigator project is created in order to implement the design in a Xilinx® FPGA or CPLD. This flow is useful when your design involves sources that are not HDL (schematics, cores, etc.) and requires Project Navigator to properly convert these sources to HDL source files which ISim can compile. ISE Simulator (ISim) In-Depth Tutorial UG682 (v1.0) April 27, 2009 www.xilinx.com vii
Additional Resources Follow these chapters if you are interested in this flow: • Chapter 1, “Overview of the ISE Simulator (ISim),” • Chapter 2, “Using ISE Simulator from ISE Project Navigator,” • Chapter 4, “Using ISE Simulator (ISim) Graphical User Interface,” Using ISim Standalone In this mode you will primarily simulate your design by creating your own ISim project files and running the HDL linker and simulation executable in a command line or batch file mode. This flow is useful for users not using Project Navigator to manage their HDL design. The following chapters will help you understand this flow: • Chapter 1, “Overview of the ISE Simulator (ISim),” • Chapter 3, “Running ISE Simulator (ISim) Standalone,” • Chapter 4, “Using ISE Simulator (ISim) Graphical User Interface,” Additional Resources To find more detailed information and discussions on ISE Simulator (ISim) topics covered in this tutorial, refer to the following documents: • ISim Help is available from the ISim software. • ISim User Guide, accessible from the Software Manuals page on the Xilinx website: http://www.xilinx.com/support/documentation/sw_manuals/xilinx11/plugin_ism.pdf • Software Manuals: To find additional documentation, see the Xilinx website at: http://www.xilinx.com/literature To search the Answer Database of silicon, software, and IP questions and answers, or to create a technical support WebCase, see the Xilinx website at: http://www.xilinx.com/support To discuss topics of interest with other Xilinx users, see the Xilinx User Community Forum at: http://forums.xilinx.com/xlnx/ viii www.xilinx.com ISE Simulator (ISim) In-Depth Tutorial UG682 (v1.0) April 27, 2009
分享到:
收藏