Getting Started with Quartus II Simulation Using the. ModelSim-Altera Software User Guide. 101 Innovation Drive San Jose, CA

Similar documents
ModelSim-Altera Software Simulation User Guide

Using Nios II Floating-Point Custom Instructions Tutorial

TimeQuest Timing Analyzer Quick Start Tutorial

MasterBlaster Serial/USB Communications Cable User Guide

Quartus II Handbook Volume 3: Verification

MAX V CPLD Development Kit User Guide

Quartus II Software Download and Installation Quick Start Guide

Quartus Prime Standard Edition Handbook Volume 3: Verification

Quartus II Software Design Series : Foundation. Digitale Signalverarbeitung mit FPGA. Digitale Signalverarbeitung mit FPGA (DSF) Quartus II 1

Altera Error Message Register Unloader IP Core User Guide

8B10B Encoder/Decoder MegaCore Function User Guide

Using Altera MAX Series as Microcontroller I/O Expanders

Lesson 1 - Creating a Project

Hybrid Memory Cube Controller Design Example User Guide

For Quartus II Software. This Quick Start Guide will show you. how to set up a Quartus. enter timing requirements, and

Quartus II Software and Device Support Release Notes Version 15.0

PROFINET IRT: Getting Started with The Siemens CPU 315 PLC

Engineering Change Order (ECO) Support in Programmable Logic Design

Using the Agilent 3070 Tester for In-System Programming in Altera CPLDs

USB-Blaster Download Cable User Guide

Software Version 10.0d Mentor Graphics Corporation All rights reserved.

1. Overview of Nios II Embedded Development

Quartus II Introduction Using VHDL Design

1. Overview of Nios II Embedded Development

Quartus II Introduction for VHDL Users

MAX II ISP Update with I/O Control & Register Data Retention

Nios II Software Developer s Handbook

Using the Altera Serial Flash Loader Megafunction with the Quartus II Software

Video and Image Processing Suite

USB-Blaster Download Cable User Guide

Lab 1: Full Adder 0.0

Download the Design Files

13. Publishing Component Information to Embedded Software

Introduction to the Quartus II Software. Version 10.0

Using the On-Chip Signal Quality Monitoring Circuitry (EyeQ) Feature in Stratix IV Transceivers

Start Active-HDL by double clicking on the Active-HDL Icon (windows).

Getting Started Using Mentor Graphic s ModelSim

Jianjian Song LogicWorks 4 Tutorials (5/15/03) Page 1 of 14

A Verilog HDL Test Bench Primer Application Note

USB-Blaster II Download Cable User Guide

EthernetBlaster Communications Cable User Guide

Fastest Path to Your Design. Quartus Prime Software Key Benefits

Altera SoC Embedded Design Suite User Guide

Python for Series 60 Platform

AFN-StudentBillingTuitionManagementGuide

Entrust Certificate Services for Adobe CDS

RTL Technology and Schematic Viewers

Microsoft Access 2010 Part 1: Introduction to Access

Qsys System Design Tutorial

15. Introduction to ALTMEMPHY IP

Simulating Power Supply Sequences for Power Manager Devices Using PAC-Designer LogiBuilder

VHDL Test Bench Tutorial

Applying the Benefits of Network on a Chip Architecture to FPGA System Design

Outlook . User Guide IS TRAINING CENTER. 833 Chestnut St, Suite 600. Philadelphia, PA

Nios II Development Kit Version 5.1 SP1 Release Notes

EMC NetWorker Module for Microsoft Exchange Server Release 5.1

Contents Overview Creating and using templates Organizing templates

Quartus II Installation & Version 8.0

Personal Call Manager User Guide. BCM Business Communications Manager

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Automate tasks with Visual Basic macros

Accounting Manager. User Guide A31003-P1030-U

Kaspersky Security 9.0 for Microsoft SharePoint Server Administrator's Guide

EMC Documentum Webtop

Interworks. Interworks Cloud Platform Installation Guide

Silect Software s MP Author

Adobe Acrobat 9 Deployment on Microsoft Systems Management

ServerView Inventory Manager

Server Installation Guide ZENworks Patch Management 6.4 SP2

Altera Advanced SEU Detection IP Core User Guide

Snapshot Reports for 800xA User Guide

Retention Policy Module Admin and User Guide

EMC SourceOne Offline Access

Getting Started with IntelleView POS Administrator Software

BLUECIELO MERIDIAN ASSET MANAGEMENT MODULE 2014

Introduction to the Altera Qsys System Integration Tool. 1 Introduction. For Quartus II 12.0

PowerPlay Power Analysis & Optimization Technology

Microsoft Access 2010 Overview of Basics

McAfee VirusScan Enterprise for Linux Software

Uploading files to a web server using SSH Secure Shell 3.2.9

