Upload
asher-hart
View
228
Download
3
Embed Size (px)
Citation preview
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II 5.1 SP2
© 2006 Altera Corporation - Confidential
ObjectivesObjectives
Create a New Quartus II Project Compile a Design into an FPGA Locate Resulting Compilation Information Assign Design Constraints (Timing & Pin) Perform Timing Analysis & Obtain Results Create Simulation Waveform & Simulate a
Design Configure an FPGA
© 2006 Altera Corporation - Confidential
Class AgendaClass Agenda Projects
Exercise 1 Design Methodology in Quartus® II
Exercise 2 Compilation
Exercise 3 Single & Multi-Clock Timing Analysis
Exercise 4 & 5 Simulation
Exercise 6 Programming/Configuration
Exercise 7 or 8
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Design Methodology
© 2006 Altera Corporation - Confidential
PLD Design Flow
Synthesis - Translate Design into Device Specific Primitives - Optimization to Meet Required Area & Performance Constraints - Precision, Synplify, Quartus II
Design Specification
Place & Route - Map Primitives to Specific Locations inside Target Technology with Reference to Area & Performance Constraints - Specify Routing Resources to Be Used
Design Entry/RTL Coding - Behavioral or Structural Description of Design
RTL Simulation - Functional Simulation (Modelsim®, Quartus II) - Verify Logic Model & Data Flow (No Timing Delays)
LEM512
M4K I/O
© 2006 Altera Corporation - Confidential
PLD Design FlowTiming Analysis - Verify Performance Specifications Were Met - Static Timing Analysis
Gate Level Simulation - Timing Simulation - Verify Design Will Work in Target Technology
PC Board Simulation & Test - Simulate Board Design - Program & Test Device on Board - Use SignalTap II for Debugging
tclk
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Quartus II Projects
© 2006 Altera Corporation - Confidential
Quartus II ProjectsQuartus II Projects Description
Collection of Related Design Files & Libraries Must Have a Designated Top-Level Entity Target a Single Device Store Settings in Quartus Settings File (.QSF)
Create New Projects with New Project Wizard Can Be Created Using Tcl Scripts
© 2006 Altera Corporation - Confidential
Quartus II Operating EnvironmentQuartus II Operating Environment
Project Navigator
Status Window
Message Window
© 2006 Altera Corporation - Confidential
Main Toolbar & ModesMain Toolbar & Modes
To Reset Views: Tools Toolbars>Reset All;Restart Quartus II
Window & new file buttons Compiler ReportFloorplan
Execution Controls
Dynamic menus
© 2006 Altera Corporation - Confidential
New Project WizardNew Project Wizard
Name of Project Can Be Any Name; Recommend Using Top-Level File Name
Select Working Directory
Top-level Entity Does Not Need to Be the Same Name as Top-Level File Name
File Menu
Create a New Project Based on an Existing Project & Settings
© 2006 Altera Corporation - Confidential
Add Design Files
• Graphic (.BDF, .GDF)• AHDL• VHDL• Verilog• EDIF
Notes:• Files in project directory do not need to
be added• Add top level file if filename & entity
name are not the same
Add User Library Pathnames
• User Libraries • MegaCore®/AMPPSM Libraries• Pre-Compiled VHDL Packages
Add FilesAdd Files
© 2006 Altera Corporation - Confidential
Choose Specific Part Number from List or Let Quartus II Choose Smallest Fastest Device Based on Filter Criteria
Choose Device Family
Device SelectionDevice Selection
© 2006 Altera Corporation - Confidential
Choose EDA Tools
Add or Change Settings Later
EDA Tool SettingsEDA Tool Settings
© 2006 Altera Corporation - Confidential
Review Results & Click on Finish
Done!Done!
© 2006 Altera Corporation - Confidential
Opening a ProjectOpening a Project
File Open Project
Double-Clicking the .QPF File Will Auto Launch Quartus II
OR
OR
Select from Most Recent Projects List
© 2006 Altera Corporation - Confidential
Displays Project Hierarchy after Project Is Analyzed
Uses Set Top-Level Entity Set Incremental Design
Partition Make Entity-Level Assig
nments Locate in Design File or
Viewers/Floorplans View Resource Usage
Project Navigator – Hierarchy TabProject Navigator – Hierarchy Tab
Select & Right-Click
© 2006 Altera Corporation - Confidential
Files & Design Units TabsFiles & Design Units Tabs Files Tab
Shows Files Explicitly Added to Project
Uses Open Files Remove Files from Project Set New Top-Level Entity Specify VHDL Library Select File-Specific Synthesis Tool
Design Units Tab Displays Design Unit & Type
VHDL Entity VHDL Architecture Verilog Module AHDL Subdesign Block Diagram Filename
Displays File which Instantiates Design Unit
© 2006 Altera Corporation - Confidential
Project FilesProject Files Quartus Project File (QPF)
Quartus II Version Time Stamp Active Revision
Quartus Default File (QDF) Project Defaults Name: assignment_defaults.qdf Local or Bin Directory
Local Read First
QUARTUS_VERSION = “5.0"DATE = "15:37:58 April 16, 2005"
# Active Revisions
PROJECT_REVISION = "filtref“PROJECT_REVISION = "filtref_new"
COMPILE_FILTER.QPF
© 2006 Altera Corporation - Confidential
Project ManagementProject Management Project Archive &
Restore Creates Compressed
Archive File (.QAR) Creates Archive Activity
Log (.QARLOG) Project Copy
Copies & Save Duplicate of Project in New Directory
Project File (QPF) Design Files Settings Files
Archive Project
Copy Project
© 2006 Altera Corporation - Confidential
Please go to Exercise 1 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Created a New Project using the New Project Wizard
Exercise SummaryExercise Summary
© 2006 Altera Corporation - Confidential
Projects Entry SummaryProjects Entry Summary
Projects Necessary for Design Processing Use Project Wizard to Create New Projects Use Project Navigator to Study File &
Entity Relationships within Project
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Design Entry
© 2006 Altera Corporation - Confidential
Design Entry MethodsDesign Entry Methods Quartus II
Text Editor AHDL VHDL Verilog
Schematic Editor Block Diagram File Graphic Design File
Memory Editor HEX MIF
3rd-Party EDA Tools EDIF HDL VQM
Mixing & Matching Design Files Allowed
Top-level design files can be schematic, HDL or 3rd-Party Netlist File
BlockFile
SymbolFile
TextFile
TextFile
TextFile
Imported from 3rd-Party EDA toolsGenerated within Quartus II
TextFile
TextFile
.v, vlg, .vhd, .vhdl, v
qm
.edf.edif
.v.vhd.tdf.bsf.bdf.gdf
Top-Level File
© 2006 Altera Corporation - Confidential
Schematic Design EntrySchematic Design Entry Full-Featured Schematic Design Capability Schematic Design Creation
Draw Schematics Using Library Functions (Blocks) Gates, Flip-flops, Pins & Other Primitives Altera Megafunctions & LPMs
Create Symbols for Verilog, VHDL, or AHDL Design Files
Connect All Blocks Using Wires & Busses Schematic Editor Uses
Create Simple Test Designs to Understand the Functionality of an Altera Megafunction
PLL, LVDS I/O, Memory, Etc… Create Top-Level Schematic for Easy Viewing & Conn
ection
© 2006 Altera Corporation - Confidential
Use the Quick Link or File New Schematic File File Extension Is .BDF
Create SchematicCreate Schematic
© 2006 Altera Corporation - Confidential
Open the Symbol Window:Use the Toolbar or Double Click Schematic Background
Local Symbols Created from MegaWizard or Design Files
Library Symbols
Insert SymbolsInsert Symbols
© 2006 Altera Corporation - Confidential
Draw Wires, Buses, or Conduit
Connect Wires & BusesConnect Wires & Buses
© 2006 Altera Corporation - Confidential
Double-Click on Pin Name to Change; Hit Enter to Advance to Next Pin
Change Names & PropertiesChange Names & Properties
Right-Click on any Block to Change Properties (Ex. Instance Name)
© 2006 Altera Corporation - Confidential
File Create/Update Create Symbol… Note: Schematic Can Be Converted to a
Symbol & Used in other Schematics
Symbol Created in Project Directory
Create SymbolsCreate Symbols
© 2006 Altera Corporation - Confidential
MegafunctionsMegafunctions Pre-Made Design Blocks
Ex. Multiply-Accumulate, PLL, Double-Data Rate Benefits
Free & Installed with Quartus II Accelerate Design Entry Pre-Optimized for Altera Architecture Add Flexibility
Two Types Altera-Specific Megafunctions (Begin with “ALT”) Library of Paramerterized Modules (LPMs)
Industry Standard Logic Functions See www.edif.org/lpmweb for more info
© 2006 Altera Corporation - Confidential
MegaWizard Plug-In ManagerMegaWizard Plug-In Manager Eases Implementation of Megafunctions & IP
Tools MegaWizard Plug-In Manager
© 2006 Altera Corporation - Confidential
MegaWizard Examples MegaWizard Examples Multiply-Add PLL
Double-Data Rate
Locate Documentation in Quartus II Help or the Web
© 2006 Altera Corporation - Confidential
MegaWizard Output File SelectionMegaWizard Output File Selection
Default HDL Wrapper File
Selectable HDL Instantiation
Template VHDL Component
Declaration (CMP) Quartus II Symbol
(BSF) Verilog Black Box
© 2006 Altera Corporation - Confidential
Behavioral WaveformsBehavioral Waveforms
HTML file Generated by MegaWizard Description of Megafunction Functionality
Reviews Selected Parameters Describes Read & Write Operations
Supported Megafunctions Subset of Memory Subset of Arithmetic
© 2006 Altera Corporation - Confidential
Example WaveformExample Waveform
© 2006 Altera Corporation - Confidential
Memory EditorMemory Editor Create or Edit Memory Initialization Files in Intel
Hex (.HEX) or Altera-Specific (.MIF) Format
Design Entry Use to Initialize Your Memory Block (Ex. RAM, ROM)
during Power-Up
Simulation Use to Initialize Memory Blocks before Simulation or
after Breakpoints
© 2006 Altera Corporation - Confidential
File New Other Files tab
1) HEX format orMIF format
Create Memory Initialization FileCreate Memory Initialization File
2) Select Memory Size
3) Memory Space
© 2006 Altera Corporation - Confidential
Change OptionsChange Options
View Options of Memory Editor View Select from Available Options
© 2006 Altera Corporation - Confidential
Select the Word & Type in a Value
OR
Select the Word & Right Click to Select an Option from the Pop-Up Menu
OR
Copy & Paste from a Spreadsheet into a Memory File
Edit ContentsEdit Contents
Edit Contents of the Memory File Save the Memory File as .HEX or .MIF File
© 2006 Altera Corporation - Confidential
Using Memory File in DesignUsing Memory File in Design
Specify MIF or HEX file in MegaWizard Interface
© 2006 Altera Corporation - Confidential
EDA Interfaces IntroductionEDA Interfaces Introduction Interface with Industry-Standard EDA Tools that
Generate a Netlist File EDIF 2 0 0 VHDL ’87 or ’93 Verilog
NativeLink Interface Provides Seamless Integration with 3rd-party EDA Software Tools Tools Pass Information/Commands in Background Designers Can Complete Entire Design in One Tool
© 2006 Altera Corporation - Confidential
Comprised of Two Components External Files
WYSIWYG (What You See Is What You Get) ATOM Netlist Files (EDIF, Verilog, VHDL)
Cross Reference Files (Ex. XRF)Timing Files (Ex. SDO)
Application Programming Interface (API)Pre-Defined Interface of Commands/Functions
EDA PartnersEDA Partners
API
External Files
NativeLinkNativeLink
© 2006 Altera Corporation - Confidential
Set of Design Primitives that Support WYSIWYG Compilation
Provide Direct Control of How a Design Is Technology-Mapped to a Specific Target Device
Allow Synthesis Vendors to Provide an Optimal Realization of a Design for Each Architecture
Synplify .vqm
WYSIWYG ATOM PrimitivesWYSIWYG ATOM Primitives
© 2006 Altera Corporation - Confidential
WYSIWYG Compilation FlowWYSIWYG Compilation Flow
EDA EDA Synthesis Synthesis
PartnerPartner
EDA EDA Synthesis Synthesis
PartnerPartner
EDF VQM
Design Input Files with
WYSIWYG Primitives
Synthesis
LogicSynthesis
Netlist Extraction
Database Builder
Place & Route
Note: Logic Options in Quartus II that control synthesis can no longer be used.
© 2006 Altera Corporation - Confidential
Three EDA Design FlowsThree EDA Design Flows Quartus II Driven Flow
User Launches other EDA Tools from Quartus II in the Background
Messages Appear in Quartus II Message Window
Vendor Driven Flow User Runs Quartus II in the Background from the 3rd-
Party EDA Tool
File Based Flow Each Tool Ran Separately Files Are Manually Transferred between Tools
© 2006 Altera Corporation - Confidential
Quartus II Driven or File-Based FlowQuartus II Driven or File-Based FlowAssignments EDA Tool Settings
Check the “Run …” Button to Launch the EDA Tool in the Background
Leave Unchecked for File Based Flow
© 2006 Altera Corporation - Confidential
EDA Driven FlowEDA Driven Flow
Run Quartus II Fitter in the Background by Selecting Run Background Compile or Launch Quartus II
© 2006 Altera Corporation - Confidential
Verification Tools
• ModelSim®
• ModelSim-Altera
• Cadence Verilog-XL
• Cadence NC-Verilog
• Cadence NC-VHDL
• Innoveda BLAST
• PrimeTime®
• Synopsys® VCS & VSS
• Mentor Graphics® Tau
• Synopsys Scirocco
Synthesis Tools
• LeonardoSpectrum™
• Precision
• DesignCompiler-FPGA
• FPGA Compiler II
• FPGA Express
• Synplify
• Synplify Pro
• Amplify
Third Party Tool SupportThird Party Tool Support
© 2006 Altera Corporation - Confidential
Please go to Exercise 2 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Created a Schematic Design Generated Logic Using MegaWizard Converted HDL File to Symbol for Inclusion
in Schematic Performed Analysis & Elaboration to Check
the File
Exercise SummaryExercise Summary
© 2006 Altera Corporation - Confidential
Design Entry SummaryDesign Entry Summary
Multiple Design Entry Methods Text (Verilog, VHDL, AHDL) Third Party Netlist (VQM, EDF) Schematic
Memory Editor MegaWizard EDA Tool Flows
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Quartus II Compilation
© 2006 Altera Corporation - Confidential
Quartus II CompilationQuartus II Compilation
Synthesis Fitting Generating Output
Timing Analysis Output Netlist Simulation Output Netlists Programming/Configuration Output Files
© 2006 Altera Corporation - Confidential
Start Compilation Perform Full Compilation
Start Analysis & Elaboration Check Syntax & Build
Database Only Start Analysis & Synthesis
Synthesize Code Estimate Timing
Start Fitter Start Assembler Start Timing Analysis Start I/O Assignment Analysis Start Design Assistant
Processing OptionsProcessing OptionsProcessing Toolbar
© 2006 Altera Corporation - Confidential
Compilation Design FlowsCompilation Design Flows Standard Flow
Design Compiled as a Whole Global Optimizations Performed
Incremental Flow User Controls How & When Pre-Selected Parts of
Design Are Compiled Benefits
Decrease Compilation Time Maintain & Improve Compilation Results
Two Types Incremental Synthesis Incremental Fitting
© 2006 Altera Corporation - Confidential
TOP
A:inst1
B:inst2B’:inst2
Incremental Compilation ConceptIncremental Compilation Concept
TOP
A:inst1
B:inst2
A
+
B
+
=
B’Only Specified Portions of Logic that Have Changed Are Re-Synthesized or Re-Fitted
Choose to Reuse Post-Synthesis or Post-Fit Netlist
© 2006 Altera Corporation - Confidential
Ex. Typical User FlowEx. Typical User Flow1. Mark Partitions Using Proje
ct Navigator2. Run Analysis & Elaboration
or Analysis & Synthesis3. Choose Netlist Type for Eac
h Partition4. Make Design Changes for A
ny Partition5. Perform Incremental Compil
ationRight-Click on Hierarchical Level in Project Navigator
Note:1) For more details on using incremental
compilation, please attend the course “Accelerating Design Cycles using Quartus II” or watch the web-recording “Incremental Design in Quartus II”
© 2006 Altera Corporation - Confidential
• Status Bars Scroll to Indicate Progress• Message Window Displays Informational, Warning, & Error Messages
Status & Message WindowsStatus & Message Windows
© 2006 Altera Corporation - Confidential
Contains All Processing Information• Resource Usage• Timing Analysis• Pin-Out File• Messages
Compilation ReportCompilation Report
© 2006 Altera Corporation - Confidential
Several Sections Detail the Resource Usage
Resource UsageResource Usage
© 2006 Altera Corporation - Confidential
Timing Closure FloorplanTiming Closure Floorplan
Editable View of Target Technology Used to:
• View Placement• View Connectivity• Make Placement Assignments
Assignments Menu
© 2006 Altera Corporation - Confidential
Synthesis & Fitting ControlSynthesis & Fitting Control Controlled Using Two
Methods Settings
Project-Wide Switches
Assignments (i.e. Logic Options; Constraints)
Individual Entity/Node Controls
Accessed Using Assignments Menu
Stored in QSF File
© 2006 Altera Corporation - Confidential
Quartus Settings File (QSF)Quartus Settings File (QSF)
Stores All Settings & Assignments Uses Tcl Syntax
Organized by Assignment Type
© 2006 Altera Corporation - Confidential
SettingsSettings
Examples Device Selection Synthesis Optimization Fitter Settings Physical Synthesis
Located in Settings Dialog Box (Assignments Menu)
© 2006 Altera Corporation - Confidential
Settings Dialog BoxSettings Dialog Box
Change Settings• Top-Level Entity• Target Device• Add/Remove Files• Libraries• VHDL ‘87, ‘93?• Verilog ‘95, ‘01?• EDA Tool Settings • Timing Settings• Compiler Settings• Simulator Settings
© 2006 Altera Corporation - Confidential
• Smart Compilation− Skips Entire Compiler Modules when
Not Required (i.e. Elaboration, Synthesis, etc.)
− Saves Compiler Time − Uses More Disk Space
• Preserve Fewer Node Names− Disable for VHDL/Verilog Synthesis
• Generate Version-Compatible Database• Enable Incremental Compilation
Compilation ProcessCompilation Process
© 2006 Altera Corporation - Confidential
Global Optimization Goal (Default)
Select Speed vs. Area or Balanced
Logic Replacement
Replace Logic with Equivalent Megafunction
State Machine Processing
Auto, One-Hot or Minimal Bit
Synthesis OptionsSynthesis Options
© 2006 Altera Corporation - Confidential
Synthesis Netlist OptimizationsSynthesis Netlist Optimizations
Further Optimize Netlists during Synthesis Types
WYSIWYG Primitive Resynthesis Gate-Level Register Retiming
Created/Modified Nodes Noted in Compilation Report
© 2006 Altera Corporation - Confidential
WYSIWYG Primitive ResynthesisWYSIWYG Primitive Resynthesis Unmaps 3rd-Party Atom
Netlist Back to Gates & then Remaps to Altera Primitives Unavailable when Using I
ntegrated Synthesis
Considerations Node Names May Chang
e 3rd-Party Synthesis Attrib
utes May Be LostPreserve/Keep
Some Registers May Be Synthesized Away
© 2006 Altera Corporation - Confidential
Gate-Level Register RetimingGate-Level Register Retiming
Moves Registers across Combinatorial Logic to Balance Timing
Trades between Critical & Non-Critical Paths
Makes Changes at Gate Level
D
>
Q D
>
QD
>
Q7 ns 8 nsD
>
Q D
>
QD
>
Q10 ns 5 ns
© 2006 Altera Corporation - Confidential
Timing Driven Compilation
Discussed Later
Compilation Speed/Fitter Effort
Standard Fit– Highest Effort
Fast Fit– Faster Compile but Possibly
Lesser Design Performance
Auto Fit – Compile Stops after Meeting
Timing– Conserves CPU Time– Default for New Designs
One Fitting Attempt
Fitter SettingsFitter Settings
© 2006 Altera Corporation - Confidential
Physical SynthesisPhysical Synthesis Re-Synthesis Based on Fitt
er Output Makes Incremental Chang
es that Improve Results for a Given Placement
Compensates for Routing Delays from Fitter
Types Combinational Logic Registers
Register Duplication Register Retiming
Effort Trades Performance vs Co
mpile Time Normal, Extra or Fast
Created/Modified Nodes Noted in Compilation Report
© 2006 Altera Corporation - Confidential
Combinational LogicCombinational Logic
Swaps Look-Up Table (LUT) Ports within LEs to Reduce Critical Path LEs
Allows LUT Duplication to Enable Further Optimizations on the Critical Path
fg
ab - critical LUT
LUT
cd
e
LUT
LUTfg
aecd
b
© 2006 Altera Corporation - Confidential
Register Duplication Register Duplication High Fan-Out Register Is Duplicated &
Placed to Reduce Delay Combinational Logic May Also Be Duplicated
N
© 2006 Altera Corporation - Confidential
AssignmentsAssignments
Assignment Editor Example Assignments I/O Assignments & Analysis
Perform Analysis & Elaboration before Obtaining Hierarchy & Node Information
© 2006 Altera Corporation - Confidential
Assignment Editor (AE)Assignment Editor (AE) Provides Spreadsheet Assignment Entry & Display
Can Copy & Paste from Clipboard
Sort on Columns
Enable/Disable IndividualAssignments
© 2006 Altera Corporation - Confidential
Invoke the Assignment Editor by Highlighting an Entity in the Hierarchy View & Right- Clicking
Opening Assignment EditorOpening Assignment Editor
Assignments Menu
© 2006 Altera Corporation - Confidential
Opening Assignment Editor (cont.)Opening Assignment Editor (cont.)
Locate to Assignment Editor from Message Window, Timing Report, etc.
© 2006 Altera Corporation - Confidential
Using Assignment EditorUsing Assignment Editor
Select Assignment from Drop-Down Menu & Set Value
Double-Click Cells to Edit or Type Name Directly
Launches Node Finder
© 2006 Altera Corporation - Confidential
Editing Multiple AssignmentsEditing Multiple Assignments
Use Edit Bar
Editing Multiple I/O Standards at Once
© 2006 Altera Corporation - Confidential
Search by Name Using Wildcards (? or *)
List of Nodes in Selected Entity& Lower Levels of Hierarchy
Use Filter to Select the Nodes to Be Displayed
Select Nodes on Left & Use Arrows to Move to the Right
Node FinderNode Finder
Locate Nodes in a Certain Level of Hierarchy
Start Displays Nodes Meeting Search Criteria
© 2006 Altera Corporation - Confidential
AE Dynamic CheckingAE Dynamic Checking Validity of Constraint Checked during Entry Color-Coded to Display Status
Grey – Disabled Black – Applied Yellow – Assignment
Warning
Dark Red – Incomplete Bright Red – Error/Illegal Value Green – Enter New
Assignment
© 2006 Altera Corporation - Confidential
Assignment Editor FeaturesAssignment Editor Features Category Bar
Selects Category of Assignments to View Ex. Pin Assignments, Timing Assignments
Each Can Be Customized Node Filter Bar
Filters Constraints Displayed Based on Node Name Information Bar
Displays Description of Selected Cell or Assignment
© 2006 Altera Corporation - Confidential
AE Tcl CommandsAE Tcl Commands Equivalent Tcl Commands Are Displayed as Assignments
Are Entered Manually Copy to Create Tcl Scripts Export Command (File Menu) Writes All Assignments t
o a Tcl File
Message Window
© 2006 Altera Corporation - Confidential
Export CSV File Assignments (Excel)Export CSV File Assignments (Excel)
Export to CSV File (File Menu) Import Data into Excel
© 2006 Altera Corporation - Confidential
Example AssignmentsExample Assignments
Optimization Technique Output Pin Load
© 2006 Altera Corporation - Confidential
OPTIMIZATION TECHNIQUEOPTIMIZATION TECHNIQUE Selects Synthesis Optimization Goal
Speed Balanced (Default) Area
Applies Only to Hierarchical Entities Effects Synthesis & Logic Mapping Only Applies to Quartus II Integrated Synthesis
© 2006 Altera Corporation - Confidential
Output Pin LoadOutput Pin Load Specifies Output Pin Loa
ding in picoFarads (pF) Changes Default Loading
Value of I/O Standard Changes tco of Output Pins
Allows Designer to Accurately Model Board Conditions
Must Be Applied to Output or Bidirectional Pins
© 2006 Altera Corporation - Confidential
Available Logic Options (Assignments)Available Logic Options (Assignments)
1) Go to Quartus II Help (Index)
2) Type in “Logic Options”
3) Click on “list of”
Supported Devices Shown for each Assignment
© 2006 Altera Corporation - Confidential
I/O (Pin) AssignmentsI/O (Pin) Assignments
Pin Planner Assignment Editor Import from Spreadsheet in CSV Format QSF File Timing Closure Floorplan
Shows Pin Pad Distances Shows Relationships with Core
Scripting
© 2006 Altera Corporation - Confidential
Pin PlannerPin Planner
Interactive Graphical Tool for Assigning Pins Drag & Drop Pin Assignments Set Pin I/O Standards
Three Sections Unassigned Pins List Package View Assigned Pins List
Assignments Menu Pin Planner
© 2006 Altera Corporation - Confidential
Pin Planner WindowPin Planner Window
Unassigned Pins List
Package View (Top or Bottom)
Assigned Pins List
© 2006 Altera Corporation - Confidential
Pin Planner FeaturesPin Planner Features Displays I/O Banks, VREF
Groups & Differential Pin Pairing
Hides Non-Migratable I/O Pins
Allows Easy Creation of Reserved Pins Use Unassigned Pins List
Has Easy-to-Read Pin Legend
View Pin Legend
I/O Banks & Differential Pairing
© 2006 Altera Corporation - Confidential
Assigning Pins Using Pin PlannerAssigning Pins Using Pin Planner
Drag & Drop Single Pin Drag & Drop Multiple Highlighted Pins or Buses
Choose Pin Alignment Direction (Edit Menu)
© 2006 Altera Corporation - Confidential
Assigning Pins Using Pin Planner (2)Assigning Pins Using Pin Planner (2)
Drag & Drop to I/O Bank or VREF Block
Double-Click Pin or I/O Bank to Open Properties Dialog Box
Filter Nodes Displayed
© 2006 Altera Corporation - Confidential
Assignment Editor I/O AssignmentsAssignment Editor I/O Assignments
Assign to Chip Edge
Assign to (Color-Coded) I/O Bank
Assign to Specific I/O Location
Reserved Pins
Change Category to Pin
© 2006 Altera Corporation - Confidential
AE Pin Assignment FeaturesAE Pin Assignment Features Show All Known Pin Names
Populates Spreadsheet with List of All Pin Names in Design
Assigned & Not Assigned
Show All Assignable Pin Numbers Populate Spreadsheet with All Pin Numbe
rs Available for Assignment Show I/O Banks in Color
Enable/Disable I/O Color Coding of Spreadsheet Based upon Floorplan
© 2006 Altera Corporation - Confidential
Import/Export via CSV to PCB ToolImport/Export via CSV to PCB Tool
Use CSV File to Interface to PCB Tools
Example PCB Tool Changes Pin Locations Import Changes Back into
Quartus II
Column Header Names To Assignment Name (Location) Value (Pin Number) I/O Standard
© 2006 Altera Corporation - Confidential
Type I/O AssignmentsType I/O Assignments
Type Pin Assignments Directly into QSF Use Tcl Syntax
© 2006 Altera Corporation - Confidential
I/O Assignment Analysis CommandI/O Assignment Analysis Command Checks Legality of All I/O
Assignments without Full Compilation Complex I/O Standards I/O Placement Limitations
Current Strength Single-Ended vs. Differential
Pins Has Two Usages
Performing Legality Checks on User Reserved Pin Assignments with Partial or No Design Files
Performing Legality Checks on User I/O Assignments with a Complete Design
© 2006 Altera Corporation - Confidential
I/O Analysis RequirementsI/O Analysis Requirements
I/O Declaration HDL Port Declaration Reserved Pin
Pin-Related Assignments I/O Standard Current Strength Pin Location (Pin, Bank, Edge) PCI Clamping Diode Toggle Rate
© 2006 Altera Corporation - Confidential
I/O Assignment Analysis OutputI/O Assignment Analysis Output
Detailed Messages on I/O Assignment Issues
• Compiler Assumptions• Device & Pin Migration Issues• I/O Bank Voltages & Standards
Compilation Report (Fitter Section)
• Pin-Out File • I/O Pin Tables• Output Pin Loading
Partial Placement Results also Shown in Floorplan
© 2006 Altera Corporation - Confidential
Back-AnnotationBack-Annotation Copies Device & Re
source Assignments Made by Compiler into QSF File Pins Logic Routing
“Locks Down” Locations in Floorplan
© 2006 Altera Corporation - Confidential
Design File ManagementDesign File Management
Project Archive & Restore Stores All Project Files
Design FilesSettings FileOutput Files
Revisions Stores Only QSF Allows Designer to Try Different Options Allows Comparison of Revisions
© 2006 Altera Corporation - Confidential
Creating a RevisionCreating a Revision
Project Revisions
Create New Revision
Type Revision Description
Base Revision on Any Previous Revision
© 2006 Altera Corporation - Confidential
Active Revision Names Stored in QPF QSF Created for Each Revision
<Revision_name>.QSF Text File Created for Each Revision
<Revision_Name>_description.TXT
Project Revision SupportProject Revision Support
Easily Switch between Revisions
© 2006 Altera Corporation - Confidential
Compare RevisionsCompare Revisions Detailed Summary of
Assignments & Results Synthesis
No Timing Data
Fitting Area Timing
Compare Results with Other Projects Export to CSV (Excel)
© 2006 Altera Corporation - Confidential
Please go to Exercise 3 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Exercise SummaryExercise Summary
Set Logic Options Using Assignment Editor Assigned Pins & I/O Standards Performed I/O Assignment Analysis Back-Annotated Pin Locations Created New Revision to Store
Assignment Changes
© 2006 Altera Corporation - Confidential
Compilation Entry SummaryCompilation Entry Summary
Compilation Includes Synthesis & Fitting Compilation Report Contains Detailed
Results Settings & Assignments Control
Compilation Pin Assignments Can Be Performed in
Many Ways Revisions Store Settings, Assignments &
Compilation Results for Comparison
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Design Analysis
© 2006 Altera Corporation - Confidential
Design AnalysisDesign Analysis
Optimization Advisors RTL Viewer Technology Viewer PowerPlay Power Analyzer Tool
© 2006 Altera Corporation - Confidential
Optimization AdvisorsOptimization Advisors Provide Design-
Specific Recommendations (Feedback) on Optimizing Designs
Two Types Resource Optimization
Advisor Timing Optimization
Advisor
© 2006 Altera Corporation - Confidential
Example Optimization AdvisorExample Optimization Advisor
Problem Area Identified
Three Stages of Recommendations to Try in Order
Checkmark Indicates Settings Already in Use
Description of Recommended Settings
Links to Adjust Settings
© 2006 Altera Corporation - Confidential
RTL ViewerRTL Viewer
Graphically Represents Results of Synthesis
Schematic ViewHierarchy List
Toolbar
Tools Menu RTL Viewer
Note:1) Must Perform Elaboration First (e.g. Analysis &
Elaboration OR Analysis & Synthesis)
© 2006 Altera Corporation - Confidential
Technology ViewerTechnology Viewer
Graphically Represents Results of Mapping Tools Menu Technology Viewer
Note:1) Must Run Synthesis and/or Fitting First
Schematic ViewHierarchy List
© 2006 Altera Corporation - Confidential
UsesUses RTL Viewer
Visually Checking Initial HDL Synthesis Results Before Any Quartus II Optimizations
Locating Synthesized Nodes for Assigning Constraints Debugging Verification Issues
Technology Viewer Analyze Critical Timing Paths Graphically
Delay Values Displayed if Timing
Locating Nodes after Optimizations Assigning Constraints Debugging
© 2006 Altera Corporation - Confidential
Schematic View (RTL Viewer)Schematic View (RTL Viewer)
Represents Design Using Logic Blocks & Nets I/O pins Registers Muxes Gates Operators
Place Pointer over Any Element in Schematic to See Details• Name• Internal Resource Count
© 2006 Altera Corporation - Confidential
Schematic View (Technology Viewer)Schematic View (Technology Viewer)
Represents Design Using ATOMs I/O Pins LCELLs Memory Blocks MAC
Place Pointer over Any Element in Schematic to See Details• Name• Internal Resource Count• Logic Equation
© 2006 Altera Corporation - Confidential
Hierarchy ListHierarchy List Traverses between Design Hie
rarchy Views Logic Schematic for Eac
h Hierarchical Level Breaks down Each Hierarchical
Level into Netlist Elements or ATOMs
Instances Primitives Pins Nets
© 2006 Altera Corporation - Confidential
Using Hierarchy ListUsing Hierarchy List
Highlighting a Netlist Element in Hierarchy List Highlights/Views that Element in the Schematic View
Expanding Instances Shows the Instances, Pins & Nets within Internal Modules
© 2006 Altera Corporation - Confidential
Schematic View Mouse Pointer Indicates ActionDescending Hierarchy
Double-Click on InstanceRight-Click & Select Hierarchy Down
Ascending HierarchyDouble-Click in Empty SpaceRight-Click & Select Hierarchy Up
Hierarchy NavigationHierarchy Navigation
© 2006 Altera Corporation - Confidential
State Machine Viewer (RTL Viewer)State Machine Viewer (RTL Viewer)Descend Hierarchy into State Machine Block to Open State Machine Viewer
Highlighting State in State Transition Table Highlights Corresponding State in State Flow Diagram
State Flow Diagram
State Transition Table
© 2006 Altera Corporation - Confidential
Filter SchematicFilter Schematic
Unfiltered: All Components & Paths Shown Filtered: Only Selected Components & Related Paths Displayed
Right-Click for Filter Menu
Filter Options
© 2006 Altera Corporation - Confidential
Page ControlPage Control
Hierarchical Levels Automatically Partitioned Control Design Size Per Page (Tools Options)
Use Toolbar to Move between Pages Navigate Nets between Pages
Right-Click to Trace
© 2006 Altera Corporation - Confidential
Other FeaturesOther Features
Go to Net Driver Traces Net Back to Source Driver
Cross-Probing : Locate Nodes from/to Design Files Assignment Editor Floorplan Chip Editor Resource Property Editor RTL/Technology Viewer
© 2006 Altera Corporation - Confidential
PowerPlay Power AnalyzerPowerPlay Power Analyzer Provides Single Interf
ace for Vectorless & Simulation-Based Power Estimation
Allows Thermal Conditions Settings
Uses Improved Power Models Based on HSPICE & Si
licon Correlation
© 2006 Altera Corporation - Confidential
PowerPlay Power Analyzer Tool PowerPlay Power Analyzer Tool Toggle Rate Input
Signal Activity File ASCII Text File (Quartus II-
Specific)
VCD Generated By 3rd-Party
Simulators
Default Toggle Rate (12.5%)
Generate Signal Activity File
Need to Run Place & Route (Full Compile)
© 2006 Altera Corporation - Confidential
Toggle Rates & Signal StatesToggle Rates & Signal States
1. Simulation (Best) Quartus II Simulator 3rd Party Simulators: Modelsim, NC-Sim or VCS
2. User Entry on Portions of Circuit Using “Power Toggle Rate” Assignment (Assignment Editor) Signal Activity File (SAF) Tcl Scripting
3. Vectorless Activity Estimation Fills In Unknowns Ex: 3rd Party RTL Simulation + Vectorless
4. Global Default Toggle Rate For Remaining (Worst)
© 2006 Altera Corporation - Confidential
Power Report – SummaryPower Report – Summary Thermal Power
Dissipation By Block Type (i.e. Device
Resources) By Hierarchy
Power Drawn from Voltage Supplies By I/O Banks By Voltage
Confidence Metric Level Based on Quality of User
Input (i.e. Simulation vs. User-Entered)
Signal Activities Signal Name, Type &
Toggle Rate
Simulation Based
© 2006 Altera Corporation - Confidential
More Details on Power Analysis?More Details on Power Analysis?
Please see www.altera.com/training for an Downloadable Recorded Demonstration
© 2006 Altera Corporation - Confidential
Design Analysis SummaryDesign Analysis Summary
Use Optimization Advisors to Aid in Choosing Quartus II Settings
Run RTL & Technology Viewers to Analyze Quartus II Results
Use PowerPlay Power Analyzer Tool to Estimate FPGA Power Consumption
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Timing Analysis
© 2006 Altera Corporation - Confidential
Timing Analysis AgendaTiming Analysis Agenda
Standard/Single Clock Analysis Timing Assignments
Global & Individual Fast Timing Model Analysis Early Timing Estimation
© 2006 Altera Corporation - Confidential
IN
CLK
OUT
Principles of Static Timing AnalysisPrinciples of Static Timing Analysis
Every path has a start point and an end point:
Start Points: End Points:ONLY FOUR POSSIBLE TIMING PATHS • Input ports
• Clock pins• Output ports• Data input pins of sequential devices
D Q
clk
D Q
clk
combinational delays*
* * *
© 2006 Altera Corporation - Confidential
Running Timing AnalysisRunning Timing Analysis
Automatically Use Full Compilation
Manually Processing Menu Start Start Timing Analy
sis Tcl Scripts Uses
Changing Speed GradeAnnotating Netlist with Delay Information
© 2006 Altera Corporation - Confidential
Reporting Timing ResultsReporting Timing Results Timing Analyzer Section of Co
mpilation Report Summary
Timing Analyses Clock Setup (fmax) Clock Hold tsu (Input Setup Times) th (Input Hold Times) tco (Clock to Out Delays) tpd (Pin to Pin Combinatorial Del
ays)
© 2006 Altera Corporation - Confidential
Standard/Single-Clock AnalysisStandard/Single-Clock Analysis Performed Automatically during Each
Compile Detects Clocks Automatically If No
Assignments Are Made Single or Multiple Asynchronous Clock
Domains Analyses
Clock Setup & Hold Input Pin Setup/Hold Time Output Pin Clock-to-Output Time
© 2006 Altera Corporation - Confidential
Clock Period = Clock-to-Out + Data Delay + Setup Time - Clock Skew = tco + B + tsu - (E - C)
fmax = 1/Clock Period
B
C
tco tsu
E
Clock Period
Clock Setup (fmax)Clock Setup (fmax)
Worst-Case Clock Frequency Without Violating Internal Setup Times
© 2006 Altera Corporation - Confidential
Select Clock Setup
Worst fmax
Fmax Values Are Listed in Ascending Order; Worst Fmax Is Listed on the Top
Source, Destination Registers & Associated F
max Values
Clock Setup (fmax) TablesClock Setup (fmax) Tables
© 2006 Altera Corporation - Confidential
fmax Analysisfmax Analysis
Highlight, Right-Click Mouse & Select List Paths
To Analyze the Path More Closely
Similar Steps for All Timing Path Analysis in Quartus II
© 2006 Altera Corporation - Confidential
fmax Analysis Detailsfmax Analysis Details
Data Delay (B)
Source Register Clock Delay (C)
Setup Time (tsu)
B
C
tco tsu
E
Clock Period
Destination Register Clock Delay (E)
Clock to Output (tco)
1
0.384 ns + 7.445 ns + 0.180 ns - 0.000 ns= 124.86 MHz
Messages Window (System Tab) in Quartus II
© 2006 Altera Corporation - Confidential
Right-Click & Select Locate
Locate Delay Path in FloorplanLocate Delay Path in Floorplan
Notes:1) May Also Locate to Floorplan fro
m Message Window 2) Use Similar Procedure for All Ti
ming Path Analysis
Compilation Report
© 2006 Altera Corporation - Confidential
Locate Delay Path in FloorplanLocate Delay Path in Floorplan
3.807 ns Is the Total Path Delay
© 2006 Altera Corporation - Confidential
Locate Delay in Technology ViewerLocate Delay in Technology Viewer
Total delay: 3.807 ns
© 2006 Altera Corporation - Confidential
Clock Hold AnalysisClock Hold Analysis Checks Internal Register-Register Timing
Report Occurs Only When Hold Violations Occur
Results When Data Delay (B) is Less than Clock Skew (E-C) Non-Global Clock Routing Gated Clocks
B
C
tco th
E
Clock Period
E
C
Data
E - C th
tco +B
© 2006 Altera Corporation - Confidential
Hold Time Violations TableHold Time Violations Table
Not Operational:
Clock Skew > Data Delay
Discover Internal Hold Time Issues before Simulation
List Paths Window
© 2006 Altera Corporation - Confidential
I/O Setup (tsu) & Hold (th) AnalysesI/O Setup (tsu) & Hold (th) Analyses
Clock delay
tsu th
Data delay
tsu = data delay - clock delay + intrinsic tsu
intrinsic tsu & hold
th = clock delay - data delay + intrinsic th
© 2006 Altera Corporation - Confidential
I/O Clock-to-Output Analysis (tco)I/O Clock-to-Output Analysis (tco)
Data delay
tco
Clock delay
clock delay + intrinsic tco + data delay = tco
intrinsic tco
© 2006 Altera Corporation - Confidential
I/O Timing AnalyzerI/O Timing Analyzer
Clock NameSelect Parameter Pin Name
tsu, tco, th Will All Show up in the Timing Analyzer Report
Value
Note: Timing Analysis of tpd is similar
Register Name
© 2006 Altera Corporation - Confidential
Timing Analysis OptionsTiming Analysis Options Used to Expand/Limit which Paths Are Analyzed/Dis
played Examples
Recovery & Removal Enable Clock Latency
Reports Detected Clock Offset as Latency Affecting Clock Skew Clock Setup/Hold Relationships Maintained Ex. Inserting Clock Delay Using PLLs
Enables Latency Timing Assignments (Discussed Later)
Timing Constraint Check Determines if Any Paths Not Constrained by Timing Assignment
© 2006 Altera Corporation - Confidential
Timing Analysis Options (cont.)Timing Analysis Options (cont.)
Examples (Cont.) Combined Fast/Slow Timing Analysis
(Discussed Later) Global Cut Timing Options (On by Default)
Cut Paths between Unrelated Clock DomainsCut Off Feedback from I/O PinsCut Off Read during Write Signal Paths
Timing Analyzer OptionsDisplay Paths that Do Not Meet Timing Only
© 2006 Altera Corporation - Confidential
Recovery & RemovalRecovery & Removal
Setup/Hold Analysis Where Data Path Feeds Register Asynchronous Control Port (Clr/Pre/Load)
Primetime’s Definitions Recovery
Minimum Length of Time after an Asynchronous Control Signal Is Disabled that an Active Clock Edge Can Occur
Removal Minimum Length of Time Asynchronous Control Signals Must Stay As
serted after an Active Clock Edge
Reset (Data) Arrival Time
CLEAR
CLOCK
t_removal
t_recovery
© 2006 Altera Corporation - Confidential
clk
Q DA
Register 1 Register 2
Breaks Bidirectional I/O Pin from Analysis When On, Paths A & B Are Valid; C Is Not When Off, Paths A, B, & C Are Valid
I/O
Pin
C
B
Cut Off Feedback from I/O PinCut Off Feedback from I/O Pin
© 2006 Altera Corporation - Confidential
Assignments Settings Timing Requirements & Options
Timing OptionsTiming Options
© 2006 Altera Corporation - Confidential
Timing Analyzer OptionsTiming Analyzer Options
List 200 Paths
List Paths with Tsu Greater than 3 ns
List Paths with Fmax Less than 250 MHz
Assignments Settings Timing Analyzer
© 2006 Altera Corporation - Confidential
Please go to Exercise 4 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Performed Single Clock Timing Analysis Viewed Details on Timing Paths
Message Window Floorplan Technology Viewer
Timing Analysis Exercise SummaryTiming Analysis Exercise Summary
© 2006 Altera Corporation - Confidential
Using Timing AssignmentsUsing Timing Assignments
VERY IMPORTANT!! Have a Major Impact on Design Compilation
Specify ALL Timing Requirements for Your Design Fitter Works Hardest on the Worst Timing Timing Will Be Reported in Red If Not Met
Types Internal & I/O Timing Maximum & Minimum
Can Be Assigned Globally or Individually Individual Assignments Recommended
© 2006 Altera Corporation - Confidential
Slack CalculationsSlack Calculations
Timing Margin Comparing Actual Timing to Timing Requirements
Appear Only When Timing Assignments Are Made
Positive Slack Timing Requirement Met (BLACK)
Negative Slack Timing Requirement Not Met (RED)
© 2006 Altera Corporation - Confidential
Slack Equations (Setup)Slack Equations (Setup)Slack = Largest Required Time - Longest Actual TimeRequired Time = Clock Setup - tco - tsu + (clk’- clk)Actual Time = Data Delay
launch edge
clk
clk’
setup latch edge
Clock Setup*
clk
tco tsu
Combinatorial Logic
clk’
Register 1 Register 2
data delay
*Refers to the clock setup relationship
© 2006 Altera Corporation - Confidential
Slack Equations (Hold)Slack Equations (Hold)
launch edge
clk
hold latch edge
Clock Hold*
clk
tco th
Combinatorial Logic
clk’
Register 1 Register 2
data delay
Slack = Shortest Actual Time - Smallest Required TimeActual Time = Data DelayRequired Time = Clock Hold - tco + th + (clk’- clk)
clk’
*Refers to the clock hold relationship
© 2006 Altera Corporation - Confidential
Timing Assignments ExamplesTiming Assignments Examples
fmax Timing AssignmentValues Are BLACK, Because Actual fmax Exceeds the Required fmax
tSU timing assignmentValues Are RED Because Actual tSU Falls below Required tSU
© 2006 Altera Corporation - Confidential
Directs Fitter to Place & Route Logic to Meet Timing Assignments Optimize Timing
Placing Nodes in Critical Paths Closer Together
Optimize Fast-Corner Timing Optimizing for Fast Process (Minimum Timing Models)
Timing Driven Compilation (TDC)Timing Driven Compilation (TDC)
Assignments Settings Fitting Settings
© 2006 Altera Corporation - Confidential
Optimize Hold TimingOptimize Hold Timing
Modifies Place & Route to Meet Hold or Minimum Timing Requirements May Add Additional Routing in Path Supported in Stratix II, Stratix, Stratix GX, Cyclone II,
Cyclone & MAX II Devices
Settings Any I/O & Minimum Tpd Paths
All Paths (I/O & Internal)
© 2006 Altera Corporation - Confidential
Optimize Hold Time ExamplesOptimize Hold Time Examples
tco
tsu = 3 nsth = 0 ns
tsu = 3 nsth = 0 ns
Min tco = 10 ns
Extra Routing Added to Delay Path
Extra Routing Added to Delay Path
Gated Clock
Clock
© 2006 Altera Corporation - Confidential
Timing AssignmentsTiming Assignments
Basic Single & Multi-Clock I/O
Input Minimum/Maximum DelayOutput Minimum/Maximum Delay
© 2006 Altera Corporation - Confidential
For Designs with Multiple Asynchronous Clocks, Enter Required Fmax for Each Individual Clock
Global Clock Assignment for a Single Clock Design
Assignments Settings Timing Requirements & Options
Single Clock AssignmentSingle Clock Assignment
© 2006 Altera Corporation - Confidential
Asynchronous Global ClocksAsynchronous Global Clocks
© 2006 Altera Corporation - Confidential
Analyzing Synchronous ClocksAnalyzing Synchronous Clocks Enables Analysis of Cross-Domain Data Paths
Ignored by Default
Establishes New Clock Setup & Required Time Defined by Relationship between Clock Signals Automatic when PLL is Used
clk1
tco tsu
clk2
capturing edge
launching edge
clk1
clk2
dataRegister 1 Register 2
© 2006 Altera Corporation - Confidential
Derived ClocksDerived Clocks
Enter Name of Derived Clock Setting
Select Clock Setting on which This Derived Clock Is Based
Click on Derived Clock Requirements
Click New to Add New Setting
Enter Name of Derived Clock Node
© 2006 Altera Corporation - Confidential
Derived Clocks (cont.)Derived Clocks (cont.)
Click OK to Add Setting
Adjust Settings to Specify Clock Relationship
© 2006 Altera Corporation - Confidential
Individual I/O Timing RequirementsIndividual I/O Timing Requirements
Specify System-Level Timing Constraints Requires Clock Assignment
Include I/O Timing as Part of Clock Timing Analysis Report Clock Setup (fmax) Clock Hold
Settings Input Minimum/Maximum Delay Output Minimum/Maximum Delay
© 2006 Altera Corporation - Confidential
Input Maximum DelayInput Maximum Delay Maximum Delay from External Device to Altera I/O
Represents External Device tco + PCB Delay + PCB Clock Skew
Constrains Registered Input Path (tsu)
A
tcotsu
Altera DeviceExternal Device
PCB Delay
tsuA ≤ tCLK – Input Maximum Delay
Input Maximum Delay
tsuA
CLKCLK
© 2006 Altera Corporation - Confidential
Input Minimum DelayInput Minimum Delay Minimum Delay from External Device to Altera I/O
Represents External Device tco + PCB Delay + PCB Clock Skew
Constrains Registered Input Path (th)
A
tcoth
Altera DeviceExternal Device
PCB Delay
thA ≤ Input Minimum Delay
Input Minimum Delay
thA
CLKCLK
© 2006 Altera Corporation - Confidential
Output Maximum DelayOutput Maximum Delay Maximum Delay from Altera I/O to External Device
Represents External Device tsu + PCB Delay + PCB Clock Skew
Constrains Registered Output Path (Max. tco)
B
tco tsu
Altera Device External Device
PCB Delay
tcoB ≤ tCLK - Output Maximum Delay
tco Output Maximum Delay
CLK CLK
© 2006 Altera Corporation - Confidential
Output Minimum DelayOutput Minimum Delay Minimum Delay from Altera I/O to External Device
Represents External Device th - PCB Board Delay
Constrains Registered Output Path (Min. tco)
B
tco th
Altera Device External Device
Board Delay
tcoB ≥ Output Minimum Delay
tco Output Maximum Delay
CLK CLK
© 2006 Altera Corporation - Confidential
Example Input Maximum DelayExample Input Maximum Delay
Notice:1) Input Pin d(6) & d(3) Timing I
nformation Is Included with Clock Setup (fmax) Analysis
2) Input Delay Has Been Added to List Path Calculation
Input Maximum Delay (d) = 4 ns
© 2006 Altera Corporation - Confidential
Timing AssignmentsTiming Assignments
Advanced Clock Uncertainty Clock Latency Maximum Clock/Data Arrival Skew Multi-Cycle
© 2006 Altera Corporation - Confidential
Clock UncertaintyClock Uncertainty Affects Clock Requirement Models Jitter/Skew/Guard Band Applied to Clock Signals Settings
Clock Setup Uncertainty Reduces Clock Setup Requirement
Clock Hold Uncertainty Increases Clock Hold Requirement
CLOCK_HOLD_UNCERTAINTY CLOCK_SETUP_UNCERTAINTY
© 2006 Altera Corporation - Confidential
Clock Uncertainty ExampleClock Uncertainty Example
Clock Uncertainty between 2 Clock Points Multi-Clock Design with Multi-Clock Transfers
out1
reg2reg1
clk
data
PLL
Specify a Clock Uncertainty Assignment between 2 Clock Points
Reduces Setup Relationship between 2 Clock Domains
© 2006 Altera Corporation - Confidential
Clock LatencyClock Latency Models External Clock Tree Delays
From Ideal Source to Device Pins
Affects Clock Skew Calculations Treats Clock Skew as Latency Instead of Offset Ignored If Source & Destination Clocks the Same
Settings Early Clock Latency
Sets Shortest Clock Trace Delay
Late Clock Latency Sets Longest Clock Trace Delay
© 2006 Altera Corporation - Confidential
Clock Latency ExampleClock Latency Example
Clock Skew for Setup Analysis(-) Source Registers : Late Clock Latency Value(+) Destination Registers: Early Clock Latency Value
Clock Skew for Hold Analysis(+) Source Registers : Early Clock Latency Value(-) Destination Registers: Late Clock Latency Value
Assign:Early Clock Latency = 2 ns clk1
clk2
Clock Setup skew calculation increased by 2 nsRequired Time = Clock Setup - tco - tsu + (clk2 – clk1 + 2)
* Clock Enable Latency analysis must be enabled as shown earlier in Timing Analysis Settings
© 2006 Altera Corporation - Confidential
Skew ManagementSkew Management Clock Arrival Skew
Specifies Maximum Clock Path Skew Between a Set of Registers
Ex. Non-Global Clocks
Max Data Arrival Skew Specifies Maximum
Data Delay Skew from Clock Node to Registers and/or Pins
Ex. Memory Interfaces
Clock Arrival 2
Clock Arrival 1
nalClockArrivalClockArriv 21
Data Arrival 1
Data Arrival 2
nlDataArrivalDataArriva 21
© 2006 Altera Corporation - Confidential
Multi-Cycle PathsMulti-Cycle Paths Intentionally Require More Than One Clock
Cycle to Become Stable Must Be Considered in Design Implementation Must Tell Timing Analyzer to Account for Multiple
Clock Edges in Clock Setup Calculation
launching edge
base clock
derived clock
capturing edge
© 2006 Altera Corporation - Confidential
Multi-Cycle AssignmentMulti-Cycle Assignment Maximum Point-to-Point Timing
Data Cannot Arrive after Number of Cycles Ex: One Path Is < 1 Cycle, Other Path Is > 1 Cycle
Circuit Requires Enables for Proper Operation
CLK1
CLK2
MULTICYCLE
Multicycle = 2 ; Multicycle Hold = 2 (Default)
CLK1
CLK2
PATH2
PATH1
DATA ARRIVAL WINDOW
© 2006 Altera Corporation - Confidential
Multi-Cycle Hold AssignmentMulti-Cycle Hold Assignment Minimum Point-to-Point Timing
Data Must Arrive after Hold Time Used in Conjunction with a Multi-cycle Assignment
CLK1
CLK2
MULTICYCLE
MULTICYCLE HOLD
CLK1
CLK2
Multicycle = 2 ; Multicycle Hold = 1
CLK1
CLK2
Multicycle = 3 ; Multicycle Hold = 1 (Note how the hold is applied)
DATA ARRIVAL WINDOW
© 2006 Altera Corporation - Confidential
Other Multi-Cycle AssignmentsOther Multi-Cycle Assignments Clock Enable Multi-Cycle
Assigns Multi-Cycle to Source of Clock EnableI/O PinRegister
Source Multi-Cycle Used When Source Clock is Higher Frequency
© 2006 Altera Corporation - Confidential
Other Individual Timing AssignmentsOther Individual Timing Assignments
Classic FPGA Timing Assignments Input (tsu, th) Output (Max. & Min. tco)
Cut Timing Path Removes Paths from TDC & Timing Analysis Specifies False Paths (Test Logic)
Max/Min Pin-to-Pin Delay (tpd) Max/Min Point-to-Point Delay Report Delay
Reports Delay between Selected Pins & Registers
© 2006 Altera Corporation - Confidential
Assignment TypesAssignment Types Single-Point
Constrains Paths from Data Pin to Any Register Fed by Any Clock
Point-to-Point Constrains Paths from Data Pin to Any Register Fed by Specified
Clock
Wildcard (* or ?) Indicates All Targets with a Character or String
‘*’ - Zero or More Characters ‘?’ – Single Character
Time Group Assigns Named to User-Defined Group of Nodes Allows Single Assignment to Constrain Entire Group
© 2006 Altera Corporation - Confidential
Time GroupsTime Groups Assigns Named to User-Defined Group of Nodes Allows Single Assignment to Constrain Entire
Group
Members
Exclude Members
Create & Name Group
Node Finder
© 2006 Altera Corporation - Confidential
Making Timing AssignmentsMaking Timing AssignmentsSelect Timing Category
Choose Timing Assignment from the Drop-down List & Enter the Value Enter the Target or
Destination Node Name
Use Source Name (From) to Create a Point-to-Point Requirement
Assignment Editor Is Used for All Individual Timing Assigments
© 2006 Altera Corporation - Confidential
Other Timing AnalysesOther Timing Analyses
Fast Corner Timing Analysis
Early Timing Estimate
© 2006 Altera Corporation - Confidential
Fast Corner Timing AnalysisFast Corner Timing Analysis Uses Fastest (Best-Case) Timing Model Two Methods
Combined Fast/Slow Analysis ReportAssignments Timing Settings More SettingsNo List Paths on Fast Timing Report
Fast Analysis Only Processing Start Start Timing Analyzer (Fast T
iming Model)Must Re-Run Standard Timing Analysis Afterwards
Netlist Annotated with Minimum Values Previous Standard Analysis Overwritten
© 2006 Altera Corporation - Confidential
Combined Analysis ReportCombined Analysis Report
© 2006 Altera Corporation - Confidential
Early Timing EstimateEarly Timing Estimate
Performs Partial Compilation Stops Fitter before Completion
80% Compilation Time Savings
Provides Early Placement InformationFloorplanning LogicLock Regions
Provides Early Estimate on Design Delays Full Static Timing Analysis Performed with all
Timing Analyzer Features
© 2006 Altera Corporation - Confidential
Early Timing EstimateEarly Timing Estimate
Options Realistic – Estimated Delays Closest To Final Delays
0% Average Prediction Error (Within ±10% of Full Fit) Optimistic – Estimated Delays Exceeds Final Delays
“Do I have any hope of meeting timing?” Pessimistic – Estimated Delays Falls Below Final Delays
“Am I almost guaranteed to meet timing?”
© 2006 Altera Corporation - Confidential
Please go to Exercise 5 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Timing Assignment Exercise SummaryTiming Assignment Exercise Summary
Created Clock Settings Applied Setting to Clock in Design Assigned Timing Constraint to Input Pins Enabled Physical Synthesis Analyzed Compiler Results in Technology
Viewer
© 2006 Altera Corporation - Confidential
Standard/Single Clock Analysis Timing Assignments
Global & Individual Fast Timing Model Analysis Early Timing Estimation
Timing Analysis SummaryTiming Analysis Summary
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Simulation
© 2006 Altera Corporation - Confidential
Quartus II SimulationQuartus II Simulation
Simulator Method & Features Overview Simulator Settings VWF File Creation Simulation Output 3rd Party Simulation
© 2006 Altera Corporation - Confidential
Supported Simulation MethodsSupported Simulation Methods Quartus II
VWF (Vector Waveform File) Primary Graphical Waveform File
VEC (Vector File) Text-Based Input File
SCF (Simulator Channel File) MAX+PLUS II Graphical Waveform File
TBL (Table File) Text-Based Output File from Quartus II or MAX+PLUS II
Tcl/TK Scripting 3rd Party Simulators
Verilog/VHDL Testbench
© 2006 Altera Corporation - Confidential
Simulator FeaturesSimulator Features
Converts VWF into HDL Testbench Generates HDL Testbench Template Supports Breakpoints Performs Automatically
Adding Output Pins to Output Waveform File Checking Outputs at End of Simulation
© 2006 Altera Corporation - Confidential
Simulator SettingsSimulator Settings
Mode Input File Period Options
Assignments Settings Simulator
© 2006 Altera Corporation - Confidential
Simulator ModeSimulator Mode Functional
Type: RTL Uses Pre-Synthesis
Netlist
Timing Type: Gate-Level o
r Post-Place & Route
Uses Fully Compiled Netlist
© 2006 Altera Corporation - Confidential
Simulator Input & PeriodSimulator Input & Period Specifies Stimulus & Length of Simulation Period
Enter End Time
Run Simulation until End of Stimulus File
Specify Stimulus File
© 2006 Altera Corporation - Confidential
Simulator OptionsSimulator Options
Reports Setup & Hold Violations
Monitors & Reports Simulation for Glitches
Reports Toggle Ratio
Compares Simulation Outputs to Outputs in Stimulus File
Automatically Add Output Pins to Simulation
Generates Signal Activity File for PowerPlay Power Analyzer
© 2006 Altera Corporation - Confidential
Create New Vector Waveform FileCreate New Vector Waveform File Select File New Vector Waveform File (Other Files
Tab)
© 2006 Altera Corporation - Confidential
Insert NodesInsert Nodes Select Insert Node
or Bus (Edit Menu) VWF Must Be Open Use Node Finder
© 2006 Altera Corporation - Confidential
Specify End TimeSpecify End Time
Maximum Length of Simulation Time Edit Menu
© 2006 Altera Corporation - Confidential
Insert Time BarsInsert Time Bars
Time Bar
Specify Time Bar
Set Master Time Bar
Set One Time Bar as Master
Insert Other Time Bars Relative to Master Absolute
© 2006 Altera Corporation - Confidential
Draw Stimulus WaveformDraw Stimulus Waveform Highlight Portion of Waveform to Change Overwrite Value with Desired Value
Overwrite Value
Toolbar Shortcuts
Highlight Waveform
© 2006 Altera Corporation - Confidential
Overwrite Waveform Signal ValuesOverwrite Waveform Signal Values
1 = Forcing ‘1’ 0 = Forcing ‘0’ X = Forcing Unknown U = Uninitialized Z = High Impedance H = Weak ‘1’ L = Weak ‘0’ W = Weak Unknown DC = Don’t Care
© 2006 Altera Corporation - Confidential
Overwrite Waveform PatternsOverwrite Waveform Patterns Clock
Enter Period & Duty Cycle
Counting Pattern Enter Count
Timing Enter Start Value
& Increment
Arbitrary (Group) Value
Random Value
© 2006 Altera Corporation - Confidential
Converts VWF into HDL Testbench
Waveform to Testbench GeneratorWaveform to Testbench Generator
© 2006 Altera Corporation - Confidential
Testbench Template GeneratorTestbench Template Generator
Generates HDL Testbench Template User Inserts Test Stimulus
© 2006 Altera Corporation - Confidential
Before Functional SimulationBefore Functional Simulation
Perform Generate Functional Simulation Netlist (Processing Menu) Creates Pre-Synthesis Netlist Fails Simulation if Not Performed
© 2006 Altera Corporation - Confidential
Starting SimulationStarting Simulation
Processing Menu Start Simulation
Scripting
© 2006 Altera Corporation - Confidential
Simulator ReportSimulator Report
Displays Simulation Result Waveform
View Simulation Waveform Result Waveform
© 2006 Altera Corporation - Confidential
Comparing WaveformsComparing Waveforms
Select Compare to Waveforms (View Menu) Simulation Waveform Must Be Open
Select VWF Comparison File
© 2006 Altera Corporation - Confidential
Original Waveforms (Ctrl+1)
Compared File Waveforms (Ctrl+2)
Both Sets of Waveforms (Ctrl+3)
Compared Waveforms (Simulator Report)Compared Waveforms (Simulator Report)
© 2006 Altera Corporation - Confidential
BreakpointsBreakpoints
Interrupts Simulation at Specified Points Consists of 2 Parts
Equation (Condition) Action
StopGive ErrorGive WarningGive Info
Processing Simulation Debug Breakpoints
Click on condition to Build Equation
© 2006 Altera Corporation - Confidential
Breakpoint ConditionsBreakpoint Conditions <Node> <Operator1> <Value>
Single Condition Ex. ena = 1
Time = <Value> Single Condition time = 500ns
<Condition> <Operator2> <Condition> Complex Tests ena = 1 && time > 500ns
© 2006 Altera Corporation - Confidential
Breakpoint Equations (cont.)Breakpoint Equations (cont.) Node
Opens Node Finder
Operator1 <, >, =
Operator2 && (AND) || (OR)
© 2006 Altera Corporation - Confidential
Example BreakpointExample Breakpoint
Name BreakpointEnable/Disable Breakpoints
Arrange Order of Breakpoints
© 2006 Altera Corporation - Confidential
Mentor Graphics ModelSim
Cadence VERILOG-XL NC-Verilog NC-VHDL
Using 3rd Party SimulatorsUsing 3rd Party Simulators
Synopsys VCS VSS Scirocco
© 2006 Altera Corporation - Confidential
Specify SimulatorSpecify Simulator
Select EDA Tools Settings Assignments Menu
Select Simulation Tool
© 2006 Altera Corporation - Confidential
Generating 3rd-Party NetlistsGenerating 3rd-Party Netlists Full Compilation Execute Process Indivi
dually Processing Menu Sta
rt Start EDA Netlist Writer
Generates Files without Full Compilation
Scripting
© 2006 Altera Corporation - Confidential
3rd Party Simulation Files3rd Party Simulation Files Functional Simulation
Use 220models & altera_mf Megafunction Model Files
VHDL Timing Simulation Use Quartus II-Generated VHO & SDO Files Use <device_name>_ATOMS.VHD & <device_name>
_ATOMS_COMPONENTS.VHD Files Located in eda\sim_lib Directory
Verilog Timing Simulation Use Quartus II-Generated VO & SDO Files Use <device_name>_ATOMS.VO File
Located in eda\sim_lib Directory
© 2006 Altera Corporation - Confidential
Please go to Exercise 6 in the Exercise Manual
© 2006 Altera Corporation - Confidential
Prepared for Simulation Created VWF File Performed Functional Simulation Viewed Simulation Results
Simulation Exercise SummarySimulation Exercise Summary
© 2006 Altera Corporation - Confidential
Simulation SummarySimulation Summary
Functional & Timing Simulation Creating a Vector Waveform File
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Designing with Quartus II
Programming/Configuration
© 2006 Altera Corporation - Confidential
Programming/ConfigurationProgramming/Configuration
Setting Device Options Assembler Module Programmer & Chain Description File
Programming Directly with Quartus II File Conversion
Creating Multi-Device Programming Files
© 2006 Altera Corporation - Confidential
Device Options Control Configuration &
Initialization of Device
Setting Device OptionsSetting Device Options Assignments Device Device & Pin Options
© 2006 Altera Corporation - Confidential
Device Options Not Dependent on Configuration Scheme Enable Device-Wide
Clear Enable Device-Wide
Output Enable Enable Initialization
Done Output Pin
General TabGeneral Tab
© 2006 Altera Corporation - Confidential
Configuration TabConfiguration Tab Choose Device
Configuration Mode & Available Options Generates Correct
Configuration & Programming Files Every Compilation
Enables Special Features of Configuration Devices Enable Programming File
Compression Set Configuration Clock
Frequency
© 2006 Altera Corporation - Confidential
Programming Files TabProgramming Files Tab Output Files Always
Created POF (Programming Object
File) SOF (SRAM Object File)
Other Selectable Output Files JAM (JEDEC STAPL) JBC (JAM Byte-Code) RBF (Raw Binary File) HEXOUT (Intel Hex
Format)
© 2006 Altera Corporation - Confidential
Other Device & Pin Option TabsOther Device & Pin Option Tabs
Dual-Purpose Pins Selects Usage of Dual-Purpose Pins after
Configuration Is Complete
Unused Pins Indicates State of All Unused I/O Pins after
Configuration Is Complete
Error Detection CRC Enables Internal CRC Circuitry & Frequency
© 2006 Altera Corporation - Confidential
Quartus II Assembler ModuleQuartus II Assembler Module Generates All Configuration/Programming Files
As Selected in Device & Pin Options Dialog Box
Ways to Run Assembler Full Compilation Execute Assembler Individually
Processing Menu Start Start Assembler Generates Files without Full Compilation
Switching Configuration Devices Enabling/Disabling Configuration Device Feature
Scripting
© 2006 Altera Corporation - Confidential
Open ProgrammerOpen ProgrammerOpen ProgrammerOpen Programmer Enables Device Programmi
ng ByteBlaster™ II or ByteBlaste
rMV™ Cables USB-Blaster MasterBlaster™ Cable APU (Altera Programming U
nit)
Opens Chain Description File (.CDF) Stores Device Programming
Chain Information
© 2006 Altera Corporation - Confidential
CDF FileCDF File
When Adding Files, the Device for that File is Automatically Chosen
Lists Devices & Files for Programming or Configuration
Programs/Configures in Top-to-Bottom Order
© 2006 Altera Corporation - Confidential
Example CDF FilesExample CDF FilesSingle Device Chain
Multiple Device Chain
© 2006 Altera Corporation - Confidential
Programmer ToolbarProgrammer Toolbar Start Programming Auto Detect Devices in JTAG Chain Add/Remove/Change Devices in
Chain Add/Remove/Changes Files in
Chain Change Order of Files in Chain Setup Programming Hardware
Note: All Options are available the Edit Menu except Start Programming & Auto Detect which are available in the Processing Menu
© 2006 Altera Corporation - Confidential
Setting up Programming HardwareSetting up Programming HardwareClick on the Hardware Setup Button
Choose the Hardware Settings
© 2006 Altera Corporation - Confidential
Chain Programming ModesChain Programming Modes
JTAG JTAG Chain Consisting of Altera & Non-Altera Devices
Passive Serial Altera FPGAs Only
Active Serial Altera Serial Configuration Devices
In-Socket Programming CPLDs & Configuration Devices in APU
© 2006 Altera Corporation - Confidential
Programming OptionsProgramming Options
To Program, Verify, Blank-Check, Examine, or Erase a Device, Check the Appropriate Boxes
Program/Configure Applies to All Devices
Verify, Blank-Check, Examine & Erase Configuration Devices MAX II, MAX 7000 & MAX 3000
Security Bit & ISP Clamp MAX II, MAX 7000 & MAX 3000
© 2006 Altera Corporation - Confidential
Method 1 : Add Programming File & Leave Program/Configure Box Unchecked
Bypassing Devices in JTAG Chain (1)Bypassing Devices in JTAG Chain (1)
© 2006 Altera Corporation - Confidential
Method 2 : Click on Add Device Button & Select Device to Leave the Programming File Field Blank
Bypassing Devices in JTAG Chain (2)Bypassing Devices in JTAG Chain (2)
© 2006 Altera Corporation - Confidential
Click New & Create User-Defined Devices to Add Non-Altera Devices to Chain
Adding Non-Altera Device to ChainAdding Non-Altera Device to Chain
© 2006 Altera Corporation - Confidential
Starting the ProgrammerStarting the Programmer
Progress Field Shows the Percentage of Completion for the Programmer
Click Program Button Once CDF File & Hardware Setup Are Complete
© 2006 Altera Corporation - Confidential
Converting SOF Programming FilesConverting SOF Programming Files
• Creates Multi-Device .POF for Enhanced Configuration Devices
• Enables Compression & Other Configuration Device Options
© 2006 Altera Corporation - Confidential
Design Entry Techniques Project Creation Compiler Settings & Assignment Editor Timing Analysis Simulation Programming/Configuration
Class SummaryClass Summary
© 2006 Altera Corporation - Confidential
Instructor-Led Training
With Altera's instructor-led training courses, you can: Listen to a lecture from an Altera technical training engineer (instructor)
Complete hands-on exercises with guidance from an Altera instructor
Ask questions & receive real-time answers from an Altera instructor
Each instructor-led class is one day in length (8 working hours).
On-Line Training
With Altera's on-line training courses, you can:
Take a course at any time that is convenient for you
Take a course from the comfort of your home or office (no need to travel as with instructor-led courses)
Each on-line course will take approximately 2-3 hours to complete.
www.altera.com/training
View Training Class Schedule & Register for a Class
Learn More through Technical TrainingLearn More through Technical Training
© 2006 Altera Corporation - Confidential
Altera Technical SupportAltera Technical Support Reference Quartus II On-Line Help Consult Altera Applications (Factory Applications Enginee
rs) MySupport: http://www.altera.com/mysupport Hotline: (800) 800-EPLD (7:00 a.m. - 5:00 p.m. PST)
Field Applications Engineers: Contact Your Local Altera Sales Office
Receive Literature by Mail: (888) 3-ALTERA FTP: ftp.altera.com World-Wide Web: http://www.altera.com
Use Solutions to Search for Answers to Technical Problems View Design Examples
© 2005 Altera Corporation© 2006 Altera Corporation - Confidential
Thank you!