EMC NetWorker Module for Microsoft for Windows Bare Metal Recovery Solution

Avira Management Console User Manual

EMC SourceOne Auditing and Reporting Version 7.0

DiskPulse DISK CHANGE MONITOR

Avaya Network Configuration Manager User Guide

Version 4.61 or Later. Copyright 2013 Interactive Financial Solutions, Inc. All Rights Reserved. ProviderPro Network Administration Guide.

Lattice Diamond User Guide

FTP Updates. Hiden Analytical Limited 420 Europa Boulevard Warrington WA5 7UN England. Tel: +44 (0) Fax: +44 (0)

Digitale Signalverarbeitung mit FPGA (DSF) Soft Core Prozessor NIOS II Stand Mai Jens Onno Krah

Xilinx ISE. <Release Version: 10.1i> Tutorial. Department of Electrical and Computer Engineering State University of New York New Paltz

Nios II IDE Help System

The following document contains information on Cypress products.

JustClust User Manual

webmethods Certificate Toolkit

Configuring Your Client: Outlook Express. Quick Reference

Business Portal for Microsoft Dynamics GP Project Time and Expense User s Guide

HP Intelligent Management Center v7.1 Virtualization Monitor Administrator Guide

For Active Directory Installation Guide

EMC Documentum Composer

Transcription:

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User Guide Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User Guide 101 Innovation Drive San Jose, CA 95134 www.altera.com UG-01102-1.0 Document last updated for Altera Complete Design Suite version: Document publication date: 11.0 June 2011

2011 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, HARDCOPY, MAX, MEGACORE, NIOS, QUARTUS and STRATIX are Reg. U.S. Pat. & Tm. Off. and/or trademarks of Altera Corporation in the U.S. and other countries. All other trademarks and service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance of its semiconductor products to current specifications in accordance with Altera s standard warranty, but reserves the right to make changes to any products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device specifications before relying on any published information and before placing orders for products or services. Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User Guide June 2011 Altera Corporation

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software The NativeLink feature of the Quartus II software allows you to control the ModelSim-Altera software from within the Quartus II software. By connecting the two tools with the NativeLink feature, the process of setting up your simulation is greatly streamlined, allowing you to focus on the simulation itself. This user guide provides instructions for getting started with Quartus II project simulation using the ModelSim-Altera Starter Edition or ModelSim-Altera Edition software, and includes the following sections: Prerequisites Starting the ModelSim-Altera Software with the Quartus II Software Setting Up EDA Tool Options on page 1 1 Setting Up the Simulation on page 1 3 Running ModelSim-Altera from the Quartus II Software on page 1 4 Creating Stimulus Waveforms on page 1 4 Modifying Stimulus Waveforms on page 1 6 Starting Simulation on page 1 7 Exporting Created Stimulus Waveforms as an HDL Testbench on page 1 8 Prerequisites You should have met the following prerequisites before performing a simulation: Understanding of Verilog, SystemVerilog, or VHDL hardware description language Completion of the Getting Started Tutorial in the Quartus II software Starting the ModelSim-Altera Software with the Quartus II Software To start the ModelSim-Altera software, follow these steps: 1. Unzip the provided Quartus II design example project counter.zip. 2. Start the Quartus II software and open the design example Quartus II project file counter.qpf. Setting Up EDA Tool Options You can specify where your third-party EDA simulators are installed with the EDA tool options settings in the Quartus II software. These settings enable you to start third-party EDA simulators from the Quartus II software. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software

1 2 Getting Started with Quartus II Simulation Using the ModelSim-Altera Software Starting the ModelSim-Altera Software with the Quartus II Software 1 For Windows users, the ModelSim-Altera tool path is automatically added during installation. Linux users must perform the following two steps to add the ModelSim-Altera tool path. To set up the EDA tool options for ModelSim-Altera, follow these steps: 1. On the Tools menu of the Quartus II GUI, click Options. The Options dialog box appears. In the Category list, under General, click EDA Tool Options. The EDA Tool Options page appears (Figure 1 1). Figure 1 1. EDA Tool Options Page (Options Dialog Box) 2. Click the Browse button to the right of ModelSim-Altera in the EDA Tool list to specify the location of the ModelSim-Altera executable. The path is <ModelSim- Altera installation path>\bin. Getting Started with Quartus II Simulation Using the ModelSim-Altera Software June 2011 Altera Corporation

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software 1 3 Starting the ModelSim-Altera Software with the Quartus II Software Setting Up the Simulation This section guides you in setting up the simulation environment to run the ModelSim-Altera simulator on your Quartus II project. To set up the simulation environment, follow these steps: 1. On the Assignments menu, click Settings. 2. In the Settings dialog box, under EDA Tool Settings, select Simulation. The Simulation page appears. (Figure 1 2). Figure 1 2. Simulation Page (Settings Dialog Box) 3. In the Tool name list, select ModelSim-Altera. Ensure that Run gate-level simulation automatically after compilation box is turned off. 4. Under EDA Netlist Writer settings, in the Format for output netlist list, select Verilog HDL. Ensure that the Map illegal HDL characters, Enable glitch filtering, and Generate Value Change Dump (VCD) file script boxes are turned off. 5. Under NativeLink settings, select None. f For more information about the Quartus II NativeLink feature, refer to the Simulating Altera Designs chapter in volume 3 of the Quartus II Handbook. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software

1 4 Getting Started with Quartus II Simulation Using the ModelSim-Altera Software Running ModelSim-Altera from the Quartus II Software Running ModelSim-Altera from the Quartus II Software In this section, you will use Quartus II software to generate the ModelSim-Altera automation script (.do file) and start the ModelSim-Altera software. The script then compiles the design files, and you are ready for simulation. Follow these steps: 1. On the Processing menu, point to Start, and then click Start Analysis & Elaboration. 2. On the Tools menu, point to Run EDA Simulation Tool and then click EDA RTL Simulation. The Quartus II software starts the ModelSim-Altera simulator. Creating Stimulus Waveforms This section guides you in adding signals to the Wave window, creating the clock waveform, and creating the reset waveform. Adding Signals to the Wave Window To add signals to the Wave window, follow these steps: 1. In the ModelSim-Altera GUI, expand Work in the Library window, and then right-click counter. 2. Click Create Wave (Figure 1 3). Three signals (clk, reset, and count) from the counter design example are added in the Wave window, where you can create stimulus waveforms for each signal to simulate the design. In this example, you will create stimulus waveforms for the clk and reset signals. The count signal is not needed and can be deleted. Getting Started with Quartus II Simulation Using the ModelSim-Altera Software June 2011 Altera Corporation

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software 1 5 Creating Stimulus Waveforms Figure 1 3. Create Wave on the Shortcut Menu 3. Right-click the count signal in the Wave window, and then click Delete. Creating the Clock Waveform 1. Right-click the clk signal in the Wave window, and then click Create/Modify Waveform. The Create Pattern Wizard appears (Figure 1 4). Figure 1 4. Create Pattern Wizard 2. Under Patterns, select Clock. 3. For Start Time, enter 0, for End Time, enter 5000, and for Time Unit, enter ns. 4. Click Next. 5. For Clock Period, enter 100, for Time Unit enter ns, and for Duty Cycle, enter 50. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software

1 6 Getting Started with Quartus II Simulation Using the ModelSim-Altera Software Creating Stimulus Waveforms 6. Click Finish. Creating the Reset Waveform 1. Right-click the reset signal in the Wave window, and then click Create/Modify Waveform. 2. In the Create Pattern Wizard, under Patterns, select Constant. 3. For Start Time, enter 0, for End Time, enter 5000, and for Time Unit, enter ns. 4. Click Next. 5. Enter St0 (Strong 0) for Value. 6. Click Finish. f For more information, refer to Chapter 12, Generating Stimulus with Waveform Editor in the ModelSim User s Manual. In the ModelSim-Altera software, on the Help menu, point to PDF Documentation, and then click User s Manual. Modifying Stimulus Waveforms To modify stimulus waveforms, follow these steps: 1. On the Wave menu, point to Mouse Mode and then click Edit Mode. Make sure the Wave window is activated. To activate it, click in the Wave window. 2. Select the reset signal from 0 ns to approximately 120 ns. The selection does not need to be exact (Figure 1 5). Figure 1 5. Inverted Waveform for reset Signal Getting Started with Quartus II Simulation Using the ModelSim-Altera Software June 2011 Altera Corporation

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software 1 7 Creating Stimulus Waveforms 3. On the Wave menu, point to Wave Editor, and then click Invert. The Edit Invert dialog box appears (Figure 1 6). Figure 1 6. Edit Invert Dialog Box 4. For Start Time, enter 0, for End Time, enter 120, and for Time Unit, enter ns. 5. Click OK to invert the waveform. Figure 1 7 shows the inverted waveform. Figure 1 7. Inverted Waveform for reset Signal (0 120 ns) Starting Simulation To start the simulation, follow these steps: 1. Expand the Work library, right-click counter and click Simulate. 2. Drag the count signal from the Objects window to the Wave window. 3. In the Transcript window, type the command run all r. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software

1 8 Getting Started with Quartus II Simulation Using the ModelSim-Altera Software Exporting Created Stimulus Waveforms as an HDL Testbench After you type the run -all command, the example counter design is simulated with the created stimulus waveforms for the clk and reset signals. The clk signal is a continuous clock waveform. The reset signal is asserted for the first 120 ns. When the reset signal is deasserted after 120 ns, the counter begins to increment, once on each rising edge of clk.the output signal count produces the simulated waveform, in the Wave window, adjacent to the stimulus waveforms. Exporting Created Stimulus Waveforms as an HDL Testbench An HDL testbench file is typically written in the same hardware description language as your design, and interacts with your design as an instantiated module. An HDL testbench file is conceptually similar to a waveform like the one created in Creating Stimulus Waveforms on page 1 4, but because it is written in HDL, it is able to accommodate more complexity and flexibility than a graphical waveform. The stimulus waveforms you created for the simulation can be exported as a HDL testbench file. You can then use the HDL testbench file to simulate your design again without manually recreating the stimulus waveforms. To export the stimulus waveform as an HDL testbench, perform the following steps: 1. Click in the Wave window to ensure it is active. 2. On the File menu, point to Export and then click Waveform. The Export Waveform dialog box appears (Figure 1 8). Figure 1 8. Export Waveform Dialog Box 3. In the Export Waveform dialog box, under Save As, select Verilog Testbench. 4. For Start Time, enter 0, for End Time, enter 5000, and for Time Unit, enter ns. 5. In the File Name box, type the name of your testbench or click the Browse button. 6. Click OK. Your testbench will be created in your <Quartus II project folder>\simulation\modelsim folder. You can use the testbench file for the simulation of your Quartus II design. Getting Started with Quartus II Simulation Using the ModelSim-Altera Software June 2011 Altera Corporation

Getting Started with Quartus II Simulation Using the ModelSim-Altera Software 1 9 Exporting Created Stimulus Waveforms as an HDL Testbench You can use NativeLink in the Quartus II software to start the ModelSim-Altera software, where you simulate your design with the exported testbench file. f For more information about setting up the testbench with NativeLink, refer to Setting Up Testbench Files Using the NativeLink Feature in Simulating Altera Designs. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software

1 10 Getting Started with Quartus II Simulation Using the ModelSim-Altera Software Exporting Created Stimulus Waveforms as an HDL Testbench Getting Started with Quartus II Simulation Using the ModelSim-Altera Software June 2011 Altera Corporation

Additional Information This section provides additional information about the document and Altera. Document Revision History The following table shows the revision history for this document. Date Version Changes June 2011 1.0 Initial release. How to Contact Altera To locate the most up-to-date information about Altera products, refer to the following table. Contact (1) Contact Method Address Technical support Website www.altera.com/support Technical training Website www.altera.com/training Email custrain@altera.com Product literature Website www.altera.com/literature Non-technical support (General) Email nacomp@altera.com (Software Licensing) Email authorization@altera.com Note to Table: (1) You can also contact your local Altera sales office or sales representative. Typographic Conventions The following table shows the typographic conventions this document uses. Visual Cue Bold Type with Initial Capital Letters bold type Italic Type with Initial Capital Letters italic type Initial Capital Letters Meaning Indicate command names, dialog box titles, dialog box options, and other GUI labels. For example, Save As dialog box. For GUI elements, capitalization matches the GUI. Indicates directory names, project names, disk drive names, file names, file name extensions, software utility names, and GUI labels. For example, \qdesigns directory, D: drive, and chiptrip.gdf file. Indicate document titles. For example, Stratix IV Design Guidelines. Indicates variables. For example, n + 1. Variable names are enclosed in angle brackets (< >). For example, <file name> and <project name>.pof file. Indicate keyboard keys and menu names. For example, the Delete key and the Options menu. June 2011 Altera Corporation Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User Guide

Info 2 Additional InformationAdditional Information Typographic Conventions Subheading Title Courier type Visual Cue r 1., 2., 3., and a., b., c., and so on Meaning Quotation marks indicate references to sections within a document and titles of Quartus II Help topics. For example, Typographic Conventions. Indicates signal, port, register, bit, block, and primitive names. For example, data1, tdi, and input. The suffix n denotes an active-low signal. For example, resetn. Indicates command line commands and anything that must be typed exactly as it appears. For example, c:\qdesigns\tutorial\chiptrip.gdf. Also indicates sections of an actual file, such as a Report File, references to parts of files (for example, the AHDL keyword SUBDESIGN), and logic function names (for example, TRI). An angled arrow instructs you to press the Enter key. Numbered steps indicate a list of items when the sequence of the items is important, such as the steps listed in a procedure. Bullets indicate a list of items when the sequence of the items is not important. 1 The hand points to information that requires special attention. h A question mark directs you to a software help system with related information. f The feet direct you to another document or website with related information. A caution calls attention to a condition or possible situation that can damage or c destroy the product or your work. A warning calls attention to a condition or possible situation that can cause you w injury. The envelope links to the Email Subscription Management Center page of the Altera website, where you can sign up to receive update notifications for Altera documents. Getting Started with Quartus II Simulation Using the ModelSim-Altera Software User Guide June 2011 Altera Corporation