Quartus II Handbook Volume 2: Design Implementation and Optimization
Quartus II Handbook Volume 2: Design Implementation and Optimization
Quartus II Handbook Volume 2: Design Implementation and Optimization
Optimization
Constraints, sometimes known as assignments or logic options, control the way the Quartus II software
implements a design for an FPGA. Constraints are also central in the way that the TimeQuest Timing
Analyzer and the PowerPlay Power Analyzer inform synthesis, placement, and routing.
There are several types of constraints:
• Global design constraints and software settings, such as device family selection, package type, and pin
count.
• Entity-level constraints, such as logic options and placement assignments.
• Instance-level constraints.
• Pin assignments and I/O constraints.
User-created constraints are contained in one of two files: the Quartus II Settings File (.qsf) or, in the
case of timing constraints, the Synopsys Design Constraints file (.sdc). Constraints and assignments
made with the Device dialog box, Settings dialog box, Assignment Editor, Chip Planner, and Pin
Planner are contained in the Quartus II Settings File. The .qsf file contains project-wide and instance-
level assignments for the current revision of the project in Tcl syntax. You can create separate revisions
of your project with different settings, and there is a separate .qsf file for each revision.
The TimeQuest Timing Analyzer uses industry-standard Synopsys Design Constraints, also using Tcl
syntax, that are contained in Synopsys Design Constraints (.sdc) files. The TimeQuest Timing Analyzer
GUI is a tool for making timing constraints and viewing the results of subsequent analysis.
There are several ways to constrain a design, each potentially more appropriate than the others,
depending on your tool chain and design flow. You can constrain designs for compilation and analysis
in the Quartus II software using the GUI, as well as using Tcl syntax and scripting. By combining the
Tcl syntax of the .qsf files and the .sdc files with procedural Tcl, you can automate iteration over several
different settings, changing constraints and recompiling.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
1-2 Global Constraints 2014.06.30
The TimeQuest Timing Analyzer GUI allows you to make timing constraints in SDC format and view the
effects of those constraints on the timing in your design. Before running the TimeQuest timing analyzer,
you must specify initial timing constraints that describe the clock characteristics, timing exceptions, and
external signal arrival and required times. The Quartus II Fitter optimizes the placement of logic in the
device to meet your specified constraints.
Related Information
About TimeQuest Timing Analysis
For more information about timing constraints and the TimeQuest Timing Analyzer
Global Constraints
Global constraints affect the entire Quartus II project and all of the applicable logic in the design. Many of
these constraints are simply project settings, such as the targeted device selected for the design.
Synthesis optimizations and global timing and power analysis settings can also be applied with globally.
Global constraints are often made when running the New Project Wizard, or in the Device dialog box or
the Settings dialog box, early project development.
Send Feedback
QII5V2
2014.06.30 Node, Entity, and Instance-Level Constraints 1-3
When you create or update a constraint in the GUI, the Quartus II software displays the equivalent Tcl
command in the System tab of the Messages window. You can use the displayed messages as references
when making assignments using Tcl commands.
Related Information
• Setting Up and Running a Compilation
For more information about specifying initial global constraints and software settings
• Managing Quartus II Projects
For more information about how the Quartus II software uses Quartus II Settings Files
Related Information
• Assigning Device I/O Pins in Pin Planner
• About the Chip Planner
• About the Assignment Editor
Send Feedback
QII5V2
1-4 Probing Between Components of the Quartus II GUI 2014.06.30
information, and demote assignments by dragging and dropping assignments to various regions in the
Regions window.
Related Information
• Assigning Device I/O Pins in Pin Planner
• About the Chip Planner
• About the Assignment Editor
Related Information
About TimeQuest Timing Analysis
For more information about timing constraints and the TimeQuest Timing Analyzer
Send Feedback
QII5V2
2014.06.30 Quartus II Settings Files and Tcl 1-5
known goals and benchmarks for the design. Such a script can further automate the iterative process by
modifying design constraints and recompiling the design.
Related Information
About Quartus II Tcl Scripting
Send Feedback
QII5V2
1-6 Quartus II Settings Files and Tcl 2014.06.30
The example shows the way that the set_global_assignment Quartus II Tcl command makes all global
constraints and software settings, with set_location_assignment constraining each I/O node in the
design to a physical pin on the device.
However, after you initially create the Quartus II Settings File for your design, you can export the contents
to a procedural, executable Tcl (.tcl) file. You can then use that generated script to restore certain settings
after experimenting with other constraints. You can also use the generated Tcl script to archive your
assignments instead of archiving the Quartus II Settings file itself.
To export your constraints as an executable Tcl script, on the Project menu, click Generate Tcl File for
Project.
Send Feedback
QII5V2
2014.06.30 Timing Analysis with Synopsys Design Constraints and Tcl 1-7
After setting initial values for variables to control constraint creation and whether or not the project needs
to be closed at the end of the script, the generated script checks to see if a project is open. If a project is
open but it is not the correct project, in this case, chiptrip, the script prints Project chiptrip is not
open to the console and does nothing else.
If no project is open, the script determines if chiptrip exists in the current directory. If the project exists,
the script opens the project. If the project does not exist, the script creates a new project and opens the
project.
The script then creates the constraints. After creating the constraints, the script writes the constraints to
the Quartus II Settings File and then closes the project.
# ------------------------------------------
set_time_unit ns
set_decimal_places 3
# ------------------------------------------
#
create_clock -period 10.0 -waveform { 0 5.0 } clk2 -name clk2
create_clock -period 4.0 -waveform { 0 2.0 } clk1 -name clk1
# clk1 -> dir* : INPUT_MAX_DELAY = 1 ns
set_input_delay -max 1ns -clock clk1 [get_ports dir*]
# clk2 -> time* : OUTPUT_MAX_DELAY = -2 ns
set_output_delay -max -2ns -clock clk2 [get_ports time*]
Send Feedback
QII5V2
1-8 A Fully Iterative Scripted Flow 2014.06.30
Similar to the constraints in the Quartus II Settings File, you can make the SDC constraints part of an
executable timing analysis script.
project_open chiptrip
create_timing_netlist
#
# Create Constraints
#
create_clock -period 10.0 -waveform { 0 5.0 } clk2 -name clk2
create_clock -period 4.0 -waveform { 0 2.0 } clk1 -name clk1
# clk1 -> dir* : INPUT_MAX_DELAY = 1 ns
set_input_delay -max 1ns -clock clk1 [get_ports dir*]
# clk2 -> time* : OUTPUT_MAX_DELAY = -2 ns
set_output_delay -max -2ns -clock clk2 [get_ports time*]
#
# Perform timing analysis for several different sets of operating conditions
#
foreach_in_collection oc [get_available_operating_conditions] {
set_operating_conditions $oc
update_timing_netlist
report_timing -setup -npaths 1
report_timing -hold -npaths 1
report_timing -recovery -npaths 1
report_timing -removal -npaths 1
report_min_pulse_width -nworst 1
}
delete_timing_netlist
project_close
The script opens the project, creates a timing netlist, then constrains the two clocks in the design and
applies input and output delay constraints. The clock settings and delay constraints are identical to those
in the .sdc file shown in the first example. The next section of the script updates the timing netlist for the
constraints and performs multi-corner timing analysis on the design.
Related Information
• API Functions for Tcl
• About Quartus II Tcl Scripting
Send Feedback
QII5V2
2014.06.30 Document Revision History 1-9
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Send Feedback
2014.12.15
Managing Device I/O Pins
2
QII5V2 Subscribe Send Feedback
This document describes efficient planning and assignment of the I/O pins in your target device. You
should consider I/O standards, pin placement rules, and your PCB characteristics early in the design
phase.
Figure 2-1: Pin Planner GUI
Device
Package
View
All Pins
List
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
2-2 I/O Planning Overview 2014.12.15
View tailored pin planning advice Tools > Advisors > Pin Advisor
Validate pin assignments against design rules Processing > Start I/O Assignment Analysis
For more information about special pin assignment features for the Arria 10 SoC devices, refer to
Instantiating the HPS Component in the Arria 10 Hard Processor System Technical Reference Manual.
Related Information
• Instantiating the HPS Component
Send Feedback
QII5V2
2014.12.15 Integrating PCB Design Tools 2-3
a. Click Import IP Core to import any defined IP core, and then assign signals to the interface IP
nodes.
b. Click Set Up Top-Level File and assign user nodes to device pins. User nodes become virtual pins
in the top-level file and are not assigned to device pins.
c. Click Generate Top-Level File. Use this file to validate I/O assignments.
4. Click Run I/O Assignment Analysis in the Tasks pane to validate any early assignments and generate
a synthesized design netlist.
5. Assign I/O properties to match your device and PCB characteristics, including assigning logic, I/O
standards, output loading, slew rate, and current strength.
6. Click Run I/O Assignment Analysis in the Tasks pane to validate assignments and generate a
synthesized design netlist. Correct any problems reported.
7. Click Processing > Start Compilation. During compilation, the Quartus II® software runs I/O
assignment analysis and advanced I/O timing analysis.
Define and validate I/O assignments in the Pin Planner, Mentor Graphics® I/O DesignerCadence
and then export the assignments to the PCB tool for Allegro
validation
Define I/O assignments in your PCB tool, and then import Mentor Graphics® I/O DesignerCadence
the assignments into the Pin Planner for validation Allegro
Send Feedback
QII5V2
2-4 Integrating PCB Design Tools 2014.12.15
Altera
PCB Tool Quartus II Software
Analysis & Synthesis
No Validate?
Yes
For more information about incorporating PCB design tools, refer to the Cadence PCB Design Tools
Support and Mentor Graphics PCB Design Tools Support chapters in volume 2 of the Quartus II Handbook.
Related Information
• Mentor Graphics PCB Design Tools Support on page 7-1
Send Feedback
QII5V2
2014.12.15 Altera Device Terms 2-5
Send Feedback
QII5V2
2-6 Assigning to Exclusive Pin Groups 2014.12.15
Send Feedback
QII5V2
2014.12.15 Assigning Differential Pins 2-7
Note: If you have a single-ended clock that feeds a PLL, assign the pin only to the positive clock pin of a
differential pair in the target device. Single-ended pins that feed a PLL and are assigned to the
negative clock pin device cause the design to not fit.
Figure 2-3: Creating a Differential Pin Pair in the Pin Planner
If your design contains a large bus that exceeds the pins available in a particular I/O bank, you can use
edge location assignments to place the bus. Edge location assignments improve the circuit board routing
ability of large buses, because they are close together near an edge. The following shows Altera device
package edges.
Figure 2-4: Die View and Package View of the Four Edges on an Altera Device
Send Feedback
QII5V2
2-8 Overriding I/O Placement Rules on Differential Pins 2014.12.15
quartus_sh -t <my_tcl_script>.tcl
Related Information
Tcl Scripting on page 5-1
API Functions
Send Feedback
QII5V2
2014.12.15 Using Synthesis Attributes 2-9
VHDL Example
entity my_entity is
port(
my_pin1: in std_logic
);
end my_entity;
Use the altera_attribute synthesis attribute to create other pin-related assignments in your
HDL code. The altera_attribute attribute is understood only by Quartus II integrated
synthesis and supports all types of instance assignments. The following examples use the
altera_attribute attribute to embed Fast Input Register logic option assignments and I/O
standard assignments in both a Verilog HDL and a VHDL design file.
entity my_entity is
port(
my_pin1: in std_logic
);
end my_entity;
Send Feedback
QII5V2
2-10 Using Low‑Level I/O Primitives 2014.12.15
Related Information
Designing with Low Level Primitives User Guide
Scenario • From your PCB design tool or • From Quartus II project for optimiza‐
spreadsheet into Pin Planner during tion in a PCB design tool
early pin planning or after optimiza‐ • From Quartus II project for spreadsheet
tion in PCB tool analysis or use in scripting assignments
• From another Quartus II project with • From Quartus II project for import into
common constraints another Quartus II project with similar
constraints
File formats .qsf, .esf, .acf, .csv, .txt, .sdc .pin, .fx, .csv, .tcl, .qsf
Send Feedback
QII5V2
2014.12.15 Importing and Exporting for PCB Tools 2-11
Pin Name/Usage The name of the design pin, or whether the pin is GND or VCC pin
I/O Standard The name of the I/O standard to which the pin is configured
User Assignment Y or N indicating if the location assignment for the design pin was
user assigned (Y) or assigned by the Fitter (N)
Related Information
Pin-Out Files for Altera Devices
Mentor Graphics PCB Tools Support on page 7-1
Send Feedback
QII5V2
2-12 Migrating Assignments to Another Target Device 2014.12.15
Figure 2-5: Device Migration Compatibility (AC24 does not exist in migration device)
The migration result for the pin function of highlighted PIN_AC23 is not an NC but a voltage reference
VREFB1N2 even though the pin is an NC in the migration device. VREF standards have a higher priority
than an NC, thus the migration result display the voltage reference. Even if you do not use that pin for a
port connection in your design, you must use the VREF standard for I/O standards that require it on the
actual board for the migration device.
If one of the migration devices has pins intended for connection to VCC or GND and these same pins are
I/O pins on a different device in the migration path, the Quartus II software ensures these pins are not
used for I/O. Ensure that these pins are connected to the correct PCB plane.
When migrating between two devices in the same package, pins that are not connected to the smaller die
may be intended to connect to VCC or GND on the larger die. To facilitate migration, you can connect
these pins to VCC or GND in your original design because the pins are not physically connected to the
smaller die.
Related Information
AN90: SameFrame PinOut Design for FineLine BGA Packages
Send Feedback
QII5V2
2014.12.15 Validating Pin Assignments 2-13
Live I/O Verifies preliminary, basic I/O legality as you Processing > Enable Live I/O Check
Check enter assignments
I/O Verifies I/O assignment legality of synthesized Processing > Start I/O Assignment
Assignment design against full set of I/O rules for the target Analysis
Analysis device
Advanced I/ Fully validates I/O assignments against all I/O Processing > Start Compilation
O Timing and timing checks during compilation
I/O bank capacity Checks the number of pins assigned to an I/O bank No
against the number of pins allowed in the I/O bank.
I/O bank VCCIO voltage compati‐ Checks that no more than one VCCIO is required for No
bility the pins assigned to the I/O bank.
I/O bank VREF voltage compati‐ Checks that no more than one VREF is required for No
bility the pins assigned to the I/O bank.
I/O standard and location Checks whether the pin location supports the assigned No
conflicts I/O standard.
I/O standard and signal direction Checks whether the pin location supports the assigned No
conflicts I/O standard and direction. For example, certain I/O
standards on a particular pin location can only
support output pins.
Differential I/O standards cannot Checks that open drain is turned off for all pins with a No
have open drain turned on differential I/O standard.
Send Feedback
QII5V2
2-14 I/O Assignment Validation Rules 2014.12.15
I/O standard and drive strength Checks whether the drive strength assignments are No
conflicts within the specifications of the I/O standard.
Drive strength and location Checks whether the pin location supports the assigned No
conflicts drive strength.
BUSHOLD and location conflicts Checks whether the pin location supports BUSHOLD. No
For example, dedicated clock pins do not support
BUSHOLD.
WEAK_PULLUP and location Checks whether the pin location supports WEAK_ No
conflicts PULLUP (for example, dedicated clock pins do not
support WEAK_PULLUP).
PCI_IO clamp diode, location, and Checks whether the pin location along with the I/O No
I/O standard conflicts standard assigned supports PCI_IO clamp diode.
SERDES and I/O pin location Checks that all pins connected to a SERDES in your Yes
compatibility check design are assigned to dedicated SERDES pin
locations.
PLL and I/O pin location compati‐ Checks whether pins connected to a PLL are assigned Yes
bility check to the dedicated PLL pin locations.
I/O bank can not have single- Checks that no single-ended I/O pin exists in the same No
ended I/O when DPA exists I/O bank as a DPA.
A PLL I/O bank does not support Checks that there are no single-ended I/O pins present No
both a single-ended I/O and a in the PLL I/O Bank when a differential signal exists.
differential signal simultaneously
Single-ended output is required to Checks whether single-ended output pins are a certain No
be a certain distance away from a distance away from a differential I/O pin.
differential I/O pin
Send Feedback
QII5V2
2014.12.15 Checking I/O Pin Assignments In Real-Time 2-15
Single-ended output has to be a Checks whether single-ended output pins are a certain No
certain distance away from a distance away from a VREF pad.
VREF pad
Single-ended input is required to Checks whether single-ended input pins are a certain No
be a certain distance away from a distance away from a differential I/O pin.
differential I/O pin
Too many outputs or bidirectional Checks that there are no more than a certain number No
pins in a VREFGROUP when a of outputs or bidirectional pins in a VREFGROUP
VREF is used when a VREF is used.
Related Information
Assigning Device I/O Pins in Pin Planner
Send Feedback
QII5V2
2-16 Running Early I/O Assignment Analysis (without Design Files) 2014.12.15
a PLL, LVDS, or gigabit transceiver blocks. In addition, the checker validates the legality of proper VREF
pin use, pin locations, and acceptable mixed I/O standards
Run I/O assignment analysis during early pin planning to validate initial reserved pin assignments before
compilation. Once you define design files, run I/O assignment analysis to perform more thorough legality
checks with respect to the synthesized netlist. Run I/O assignment analysis whenever you modify I/O
assignments.
The Fitter assigns pins to accommodate your constraints. For example, if you assign an edge location to a
group of LVDS pins, the Fitter assigns pin locations for each LVDS pin in the specified edge location and
then performs legality checks. To display the Fitter-placed pins, click Show Fitter Placements in the Pin
Planner. To accept these suggested pin locations, you must back-annotate your pin assignments.
View the I/O Assignment Warnings report to view and resolve all assignment warnings. For example, a
warning that some design pins have undefined drive strength or slew rate. The Fitter recognizes
undefined, single-ended output and bidirectional pins as non-calibrated OCT. To resolve the warning,
assign the Current Strength, Slew Rate or Slow Slew Rate for the reported pin. Alternatively, you could
assign the Termination to the pin. You cannot assign drive strength or slew rate settings when a pin has
an OCT assignment.
Related Information
Back-Annotating Assignments for A Project
Assignments No
Correct?
Yes
Send Feedback
QII5V2
2014.12.15 Running I/O Assignment Analysis (with Design Files) 2-17
You must reserve all pins you intend to use as I/O pins, so that the Fitter can determine each pin type.
After performing I/O assignment analysis, correct any errors reported by the Fitter and rerun I/O
assignment analysis until all errors are corrected. A complete I/O assignment analysis requires all design
files.
Assignments No
Correct?
Yes
Even if I/O assignment analysis passes on incomplete design files, you may still encounter errors during
full compilation. For example, you can assign a clock to a user I/O pin instead of assigning it to a
dedicated clock pin, or design the clock to drive a PLL that you have not yet instantiated in the design.
Send Feedback
QII5V2
2-18 Overriding Default I/O Pin Analysis 2014.12.15
This occurs because I/O assignment analysis does not account for the logic that the pin drives, and does
not verify that only dedicated clock inputs can drive the a PLL clock port.
To obtain better coverage, analyze as much of the design as possible over time, especially logic that
connects to pins. For example, if your design includes PLLs or LVDS blocks, define these files prior to full
analysis. After performing I/O assignment analysis, correct any errors reported by the Fitter and rerun
I/O assignment analysis until all errors are corrected.
The following figure shows the compilation time benefit of performing I/O assignment analysis before
running a full compilation.
Figure 2-8: I/O Assignment Analysis Reduces Compilation Time
Without
Start I/O Assignment Analysis First Full Compilation Second Full Compilation
Command
With
Start I/O Assignment Analysis First Full Compilation
Command
I/O Errors
Assignment Reported
Analysis and Fixed
Compilation T ime
Send Feedback
QII5V2
2014.12.15 Understanding I/O Analysis Reports 2-19
This assignment is especially important for external memory interfaces. For example, consider a DDR2
interface in a Stratix II device. The device allows 30 pins in a VREF group. Each byte lane for a ×8 DDR2
interface includes one DQS pin and eight DQ pins, for a total of nine pins per byte lane. The DDR2
interface uses the SSTL 18 Class I VREF I/O standard. In typical interfaces, each byte lane has its own
output enable. In this example, the DDR2 interface has four byte lanes. Using 30 I/O pins in a VREF
group, there are three byte lanes and an extra byte lane that supports the three remaining pins. Without
the Output Enable Group assignment, the Fitter analyzes each byte lane as an independent group driven
by a unique output enable. In this worst-case scenario the three pins are inputs, and the other 27 pins are
outputs violating the 20 output pin limit.
Because DDR2 DQS and DQ pins are always driven in the same direction, the analysis reports an error
that is not applicable to your design. The Output Enable Group assignment designates the DQS and DQ
pins as a single group driven by a common output enable for I/O assignment analysis. When you use the
Output Enable Group logic option assignment, the DQS and DQ pins are checked as all input pins or all
output pins and are not in violation of the I/O rules.
You can also use the Output Enable Group assignment to designate pins that are driven only at certain
times. For example, the data mask signal in DDR2 interfaces is an output signal, but it is driven only when
the DDR2 is writing (bidirectional signals are outputs). To avoid I/O assignment analysis errors, use the
Output Enable Group logic option assignment to assign the data mask to the same value as the DQ and
DQS signals.
You can also use the Output Enable Group to designate VREF input pins that are inactive during the
time the outputs are driving. This assignment removes the VREF input pins from the VREF analysis. For
example, the QVLD signal for an RLDRAM II interface is active only during a read. During a write, the
QVLD pin is not active and does not count as an active VREF input pin in the VREF group. Place the
QVLD pins in the same output enable group as the RLDRAM II data pins.
Related Information
The TimeQuest Timing Analyzer
Send Feedback
QII5V2
2-20 Verifying I/O Timing 2014.12.15
Advanced I/O Analyze I/O timing with your board trace model to report accurate, “board-aware”
timing analysis simulation models. Configures a complete board trace model for each I/O standard
or pin. TimeQuest applies simulation results of the I/O buffer, package, and board
trace model to generate accurate I/O delays and system level signal information.
Use this information to improve timing and signal integrity.
I/O timing analysis Analyze I/O timing with default or specified capacitive load without signal
integrity analysis. TimeQuest reports tCO to an I/O pin using a default or user-
specified value for a capacitive load.
Send Feedback
QII5V2
2014.12.15 Running Advanced I/O Timing 2-21
Full board routing Use Altera-provided or Quartus II software-generated IBIS or HSPICE I/O models
simulation for simulation in Mentor Graphics HyperLynx and Synopsys HSPICE.
Note: Advanced I/O timing analysis is supported only for .28nm and larger device families. For devices
that support advanced I/O timing, it is the default method of I/O timing analysis. For all other
devices, you must use a default or user-specified capacitive load assignment to determine tCO and
power measurements.
For more information about advanced I/O timing support, refer to the appropriate device handbook for
your target device. For more information about board-level signal integrity and tips on how to improve
signal integrity in your high-speed designs, refer to the Altera Signal Integrity Center page of the Altera
website.
For information about creating IBIS and HSPICE models with the Quartus II software and integrating
those models into HyperLynx and HSPICE simulations, refer to theSignal Integrity Analysis with Third
Party Tools chapter in volume 2 of the Quartus II Handbook.
Related Information
• Literature and Technical Documentation
• Altera Signal Integrity Center
• Signal Integrity Analysis with Third-Party Tools on page 6-1
Send Feedback
QII5V2
2-22 Understanding the Board Trace Models 2014.12.15
The following figure shows the template for the LVDS I/O standard. The far-end capacitance (Cf)
represents the external-device or multiple-device capacitive load. If you have multiple devices on the
far-end, you must find the equivalent capacitance at the far-end, taking into account all receiver
capacitances. The far-end capacitance can be the sum of all the receiver capacitances.
The Quartus II software models lossless transmission lines, and does not require a transmission-line
resistance value. Only distributed inductance (L) and capacitance (C) values are needed. The distributed L
and C values of transmission lines must be entered on a per-inch basis, and can be obtained from the PCB
vendor or manufacturer, the CAD Design tool, or a signal integrity tool, such as the Mentor Graphics
Hyperlynx software.
Send Feedback
QII5V2
2014.12.15 Defining the Board Trace Model 2-23
## setting the near end series resistance model of sel_p output pin to 25
ohms
Send Feedback
QII5V2
2-24 Modifying the Board Trace Model 2014.12.15
Related Information
• Using Advanced I/O Timing
• Board Trace Models
Board Trace Model Summarizes the board trace model component settings for each output and
Assignments report bidirectional signal.
Signal Integrity Metrics Contains all the signal integrity metrics calculated during advanced I/O
report timing analysis based on the board trace model settings for each output or
bidirectional pin. Includes measurements at both the FPGA pin and at the
far-end load of board delay, steady state voltages, and rise and fall times.
Note: By default, the TimeQuest analyzer generates the Slow-Corner Signal Integrity Metrics report. To
generate a Fast-Corner Signal Integrity Metrics report you must change the delay model by clicking
Tools > TimeQuest Timing Analyzer.
Send Feedback
QII5V2
2014.12.15 Adjusting I/O Timing and Power with Capacitive Loading 2-25
Related Information
The TimeQuest Timing Analyzer
Related Information
Simultaneous Switching Noise (SSN) Analysis and Optimization
Scripting API
You can alternatively use Tcl commands to access I/O management functions, rather than using the GUI.
For detailed information about specific scripting command options and Tcl API packages, type the
following command at a system command prompt to view the Tcl API Help browser:
quartus_sh --qhelp
Related Information
• Tcl Scripting on page 5-1
• Command Line Scripting on page 4-1
Send Feedback
QII5V2
2-26 Run I/O Assignment Analysis 2014.12.15
execute_flow -check_ios
Reserve Pins
Use the following Tcl command to reserve a pin:
set_instance_assignment -name RESERVE_PIN <value> -to <signal name>
Note: You must include the quotation marks when specifying the reserved pin value.
Set Location
Use the following Tcl command to assign a signal to a pin or device location:
Valid locations are pin locations, I/O bank locations, or edge locations. Pin locations include pin names,
such as PIN_A3. I/O bank locations include IOBANK_1 up to IOBANK_ n, where n is the number of I/O
banks in the device.
Use one of the following valid edge location values:
• EDGE_BOTTOM
• EDGE_LEFT
• EDGE_TOP
• EDGE_RIGHT
Send Feedback
QII5V2
2014.12.15 Exclusive I/O Group 2-27
Related Information
Altera Device Package Information Data Sheet
2014.12.15 14.1.0 • Updated Live I/O check device support to include only limited device
families.
2014.08.30 14.0a10.0 • Added link to information about special pin assignment features for
Arria 10 SoC devices.
May 2013 13.0.0 • Added information about overriding I/O placement rules.
November 2012 12.1.0 • Updated Pin Planner description for new task and report windows.
Send Feedback
QII5V2
2-28 Document Revision History 2014.12.15
November 2009 9.1.0 • Reorganized entire chapter to include links to Help for procedural
information previously included in the chapter
• Added documentation on near-end and far-end advanced I/O timing
Related Information
Quartus II Handbook Archive
Send Feedback
2014.12.15
Simultaneous Switching Noise (SSN) Analysis
and Optimizations 3
QII5V2 Subscribe Send Feedback
software. This chapter describes the Quartus II SSN Analyzer tool and covers the following topics:
Definitions
The terminology used in this chapter includes the following terms:
• Aggressor: An output or bidirectional signal that contributes to the noise for a victim I/O pin
• PDN: Power distribution network
• QH: Quiet high signal level on a pin
• QHN: Quiet high noise on a pin, measured in volts
• QL: Quiet low signal level on a pin
• QLN: Quiet low noise on a pin, measured in volts
• SI: Signal integrity (a superset of SSN, covering all noise sources)
• SSN: Simultaneous switching noise
• SSO: Simultaneous switching output (which are either the output or bidirectional pins)
• Victim: An input, output, or bidirectional pin that is analyzed during SSN analysis. During SSN
analysis, each pin is analyzed as a victim. If a pin is an output or bidirectional pin, the same pin acts as
an aggressor signal for other pins.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
3-2 Understanding SSN 2014.12.15
Understanding SSN
SSN is defined as a noise voltage induced onto a single victim I/O pin on a device due to the switching
behavior of other aggressor I/O pins on the device. SSN can be divided into two types of noise: voltage
noise and timing noise.
In a sample system with three pins, two of the pins (A and C) are switching, while one pin (B) is quiet. If
the pins are driven in isolation, the voltage waveforms at the output of the buffers appear without noise
interference, as shown by the solid curves at the left of the figure. However, when pins A and C are
switching simultaneously, the noise generated by the switching is injected onto other pins. This noise
manifests itself as a voltage noise on pin B and timing noise on pins A and C.
Figure 3-1: System with Three Pins
In this figure, the dotted curves show the voltage noise on pin B and timing noise on pins A and C.
Voltage noise is measured as the change in voltage of a signal due to SSN. When a signal is QH, it is
measured as the change in voltage toward 0 V. When a signal is QL, it is measured as the change in
voltage toward VCC.
In the Quartus® II software, only voltage noise is analyzed. Voltage noise can be caused by SSOs under
two worst-case conditions:
• The victim pin is high and the aggressor pins (SSOs) are switching from low to high
• The victim pin is low and the aggressor pins (SSOs) are switching from high to low
Send Feedback
QII5V2
2014.12.15 Understanding SSN 3-3
Victim pin B
1
A
0
1
B
0
1
C
0
SSN can occur in any system, but the induced noise does not always result in failures. Voltage functional
errors are caused by SSN on quiet victim pins only when the voltage values on the quiet pins change by a
large voltage that the logic listening to that signal reads a change in the logic value. For QH signals, a
voltage functional error occurs when noise events cause the voltage to fall below VIH. Similarly, for QL
signals, a voltage functional error occurs when noise events cause the voltage to rise above VIL. Because
VIH and VIL of the Altera device are different for different I/O standards, and because signals have
different quiet voltage values, the absolute amount of SSN, measured in volts, cannot be used to determine
if a voltage failure occurs. Instead, to assess the level of impact by SSN in the SSN analysis, the Quartus II
sofware quantifies the SSN in terms of the percentage of signal margin in Altera devices.
Send Feedback
QII5V2
3-4 SSN Estimation Tools 2014.12.15
The figure shows four noise events, two on QH signals and two on QL signals. The two noise events on
the right-side of the figure consume 50 percent of the signal margin and do not cause voltage functional
errors. However, the two noise events on the left side of the figure consume 100 percent of the signal
margin, which can cause a voltage functional error.
Noise caused by aggressor signals are synchronously related to the victim pin outside of the sampling
window of a receiver. This noise affects the switching time of a victim pin, but are not considered an input
threshold violation failure.
Figure 3-5: Synchronous Voltage Noise with No Functional Error
Related Information
SSN Analysis Overview on page 3-5
Send Feedback
QII5V2
2014.12.15 SSN Analysis Overview 3-5
Altera provides many tools for SSN analysis and estimation, including the following tools:
• SSN characterization reports
• An early SSN estimation (ESE) tool
• The SSN Analyzer in the Quartus II software
The ESE tool is useful for preliminary SSN analysis of your FPGA design; for more accurate results,
however, you must use the SSN Analyzer in the Quartus II software.
Related Information
• Signal Integrity Center
For more information on the Altera website about the SSN characterization reports and the ESE tool,
including device support information.
• About the SSN Analyzer
For more information about the devices for which you can run the SSN Analyzer, refer to Quartus II
Help.
Send Feedback
QII5V2
3-6 Performing Early Pin-Out SSN Analysis 2014.12.15
example, a pass criterion you might define is a condition that verifies you have sufficient SSN margins in
your design. You may require that the acceptable voltage noise on a pin must be below 70% of the voltage
level for that pin. The pass criteria for the early-pin out flow may be higher than the final pin-out flow
criteria, so that you do not spend too much time optimizing the on-FPGA portions of your design when
the SSN metrics for the design may improve after the design is fully specified.
Figure 3-6: Early Flow and Final Pin-Out SSN Analysis
Start
Yes
No Yes
Manual optimization
Design PCB & Extract
Yes board parameters
Can we further No
constrain PCB?
Run Quartus II & Yes
No
Noise < final pass? Done
SSN Analyzer
Design is unlikely to
pass final SSN Analysis
Note :
1. Pass criteria determined by customer requirements.
Send Feedback
QII5V2
2014.12.15 Performing Early Pin-Out SSN Analysis with the SSN Analyzer 3-7
Related Information
• Optimizing Your Design for SSN Analysis on page 3-8
• Managing Quartus II Projects
For more information about creating and managing projects.
• I/O Management on page 2-1
For more about generating a top-level design file in the Quartus II software and I/O assignment
analysis.
Send Feedback
QII5V2
3-8 Design Factors Affecting SSN Results 2014.12.15
settings and I/O placement. Changing the drive strength and slew rate of output and bidirectional pins, as
well as adjusting the placement of different SSOs, can affect SSN results. Adjusting I/O settings and
placement allows the design to meet the pass criteria for final pin-out SSN analysis after you specify the
actual PCB board parameters.
Related Information
Optimizing Your Design for SSN Analysis on page 3-8
Related Information
Signal Integrity Center
For more information on the Altera website about the factors that contribute to SSN voltage noise in your
FPGA design and managing SSN in your system.
Send Feedback
QII5V2
2014.12.15 Optimizing Pin Placements for Signal Integrity 3-9
Send Feedback
QII5V2
3-10 Specifying Board Trace Model Settings 2014.12.15
Related Information
• Setting Up and Running the Fitter
For more information about creating project-wide logic option assignments, refer to Quartus II Help.
• Show Commands
For more information about the Show Fitter Placements feature, refer to Quartus II Help.
• Back-Annotating Assignments for A Project
For more information about back-annotating assignments, refer to Quartus II Help.
• Area, Timing, and Compilation Time Optimization
For more information about design optimization features, refer to the Quartus II Handbook.
The best way to calculate transmission line parameters is to use a two-dimensional solver to estimate the
inductance per inch and capacitance per inch for the transmission line. The termination resistor topology
information can be obtained from the PCB schematics. The near-end and far-end pin load (capacitance)
values can be obtained from the PCB schematic and other device data sheets. For example, if you know
that an FPGA pin is driving a DIMM, you can obtain the far-end loading information in the data sheet for
your target device.
Related Information
• Understanding the SSN Reports on page 3-15
For more information about the default parameters used by the SSN Analyzer and SSN confidence
levels reported in the Confidence Metric Details Report.
Send Feedback
QII5V2
2014.12.15 Defining PCB Layers and PCB Layer Thickness 3-11
The cross-section shows the stackup information of a PCB, which tells you the number of layers used in
your PCB. The PCB shown in this example consists of various signal and circuit layers on which FPGA
pins are routed, as well as the power and ground layers.
Send Feedback
QII5V2
3-12 Defining PCB Layers and PCB Layer Thickness 2014.12.15
Figure 3-9: Snapshot of Stackup of a PCB Shown in the Allegro Board Design Environment
In this example, each of the four signal layers are a different thickness, with the depths shown in the
Thickness (MIL) column. The layer thickness for each signal layer is computed as follows:
• Signal Layer 1 is the L4-SIGNAL, at thickness (1.9+3.6+1.2+3+1.2+4=) 14.9 mils
• Signal Layer 2 is the L5-SIGNAL, at thickness (0.6+6=) 6.6 mils
• Signal Layer 3 is the L8-SIGNAL, at thickness (0.6+4+1.2+3+1.2+4=) 14 mils
• Signal Layer 4 is the L9-SIGNAL, at thickness (0.6+6=) 6.6 mils
Figure 3-10: PCB Layers and Thickness Assignments Specified in the Quartus II Software
Send Feedback
QII5V2
2014.12.15 Specifying Signal Breakout Layers 3-13
Related Information
Running the SSN Analyzer
For more information about specifying PCB layer information, refer to Quartus II Help.
Send Feedback
QII5V2
3-14 Excluding Pins as Aggressor Signals 2014.12.15
assignments for specific types of pins. Use the following group assignments to decrease the pessimism in
SSN analysis results:
• Assign pins to an output enable group—All pins in an output enable group must be either all input
pins or all output pins. If all the pins in a group are always either all inputs or all outputs, it is
impossible for an output pin in the group to cause SSN noise on an input pin in the group. You can
assign pins to an output enable group with the Output Enable Group logic option.
• Assign pins to a synchronous group—I/O pins that are part of a synchronous group (signals that
switch at the same time) may cause SSN, but do not result in any failures because the noise glitch
occurs during the switching period of the signal. The noise, therefore, does not occur in the sampling
window of that signal. You can assign pins to an output enable group with the Synchronous Group
logic option. For example, in your design you have a bus with 32 pins that all belong to the same
group. In a real operation, the bus switches at the same time, so any voltage noise induced by a pin on
its groupmates does not matter, because it does not fall in the sampling window. If you do not assign
the bus to a synchronous group, the other 31 pins can act as aggressors for the first pin in that group,
leading to higher QL and QH noise levels during SSN analysis.
In some cases, the SSN Analyzer can detect the grouping for bidirectional pins by looking at the output
enable signal of the bidirectional pins. However, Altera recommends that you explicitly specify the
bidirectional groups and output groups in your design.
Related Information
Assigning Device I/O Pins
For more information about creating logic option assignments, refer to Quartus II Help.
Send Feedback
QII5V2
2014.12.15 Understanding the SSN Reports 3-15
Related Information
• Running the SSN Analyzer
For more information on performing SSN analysis, refer to Quartus II Help.
• Literature and Technical Documentation
For more information about I/O bank numbering refer to the appropriate device handbook available
on the Altera website.
Summary Report
The Summary report summarizes the SSN Analyzer status and rates the SSN Analyzer confidence level as
low, medium, or high.
The confidence level depends on the completeness of your board trace model assignments. The more
assignments you complete, the higher the confidence level. However, the confidence level does not always
contribute to the accuracy of the QL and QH noise levels on a victim pin. The accuracy of QH and QL
noise levels depends the accuracy of your board trace model assignments.
Send Feedback
QII5V2
3-16 Viewing SSN Analysis Results in the Pin Planner 2014.12.15
Send Feedback
QII5V2
2014.12.15 Scripting Support 3-17
Scripting Support
A Tcl script allows you to run procedures and determine settings. You can also run some of these
procedures at a command prompt.
The Quartus II software provides several packages to compile your design and create I/O assignments for
analysis and fitting. You can create a custom Tcl script that maps the design and runs SSN analysis on
your design.
For detailed information about specific scripting command options and Tcl API packages, type the
following command at a system command prompt to run the Quartus II Command-Line and Tcl API
Help browser:
quartus_sh --qhelp
Related Information
Tcl Scripting on page 5-1
Command-Line Scripting on page 4-1
For more information about Quartus II scripting support, including examples, refer to the Quartus II
Handbook.
API Functions for Tcl
For more information about Quartus II scripting support, including examples, refer to Quartus II Help.
Related Information
Optimizing Pin Placements for Signal Integrity on page 3-9
Send Feedback
QII5V2
3-18 Specifying Signal Breakout Layers 2014.12.15
These Tcl commands specify that there are seven PCB layers in the design, each with a different thickness.
In each assignment, the letter M indicates the unit of measurement is millimeters. When you specify PCB
layer assignments with Tcl commands, you must list the layers in consecutive order. For example, you
would receive an error during SSN Analysis if your Tcl commands created the following assignments:
To create assignments with the unit of measurement in mils, refer to the syntax in the following Tcl
commands.
Related Information
Defining PCB Layers and PCB Layer Thickness on page 3-11
When you create PCB breakout layer assignments with Tcl commands, if you do not specify a PCB layer,
or if you specify a PCB layer that does not exist, the SSN Analyzer breaks out the signal at the bottommost
PCB layer.
Note: If you create a PCB layer breakout assignment to a layer that does not exist, the SSN Analyzer will
generate a warning message.
The following Tcl command assigns the bus PCI_ADD_io to a synchronous group:
Related Information
Decreasing Pessimism in SSN Analysis on page 3-13
Send Feedback
QII5V2
2014.12.15 Document Revision History 3-19
Type the following command at a system command prompt to start the SSN Analyzer:
To analyze just one I/O bank, type the following command at a system command prompt:
For example, to run analyze the I/O bank 2A type the following command:
For more information about the quartus_si package, type quartus_si -h at a system command
prompt.
Related Information
Performing SSN Analysis and Viewing Results on page 3-14
November 9.1.0 • Added “Figure 6–9 shows the layout cross-section of a PCB in the
2009 Cadence Allegro PCB tool. The cross-section shows the stackup
information of a PCB, which tells you the number of layers used in
your PCB. The PCB shown in this example consists of various signal
and circuit layers on which FPGA pins are routed, as well as the power
and ground layers.” on page 6–12
• Updated for the Quartus II software 9.1 release
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook on the Altera website.
Send Feedback
2015.05.04
Command Line Scripting
4
QII5V2 Subscribe Send Feedback
FPGA design software that easily integrates into your design flow saves time and improves productivity.
The Altera Quartus II software provides you with a command-line executable for each step of the FPGA
® ®
Related Information
Using the Quartus II Executables in Shell Scripts
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
4-2 Introductory Example 2015.05.04
Introductory Example
The following introduction to command-line executables demonstrates how to create a project, fit the
design, and generate programming files.
The tutorial design included with the Quartus II software is used to demonstrate this functionality. If
installed, the tutorial design is found in the <Quartus II directory>/qdesigns/fir_filter directory.
Before making changes, copy the tutorial directory and type the four commands shown in the introduc‐
tory example below at a command prompt in the new project directory.
The <Quartus II directory>/quartus/bin directory must be in your PATH environment variable.
and performs logic synthesis and technology mapping on the design files.
The quartus_fit filtref --part=EP3C10F256C8 --pack_register=minimize_area command
performs fitting on the filtref project. This command specifies an EP3C10F256C8 device, and the --
pack_register=minimize_area option causes the Fitter to pack sequential and combinational functions
into single logic cells to reduce device resource usage.
The quartus_asm filtref command creates programming files for the filtref project.
The quartus_sta filtref command performs basic timing analysis on the filtref project using the
Quartus II TimeQuest Timing Analyzer, reporting worst-case setup slack, worst-case hold slack, and
other measurements.
You can put the four commands from the introductory example into a batch file or script file, and run
them. For example, you can create a simple UNIX shell script called compile.sh, which includes the code
shown in the UNIX shell script example below.
#!/bin/sh
PROJECT=filtref
TOP_LEVEL_FILE=filtref.bdf
FAMILY=”Cyclone V”
PART=EP3C10F256C8
PACKING_OPTION=minimize_area
quartus_map $PROJECT --source=$TOP_LEVEL_FILE --family=$FAMILY
quartus_fit $PROJECT --part=$PART --pack_register=$PACKING_OPTION
quartus_asm $PROJECT
quartus_sta $PROJECT
Send Feedback
QII5V2
2015.05.04 Command-Line Scripting Help 4-3
quartus_sh --qhelp
This command starts the Quartus II Command-Line and Tcl API Help browser, a viewer for information
about the Quartus II Command-Line executables and Tcl API.
Use the -h option with any of the Quartus II Command-Line executables to get a description and list of
supported options. Use the --help=<option name> option for detailed information about each option.
Figure 4-1: Quartus II Command-Line and Tcl API Help Browser
Send Feedback
QII5V2
4-4 Option Precedence 2015.05.04
assignment. You can also make assignments using the Quartus II Tcl scripting API. If you want to
completely script the creation of a Quartus II project, choose this method.
Related Information
• Option Precedence on page 4-4
• Tcl Scripting on page 5-1
• QSF Reference Manual
Option Precedence
If you use command-line executables, you must be aware of the precedence of various project assignments
and how to control the precedence. Assignments for a particular project exist in the Quartus II Settings
File (.qsf) for the project. Before the .qsf is updated after assignment changes, the updated assignments are
reflected in compiler database files that hold intermediate compilation results.
All command-line options override any conflicting assignments found in the .qsf or the compiler database
files. There are two command-line options to specify whether the .qsf or compiler database files take
precedence for any assignments not specified as command-line options.
Any assignment not specified as a command-line option or found in the .qsf or compiler database file is
set to its default value.
The file precedence command-line options are --read_settings_files and --write_settings_files.
By default, the --read_settings_files and --write_settings_files options are turned on. Turning
on the --read_settings_files option causes a command-line executable to read assignments from
the .qsf instead of from the compiler database files. Turning on the --write_settings_files option
causes a command-line executable to update the .qsf to reflect any specified options, as happens when you
close a project in the Quartus II GUI.
If you use command-line executables, be aware of the precedence of various project assignments and how
to control the precedence. Assignments for a particular project can exist in three places:
• The .qsf for the project
• The result of the last compilation, in the /db directory, which reflects the assignments that existed
when the project was compiled
• Command-line options
The precedence for reading assignments depends on the value of the --read_settings_files option.
Send Feedback
QII5V2
2015.05.04 Option Precedence 4-5
The table lists the locations to which assignments are written, depending on the value of the --
write_settings_files command-line option.
The example assumes that a project named fir_filter exists, and that the analysis and synthesis step has
been performed (using the quartus_map executable).
The first command, quartus_fit fir_filter --pack_register=off, runs the quartus_fit executable
with no aggressive attempts to reduce device resource usage.
The second command, quartus_sta fir_filter, performs basic timing analysis for the results of the
previous fit.
The third command uses the UNIX mv command to copy the report file output from quartus_sta to a file
with a new name, so that the results are not overwritten by subsequent timing analysis.
The fourth command runs quartus_fit a second time, and directs it to attempt to pack logic into registers
to reduce device resource usage. With the --write_settings_files=off option, the command-line
executable does not update the .qsf to reflect the changed register packing setting. Instead, only the
compiler database files reflect the changed setting. If the --write_settings_files=off option is not
specified, the command-line executable updates the .qsf to reflect the register packing setting.
The fifth command reruns timing analysis, and the sixth command renames the report file, so that it is
not overwritten by subsequent timing anlysis.
Use the options --read_settings_files=off and --write_settings_files=off (where appropriate)
to optimize the way that the Quartus II software reads and updates settings files. In the following example,
Send Feedback
QII5V2
4-6 Compilation with quartus_sh --flow 2015.05.04
the quartus_asm executable does not read or write settings files because doing so would not change any
settings for the project.
Quartus Shell
quartus_sh
Use the quartus_sh executable with the --flow option to perform a complete compilation flow with a
single command. The --flow option supports the smart recompile feature and efficiently sets command-
line arguments for each executable in the flow.
Send Feedback
QII5V2
2015.05.04 Text-Based Report Files 4-7
The following example runs compilation, timing analysis, and programming file generation with a single
command:
Tip: For information about specialized flows, type quartus_sh --help=flow at a command prompt.
Related Information
Tcl Scripting on page 5-1
About Quartus II Tcl Scripting
#!/bin/sh
# Run synthesis first.
# This example assumes you use Synplify software
synplify -batch synthesize.tcl
# If your Quartus II project exists already, you can just
# recompile the design.
# You can also use the script described in a later example to
# create a new project from scratch
quartus_sh --flow compile myproject
Send Feedback
QII5V2
4-8 Common Scripting Examples 2015.05.04
Related Information
Tcl Scripting on page 5-1
About Quartus II Tcl Scripting
Save the script in a file called setup_proj.tcl and type the commands illustrated in the eample at a command
prompt to create the design, apply constraints, compile the design, and perform fast-corner and slow-
corner timing analysis. Timing analysis results are saved in two files, filtref_sta_1.rpt and filtref_sta_2.rpt.
quartus_sh -t setup_proj.tcl
quartus_map filtref
quartus_fit filtref
quartus_asm filtref
quartus_sta filtref --model=fast --export_settings=off
mv filtref_sta.rpt filtref_sta_1.rpt
quartus_sta filtref --export_settings=off
mv filtref_sta.rpt filtref_sta_2.rpt
Send Feedback
QII5V2
2015.05.04 Check Design File Syntax 4-9
Type the following commands to create the design, apply constraints, and compile the design, without
performing timing analysis:
quartus_sh -t setup_proj.tcl
quartus_sh --flow compile filtref
The quartus_sh --flow compile command performs a full compilation, and is equivalent to clicking
the Start Compilation button in the toolbar.
#!/bin/sh
FILES_WITH_ERRORS=""
# Iterate over each file with a .bdf or .v extension
for filename in `ls *.bdf *.v`
do
# Perform a syntax check on the specified file
quartus_map fir_filter --analyze_file=$filename
# If the exit code is non-zero, the file has a syntax error
if [ $? -ne 0 ]
then
FILES_WITH_ERRORS="$FILES_WITH_ERRORS $filename"
fi
done
if [ -z "$FILES_WITH_ERRORS" ]
then
echo "All files passed the syntax check"
exit 0
else
echo "There were syntax errors in the following file(s)"
echo $FILES_WITH_ERRORS
exit 1
fi
Send Feedback
QII5V2
4-10 Archive and Restore Projects 2015.05.04
The archive file is automatically named <project name>.qar. If you want to use a different name, type the
command with the -output option as shown in example the example.
To restore a project archive, type the command shown in the example at a command prompt.
The command restores the project archive to the current directory and overwrites existing files.
Related Information
Managing Quartus II Projects
The example shows the commands for a DOS batch file for this example. With a DOS batch file, you can
specify the project name and the revision name once for both commands. To create the DOS batch file,
paste the following lines into a file called update_memory.bat.
To run the batch file, type the following command at a command prompt:
Send Feedback
QII5V2
2015.05.04 Create a Compressed Configuration File 4-11
quartus_cpf -w <filename>.opt
This interactive command guides you through some questions, then creates an option file based on your
answers. Use --option to cause quartus_cpf to use the option file. For example, the following command
creates a compressed .pof that targets an EPCS64 device:
Alternatively, you can use the Convert Programming Files utility in the Quartus II software GUI to create
a Conversion Setup File (.cof). Configure any options you want, including compression, then save the
conversion setup. Use the following command to run the conversion setup you specified.
To attempt to fit the project called top as quickly as possible, type the command shown at a command
prompt.
#!/bin/sh
ERROR_SEEDS=""
quartus_map fir_filter --rev=filtref
# Iterate over a number of seeds
for seed in 1 2 3 4 5
do
echo "Starting fit with seed=$seed"
Send Feedback
QII5V2
4-12 The QFlow Script 2015.05.04
Tip: Use Design Space Explorer II (DSE) included with the Quartus II software script (by typing
quartus_dse at a command prompt) to improve design performance by performing automated seed
sweeping.
Related Information
Design Space Explorer II
For more information about DSE II, type quartus_dse --help at a command prompt.
To view floorplans or perform other GUI-intensive tasks, launch the Quartus II software.
Start QFlow by typing the following command at a command prompt:
quartus_sh -g
Send Feedback
QII5V2
2015.05.04 Document Revision History 4-13
July 2010 10.0.0 Updated script examples to use quartus_sta instead of quartus_tan, and
other minor updates throughout document.
November 9.1.0 Updated Table 2–1 to add quartus_jli and quartus_jbcc executables and
2009 descriptions, and other minor updates throughout document.
March 2009 9.0.0 No change to content.
Send Feedback
QII5V2
4-14 Document Revision History 2015.05.04
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Send Feedback
2014.06.30
Tcl Scripting
5
QII5V2 Subscribe Send Feedback
Tcl Scripting
Developing and running Tcl scripts to control the Altera Quartus II software allows you to perform a
® ®
wide range of functions, such as compiling a design or writing procedures to automate common tasks.
You can use Tcl scripts to manage a Quartus II project, make assignments, define design constraints,
make device assignments, compile your design, perform timing analysis, and access reports. Tcl scripts
also facilitate project or assignment migration. For example, when designing in different projects with the
same prototype or development board, you can automate reassignment of pin locations in each new
project. The Quartus II software can also generate a Tcl script based on all the current assignments in the
project, which aids in switching assignments to another project.
The Quartus II software Tcl commands follow the EDA industry Tcl application programming interface
(API) standards for command-line options. This simplifies learning and using Tcl commands. If you
encounter an error with a command argument, the Tcl interpreter includes help information showing
correct usage.
This chapter includes sample Tcl scripts for automating the Quartus II software. You can modify these
example scripts for use with your own designs. You can find more Tcl scripts in the Design Examples
section of the Support area on the Altera website.
software. It allows you to create custom commands and works seamlessly across most development
platforms.
You can create your own procedures by writing scripts containing basic Tcl commands and Quartus II
API functions. You can then automate your design flow, run the Quartus II software in batch mode, or
execute the individual Tcl commands interactively in the Quartus II Tcl interactive shell.
The Quartus II software supports Tcl/Tk version 8.5, supplied by the Tcl DeveloperXchange.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
5-2 Quartus II Tcl Packages 2014.06.30
Related Information
• External References on page 5-22
For a list of recommended literature on Tcl.
• Tcl Scripting Basics on page 5-17
For more information on Tcl scripting, or if you are are a Tcl beginner.
• tcl.activestate.com/
Send Feedback
QII5V2
2014.06.30 Loading Packages 5-3
By default, only the minimum number of packages is loaded automatically with each Quartus II
executable. This keeps the memory requirement for each executable as low as possible. Because the
minimum number of packages is automatically loaded, you must load other packages before you can run
commands in those packages.
Because different packages are available in different executables, you must run your scripts with executa‐
bles that include the packages you use in the scripts. For example, if you use commands in the sdc_ext
package, you must use the quartus_sta executable to run the script because the quartus_sta executable is the
only one with support for the sdc_ext package.
The following command prints lists of the packages loaded or available to load for an executable, to the
console:
<executable name> --tcl_eval help
For example, type the following command to list the packages loaded or available to load by the quartus_fit
executable:
Loading Packages
To load a Quartus II Tcl package, use the load_package command as follows:
This command is similar to the package require Tcl command, but you can easily alternate between
different versions of a Quartus II Tcl package with the load_package command because of the -version
option.
Related Information
• Command-Line Scripting on page 4-1
For additional information about these and other Quartus II command-line executables.
quartus_sh --qhelp
This command runs the Quartus II Command-Line and Tcl API help browser, which documents all
commands and options in the Quartus II Tcl API.
Quartus II Tcl help allows easy access to information about the Quartus II Tcl commands. To access the
help information, type help at a Tcl prompt.
Send Feedback
QII5V2
5-4 Quartus II Tcl API Help 2014.06.30
tcl> help
-------------------------------------------------------------------------
----------------------------------
Available Quartus II Tcl Packages:
----------------------------------
Loaded Not Loaded
---------------------------- -----------------------
::quartus::misc ::quartus::device
::quartus::old_api ::quartus::backannotate
::quartus::project ::quartus::flow
::quartus::timing_assignment ::quartus::logiclock
::quartus::timing_report ::quartus::report
* Type "help -tcl"
to get an overview on Quartus II Tcl usages.
If you do not specify the -version option, help for the currently
loaded package is displayed by default. If the package for which
you want help is not loaded, help for the latest version of the
package is displayed by default.
Examples:
help -pkg ::quartus::project
help -pkg project help -pkg project -version 1.0
<command_name> -h To view short help for a Quartus II Tcl command for which the
package is loaded.
or
Examples:
<command_name> -help
project_open -h
project_open -help
Send Feedback
QII5V2
2014.06.30 Command-Line Options: -t, -s, and --tcl_eval 5-5
help -cmd <command_name> To view complete help text for a Quartus II Tcl command.
[-version <version>]
If you do not specify the -version option, help for the command
or in the currently loaded package version is displayed by default.
<command_name> -long_ If the package version for which you want help is not loaded, help
help for the latest version of the package is displayed by default.
Examples:
project_open -long_help
The Tcl API help is also available in Quartus II online help. Search for the command or package name to
find details about that command or package.
Related Information
• Command-Line Scripting on page 4-1
For more information about the Tk viewer for Quartus II command-line help.
Send Feedback
QII5V2
5-6 Run a Tcl Script 2014.06.30
Related Information
Accessing Command-Line Arguments on page 5-14
Commands you type in the Tcl shell are interpreted when you click Enter. You can run a Tcl script in the
interactive shell with the following command:
If a command is not recognized by the shell, it is assumed to be an external command and executed with
the exec command.
Evaluate as Tcl
Running an executable with the --tcl_eval option causes the executable to immediately evaluate the
remaining command-line arguments as Tcl commands. This can be useful if you want to run simple Tcl
commands from other scripting languages.
Send Feedback
QII5V2
2014.06.30 The Quartus II Tcl Console Window 5-7
For example, the following command runs the Tcl command that prints out the commands available in
the project package.
Send Feedback
QII5V2
5-8 Compiling Designs 2014.06.30
load_package flow
# Create the project and overwrite any settings
# files that exist
project_new fir_filter -revision filtref -overwrite
# Set the device, the name of the top-level BDF,
# and the name of the top level entity
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref
# Add other pin assignments here
set_location_assignment -to clk Pin_G1
# compile the project
execute_flow -compile
project_close
Note: The assignments created or modified while a project is open are not committed to the Quartus II
Settings File (.qsf) unless you explicitly call export_assignments or project_close (unless -
dont_export_assignments is specified). In some cases, such as when running execute_flow, the
Quartus II software automatically commits the changes.
Related Information
• Interactive Shell Mode on page 5-6
• Constraining Designs on page 1-1
For more information on making assignments.
• QSF Reference Manual
For more information on scripting for all Quartus II project settings and assignments.
Compiling Designs
You can run the Quartus II command-line executables from Tcl scripts. Use the included flow package to
run various Quartus II compilation flows, or run each executable directly.
load_package flow
project_open [lindex $quartus(args) 0]
Send Feedback
QII5V2
2014.06.30 Reporting 5-9
Reporting
It is sometimes necessary to extract information from the Compilation Report to evaluate results. The
Quartus II Tcl API provides easy access to report data so you do not have to write scripts to parse the text
report files.
If you know the exact cell or cells you want to access, use the get_report_panel_data command and
specify the row and column names (or x and y coordinates) and the name of the appropriate report panel.
You can often search for data in a report panel. To do this, use a loop that reads the report one row at a
time with the get_report_panel_row command.
Column headings in report panels are in row 0. If you use a loop that reads the report one row at a time,
you can start with row 1 to skip the row with column headings. The get_number_of_rows command
returns the number of rows in the report panel, including the column heading row. Because the number
of rows includes the column heading row, continue your loop as long as the loop index is less than the
number of rows.
Report panels are hierarchically arranged and each level of hierarchy is denoted by the string “||“ in the
panel name. For example, the name of the Fitter Settings report panel is Fitter||Fitter Settings
because it is in the Fitter folder. Panels at the highest hierarchy level do not use the “||” string. For
example, the Flow Settings report panel is named Flow Settings.
The following Tcl code prints a list of all report panel names in your project. You can run this code with
any executable that includes support for the report package.
load_package report
project_open myproject
load_report
set panel_names [get_report_panel_names]
foreach panel_name $panel_names {
post_message "$panel_name"
}
load_package report
project_open my-project
load_report
Send Feedback
QII5V2
5-10 Timing Analysis 2014.06.30
Timing Analysis
The Quartus II TimeQuest Timing Analyzer includes support for industry-standard SDC commands in
the sdc package. The Quartus II software also includes comprehensive Tcl APIs and SDC extensions for
the TimeQuest Timing Analyzer in the sta, and sdc_ext packages.
Related Information
Quartus II TimeQuest Timing Analyzer
For information about how to perform timing analysis with the Quartus II TimeQuest Timing Analyzer.
Send Feedback
QII5V2
2014.06.30 Execution Example 5-11
To make an assignment automatically run a script, add an assignment with the following form to the .qsf
for your project:
<executable> -t <script name> <flow or module name> <project name> <revision name>
The first argument passed in the argv variable (or quartus(args) variable) is the name of the flow or
module being executed, depending on the assignment you use. The second argument is the name of the
project and the third argument is the name of the revision.
When you use the POST_MODULE_SCRIPT_FILE assignment, the specified script is automatically run after
every executable in a flow. You can use a string comparison with the module name (the first argument
passed in to the script) to isolate script processing to certain modules.
Execution Example
To illustrate how automatic script execution works in a complete flow, assume you have a project called
top with a current revision called rev_1, and you have the following assignments in the .qsf for your
project.
When you compile your project, the PRE_FLOW_SCRIPT_FILE assignment causes the following command
to be run before compilation begins:
quartus_sh -t first.tcl compile top rev_1
Next, the Quartus II software starts compilation with analysis and synthesis, performed by the quartus_
map executable. After the analysis and synthesis finishes, the POST_MODULE_SCRIPT_FILE assignment
causes the following command to run:
quartus_sh -t next.tcl quartus_map top rev_1
Then, the Quartus II software continues compilation with the Fitter, performed by the quartus_fit
executable. After the Fitter finishes, the POST_MODULE_SCRIPT_FILE assignment runs the following
command:
quartus_sh -t next.tcl quartus_fit top rev_1
Corresponding commands are run after the other stages of the compilation. When the compilation is
over, the POST_FLOW_SCRIPT_FILE assignment runs the following command:
quartus_sh -t last.tcl compile top rev_1
Controlling Processing
The POST_MODULE_SCRIPT_FILE assignment causes a script to run after every module. Because the same
script is run after every module, you might have to include some conditional statements that restrict
processing in your script to certain modules.
For example, if you want a script to run only after timing analysis, use a conditional test like the following
example. It checks the flow or module name passed as the first argument to the script and executes code
when the module is quartus_sta.
Send Feedback
QII5V2
5-12 Displaying Messages 2014.06.30
Displaying Messages
Because of the way the Quartus II software runs the scripts automatically, you must use the post_message
command to display messages, instead of the puts command. This requirement applies only to scripts
that are run by the three assignments listed in “Automating Script Execution”.
Related Information
• The post_message Command on page 5-14
For more information about this command.
• Automating Script Execution on page 5-10
For more information on the three scripts capable of scripting-message automation.
The Quartus II software defaults to natural bus naming. You can turn off natural bus naming with the
disable_natural_bus_naming command. For more information about natural bus naming, type the
following at a Quartus II Tcl prompt:
enable_natural_bus_naming -h
You can use any of the following abbreviations of the -revision option:
Send Feedback
QII5V2
2014.06.30 Collection Commands 5-13
• -r
• -re
• -rev
• -revi
• -revis
• -revisio
You can use an option as short as -r because in the case of the project_open command no other option
starts with the letter r. However, the report_timing command includes the options -recovery and -
removal. You cannot use -r or -re to shorten either of those options, because the abbreviation would not
be unique to only one option.
Collection Commands
Some Quartus II Tcl functions return very large sets of data that would be inefficient as Tcl lists. These
data structures are referred to as collections. The Quartus II Tcl API uses a collection ID to access the
collection.
There are two Quartus II Tcl commands for working with collections, foreach_in_collection and
get_collection_size. Use the set command to assign a collection ID to a variable.
Related Information
foreach_in_collection
For information about which Quartus II Tcl commands return collection IDs
foreach_in_collection Example
get_collection_size Example
Send Feedback
QII5V2
5-14 The post_message Command 2014.06.30
DISPLAY_COMMAND_LINE_MESSAGES_IN_COLOR = on
set i 0
foreach arg $quartus(args) {
puts "The value at index $i is $arg"
incr i
}
If you copy the script in the previous example to a file named print_args.tcl, it displays the following output
when you type the following at a command prompt.
Send Feedback
QII5V2
2014.06.30 The cmdline Package 5-15
cmdline Package
If you save those commands in a Tcl script called print_cmd_args.tcl you see the following output when you
type the following command at a command prompt.
Virtually all Quartus II Tcl scripts must open a project. You can open a project, and you can optionally
specify a revision name with code like the following example. The example checks whether the specified
project exists. If it does, the example opens the current revision, or the revision you specify.
If you do not require this flexibility or error checking, you can use just the project_open command.
Send Feedback
QII5V2
5-16 The quartus() Array 2014.06.30
quartus_sh -s
Create a new project called fir_filter, with a revision called filtref by typing the following command at a Tcl
prompt:
Note: If the project file and project name are the same, the Quartus II software gives the revision the
same name as the project.
Because the revision named filtref matches the top-level file, all design files are automatically picked up
from the hierarchy tree.
Next, set a global assignment for the device with the following command:
To learn more about assignment names that you can use with the -name option, refer to Quartus II Help.
Note: For assignment values that contain spaces, enclose the value in quotation marks.
To quickly compile a design, use the ::quartus::flow package, which properly exports the new project
assignments and compiles the design with the proper sequence of the command-line executables. First,
load the package:
load_package flow
1.0
To perform a full compilation of the FIR filter design, use the execute_flow command with the -
compile option:
exectue_flow -compile
This command compiles the FIR filter tutorial project, exporting the project assignments and running
quartus_map, quartus_fit, quartus_asm, and quartus_sta. This sequence of events is the same as
selecting Start Compilation from the Processing menu in the Quartus II GUI.
Send Feedback
QII5V2
2014.06.30 The tclsh Shell 5-17
When you are finished with a project, close it with the project_close command.
To exit the interactive Tcl shell, type exit at a Tcl prompt.
Use double quotation marks to group the words hello and world as one argument. Double quotation
marks allow substitutions to occur in the group. Substitutions can be simple variable substitutions, or the
result of running a nested command. Use curly braces {} for grouping when you want to prevent
substitutions.
Variables
Assign a value to a variable with the set command. You do not have to declare a variable before using it.
Tcl variable names are case-sensitive.
set a 1
To access the contents of a variable, use a dollar sign (“$”) before the variable name. The following
example prints "Hello world" in a different way.
set a Hello
set b world
puts "$a $b"
Substitutions
Tcl performs three types of substitution:
Send Feedback
QII5V2
5-18 Variable Value Substitution 2014.06.30
Backslash Substitution
Backslash substitution allows you to quote reserved characters in Tcl, such as dollar signs (“$”) and braces
(“[ ]”). You can also specify other special ASCII characters like tabs and new lines with backslash
substitutions. The backslash character is the Tcl line continuation character, used when a Tcl command
wraps to more than one line.
Arithmetic
Use the expr command to perform arithmetic calculations. Use curly braces (“{ }”) to group the
arguments of this command for greater efficiency and numeric precision.
set a 5
set b [expr { $a + sqrt(2) }]
Tcl also supports boolean operators such as && (AND), || (OR), ! (NOT), and comparison operators such
as < (less than), > (greater than), and == (equal to).
Lists
A Tcl list is a series of values. Supported list operations include creating lists, appending lists, extracting
list elements, computing the length of a list, sorting a list, and more.
set a { 1 2 3 }
You can use the lindex command to extract information at a specific index in a list. Indexes are zero-
based. You can use the index end to specify the last element in the list, or the index end-<n> to count
from the end of the list. For example to print the second element (at index 1) in the list stored in a use the
following code.
puts [lindex $a 1]
Send Feedback
QII5V2
2014.06.30 Arrays 5-19
The lappend command appends elements to a list. If a list does not already exist, the list you specify is
created. The list variable name is not specified with a dollar sign (“$”).
lappend a 4 5 6
Arrays
Arrays are similar to lists except that they use a string-based index. Tcl arrays are implemented as hash
tables. You can create arrays by setting each element individually or with the array set command.
To set an element with an index of Mon to a value of Monday in an array called days, use the following
command:
The array set command requires a list of index/value pairs. This example sets the array called days:
Use the array names command to get a list of all the indexes in a particular array. The index values are
not returned in any specified order. The following example is one way to iterate over all the values in an
array.
Arrays are a very flexible way of storing information in a Tcl script and are a good way to build complex
data structures.
Control Structures
Tcl supports common control structures, including if-then-else conditions and for, foreach, and while
loops. The position of the curly braces as shown in the following examples ensures the control structure
commands are executed efficiently and correctly. The following example prints whether the value of
variable a positive, negative, or zero.
If-Then-Else Structure
if { $a > 0 } {
puts "The value is positive"
} elseif { $a < 0 } {
puts "The value is negative"
} else {
puts "The value is zero"
}
Send Feedback
QII5V2
5-20 Procedures 2014.06.30
The following example uses a for loop to print each element in a list.
For Loop
set a { 1 2 3 }
for { set i 0 } { $i < [llength $a] } { incr i } {
puts "The list element at index $i is [lindex $a $i]"
}
The following example uses a foreach loop to print each element in a list.
foreach Loop
set a { 1 2 3 }
foreach element $a {
puts "The list element is $element"
}
The following example uses a while loop to print each element in a list.
while Loop
set a { 1 2 3 }
set i 0
while { $i < [llength $a] } {
puts "The list element at index $i is [lindex $a $i]"
incr i
}
You do not have to use the expr command in boolean expressions in control structure commands
because they invoke the expr command automatically.
Procedures
Use the proc command to define a Tcl procedure (known as a subroutine or function in other scripting
and programming languages). The scope of variables in a procedure is local to the procedure. If the
procedure returns a value, use the return command to return the value from the procedure. The
following example defines a procedure that multiplies two numbers and returns the result.
Simple Procedure
proc multiply { x y } {
set product [expr { $x * $y }]
return $product
}
The following example shows how to use the multiply procedure in your code. You must define a
procedure before your script calls it.
Using a Procedure
proc multiply { x y } {
set product [expr { $x * $y }]
return $product
}
set a 1
Send Feedback
QII5V2
2014.06.30 File I/O 5-21
set b 2
puts [multiply $a $b]
Define procedures near the beginning of a script. If you want to access global variables in a procedure, use
the global command in each procedure that uses a global variable.
proc print_global_list_element { i } {
global my_data
puts "The list element at index $i is [lindex $my_data $i]"
}
set my_data { 1 2 3}
print_global_list_element 0
File I/O
Tcl includes commands to read from and write to files. You must open a file before you can read from or
write to it, and close it when the read and write operations are done. To open a file, use the open
command; to close a file, use the close command. When you open a file, specify its name and the mode
in which to open it. If you do not specify a mode, Tcl defaults to read mode. To write to a file, specify w for
write mode.
Tcl supports other modes, including appending to existing files and reading from and writing to the same
file.
The open command returns a file handle to use for read or write access. You can use the puts command
to write to a file by specifying a filehandle.
Write to a File
You can read a file one line at a time with the gets command. The following example uses the gets
command to read each line of the file and then prints it out with its line number.
Send Feedback
QII5V2
5-22 Syntax and Comments 2014.06.30
Without the semicolon, it would be an invalid command because the set command would not terminate
until the new line after the comment.
The Tcl interpreter counts curly braces inside comments, which can lead to errors that are difficult to
track down. The following example causes an error because of unbalanced curly braces.
# if { $x > 0 } {
if { $y > 0 } {
# code here
}
External References
For more information about Tcl, refer to the following sources:
• Practical Programming in Tcl and Tk, Brent B. Welch
• Tcl and the TK Toolkit, John Ousterhout
• Effective Tcl/TK Programming, Michael McLennan and Mark Harrison
Related Information
• Quartus II Tcl Examples
For Quartus II Tcl example scripts
• tcl.activestate.com
Tcl Developer Xchange
Send Feedback
QII5V2
2014.06.30 Document Revision History 5-23
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Send Feedback
2014.06.30
Signal Integrity Analysis with Third-Party Tools
6
QII5V2 Subscribe Send Feedback
timing margin between Altera FPGA devices and other components on the board. Three types of
®
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
6-2 Signal Integrity Simulations with HSPICE and IBIS Models 2014.06.30
In this case, timing and signal integrity metrics between the I/O buffer and the defined far end load are
analyzed and reported in enhanced reports generated by the Quartus II TimeQuest Timing Analyzer.
Related Information
• I/O Management on page 2-1
For more information about defining capacitive test loads or how to use the Enable Advanced I/O
Timing option to configure a board trace model.
quickly, you can build accurate simulations that can provide data to help improve board-level signal
integrity.
The I/O’s IBIS and HSPICE model creation available in the Quartus II software can help prevent
problems before a costly board respin is required. In general, creating and running accurate simulations is
difficult and time consuming. The tools in the Quartus II software automate the I/O model setup and
creation process by configuring the models specifically for your design. With these tools, you can set up
and run accurate simulations quickly and acquire data that helps guide your FPGA and board design.
The information about signal integrity in this chapter refers to board-level signal integrity based on I/O
buffer configuration and board parameters, not simultaneous switching noise (SSN), also known as
ground bounce or VCC sag. SSN is a product of multiple output drivers switching at the same time,
causing an overall drop in the voltage of the chip’s power supply. This can cause temporary glitches in the
specified level of ground or VCC for the device.
This chapter is intended for FPGA and board designers and includes details about the concepts and steps
involved in getting designs simulated and how to adjust designs to improve board-level timing and signal
integrity. Also included is information about how to create accurate models from the Quartus II software
and how to use those models in simulation software.
The information in this chapter is meant for those who are familiar with the Quartus II software and basic
concepts of signal integrity and the design techniques and components in good PCB design. Finally, you
should know how to set up simulations and use your selected third-party simulation tool.
Related Information
• AN 315: Guidelines for Designing High-Speed FPGA PCBs
For a more information about SSN and ways to prevent it.
• Altera Signal Integrity Center
For information about basic signal integrity concepts and signal integrity details pertaining to Altera
FPGA devices.
Send Feedback
QII5V2
2014.06.30 I/O Model Selection: IBIS or HSPICE 6-3
Related Information
AN 283: Simulating Altera Devices with IBIS Models
For more information about IBIS files created by the Quartus II IBIS Writer and IBIS files in general, as
well as links to websites with detailed information.
Send Feedback
QII5V2
6-4 FPGA to Board Signal Integrity Analysis Flow 2014.06.30
Send Feedback
QII5V2
2014.06.30 Create I/O and Board Trace Model Assignments 6-5
Yes
Customize Files
Changes
to FPGA I/O
No
required?
Run Simulation
Make Adjustments to
Results No
Models or Simulation Parameters
OK?
and Simulate Again
Yes
Related Information
EDA Tool Support Resource Center
For more information, generic IBIS model files for each device family, and to obtain HSPICE buffer
simulation kits.
Send Feedback
QII5V2
6-6 Output File Generation 2014.06.30
To configure a board trace model, in the Settings dialog box, in the TimeQuest Timing Analyzer page,
turn on the Enable Advanced I/O Timing option and configure the board trace model assignment
settings for each I/O standard used in your design. You can add series or parallel termination, specify the
transmission line length, and set the value of the far-end capacitive load. You can configure these
parameters either in the Board Trace Model view of the Pin Planner, or click SettingsDeviceDevice and
Pin Options.
The Quartus II software can generate IBIS models and HSPICE decks without having to configure a board
trace model with the Enable Advanced I/O Timing option. In fact, IBIS models ignore any board trace
model settings other than the far-end capacitive load. If any load value is set other than the default, the
delay given by IBIS models generated by the IBIS Writer cannot be used to account correctly for the
double counting problem. The load value mismatch between the IBIS delay and the tCO measurement of
the Quartus II software prevents the delays from being safely added together. Warning messages displayed
when the EDA Netlist Writer runs indicate when this mismatch occurs.
Related Information
• I/O Management on page 2-1
For information about how to use theEnable Advanced I/O Timing option and configure board trace
models for the I/O standards used in your design.
Send Feedback
QII5V2
2014.06.30 Set Up and Run Simulations in Third-Party Tools 6-7
Send Feedback
QII5V2
6-8 Creating Accurate IBIS Models 2014.06.30
2 3
4 5
Rise
Fall L_pkg R_pkg
C_comp C_pkg
1
Send Feedback
QII5V2
2014.06.30 Download IBIS Models 6-9
• When the buffer is assigned as an output, use the series termination r50c.
• When the buffer is assigned as an input, use the parallel termination g50c.
Related Information
Altera IBIS Models
For information about whether models for your selected device are available.
Send Feedback
QII5V2
6-10 Design Simulation Using the Mentor Graphics HyperLynx Software
®
2014.06.30
Related Information
• Generating IBIS Output Files with the Quartus II Software
For step-by-step instructions on how to generate IBIS models with the Quartus II software, refer to
Quartus II Help.
• AN 283: Simulating Altera Devices with IBIS Models
For more information about IBIS model generation.
You must integrate IBIS models downloaded from the Altera website or created with the Quartus II IBIS
Writer into board design simulations to accurately model timing and signal integrity.
The HyperLynx software from Mentor Graphics is one of the most popular tools for design simulation.
The HyperLynx software makes it easy to integrate IBIS models into simulations.
The HyperLynx software is a PCB analysis and simulation tool for high-speed designs, consisting of two
products, LineSim and BoardSim. LineSim is an early simulation tool. Before any board routing takes
place, LineSim is used to simulate “what if” scenarios to assist in creating routing rules and defining board
parameters. BoardSim is a post-layout tool used to analyze existing board routing. Specific nets are
selected from a board layout file and simulated in a manner similar to LineSim. With board and routing
parameters, and surrounding signal routing known, highly accurate simulations of the final fabricated
PCB are possible. This section focuses on LineSim. Because the process of creating and running
simulations is very similar for both LineSim and BoardSim, the details of IBIS model use in LineSim
applies to simulations in BoardSim.
Simulations in LineSim are configured using a schematic GUI to create connections and topologies
between I/O buffers, route trace segments, and termination components. LineSim provides two methods
for creating routing schematics: cell-based and free-form. Cell-based schematics are based on fixed cells
consisting of typical placements of buffers, trace impedances, and components. Parts of the grid-based
cells are filled with the desired objects to create the topology. A topology in a cell-based schematic is
limited by the available connections within and between the cells.
A more robust and expandable way to create a circuit schematic for simulation is to use the free-form
schematic format in LineSim. The free-form schematic format makes it easy to place parts into any
configuration and edit them as required. This section describes the use of IBIS models with free-form
schematics, but the process is nearly identical for cell-based schematics.
Send Feedback
QII5V2
2014.06.30 Design Simulation Using the Mentor Graphics HyperLynx Software
®
6-11
When you use HyperLynx software to perform simulations, you typically perform the following steps:
1. Create a new LineSim free-form schematic document and set up the board stackup for your PCB using
the Stackup Editor. In this editor, specify board layer properties including layer thickness, dielectric
constant, and trace width.
2. Create a circuit schematic for the net you want to simulate. The schematic represents all the parts of
the routed net including source and destination I/O buffers, termination components, transmission
line segments, and representations of impedance discontinuities such as vias or connectors.
3. Assign IBIS models to the source and destination I/O buffers to represent their behavior during
operation.
4. Attach probes from the digital oscilloscope that is built in to LineSim to points in the circuit that you
want to monitor during simulation. Typically, at least one probe is attached to the pin of a destination
I/O buffer. For differential signals, you can attach a differential probe to both the positive and negative
pins at the destination.
5. Configure and run the simulation. You can simulate a rising or falling edge and test the circuit under
different drive strength conditions.
6. Interpret the results and make adjustments. Based on the waveforms captured in the digital oscillo‐
scope, you can adjust anything in the circuit schematic to correct any signal integrity issues, such as
overshoot or ringing. If necessary, you can make I/O assignment changes in the Quartus II software,
regenerate the IBIS file with the IBIS Writer, and apply the updated IBIS model to the buffers in your
HyperLynx software schematic.
7. Repeat the simulations and circuit adjustments until you are satisfied with the results. When the
operation of the net meets your design requirements, implement changes to your I/O assignments in
Send Feedback
QII5V2
6-12 Configuring LineSim to Use Altera IBIS Models 2014.06.30
the Quartus II software and/or adjust your board routing constraints, component values, and
placement to match the simulation.
Related Information
www.mentor.com
For more information about HyperLynx software, including schematic creation, simulation setup, model
usage, product support, licensing, and training.
2. Click Edit. A dialog box appears where you can add directories and adjust the order in which LineSim
searches them.
Send Feedback
QII5V2
2014.06.30 Integrating Altera IBIS Models into LineSim Simulations 6-13
3. Click Add
4. Browse to the default IBIS model location, <project directory>/board/ibis. Click OK.
5. Click Up to move the IBIS model directory to the top of the list. Click Generate Model Index to
update LineSim’s model database with the models found in the added directory.
6. Click OK. The IBIS model directory for your project is added to the top of the Model-library file
path(s) list.
7. To close the Set Directories dialog box, click OK.
1. Double-click a buffer symbol in your schematic to open the Assign Models dialog box. You can also
click Assign Models from the buffer symbol’s right-click menu.
Send Feedback
QII5V2
6-14 Integrating Altera IBIS Models into LineSim Simulations 2014.06.30
2. The pin of the buffer symbol you selected should be highlighted in the Pins list. If you want to assign a
model to a different symbol or pin, select it from the list.
3. Click Select. The Select IC Model dialog box appears.
Figure 6-7: LineSim Select IC Model Dialog Box
4. To filter the list of available libraries to display only IBIS models, select .IBS. Scroll through the
Libraries list, and click the name of the library for your design. By default, this is <project name>.ibs.
Send Feedback
QII5V2
2014.06.30 Running and Interpreting LineSim Simulations 6-15
5. The device for your design should be selected as the only item in the Devices list. If not, select your
device from the list.
6. From the Signal list, select the name of the signal you want to simulate. You can also choose to select
by device pin number.
7. Click OK. The Assign Models dialog box displays the selected .ibs file and signal.
8. If applicable to the signal you chose, adjust the buffer settings as required for the simulation.
9. Select and configure other buffer pins from the Pins list in the same manner.
10.Click OK when all I/O models are assigned.
If you see a discontinuity or other anomalies at the destination, such as slow rise and fall times, adjust the
termination scheme or termination component values. After making these changes, rerun the simulation
to check whether your adjustments solved the problem. In this case, it is not necessary to regenerate
the .ibs file.
Send Feedback
QII5V2
6-16 Simulation with HSPICE Models 2014.06.30
Figure 6-9: Example of Signal Integrity Anomaly in HyperLynx with IBIS Models
Related Information
Altera Signal Integrity Center
For more information about board-level signal integrity and to learn about ways to improve it with simple
changes to your design.
Related Information
The Double Counting Problem in HSPICE Simulations on page 6-17
Send Feedback
QII5V2
2014.06.30 Accessing HSPICE Simulation Kits 6-17
Note: Note that for Arria 10 devices, you may need to download the Encrypted HSPICE model from the
Altera website.
Related Information
I/O Management on page 2-1
For more information about the Enable Advanced I/O Timing option and configuring board trace
models for the I/O standards in your design.
SPICE Models for Altera Devices
For more information about the Encrypted HSPICE model.
Send Feedback
QII5V2
6-18 The Solution to Double Counting 2014.06.30
Quartus II tCO
HSPICE models for board simulation measure tPD (propagation delay) from an arbitrary reference point
in the output buffer, through the device pin, out along the board routing, and ending at the signal destina‐
tion.
It is apparent immediately that if these two delays were simply added together, the delay between the
output buffer and the device pin would be counted twice in the calculation. A model or simulation that
does not account for this double count would create overly pessimistic simulation results, because the
double-counted delay can limit I/O performance artificially. To fix the problem, it might seem that simply
subtracting the overlap between tCO and tPD would account for the double count. However, this
adjustment would not be accurate because each measurement is based on a different load.
Note: Input signals do not exhibit this problem because the HSPICE models for inputs stop at the FPGA
pin instead of at the input buffer. In this case, simply adding the delays together produces an
accurate measurement of delay timing.
Send Feedback
QII5V2
2014.06.30 HSPICE Writer Tool Flow 6-19
FPGA Core FPGA Output FPGA Pin Quartus Termination Network/ Signal
Logic Buffer Test Load Trace Model Destination
Quartus II tCO
Total Delay
With tTESTLOAD known, the total delay is calculated for the output signal from the FPGA logic to the
signal destination on the board, accounting for the double count.
tdelay = tCO+(tPD-tTESTLOAD)
The preconfigured simulation files generated by the HSPICE Writer in the Quartus II software are
designed to account for the double-counting problem based on this calculation automatically. Performing
accurate timing simulations is easy without having to make adjustments for double counting manually.
Related Information
Quartus II Handbook
For additional information about standard design flows.
Send Feedback
QII5V2
6-20 Enabling HSPICE Writer 2014.06.30
The Quartus II software provides multiple methods for creating these assignments:
• Using the Pin Planner
• Using the assignment editor
• Manually editing the .qsf file
• By making assignments in a scripted Quartus II flow using Tcl
As with command-line invocation, specifying the output directory is optional. If not specified, the output
directory defaults to board/hspice.
Send Feedback
QII5V2
2014.06.30 Invoking HSPICE Writer 6-21
For bidirectional pins, two spice decks are produced; one with the I/O buffer configured as an input, and
the other with the I/O buffer configured as an output.
The Quartus II software supports alphanumeric pin names that contain the underscore (_) and dash (-)
characters. Any illegal characters used in file names are converted automatically to underscores.
Related Information
• Sample Output for I/O HSPICE Simulation Deck on page 6-31
• Sample Input for I/O HSPICE Simulation Deck on page 6-27
The <output_directory> option specifies the location where HSPICE model files are saved. By default, the
<project directory>/board/hspice directory is used.
<output_directory> specifies the location where the generated spice decks will be written (relative to the
design directory). This is an optional parameter and defaults to board/hspice.
Send Feedback
QII5V2
6-22 Running an HSPICE Simulation 2014.06.30
The sample board trace loading in the generated HSPICE model files must be replaced by your actual
trace model before you can run a correct simulation. To do this, open the generated HSPICE model files
for all pins you want to simulate and locate the following section.
You must replace the example load with a load that matches the design of your PCB board. This includes
a trace model, termination resistors, and, for output simulations, a receiver model. The spice circuit node
that represents the pin of the FPGA package is called pin. The node that represents the far pin of the
external device is called load-in (for output SPICE decks) and source-in (for input SPICE decks).
For an input simulation, you must also modify the stimulus portion of the spice file. The section of the file
that must be modified is indicated in the following comment block.
Replace the sample stimulus model with a model for the device that will drive the FPGA.
Click Open and browse to the location of the HSPICE model files generated by the Quartus II HSPICE
Writer. The default location for HSPICE model files is <project directory>/board/hspice. Select the .sp file
generated by the HSPICE Writer for the signal you want to simulate. Click OK.
To run the simulation, click Simulate. The status of the simulation is displayed in the window and saved
in an .lis file with the same name as the .sp file when the simulation is complete. Check the .lis file if an
error occurs during the simulation requiring a change in the .sp file to fix.
Send Feedback
QII5V2
2014.06.30 Interpreting the Results of an Output Simulation 6-23
Send Feedback
QII5V2
6-24 Viewing Graphical Simulation Results 2014.06.30
The Results Browser lets you select which waveform to view quickly in the main viewing window. If
multiple simulations are run on the same signal, the list at the top of the Results Browser displays the
results of each simulation. Click the simulation description to select which simulation to view. By default,
the descriptions are derived from the first line of the HSPICE file, so the description might appear as a line
of asterisks.
Select the type of waveform to view, by performing the following steps:
1. To see the source and destination waveforms with the default simulation, from the Types list, select
Voltages.
2. On the Curves list, double-click the waveform you want to view. The waveform appears in the main
viewing window.
You can zoom in and out and adjust the view as desired.
Send Feedback
QII5V2
2014.06.30 Making Design Adjustments Based on HSPICE Simulations 6-25
Send Feedback
QII5V2
6-26 Making Design Adjustments Based on HSPICE Simulations 2014.06.30
If there is a discontinuity or any other anomalies at the destination, adjust the board description in the
Quartus II Board Trace Model, or in the generated HSPICE model files to change the termination scheme
or adjust termination component values. After making these changes, regenerate the HSPICE files if
necessary, and rerun the simulation to verify whether your adjustments solved the problem.
Send Feedback
QII5V2
2014.06.30 Sample Input for I/O HSPICE Simulation Deck 6-27
Figure 6-17: Example of Signal Integrity Anomaly in the AvanWaves Waveform Viewer
Related Information
Altera Signal Integrity Center
For more information about board-level signal integrity and to learn about ways to improve it with simple
changes to your FPGA design.
Header Comment
The first block of an input simulation spice deck is the header comment. The purpose of this block is to
provide an easily readable summary of how the simulation file has been automatically configured by the
Quartus II software.
This block has two main components: The first component summarizes the I/O configuration relevant
information such as device, speed grade, and so on. The second component specifies the exact test
condition that the Quartus II software assumes for the given I/O standard.
Send Feedback
QII5V2
6-28 Simulation Conditions 2014.06.30
* Device: EP2S60F1020C3
* Speed Grade: C3
* Pin: AA4 (out96)
* Bank: IO Bank 6 (Row I/O)
* I/O Standard: LVTTL, 12mA
* OCT: Off
*
* Quartus II’s default I/O timing delays assume the following slow
* corner simulation conditions.
*
* Specified Test Conditions For Quartus II Tco
* Temperature: 85C (Slowest Temperature Corner)
* Transistor Model: TT (Typical Transistor Corner)
* Vccn: 3.135V (Vccn_min = Nominal - 5%)
* Vccpd: 2.97V (Vccpd_min = Nominal - 10%)
* Load: No Load
* Vtt: 1.5675V (Voltage reference is Vccn/2)
*
* Note: The I/O transistors are specified to operate at least as
* fast as the TT transistor corner, actual production
* devices can be as fast as the FF corner. Any simulations
* for hold times should be conducted using the fast process
* corner with the following simulation conditions.
* Temperature: 0C (Fastest Commercial Temperature Corner **)
* Transistor Model: FF (Fastest Transistor Corner)
* Vccn: 1.98V (Vccn_hold = Nominal + 10%)
* Vccpd: 3.63V (Vccpd_hold = Nominal + 10%)
* Vtt: 0.95V (Vtt_hold = Vccn/2 - 40mV)
* Vcc: 1.25V (Vcc_hold = Maximum Recommended)
* Package Model: Short-circuit from pad to pin (no parasitics)
*
* Warnings:
Simulation Conditions
The simulation conditions block loads the appropriate process corner models for the transistors. This
condition is automatically set up for the slow timing corner and is modified only if other simulation
corners are desired.
* Process Settings
.options brief
.inc ‘sii_tt.inc’ * TT process corner
Simulation Options
The simulation options block configures the simulation temperature and configures HSPICE with typical
simulation options.
* Simulation Options
.options brief=0
.options badchr co=132 scale=1e-6 acct ingold=2 nomod dv=1.0
+ dcstep=1 absv=1e-3 absi=1e-8 probe csdf=2 accurate=1
+ converge=1
.temp 85
Note: For a detailed description of these options, consult your HSPICE manual.
Send Feedback
QII5V2
2014.06.30 Constant Definition 6-29
Constant Definition
The constant definition block of the simulation file instantiates the voltage sources that controls the
configuration modes of the I/O buffer.
* Constant Definition
Where:
• Voltage source voeb controls the output enable of the buffer and is set to disabled for inputs.
• vopdrain controls the open drain mode for the I/O.
• vrambh controls the bus hold circuitry in the I/O.
• vrpullup controls the weak pullup.
• The next 11 voltages sources control the I/O standard of the buffer and are configured through a later
library call.
• vdin is not used on input pins because it is the data pin for the output buffer.
Buffer Netlist
The buffer netlist block of the simulation spice deck loads all the load models required for the
corresponding input pin.
* IO Buffer Netlist
.include ‘vio_buffer.inc’
Drive Strength
The drive strength block of the simulation SPICE deck loads the configuration bits necessary to configure
the I/O into the proper I/O standard and drive strengths.
Although these settings are not relevant to an input buffer, they are provided to allow the SPICE deck to
be modifiable to support bidirectional simulations.
Send Feedback
QII5V2
6-30 I/O Buffer Instantiation 2014.06.30
Send Feedback
QII5V2
2014.06.30 Stimulus Model 6-31
Stimulus Model
The stimulus model block of the simulation spice deck is provided only as a place holder example. Replace
this block with your own stimulus model. Options for this include an IBIS or HSPICE model, among
others.
Simulation Analysis
The simulation analysis block of the simulation file is configured to measure the propagation delay from
the source to the FPGA pin. Both the source and end point of the delay are referenced against the 50%
VCCN crossing point of the waveform.
* Print out the voltage waveform at both the source and the pin
.print tran v(source) v(pin)
.tran 0.020ns 17ns
* Measure the propagation delay from the source pin to the pin
* referenced against the 50% voltage threshold crossing point
Header Comment
The first block of an output simulation SPICE deck is the header comment. The purpose of this block is to
provide a readable summary of how the simulation file has been automatically configured by the
Quartus II software.
This block has two main components:
• The first component summarizes the I/O configuration relevant information such as device, speed
grade, and so on.
• The second component specifies the exact test condition that the Quartus II software assumes when
generating tCO delay numbers. This information is used as part of the double-counting correction
circuitry contained in the simulation file.
The SPICE decks are preconfigured to calculate the slow process corner delay but can also be used to
simulate the fast process corner as well. The fast corner conditions are listed in the header under the notes
section.
Send Feedback
QII5V2
6-32 Simulation Conditions 2014.06.30
The final section of the header comment lists any warning messages that you must consider when you use
the SPICE decks.
Simulation Conditions
The simulation conditions block loads the appropriate process corner models for the transistors. This
condition is automatically set up for the slow timing corner and must be modified only if other simulation
corners are desired.
* Process Settings
.options brief
.inc ‘sii_tt.inc’ * typical-typical process corner
Note: Two separate corners cannot be simulated at the same time. Instead, simulate the base case using
the Quartus corner as one simulation and then perform a second simulation using the desired
customer corner. The results of the two simulations can be manually added together.
Send Feedback
QII5V2
2014.06.30 Simulation Options 6-33
Simulation Options
The simulation options block configures the simulation temperature and configures HSPICE with typical
simulation options.
* Simulation Options
.options brief=0
.options badchr co=132 scale=1e-6 acct ingold=2 nomod dv=1.0
+ dcstep=1 absv=1e-3 absi=1e-8 probe csdf=2 accurate=1
+ converge=1
.temp 85
Note: For a detailed description of these options, consult your HSPICE manual.
Constant Definition
The constant definition block of the output simulation SPICE deck instantiates the voltage sources that
controls the configuration modes of the I/O buffer.
* Constant Definition
Where:
• Voltage source voeb controls the output enable of the buffer.
• vopdrain controls the open drain mode for the I/O.
• vrambh controls the bus hold circuitry in the I/O.
• vrpullup controls the weak pullup.
• vpci controls the PCI clamp.
• The next ten voltage sources control the I/O standard of the buffer and are configured through a later
library call.
• vdin is connected to the data input of the I/O buffer.
• The edge rate of the input stimulus is automatically set to the correct value by the Quartus II software.
Send Feedback
QII5V2
6-34 Drive Strength 2014.06.30
.include ‘hio_buffer.inc’
.include ‘lvds_input_load.inc’
.include ‘lvds_oct_load.inc’
Drive Strength
The drive strength block of the simulation spice deck loads the configuration bits for configuring the I/O
to the proper I/O standard and drive strength. These options are set by the HSPICE Writer tool and are
not changed for expected use.
Send Feedback
QII5V2
2014.06.30 Board and Trace Termination 6-35
Send Feedback
QII5V2
6-36 Simulation Analysis 2014.06.30
vrpullup_tl rpullup_tl 0 0
Related Information
The Double Counting Problem in HSPICE Simulations on page 6-17
Simulation Analysis
The simulation analysis block is set up to measure double-counting corrected delays. This is accomplished
by measuring the uncompensated delay of the I/O buffer when connected to the user load, and when
subtracting the simulated amount of double-counting from the test load I/O buffer.
* Print out the voltage waveform at both the pin and far end load
.print tran v(pin) v(load)
.tran 0.020ns 17ns
* Measure the propagation delay to the load pin. This value will
* include some double counting with Quartus II’s Tco
.measure TRAN tpd_uncomp_rise TRIG v(din) val=’vc*0.5’ rise=1
+ TARG v(load) val=’vcn*0.5’ rise=1
.measure TRAN tpd_uncomp_fall TRIG v(din) val=’vc*0.5’ fall=1
+ TARG v(load) val=’vcn*0.5’ fall=1
* The test load buffer can calculate the amount of double counting
.measure TRAN t_dblcnt_rise TRIG v(din) val=’vc*0.5’ rise=1
+ TARG v(pin_tl) val=’vcn_tl*0.5’ rise=1
.measure TRAN t_dblcnt_fall TRIG v(din) val=’vc*0.5’ fall=1
+ TARG v(pin_tl) val=’vcn_tl*0.5’ fall=1
Send Feedback
QII5V2
2014.06.30 Advanced Topics 6-37
Advanced Topics
The information in this section describes some of the more advanced topics and methods employed when
setting up and running HSPICE simulation files.
PVT Simulations
The automatically generated HSPICE simulation files are set up to simulate the slow process corner using
low voltage, high temperature, and slow transistors. To ensure a fully robust link, Altera recommends that
you run simulations over all process corners.
To perform process, voltage, and temperature (PVT) simulations, manually modify the spice decks in a
two step process:
1. Remove the double-counting compensation circuitry from the simulation file. This is required as the
amount of double-counting is dependant upon how the Quartus II software calculates delays and is
not based on which PVT corner is being simulated. By default, the Quartus II software provides timing
numbers using the slow process corner.
2. Select the proper corner for the PVT simulation by setting the correct HSPICE temperature, changing
the supply voltage sources, and loading the correct transistor models.
A more detailed description of HSPICE process corners can be found in the family-specific HSPICE
model documentation.
Related Information
Accessing HSPICE Simulation Kits on page 6-17
Send Feedback
QII5V2
6-38 Correlation Report 2014.06.30
Correlation Report
Correlation reports for the HSPICE I/O models are located in the family-specific HSPICE I/O buffer
simulation kits.
Related Information
Accessing HSPICE Simulation Kits on page 6-17
Send Feedback
QII5V2
2014.06.30 Document Revision History 6-39
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Send Feedback
2014.06.30
Mentor Graphics PCB Design Tools Support
7
QII5V2 Subscribe Send Feedback
You can integrate the Mentor Graphics® I/O Designer or DxDesigner PCB design tools into the Quartus®
II design flow. This combination provides a complete FPGA-to-board design workflow.
With today’s large, high-pin-count and high-speed FPGA devices, good and correct PCB design practices
are essential to ensure correct system operation. The PCB design takes place concurrently with the design
and programming of the FPGA. The FPGA or ASIC designer initially creates signal and pin assignments,
and the board designer must correctly transfer these assignments to the symbols in their system circuit
schematics and board layout. As the board design progresses, Altera recommends reassigning pins to
optimize the PCB layout. Ensure that you inform the FPGA designer of the pin reassignments so that the
new assignments are included in an updated placement and routing of the design.
The Mentor Graphics I/O Designer software allows you to take advantage of the full FPGA symbol design,
creation, editing, and back-annotation flow supported by the Mentor Graphics tools.
This chapter covers the following topics:
• Mentor Graphics and Altera software integration flow
• Generating supporting files
• Adding Quartus II I/O assignments to I/O Designer
• Updating assignment changes between the I/O Designer the Quartus II software
• Generating I/O Designer symbols
• Creating DxDesigner symbols from the Quartus II output files
This chapter is intended for board design and layout engineers who want to start the FPGA board integra‐
tion while the FPGA is still in the design phase. Alternatively, the board designer can plan the FPGA pin-
out and routing requirements in the Mentor Graphics tools and pass the information back to the Quartus
II software for placement and routing. Part librarians can also benefit from this chapter by learning how
to use output from the Quartus II software to create new library parts and symbols.
The procedures in this chapter require the following software:
• The Quartus II software version 5.1 or later
• DxDesigner software version 2004 or later
• Mentor Graphics I/O Designer software (optional)
Note: To obtain and license the Mentor Graphics tools and for product information, support, and
training, refer to the Mentor Graphics website.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
7-2 FPGA-to-PCB Design Flow 2014.06.30
Generate Symbol
DxDesigner
Instantiate Symbol
in Schematic
Forward to Board
Layout Tool
Board Layout Tool
End
Send Feedback
QII5V2
2014.06.30 Integrating with I/O Designer 7-3
Note: The Quartus II software generates the .fx in the output directory you specify in the Board-Level
page of the Settings dialog box. However, the Quartus II software and the I/O Designer software
can import pin assignments from an .fx located in any directory. Use a backup .fx to prevent
overwriting existing assignments or importing invalid assignments.
To integrate the I/O Designer into your design flow, follow these steps:
1. In the Quartus II software, click Assignments > Settings > EDA Tool Settings > Board-Level to
specify settings for .fx symbol file generation.
2. Compile your design to generate the .fx and Pin-Out File (.pin) in the Quartus II project directory.
3. Create a board design with the DxDesigner software and the I/O Designer software by performing the
following steps:
a. Create a new I/O Designer database based on the .fx and the .pin files.
b. In the I/O Designer software, make adjustments to signal and pin assignments.
c. Regenerate the .fx in the I/O Designer software to export the I/O Designer software changes to the
Quartus II software.
d. Generate a single or fractured symbol for use in the DxDesigner software.
e. Add the symbol to the sym directory of a DxDesigner project, or specify a new DxDesigner project
with the new symbol.
f. Instantiate the symbol in your DxDesigner schematic and export the design to the board layout
tool.
g. Back-annotate pin changes created in the board layout tool to the DxDesigner software and back to
the I/O Designer software and the Quartus II software.
4. Create a board design with the DxDesigner software without the I/O Designer software by performing
the following steps:
a. Create a new DxBoardLink symbol with the Symbol wizard and reference the .pin from the
Quartus II software in an existing DxDesigner project.
b. Instantiate the symbol in your DxDesigner schematic and export the design to a board layout tool.
Note: You can update these symbols with design changes with or without the I/O Designer software. If
you use the Mentor Graphics I/O Designer software and you change symbols with the DxDesigner
software, you must reimport the symbols into I/O Designer to avoid overwriting your symbol
changes.
Send Feedback
QII5V2
7-4 Generating Pin Assignment Files 2014.06.30
I/O Designer
Create or Update
.fpc
Create or Change
Pin Assignments
.fx
Regenerate .fx
Generate Symbol
DxDesigner
Instantiate Symbol
in Schematic
Forward to Board
Layout Tool
Board Layout Tool
End
Note: (2) DxDesigner software-specific steps in the design flow are not part of the I/O Designer flow.
Send Feedback
QII5V2
2014.06.30 I/O Designer Settings 7-5
assignments. You cannot import pin assignment changes from a Mentor Graphics .pin into the Quartus II
software.
The .fx is an input or output of either the Quartus II or I/O Designer software. You can generate an .fx in
the Quartus II software for symbol generation in the Mentor Graphics I/O Designer software. A Quartus
II .fx contains the pin name, number, location, direction, I/O standard, drive strength, termination, slew
rate, IOB delay, and differential pins. An I/O Designer .fx additionally includes information about unused
pins and pin set groups.
The I/O Designer software can also read from or update a Quartus II Settings File (.qsf). You can use
the .qsf in the same way as use of the .fx, but pin swap group information does not transfer between I/O
Designer and the Quartus II software. Use the .fx rather than the .qsf for transferring I/O assignment
information.
Figure 7-3: Generating .pin and .fx files
Set Up to Generate
.fx
.pin
Send Feedback
QII5V2
7-6 Transferring I/O Assignments 2014.06.30
Send Feedback
QII5V2
2014.06.30 Updating I/O Designer with Quartus II Pin Assignments 7-7
9. In the FPGAX file name field, type or browse to the backup copy of the .fx generated by the Quartus II
software.
10.In the Pin report file name field, type or browse to the .pin generated by the Quartus II software.
Click Next.
You can also select a .qsf for update. The I/O Designer software can update the pin assignment
information in the .qsf without affecting any other information in the file.
Note: You can import a .pin without importing an .fx. The I/O Designer software does not generate
a .pin. To transfer assignment information to the Quartus II software, select an additional file
and file type. Altera recommends selecting an .fx in addition to a .pin for transferring all the
assignment information in the .fx and .pin files. In some versions of the I/O Designer software,
the standard file picker may incorrectly look for a .pin instead of an .fx. In this case, select All
Files (*.*) from the Save as type list and select the file from the list.
11.On the Synthesis page, specify an external synthesis tool and a synthesis constraints file for use with
the tool. If you do not use an external synthesis tool, click Next.
12.On the PCB Flow page, you can select an existing schematic project or create a new project as a symbol
information destination.
• To select an existing project, select Choose existing project and click Browse after the Project Path
field. The Select project dialog box appears. Select the project.
• To create a new project, in the Select project dialog box, select Create new empty project. Type the
project file name in the Name field and browse to the location where you want to save the file. Click
OK.
13.If you have not specified a design tool to which you can send symbol information in the I/O Designer
software, click Advanced in the PCB Flow page and select your design tool. If you select the
DxDesigner software, you have the option to specify a Hierarchical Occurrence Attributes (.oat) file to
import into the I/O Designer software. Click Next and then click Finish to create the
database.Updating
Send Feedback
QII5V2
7-8 Updating Quartus II with I/O Designer Pin Assignments 2014.06.30
I/O Designer
Create or Update
.fpc
Create or Change
Pin Assignments
.fx
Regenerate .fx
To update the .fx in your selected output directory and the .pin in your project directory after making
changes to the design, perform the following tasks:
1. In the I/O Designer software, click File > Properties.
2. Under FPGA Xchange, specify the .fx file name and location.
3. Under Place and Route, specify the .pin file name and location.
After you have set up these file locations, the I/O Designer software monitors these files for changes. If
the specified .fx or .pin is modified during design processing, three indicators flash red in the lower
right corner of the I/O Designer GUI. You can click the indicators to open the I/O Designer Update
Wizard dialog box. The I/O Designer Update Wizard dialog box lists the updated files in the
database.
4. Make logic or pin assignment changes in your design.
5. Click Processing > Start > Start I/O Assignment Analysis to validate your latest assignment changes.
6. To preserve your changes an update the corresponding the .fx and .pin files, click Processing > Start >
Start EDA Netlist Writer or Processing > Start Compilation.
Note: Your I/O Designer database should us a backup copy of the .fx generated by the Quartus II
software. Otherwise, updating the file in the Quartus II software overwrites any changes made
to the file by the I/O Designer software. If there are I/O Designer assignments in the .fx that you
want to preserve, create a backup copy of the file before updating it in the Quartus II software,
and verify that your I/O Designer database points to the backup copy.
Send Feedback
QII5V2
2014.06.30 Generating Schematic Symbols in I/O Designer 7-9
Generate Symbol
(2)
Send Feedback
QII5V2
7-10 Generating Schematic Symbols 2014.06.30
You can use the I/O Designer Symbol wizard to quickly create symbols that you can subsequently refine.
Alternatively, you can import symbols from another DXDesigner project, and then assign an FPGA to the
symbol. To import symbols in the I/O Designer software, File > Import Symbol.
I/O Designer symbols are either functional, physical (PCB), or both. Signals imported into the database,
usually from Verilog HDL or VHDL files, are the basis of a functional symbol. No physical device pins
must be associated with the signals to generate a functional symbol. This section focuses on board-level
PCB symbols with signals directly mapped to physical device pins through assignments in either the
Quartus II Pin Planner or in the I/O Designer database.
Send Feedback
QII5V2
2014.06.30 DxDesigner Project Settings 7-11
Quartus II software. You cannot back-annotate changes made in a board layout tool or in a DxDesigner
symbol to the Quartus II software.
Figure 7-6: DxDesigner-only Flow (without I/O Designer)
DxDesigner
Create New or Open
Existing Project
Instantiate in
Schematic
Forward to Board
Layout Tool
Send Feedback
QII5V2
7-12 Analyzing FPGA Simultaneous Switching Noise (SSN) 2014.06.30
6. Specify the appearance of the generated symbol and how itthe grid you have set in your DxDesigner
project schematic. After making your selections. Click Next.
7. In the FPGA vendor list, select Altera Quartus. In the Pin-Out file to import field, select the .pin
from your Quartus II project directory. You can also specify Fracturing Scheme, Bus pin, and Power
pin options. Click Next.
8. Select to create or modify symbol attributes for use in the DxDesigner software. Click Next.
9. On the Pin Settings page, make any final adjustments to pin and label location and information. Each
tabbed spreadsheet represents a fracture of your symbol. Click Save Symbol.
After creating the symbol, you can examine and place any fracture of the symbol in your schematic.
You can locate separate files of all the fractures you created in the library you specified or created in
the /sym directory in your DxDesigner project. You can add the symbols to your schematics or you
can manually edit the symbols or with the Symbol wizard.
Scripting API
The I/O Designer software includes a command line Tcl interpreter. All commands input through the I/O
Designer GUI translate into Tcl commands run by the tool. You can run individual Tcl commands or
scripts in the I/O Designer Console window, rather than using the GUI.
You can use the following Tcl commands to control I/O Designer.
• set_fpga_xchange_file <file name>—specifies the .fx from which the I/O Designer software
updates assignments.
• update_from_fpga_xchange_file—updates the I/O Designer database with assignment updates
from the currently specified .fx.
• generate_fpga_xchange_file—updates the .fx with I/O Designer software changes for transfer back
into the Quartus II software.
• set_pin_report_file -quartus_pin <file name>—imports assignment data from a Quartus II
software .pin file.
• symbolwizard—runs the I/O Designer Symbol wizard.
• set_dx_designer_project -path <path>
Send Feedback
QII5V2
2014.06.30 Document Revision History 7-13
Related Information
Quartus II Handbook Archive
Send Feedback
2014.06.30
Cadence PCB Design Tools Support
8
QII5V2 Subscribe Send Feedback
integration design workflow: the Cadence Allegro Design Entry HDL software and the Cadence Allegro
Design Entry CIS (Component Information System) software (also known as OrCAD Capture CIS). The
information is useful for board design and layout engineers who want to begin the FPGA board integra‐
tion process while the FPGA is still in the design phase. Part librarians can also benefit by learning the
method to use output from the Quartus II software to create new library parts and symbols.
With today’s large, high-pin-count and high-speed FPGA devices, good PCB design practices are
important to ensure the correct operation of your system. The PCB design takes place concurrently with
the design and programming of the FPGA. An FPGA or ASIC designer initially creates the signal and pin
assignments and the board designer must transfer these assignments to the symbols used in their system
circuit schematics and board layout correctly. As the board design progresses, you must perform pin
reassignments to optimize the layout. You must communicate pin reassignments to the FPGA designer to
ensure the new assignments are processed through the FPGA with updated placement and routing.
You require the following software:
• The Quartus II software version 5.1 or later
• The Cadence Allegro Design Entry HDL software or the Cadence Allegro Design Entry CIS software
version 15.2 or later
• The OrCAD Capture software with the optional CIS option version 10.3 or later (optional)
Note: These programs are very similar because the Cadence Allegro Design Entry CIS software is based
on the OrCAD Capture software. Any procedural information can also apply to the OrCAD
Capture software unless otherwise noted.
Related Information
• www.cadence.com
For more information about obtaining and licensing the Cadence tools and for product information,
support, and training
• www.cadence.com
For more information about the OrCAD Capture software and the CIS option
• www.ema-eda.com
For more information about Cadence and OrCAD support and training
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
8-2 Product Comparison 2014.06.30
Product Comparison
Table 8-1: Cadence and OrCAD Product Comparison
Related Information
• www.cadence.com
• www.ema-eda.com
Send Feedback
QII5V2
2014.06.30 FPGA-to-PCB Design Flow 8-3
Figure 8-1: Design Flow with the Cadence Allegro Design Entry HDL Software
.pin
Edit or F racture Symbol
End
Figure 8-2: Design Flow with the Cadence Allegro Design Entry CIS Software
.pin
Forward to Board Developement Tool
End
To create FPGA symbols using the Cadence Allegro PCB Librarian Part Developer tool, you must obtain
the Cadence PCB Librarian Expert license. You can update symbols with changes made to the FPGA
design using any of these tools.
Send Feedback
QII5V2
8-4 Integrating Altera FPGA Design 2014.06.30
1. In the Quartus II software, compile your design to generate a Pin-Out File (.pin) to transfer the
assignments to the Cadence software.
2. If you are using the Cadence Allegro Design Entry HDL software for your schematic design, follow
these steps:
a. Open an existing project or create a new project in the Cadence Allegro Project Manager tool.
b. Construct a new symbol or update an existing symbol using the Cadence Allegro PCB Librarian
Part Developer tool.
c. With the Cadence Allegro PCB Librarian Part Developer tool, edit your symbol or fracture it into
smaller parts (optional).
d. Instantiate the symbol in your Cadence Allegro Design Entry HDL software schematic and transfer
the design to your board layout tool.
or
If you are using the Cadence Allegro Design Entry CIS software for your schematic design, follow
these steps:
e. Generate a new part in a new or existing Cadence Allegro Design Entry CIS project, referencing
the .pin output file from the Quartus II software. You can also update an existing symbol with a
new .pin.
f. Split the symbol into smaller parts as necessary.
g. Instantiate the symbol in your Cadence Allegro Design Entry CIS schematic and transfer the design
to your board layout tool.
Related Information
About the SSN Analyzer
Simultaneous Switching Noise (SSN) Analysis and Optimizations on page 3-1
Send Feedback
QII5V2
2014.06.30 Generating a .pin File 8-5
The .pin lists all used and unused pins on your selected Altera device. The .pin also provides the following
basic information fields for each assigned pin on the device:
• Pin signal name and usage
• Pin number
• Signal direction
• I/O standard
• Voltage
• I/O bank
• User or Fitter-assigned
Related Information
• I/O Management on page 2-1
For more information about using the Quartus II Pin Planner to create or change pin assignment
details.
Related Information
• I/O Management on page 2-1
For more information about pin and signal assignment transfer and the files that the Quartus II
software can import and export.
Send Feedback
QII5V2
8-6 Creating Symbols 2014.06.30
Related Information
www.cadence.com
Provides information about the Cadence Allegro Design Entry HDL software and the Cadence Allegro
PCB Librarian Part Developer tool, including licensing, support, usage, training, and product updates.
Creating Symbols
In addition to circuit simulation, circuit board schematic creation is one of the first tasks required when
designing a new PCB. Schematics must understand how the PCB works, and to generate a netlist for a
board layout tool for board design and routing. The Cadence Allegro PCB Librarian Part Developer tool
allows you to create schematic symbols based on FPGA designs exported from the Quartus II software.
You can create symbols for the Cadence Allegro Design Entry HDL project with the Cadence Allegro PCB
Librarian Part Developer tool, which is available in the Cadence Allegro Project Manager tool. Altera
recommends using the Cadence Allegro PCB Librarian Part Developer tool to import FPGA designs into
the Cadence Allegro Design Entry HDL software.
You must obtain a PCB Librarian Expert license from Cadence to run the Cadence Allegro PCB Librarian
Part Developer tool. The Cadence Allegro PCB Librarian Part Developer tool provides a GUI with many
options for creating, editing, fracturing, and updating symbols. If you do not use the Cadence Allegro
PCB Librarian Part Developer tool, you must create and edit symbols manually in the Symbol Schematic
View in the Cadence Allegro Design Entry HDL software.
Note: If you do not have a PCB Librarian Expert license, you can automatically create FPGA symbols
using the programmable IC (PIC) design flow found in the Cadence Allegro Project Manager tool.
Before creating a symbol from an FPGA design, you must open a Cadence Allegro Design Entry HDL
project with the Cadence Allegro Project Manager tool. If you do not have an existing Cadence Allegro
Design Entry HDL project, you can create one with the Cadence Allegro Design Entry HDL software. The
Cadence Allegro Design Entry HDL project directory with the name <project name>.cpm contains your
Cadence Allegro Design Entry HDL projects.
While the Cadence Allegro PCB Librarian Part Developer tool refers to symbol fractures as slots, the other
tools use different names to refer to symbol fractures.
Related Information
www.cadence.com
Provides information about using the PIC design flow.
Send Feedback
QII5V2
2014.06.30 Cadence Allegro PCB Librarian Part Developer Tool in the Design Flow 8-7
tool can be split or fractured into several functional blocks called slots, allowing multiple smaller part
fractures to exist on the same schematic page or across multiple pages.
Cadence Allegro PCB Librarian Part Developer Tool in the Design Flow
Part Developer
Instantiate Symbol
in Schematic
Forward to Board
These steps are not
Layout Tool
part of the FPGA symbol
creation or update process.
Board Layout Tool
End
To run the Cadence Allegro PCB Librarian Part Developer tool, you must open a Cadence Allegro Design
Entry HDL project in the Cadence Allegro Project Manager tool. To open the Cadence Allegro PCB
Librarian Part Developer tool, on the Flows menu, click Library Management, and then click Part
Developer.
Related Information
• FPGA-to-PCB Design Flow on page 8-2
Send Feedback
QII5V2
8-8 Editing and Fracturing Symbol 2014.06.30
Send Feedback
QII5V2
2014.06.30 Editing and Fracturing Symbol 8-9
d[7..0] yn_out[7..0]
filtref
VCCIO1
VCCIO2
VCCIO3
VCCIO4
VCCINT
DCLK filtref
DATA0
NCONFIG CONF_DONE VCCA_PLL1
clk NSTATUS VCCA_PLL2
NCE ASDO
clkx2 follow NCSO GNDA_PLL1
MSEL0 GNDA_PLL2
MSEL1 filtref NCEO GNDG_PLL1
newt yvalid
TDI TDO GNDG_PLL2
reset TMS
GND
GND
GND
GND
GND
GND
GND
GND
GND
GND
TCK
To fracture a part into separate slots, or to modify the slot locations of pins on parts fractured in the
Cadence Allegro PCB Librarian Part Developer tool, follow these steps:
1. Start the Cadence Allegro Design Project Manager.
2. On the Flows menu, click Library Management.
3. Click Part Developer.
4. Click the name of the package you want to change in the cell hierarchy.
5. Click Functions/Slots. If you are not creating new slots but want to change the slot location of some
pins, proceed to Step 6. If you are creating new slots, click Add. A dialog box appears, allowing you to
add extra symbol slots. Set the number of extra slots you want to add to the existing symbol, not the
total number of desired slots for the part. Click OK.
6. Click Distribute Pins. Specify the slot location for each pin. Use the checkboxes in each column to
move pins from one slot to another. Click OK.
7. After distributing the pins, click the Package Pin tab and click Generate Symbol(s).
8. Select whether to create a new symbol or modify an existing symbol in each slot. Click OK.
The newly generated or modified slot symbols appear as separate symbols in the cell hierarchy. Each of
these symbols can be edited individually.
Caution: The Cadence Allegro PCB Librarian Part Developer tool allows you to remap pin
assignments in the Package Pin tab of the main Cadence Allegro PCB Librarian Part
Developer window. If signals remap to different pins in the Cadence Allegro PCB Librarian
Part Developer tool, the changes reflect only in regenerated symbols for use in your
schematics. You cannot transfer pin assignment changes to the Quartus II software from the
Cadence Allegro PCB Librarian Part Developer tool, which creates a potential mismatch of
the schematic symbols and assignments in the FPGA design. If pin assignment changes are
necessary, make the changes in the Quartus II Pin Planner instead of the Cadence Allegro
PCB Librarian Part Developer tool, and update the symbol as described in the following
sections.
For more information about creating, editing, and organizing component symbols with the
Cadence Allegro PCB Librarian Part Developer tool, refer to the Part Developer Help.
Send Feedback
QII5V2
8-10 Updating FPGA Symbols 2014.06.30
Part Developer
End
To update the symbol using the Cadence Allegro PCB Librarian Part Developer tool after updating
the .pin, follow these steps:
1. On the File menu, click Import and Export. The Import and Export wizard appears.
2. In the list of actions to perform, select Import ECO - FPGA. Click Next. The Select Source dialog box
appears.
3. Select the updated source of the FPGA assignment information. In the Vendor list, select Altera. In
the PnR Tool list, select quartusII. In the PR File field, click browse to specify the updated .pin in
your Quartus II project directory. Click Next. The Select Destination window appears.
4. Select the source component and a destination cell for the updated symbol. To create a new
component based on the updated pin assignment data, select Generate Custom Component. Selecting
Generate Custom Component replaces the cell listed under the Specify Library and Cell name
header with a new, nonfractured cell. You can preserve these edits by selecting Use standard
component and select the existing library and cell. Select the destination library for the component
and click Next. The Preview of Import Data dialog box appears.
5. Make any additional changes to your symbol. Click Next. A list of ECO messages appears
summarizing the changes made to the cell. To accept the changes and update the cell, click Finish.
6. The main Cadence Allegro PCB Librarian Part Developer window appears. You can edit, fracture, and
generate the updated symbols as usual from the main Cadence Allegro PCB Librarian Part Developer
window.
Note: If the Cadence Allegro PCB Librarian Part Developer tool is not set up to point to your PCB
Librarian Expert license file, an error message appears in red at the bottom of the message text
Send Feedback
QII5V2
2014.06.30 Instantiating the Symbol in the Cadence Allegro Design Entry HDL Software 8-11
window of the Part Developer when you select the Import and Export command. To point to your
PCB Librarian Expert license, on the File menu, click Change Product, and select the correct
product license.
Related Information
• FPGA-to-PCB Design Flow on page 8-2
Instantiating the Symbol in the Cadence Allegro Design Entry HDL Software
To instantiate the symbol in your Cadence Allegro Design Entry HDL schematic after saving the new
symbol in the Cadence Allegro PCB Librarian Part Developer tool, follow these steps:
1. In the Cadence Allegro Project Manager tool, switch to the board design flow.
2. On the Flows menu, click Board Design.
3. To start the Cadence Allegro Design Entry HDL software, click Design Entry.
4. To add the newly created symbol to your schematic, on the Component menu, click Add. The Add
Component dialog box appears.
5. Select the new symbol library location, and select the name of the cell you created from the list of cells.
The symbol attaches to your cursor for placement in the schematic. To fracture the symbol into slots,
right-click the symbol and choose Version to select one of the slots for placement in the schematic.
Related Information
• www.cadence.com
Provides more information about the Cadence Allegro Design Entry HDL software, including
licensing, support, usage, training, and product updates.
Send Feedback
QII5V2
8-12 Creating a Cadence Allegro Design Entry CIS Project 2014.06.30
Figure 8-5: Design Flow with the Cadence Allegro Design Entry CIS Software
.pin
Forward to Board Developement Tool
End
Note: Routing or pin assignment changes made in a board layout tool or a Cadence Allegro Design Entry
CIS symbol cannot be back-annotated to the Quartus II software.
Related Information
• www.cadence.com
For more information about the Cadence Allegro Design Entry CIS software, including licensing,
support, usage, training, and product updates.
• www.ema-eda.com
For more information about the Cadence Allegro Design Entry CIS software, including licensing,
support, usage, training, and product updates.
Send Feedback
QII5V2
2014.06.30 Generating a Part 8-13
Your new project is in the specified location and consists of the following files:
• OrCAD Capture Project File (.opj)
• Schematic Design File (.dsn)
Generating a Part
After you create a new project or open an existing project in the Cadence Allegro Design Entry CIS
software, you can generate a new schematic symbol based on your Quartus II FPGA design. You can also
update an existing symbol. The Cadence Allegro Design Entry CIS software stores component symbols in
OrCAD Library File (.olb). When you place a symbol in a library attached to a project, it is immediately
available for instantiation in the project schematic.
You can add symbols to an existing library or you can create a new library specifically for the symbols
generated from your FPGA designs. To create a new library, follow these steps:
1. On the File menu, point to New and click Library in the Cadence Allegro Design Entry CIS software to
create a default library named library1.olb. This library appears in the Library folder in the Project
Manager window of the Cadence Allegro Design Entry CIS software.
2. To specify a desired name and location for the library, right-click the new library and select Save As.
Saving the new library creates the library file.
Send Feedback
QII5V2
8-14 Splitting a Part 2014.06.30
Splitting a Part
After saving a new symbol in a project library, you can fracture the symbol into multiple parts called
sections. Fracturing a part into separate sections is useful for FPGA designs. A single symbol for most
FPGA packages might be too large for a single schematic page. Splitting the part into separate sections
allows you to organize parts of the symbol by function, creating cleaner circuit schematics. For example,
you can create one slot for an I/O symbol, a second slot for a JTAG symbol, and a third slot for a power/
ground symbol.
Figure 8-6: Splitting a Symbol into Multiple Sections
d[7..0] yn_out[7..0]
filtref
VCCIO1
VCCIO2
VCCIO3
VCCIO4
VCCINT
DCLK filtref
DATA0 CONF_DONE
clk NCONFIG VCCA_PLL1
NCE NSTATUS VCCA_PLL2
ASDO
clkx2 follow NCSO GNDA_PLL1
MSEL0 GNDA_PLL2
MSEL1 filtref NCEO GNDG_PLL1
newt yvalid
TDI TDO GNDG_PLL2
reset TMS
GND
GND
GND
GND
GND
GND
GND
GND
GND
GND
TCK
Note: Although symbol generation in the Design Entry CIS software refers to symbol fractures as
sections, other tools use different names to refer to symbol fractures.
To split a part into sections, select the part in its library in the Project Manager window of the Cadence
Allegro Design Entry CIS software. On the Tools menu, click Split Part or right-click the part and choose
Split Part. The Split Part Section Input Spreadsheet appears.
Send Feedback
QII5V2
2014.06.30 Instantiating a Symbol in a Design Entry CIS Schematic 8-15
Each row in the spreadsheet represents a pin in the symbol. The Section column indicates the section of
the symbol to which each pin is assigned. You can locate all pins in a new symbol in section 1. You can
change the values in the Section column to assign pins to various sections of the symbol. You can also
specify the side of a section on the location of the pin by changing the values in the Location column.
When you are ready, click Split. A new symbol appears in the same library as the original with the name
<original part name>_Split1.
View and edit each section individually. To view the new sections of the part, double-click the part. The
Part Symbol Editor window appears and the first section of the part displays for editing. On the View
menu, click Package to view thumbnails of all the part sections. To edit the section of the symbol, double-
click the thumbnail.
For more information about splitting parts into sections and editing symbol sections in the Cadence
Allegro Design Entry CIS software, refer to the Help in the software.
Send Feedback
QII5V2
8-16 Altera Libraries for the Cadence Allegro Design Entry CIS Software 2014.06.30
Select the new symbol library location and the newly created part name. If you select a part that is split
into sections, you can select the section to place from the Part pop-up menu. Click OK. The symbol
attaches to your cursor for placement in the schematic. To place the symbol, click on the schematic page.
For more information about using the Cadence Allegro Design Entry CIS software, refer to the Help in
the software.
Altera Libraries for the Cadence Allegro Design Entry CIS Software
Altera provides downloadable .olb for many of its device packages. You can add these libraries to your
Cadence Allegro Design Entry CIS project and update the symbols with the pin assignments contained in
the .pin generated by the Quartus II software. You can use the downloaded library symbols as a base for
creating custom schematic symbols with your pin assignments that you can edit or fracture. This method
increases productivity by reducing the amount of time it takes to create and edit a new symbol.
Using the Altera-provided Libraries with your Cadence Allegro Design Entry CIS Project
To use the Altera-provided libraries with your Cadence Allegro Design Entry CIS project, follow these
steps:
1. Download the library of your target device from the Download Center page found through the
Support page on the Altera website.
2. Create a copy of the appropriate .olb to maintain the original symbols. Place the copy in a convenient
location, such as your Cadence Allegro Design Entry CIS project directory.
3. In the Project Manager window of the Cadence Allegro Design Entry CIS software, click once on the
Library folder to select it. On the Edit menu, click Project or right-click the Library folder and choose
Add File to select the copy of the downloaded .olb and add it to your project. You can locate the new
library in the list of part libraries for your project.
4. On the Tools menu, click Generate Part. The Generate Part dialog box appears.
5. In the Netlist/source file field, click Browse to specify the .pin in your Quartus II design.
6. From the Netlist/source file type list, select Altera Pin File.
7. For Part name, type the name of the target device the same as it appears in the downloaded library file.
For example, if you are using a device from the CYCLONE06.OLB library, type the part name to
match one of the devices in this library such as ep1c6f256. You can rename the symbol in the Project
Manager window after updating the part.
Send Feedback
QII5V2
2014.06.30 Document Revision History 8-17
8. Set the Destination part library to the copy of the downloaded library you added to the project.
9. Select Update pins on existing part in library. Click OK.
10.Click Yes.
The symbol is updated with your pin assignments. Double-click the symbol in the Project Manager
window to view and edit the symbol. On the View menu, click Package if you want to view and edit
other sections of the symbol. If the symbol in the downloaded library is fractured into sections, you can
edit each section but you cannot further fracture the part. You can generate a new part without using
the downloaded part library if you require additional sections.
For more information about creating, editing, and fracturing symbols in the Cadence Allegro Design
Entry CIS software, refer to the Help in the software.
March 2009 9.0.0 • Chapter 9 was previously Chapter 7 in the 8.1 software release.
• No change to content.
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Send Feedback
2014.06.30
Reviewing Printed Circuit Board Schematics
with the Quartus II Software 9
QII5V2 Subscribe Send Feedback
Altera FPGAs and CPLDs offer a multitude of configurable options to allow you to implement a custom
application-specific circuit on your PCB.
Your Quartus II project provides important information specific to your programmable logic design,
which you can use in conjunction with the device literature available on Altera's website to ensure that
you implement the correct board-level connections in your schematic.
Refer to the Settings dialog box options, the Fitter report, and Messages window when creating and
reviewing your PCB schematic. The Quartus II software also provides the Pin Planner and the SSN
Analyzer to assist you during your PCB schematic review process.
Related Information
• Schematic Review Worksheets
• Pin Connection Guidelines
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
9-2 Device and Pins Options Dialog Box Settings 2014.06.30
If you are migrating from a smaller device with NC (no-connect) pins to a larger device with power or
ground pins in the same package, you can safely connect the NC pins to power or ground pins to facilitate
successful migration.
Related Information
Migration Devices Dialog Box
For more information about the Migration Devices dialog box in the Quartus II software
Configuration Settings
The Configuration page of the Device and Pin Options dialog box specifies the configuration scheme
and configuration device for the target device. Use the Configuration page settings to verify the
configuration scheme with the MSEL pin settings used on your PCB schematic and the I/O voltage of the
configuration scheme.
Your specific configuration settings may impact the availability of some dual-purpose I/O pins in user
mode.
Related Information
Dual-Purpose Pins Settings on page 9-2
Altera Corporation Reviewing Printed Circuit Board Schematics with the Quartus II Software
Send Feedback
QII5V2
2014.06.30 Voltage Settings 9-3
Voltage Settings
The Voltage page specifies the default VCCIO I/O bank voltage and the default I/O bank voltage for the
pins on the target device. VCCIO I/O bank voltage settings made in the Voltage page are overridden by
I/O standard assignments made on I/O pins in their respective banks.
Related Information
Reviewing Device Pin-Out Information in the Fitter Report on page 9-3
Related Information
Device and Pin Options Dialog Box
For more information about the Device and Pins Options dialog box in the Quartus II software
Voltage Settings
The Voltage page, under Operating Settings and Conditions in the Settings dialog box, allows you to
specify voltage operating conditions for timing and power analyses. Ensure that the settings in the
Voltage page match the settings in your PCB schematic, especially if the target device includes
transceivers.
The Voltage page settings requirements differ depending on the settings of the transceiver instances in
the design. Refer to the Fitter report for the required settings, and verify that the voltage settings are
correctly set up for your PCB schematic.
After verifying your settings in the Device and Settings dialog boxes, you can verify your device pin-out
with the Fitter report.
Related Information
Pin Connection Guidelines
For more information about voltage settings
Reviewing Printed Circuit Board Schematics with the Quartus II Software Altera Corporation
Send Feedback
QII5V2
9-4 Reviewing Device Pin-Out Information in the Fitter Report 2014.06.30
clamp diodes, and on-chip termination (OCT) pin assignments in these sections of the Fitter report. You
can check the pin assignments reported in the Input Pins, Output Pins, and Bidirectional Pins reports
against your PCB schematic to determine whether your PCB requires external components.
These reports also identify whether you made pin assignments or if the Fitter automatically placed the
pins. If the Fitter changed your pin assignments, you should make these changes user assignments
because the location of pin assignments made by the Fitter may change with subsequent compilations.
Figure 9-1: Resource Section Report
This figure shows the pins the Fitter chose for the OCT external calibration resistor connections (RUP/
RDN) and the name of the associated termination block in the Input Pins report. You should make these
types of assignments user assignments.
The I/O Bank Usage report provides a high-level overview of the VCCIO and VREF requirements for
your design, based on your I/O assignments. Verify that the requirements in this report match the settings
in your PCB schematic. All unused I/O banks, and all banks with I/O pins with undefined I/O standards,
default the VCCIO voltage to the voltage defined in the Voltage page of the Device and Pin Options
dialog box.
The All Package Pins report lists all the pins on your device, including unused pins, dedicated pins and
power/ground pins. You can use this report to verify pin characteristics, such as the location, name, usage,
direction, I/O standard and voltage for each pin with the pin information in your PCB schematic. In
particular, you should verify the recommended voltage levels at which you connect unused dedicated
inputs and I/O and power pins, especially if you selected a migration device. Use the All Package Pins
report to verify that you connected all the device voltage rails to the voltages reported.
Altera Corporation Reviewing Printed Circuit Board Schematics with the Quartus II Software
Send Feedback
QII5V2
2014.06.30 Reviewing Compilation Error and Warning Messages 9-5
Errors commonly reported include connecting the incorrect voltage to the predriver supply (VCCPD) pin
in a specific bank, or leaving dedicated clock input pins floating. Unused input pins that should be
connected to ground are designated as GND+ in the Pin Name/Usage column in the All Package Pins
report.
You can also use the All Package Pins report to check transceiver-specific pin connections and verify that
they match the PCB schematic. Unused transceiver pins have the following requirements, based on the
pin designation in the Fitter report:
• GXB_GND—Unused GXB receiver or dedicated reference clock pin. This pin must be connected to
GXB_GND through a 10k Ohm resistor.
• GXB_NC—Unused GXB transmitter or dedicated clock output pin. This pin must be disconnected.
Some transceiver power supply rails have dual voltage capabilities, such as VCCA_L/R and VCCH_L/R,
that depend on the settings you created for the ALTGX parameter editor. Because these user-defined
settings overwrite the default settings, you should use the All Package Pins report to verify that these
power pins on the device symbol in the PCB schematics are connected to the voltage required by the
transceiver. An incorrect connection may cause the transceiver to function not as expected.
If your design includes a memory interface, the DQS Summary report provides an overview of each DQ
pin group. You can use this report to quickly confirm that the correct DQ/DQS pins are grouped together.
Finally, the Fitter Device Options report summarizes some of the settings made in the Device and Pin
Options dialog box. Verify that these settings match your PCB schematics.
Related Information
• Signal Integrity Analysis with Third-Party Tools on page 6-1
For more information about signal integrity analysis in the Quartus II software
Reviewing Printed Circuit Board Schematics with the Quartus II Software Altera Corporation
Send Feedback
QII5V2
9-6 Using Additional Quartus II Software Tools 2014.06.30
Pin Planner
The Quartus II Pin Planner helps you visualize, plan, and assign device I/O pins in a graphical view of the
target device package. You can quickly locate various I/O pins and assign them design elements or other
properties to ensure compatibility with your PCB layout.
You can use the Pin Planner to verify the location of clock inputs, and whether they have been placed on
dedicated clock input pins, which is recommended when your design uses PLLs.
You can also use the Pin Planner to verify the placement of dedicated SERDES pins. SERDES receiver
inputs can be placed only on DIFFIO_RX pins, while SERDES transmitter outputs can be placed only on
DIFFIO_TX pins.
The Pin Planner gives a visual indication of signal-to-signal proximity in the Pad View window, and also
provides information about differential pin pair placement, such as the placement of pseudo-differential
signals.
Related Information
• I/O Management on page 2-1
For more information about the Pin Planner
SSN Analyzer
The SSN Analyzer supports pin planning by estimating the voltage noise caused by the simultaneous
switching of output pins on the device. Because of the importance of the potential SSN performance for a
specific I/O placement, you can use the SSN Analyzer to analyze the effects of aggressor I/O signals on a
victim I/O pin.
Related Information
• Simultaneous Switching Noise (SSN) Analysis and Optimizations on page 3-1
For more information about the SSN Analyzer
Altera Corporation Reviewing Printed Circuit Board Schematics with the Quartus II Software
Send Feedback
QII5V2
2014.06.30 Document Revision History 9-7
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Reviewing Printed Circuit Board Schematics with the Quartus II Software Altera Corporation
Send Feedback
2014.12.15
Design Optimization Overview
10
QII5V2 Subscribe Send Feedback
design performance when you design for programmable logic devices (PLDs), especially high density
FPGAs.
Physical implementation can be an intimidating and challenging phase of the design process. The Quartus
II software provides a comprehensive environment for FPGA designs, delivering unmatched perform‐
ance, efficiency, and ease-of-use.
In a typical design flow, you must synthesize your design with Quartus II integrated synthesis or a third-
party tool, place and route your design with the Fitter, and use the TimeQuest timing analyzer to ensure
your design meets the timing requirements. With the PowerPlay Power Analyzer, you ensure the design’s
power consumption is within limits.
Device Settings
Device assignments determine the timing model that the Quartus II software uses during compilation.
Choose the correct speed grade to obtain accurate results and the best optimization. The device size and
the package determine the device pin-out and the available resources in the device.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
10-2 I/O Assignments 2014.12.15
I/O Assignments
The I/O standards and drive strengths specified for a design affect I/O timing. Specify I/O assignments so
that the Quartus II software uses accurate I/O timing delays in timing analysis and Fitter optimizations.
If there is no PCB layout requirement, then you do not need to specify pin locations. If your pin locations
are not fixed due to PCB layout requirements, then leave the pin locations unconstrained. If your pin
locations are already fixed, then make pin assignments to constrain the compilation appropriately.
Use the Assignment Editor and Pin Planner to assign I/O standards and pin locations.
Related Information
Timing Closure and Optimization on page 12-1
For more information about recommendations for making pin assignments that can have a large effect on
your results in smaller macrocell-based architectures.
I/O Management on page 2-1
For more information about I/O standards and pin constraints, refer to the appropriate device handbook.
For more information about planning and checking I/O assignments.
About the Assignment Editor
For information about using the Assignment Editor, refer to Quartus II Help.
Send Feedback
QII5V2
2014.12.15 Partitions and Floorplan Assignments for Incremental Compilation 10-3
and maximum timing constraints as applicable. If your design contains more than one clock or contains
pins with different I/O requirements, make multiple clock settings and individual I/O assignments instead
of using a global constraint.
Make any complex timing assignments required in your design, including false path and multicycle path
assignments. Common situations for these types of assignments include reset or static control signals
(when the time required for a signal to reach a destination is not important) or paths that have more than
one clock cycle available for operation in a design. These assignments enable the Quartus II software to
make appropriate trade-offs between timing paths and can enable the Compiler to improve timing
performance in other parts of your design.
Note: To ensure that you apply constraints or assignments to all design nodes, you can report all
unconstrained paths in your design with the Report Unconstrained Paths command in the Task
pane of the Quartus II TimeQuest Timing Analyzer or the report_ucp Tcl command.
Related Information
• Timing Closure and Optimization on page 12-1
For more information about optimization with physical synthesis.
• Advanced Settings (Fitter)
For more information about reducing runtime by changing Fitter effort.
• The Quartus II TimeQuest Timing Analyzer
For more information about timing assignments and timing analysis.
• Quartus II TimeQuest Timing Analyzer Cookbook
For more information about timing assignments and timing analysis.
Send Feedback
QII5V2
10-4 Physical Implementation 2014.12.15
Physical Implementation
Most optimization issues involve preserving previous results, reducing area, reducing critical path delay,
reducing power consumption, and reducing runtime.
The Quartus II software includes advisors to address each of these issues and helps you optimize your
design. Run these advisors during physical implementation for advice about your specific design.
You can reduce the time spent on design iterations by following the recommended design practices for
designing with Altera devices. Design planning is critical for successful design timing implementation
®
and closure.
Related Information
Design Planning with the Quartus II Software
Send Feedback
QII5V2
2014.12.15 Reducing Area 10-5
Related Information
• Quartus II Incremental Compilation for Hierarchical and Team-Based Designs
• About Incremental Compilation
Reducing Area
By default, the Quartus II Fitter might physically spread a design over the entire device to meet the set
timing constraints. If you prefer to optimize your design to use the smallest area, you can change this
behavior. If you require reduced area, you can enable certain physical synthesis options to modify your
netlist to create a more area-efficient implementation, but at the cost of increased runtime and decreased
performance.
Related Information
Netlist Optimizations and Physical Synthesis on page 16-1
Timing Closure and Optimization on page 12-1
Recommended HDL Coding Styles
Send Feedback
QII5V2
10-6 Reducing Power Consumption 2014.12.15
Related Information
• Power Optimization on page 13-1
Reducing Runtime
Many Fitter settings influence compilation time. Most of the default settings in the Quartus II software are
set for reduced compilation time. You can modify these settings based on your project requirements.
The Quartus II software supports parallel compilation in computers with multiple processors. This can
reduce compilation times by up to 15% while giving the identical result as serial compilation.
You can also reduce compilation time with your iterations by using incremental compilation. Use
incremental compilation when you want to change parts of your design, while keeping most of the
remaining logic unchanged.
Design Analysis
The Quartus II software provides tools that help with a visual representation of your design. You can use
the RTL Viewer to see a schematic representation of your design before synthesis and place-and-route.
The Technology Map Viewer provides a schematic representation of the design implementation in the
selected device architecture after synthesis and place-and-route. It can also include timing information.
With incremental compilation, the Design Partition Planner and the Chip Planner allow you to partition
and layout your design at a higher level. In addition, you can perform many different tasks with the Chip
Planner, including: making floorplan assignments, implementing engineering change orders (ECOs), and
performing power analysis. Also, you can analyze your design and achieve a faster timing closure with the
Chip Planner. The Chip Planner provides physical timing estimates, critical path display, and a routing
congestion view to help guide placement for optimal performance.
Related Information
• Quartus II Incremental Compilation for Hierarchical and Team-Based Designs
• Best Practices for Incremental Compilation Partitions and Floorplan Assignments
• Engineering Change Management with the Chip Planner on page 17-1
For more information on design analysis for incremental compilation.
Advisors
The Quartus II software includes several advisors to help you optimize your design and reduce
compilation time.
You can complete your design faster by following the recommendations in the Compilation Time
Advisor, Incremental Compilation Advisor, Timing Optimization Advisor, Area Optimization Advisor,
Resource Optimization Advisor, and Power Optimization Advisor. These advisors give recommendations
based on your project settings and your design constraints.
Send Feedback
QII5V2
2014.12.15 Design Space Explorer II 10-7
Related Information
Running Advisors in the Quartus II Software
For more information about advisors, refer to Quartus II Help.
Send Feedback
QII5V2
10-8 Document Revision History 2014.12.15
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Send Feedback
2014.12.15
Reducing Compilation Time
11
QII5V2 Subscribe Send Feedback
The Analysis and Synthesis module includes physical synthesis optimizations performed during synthesis,
if you have turned on physical synthesis optimizations. The Fitter includes two steps, placement and
routing, and also includes physical synthesis if you turned on the physical synthesis option with Normal
or Extra effort levels. The Flow Elapsed Time section of the Compilation Report shows the duration of
the Analysis and Synthesis and Fitter modules. The Fitter Messages report in the Fitter section of the
Compilation Report displays the elapsed time for placement and routing processes.
Placement is the process of finding optimum locations for the logic in your design. Placement includes
Quartus II pre-Fitter operations, which place dedicated logic such as clocks, PLLs, and transceiver blocks.
Routing is the process of connecting the nets between the logic in your design. Finding better placement
for the logic in your design requires more compilation time. Good logic placement allows you to more
easily meet your timing requirements and makes your design easier to route.
The Quartus II software displays info messages while the Fitter is running (including Placement and
Routing). The Message window displays this message every hour to indicate Fitter operations are
progressing normally.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
11-2 Strategies to Reduce the Overall Compilation Time 2014.12.15
Send Feedback
QII5V2
2014.12.15 Using Incremental Compilation 11-3
one. Altera recommends that you do not use the Intel Hyper-Threading feature for Quartus II
compilations, because it can increase runtimes.
The software does not necessarily use all the processors that you specify during a given compilation.
Additionally, the software never uses more than the specified number of processors, enabling you to work
on other tasks on your computer without it becoming slow or less responsive.
If you have partitioned your design and enabled parallel compilation, the Quartus II software can use
different processors to compile those partitions simultaneously during Analysis and Synthesis. This can
cause higher peak memory usage during Analysis and Synthesis.
You can reduce the compilation time by up to 10% on systems with two processing cores and by up to
20% on systems with four cores. With certain design flows in which timing analysis runs alone, multiple
processors can reduce the time required for timing analysis by an average of 10% when using two
processors. This reduction can reach an average of 15% when using four processors.
The actual reduction in compilation time when using incremental compilation partitions depends on
your design and on the specific compilation settings. For example, compilations with multi-corner
optimization turned on benefit more from using multiple processors than do compilations without multi-
corner optimization. The runtime requirement is not reduced for some other compilation goals, such as
Analysis and Synthesis. The Fitter (quartus_fit) and the Quartus II TimeQuest Timing Analyzer
(quartus_sta) stages in the compilation can, in certain cases, benefit from the use of multiple processors.
The Flow Elapsed Time panel of the Compilation Report shows the average number of processors for
these stages. The Parallel Compilation panel of the appropriate report, such as the Fitter report, shows a
more detailed breakdown of processor usage. This panel is displayed only if parallel compilation is
enabled.
Parallel compilation is available for Arria series, Cyclone , MAX II, MAX V (limited support), and
® ® ®
You can also set the number of processors available for Quartus II compilation using the following Tcl
command in your script:
The use of multiple processors does not affect the quality of the fit. For a given Fitter seed on a specific
design, the fit is exactly the same, regardless of whether the Quartus II software uses one processor or
multiple processors. The only difference between compilations using a different number of processors is
the compilation time.
Related Information
• Processing Page (Options Dialog Box)
• Compilation Process Settings Page (Settings Dialog Box)
For more information about how to control the number of processors used during compilation for a
specific project, refer to Quartus II Help.
Send Feedback
QII5V2
11-4 Reducing Synthesis Time and Synthesis Netlist Optimization Time 2014.12.15
You can speed up design iterations by recompiling only a particular design partition and merging results
with previous compilation results from other partitions. You can also use physical synthesis optimization
techniques for specific design partitions while leaving other parts of your design untouched to preserve
performance.
If you are using a third-party synthesis tool, you can create separate atom netlist files for the parts of your
design that you already have synthesized and optimized so that you update only the parts of your design
that change.
In the standard incremental compilation design flow, you can divide the top-level design into partitions,
which the software can compile and optimize in the top-level Quartus II project. You can preserve fitting
results and performance for completed partitions while other parts of your design are changing.
Incremental compilation reduces the compilation time for each design iteration because the software does
not recompile the unchanged partitions in your design.
The incremental compilation feature facilitates team-based design flows by enabling designers to create
and optimize design blocks independently, when necessary, and supports third-party IP integration.
Related Information
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design
For more information about the full incremental compilation flow in the Quartus II software.
• About Incremental Compilation
For more information about incremental compilation, refer to Quartus II Help.
Send Feedback
QII5V2
2014.12.15 Reducing Placement Time 11-5
If you are trying to infer a large memory block, the software consumes more resources in the FPGA. This
can cause routing congestion and increasing compilation time significantly. If you see high routing
utilizations in certain blocks, it is a good idea to review the code for such blocks.
Related Information
Recommended HDL Coding Styles
For more information about coding guidelines.
Send Feedback
QII5V2
11-6 Preserving Placement with Incremental Compilation 2014.12.15
Related Information
Using Incremental Compilation on page 11-3
Send Feedback
QII5V2
2014.12.15 Reducing Static Timing Analysis Time 11-7
Related Information
Processing Page (Options Dialog Box)
For more information about setting process priority, refer to Quartus II Help.
Send Feedback
QII5V2
11-8 Document Revision History 2014.12.15
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Send Feedback
2014.12.15
Timing Closure and Optimization
12
QII5V2 Subscribe Send Feedback
The application techniques vary between designs. Applying each technique does not always improve
results. Settings and options in the Quartus II software have default values that provide the best trade-off
®
between compilation time, resource utilization, and timing performance. You can adjust these settings to
determine whether other settings provide better results for your design.
Related Information
Advanced Fitter Setting Dialog Box online help
For scripting and device family support information of the Optimize Hold Timing and Optimize Multi-
Corner Timing settings
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
12-2 Optimize Multi-Corner Timing 2014.12.15
If you select All Paths, the Fitter also works to meet hold requirements from registers to registers, as
highlighted in blue in the figure, in which a derived clock generated with logic causes a hold time problem
on another register.
Figure 12-1: Optimize Hold Timing Option Fixing an Internal Hold Time Violation
D Q
clk D Q
Logic
However, if your design still has internal hold time violations between registers, correct the violations by
manually adding some delays by instantiating LCELL primitives, or by making changes to your design,
such as using a clock enable signal instead of a derived or gated clock.
Related Information
Recommended Design Practices documentation
For design practices that help to eliminate internal hold time violations
Send Feedback
QII5V2
2014.12.15 Fitter Aggressive Routability Optimization 12-3
When this option is off, the Fitter optimizes designs considering only slow-corner delays from the slow-
corner timing model (slowest manufactured device for a given speed grade, operating in low-voltage
conditions).
Settings Description
Always The Fitter always performs aggressive routability optimizations. If you set the
Fitter Aggressive Routability Optimizations logic option to Always, reducing
wire utilization may affect the performance of your design.
Never The Fitter never performs aggressive routability optimizations. If improving
timing is more important than reducing wire usage, then set this option to
Automatically or Never.
Automatically The Fitter performs aggressive routability optimizations automatically, based on
the routability and timing requirements of the design. If improving timing is
more important than reducing wire usage, then set this option to Automatically
or Never.
Design Analysis
The initial compilation establishes whether the design achieves a successful fit and meets the specified
timing requirements. This section describes how to analyze your design results in the Quartus II software.
You should analyze any constraints that the Quartus II software ignores. If necessary, correct the
constraints and recompile your design before proceeding with design optimization.
You can view a list of ignored assignment in the Ignored Assignment Report generated by the Fitter.
Send Feedback
QII5V2
12-4 I/O Timing (Including tPD) 2014.12.15
Related Information
• Quartus II TimeQuest Timing Analyzer documentation
For more information about the report_sdc command and its options
• Fitter Summary Reports online help
Related Information
Quartus II TimeQuest Timing Analyzer documentation
Information about how timing numbers are calculated
Register-to-Register Timing
Timing Analysis with the TimeQuest Timing Analyzer
Analyze all valid register-to-register paths by using the appropriate constraints in the TimeQuest analyzer.
To view all timing summaries, run the Report All Summaries command by double-clicking Report All
Summaries in the Tasks pane in the TimeQuest analyzer.
If any clock domains have failing paths (highlighted in red in the Report panel), right-click the Clock
Name listed in the Clocks Summary panel and go to Report Timing to get more details. Your design
meets timing requirements when you do not have negative slack on any register-to-register path on any of
the clock domains.
When timing requirements are not met, a report on the failed paths (highlighted in red) can uncover
more detail.
When you select a path listed in the TimeQuest Report Timing pane, the tabs in the corresponding path
detail pane show a path summary of source and destination registers and their timing, statistics about the
path delay, detailed information about the complete data path with all nodes in the path, and the
waveforms of the relevant signals. The Extra Fitter Information tab will show a Graphical Data Path of
where the offending path lies on the physical device. This can reveal whether the timing failure may be
distance related, due to the source and destination node being too close or too far. The Chip Planner can
also be used to investigate the physical layout of a failing path in more detail. To locate a selected path in
the Chip Planner, right-click a node, point to Locate, and select Locate in Chip Planner. The Chip
Planner appears with the path highlighted. Use this to show fanout, fanin, routing congestion, and region
assignments information, and to determine whether those factors might be contributing to the timing
critical path. Additionally, if you know that a path is not a valid path, you can set it to be a false path using
the shortcut menu.
Send Feedback
QII5V2
2014.12.15 Tips for Analyzing Failing Paths 12-5
The Data Path tab can also be useful for determining contributions to timing critical paths. The Data
Path tab shows details of the paths that the clock and data took to get from source to destination nodes,
and the time it took on an incremental and cumulative basis. It also provides information about the
routing types and elements used, and their locations.
To view the path details of any selected path, click the Data Path tab in the path details pane. The Data
Path tab displays the details of the Data Arrival Path, as well as the Data Required Path.
The Waveform tab will show the slack relationship between arrival data and required data. This could be
useful for determining how close or far off the path is from meeting timing.
To aid in timing debug, the RTL Viewer or Technology Map Viewer allow you to see schematic represen‐
tations of your design. These viewers allow you to view a gate-level or technology-mapped representation
of your design netlist. By providing a view of the path from source and destination nodes, the viewers can
help identify areas in a design that may benefit from reducing the number of logic levels between the
nodes. To locate a timing path in one of the viewers, right-click a path in the report, point to Locate, and
click Locate in RTL Viewer or Locate in Technology Map Viewer.
Related Information
• Quartus II TimeQuest Timing Analyzer documentation
Information about how timing analysis results are calculated
• Analyzing Designs with Quartus II Netlist Viewers documentation
Related Information
Design Evaluation for Timing Closure on page 12-23
Send Feedback
QII5V2
12-6 Tips for Analyzing Failing Clock Paths that Cross Clock Domains 2014.12.15
Tips for Analyzing Failing Clock Paths that Cross Clock Domains
When analyzing clock path failures, check whether these paths cross two clock domains. This is the case if
the From Clock and To Clock in the timing analysis report are different.
Figure 12-2: Different Value in From Clock and To Clock Field
There can also be paths that involve a different clock in the middle of the path, even if the source and
destination register clock are the same.
When you run Report Timing on your design, the report shows the launch clock and latch clock for each
failing path. Check whether these failing paths between these clock domains should be analyzed synchro‐
nously. If the failing paths are not to be analyzed synchronously, they must be set as false paths. Also
check the relationship between the launch clock and latch clock to make sure it is realistic and what you
expect from your knowledge of the design. For example, the path can start at a rising edge and end at a
falling edge, which reduces the setup relationship by one half clock cycle.
Review the clock skew reported in the Timing Report. A large skew may indicate a problem in your
design, such as a gated clock or a problem in the physical layout (for example, a clock using local routing
instead of dedicated clock routing). When you have made sure the paths are analyzed synchronously and
that there is no large skew on the path, and that the constraints are correct, you can analyze the data
path.These steps help you fine tune your constraints for paths across clock domains to ensure you get an
accurate timing report.
Check if the PLL phase shift is reducing the setup requirement. You might be able to adjust this using PLL
parameters and settings.
Paths that cross clock domains are generally protected with synchronization logic (for example, FIFOs or
double-data synchronization registers) to allow asynchronous interaction between the two clock domains.
In such cases, you can ignore the timing paths between registers in the two clock domains while running
timing analysis, even if the clocks are related.
The Fitter attempts to optimize all failing timing paths. If there are paths that can be ignored for optimiza‐
tion and timing analysis, but the paths do not have constraints that instruct the Fitter to ignore them, the
Fitter tries to optimize those paths as well. In some cases, optimizing unnecessary paths can prevent the
Fitter from meeting the timing requirements on timing paths that are critical to the design. It is beneficial
to specify all paths that can be ignored by setting false path constraints on them, so that the Fitter can put
more effort into the paths that must meet their timing requirements instead of optimizing paths that can
be ignored.
Related Information
Quartus II TimeQuest Timing Analyzer
Details about how to ignore timing paths that cross clock domains
Send Feedback
QII5V2
2014.12.15 Tips for Analyzing Paths from/to the Source and Destination of Critical Path 12-7
Tips for Analyzing Paths from/to the Source and Destination of Critical Path
When analyzing the failing paths in a design, it is often helpful to get a fuller picture of the many
interactions the fitter may be working on around the paths. To understand what may be pulling on a
critical path, the following report_timing command can be useful.
In the project directory, run the report_timing command, shown in the example below, in a .tcl file to
analyze the nodes in a critical path.
Copy the node names from the From Node and To Node columns of the worst path into the first two
variables, and then in the TimeQuest timing analyzer, in the Script menu, source the .tcl script.
In the resulting timing panel, timing failed paths (highlighted in red) can be located in the Chip Planner,
where information such as distance between the nodes and large fanouts can be viewed.
The figure shows a simplified example of what these reports analyzed.
Figure 12-3: Timing Report
Source Register
of Worst Path
LUT
LUT
LUT LUT LUT
LUT
LUT LUT
LUT
Legend Destination
wrst_src -> * Register of
* -> wrst_dst Worst Path
* -> wrst_src LUT
wrst_dst -> *
Critical Path
The critical path of the design is in red. The script analyzes the path between the worst source and
destination registers. The first report_timing command analyzes other path that the source is driving, as
shown in green. The second report_timing command analyzes the critical path and other path going to
the destination, shown in yellow. These commands report everything inside these two endpoints that are
pulling them in different directions. The last two report_timing commands show everything outside of
Send Feedback
QII5V2
12-8 Tips for Locating Multiple Paths to the Chip Planner 2014.12.15
the endpoints pulling them in other directions. If any of these reports have slacks near the critical path,
then the Fitter is balancing these paths with the critical path, trying to achieve the best slack. The figure is
quite simple compared to the critical path in most designs, but it is easy to see how this can get very
complicated quickly.
Tips for Creating a .tcl Script to Monitor Critical Paths Across Compiles
Many designs have the same critical paths show up after each compile, but some suffer from having
critical paths bounce around between different hierarchies, changing with each compile.
This could happen in high speed designs where many register to register paths have very little slack.
Different placements can then result in timing failures in the marginal paths. In designs like this, create a
TQ_critical_paths.tcl script in the project directory. For a given compile, view the critical paths and then
write a generic report_timing command to capture those paths. For example, if several paths fail in a
low-level hierarchy, you can add the following command:
If there is a specific path, such as a bit of a state-machine going to other *count_sync* registers, you can
add a command as shown by the following:
This file can be sourced in the TimeQuest timing analyzer after every compilation, and new
report_timing commands can be added as new critical paths appear. This helps you monitor paths that
consistently fail and paths that are only marginal, so you can prioritize effectively.
Send Feedback
QII5V2
2014.12.15 Optimizing Timing (LUT-Based Devices) 12-9
For details about the number and types of global routing resources available, refer to the relevant device
handbook.
Check the global signal utilization in your design to ensure that the appropriate signals have been placed
on the global routing resources. In the Compilation Report, open the Fitter report and click Resource
Section. Analyze the Global & Other Fast Signals and Non-Global High Fan-out Signals reports to
determine whether any changes are required.
You might be able to reduce skew for high fan-out signals by placing them on global routing resources.
Conversely, you can reduce the insertion delay of low fan-out signals by removing them from global
routing resources. Doing so can improve clock enable timing and control signal recovery/removal timing,
but increases clock skew. Use the Global Signal setting in the Assignment Editor to control global routing
resources.
Related Information
Report Timing Closure Recommendations Dialog Box online help
Send Feedback
QII5V2
12-10 Timing Optimization Advisor 2014.12.15
When you expand one of the categories in the Timing Optimization Advisor, such as Maximum
Frequency (fmax) or I/O Timing (tsu, tco, tpd), the recommendations are divided into stages. The stages
show the order in which to apply the recommended settings. The first stage contains the options that are
easiest to change, make the least drastic changes to your design optimization, and have the least effect on
compilation time. Icons indicate whether each recommended setting has been made in the current
project. In the figure, the checkmark icons in the list of recommendations for Stage 1 indicate recommen‐
dations that are already implemented. The warning icons indicate recommendations that are not followed
for this compilation. The information icons indicate general suggestions. For these entries, the advisor
Send Feedback
QII5V2
2014.12.15 I/O Timing Optimization 12-11
does not report whether these recommendations were followed, but instead explains how you can achieve
better performance. For a legend that provides more information for each icon, refer to the “How to use”
page in the Timing Optimization Advisor.
There is a link from each recommendation to the appropriate location in the Quartus II GUI where you
can change the settings. For example, consider the Synthesis Netlist Optimizations page of the Settings
dialog box or the Global Signals category in the Assignment Editor. This approach provides the most
control over which settings are made and helps you learn about the settings in the software. In some cases,
you can also use the Correct the Settings button to automatically make the suggested change to global
settings.
For some entries in the Timing Optimization Advisor, a button appears that allows you to further analyze
your design and gives you more information. The advisor provides a table with the clocks in the design
and indicates whether they have been assigned a timing constraint.
Send Feedback
QII5V2
12-12 Timing-Driven Compilation 2014.12.15
Timing-Driven Compilation
This option moves registers into I/O elements if required to meet tSU or tCO assignments, duplicating the
register if necessary (as in the case in which a register fans out to multiple output locations). This option is
turned on by default and is a global setting. The option does not apply to MAX II series devices because
they do not contain I/O registers.
The Optimize IOC Register Placement for Timing option affects only pins that have a tSU or tCO
requirement. Using the I/O register is possible only if the register directly feeds a pin or is fed directly by a
pin. This setting does not affect registers with any of the following characteristics:
• Have combinational logic between the register and the pin
• Are part of a carry or cascade chain
• Have an overriding location assignment
• Use the asynchronous load port and the value is not 1 (in device families where the port is available)
Registers with the characteristics listed are optimized using the regular Quartus II Fitter optimizations.
Related Information
Optimize IOC Register Placement for Timing Logic Option online help
Send Feedback
QII5V2
2014.12.15 Programmable Delays 12-13
In MAX II series devices, which have no I/O registers, these assignments lock the register into the LAB
adjacent to the I/O pin if there is a pin location assignment for that I/O pin.
If the fast I/O setting is on, the register is always placed in the I/O element. If the fast I/O setting is off, the
register is never placed in the I/O element. This is true even if the Optimize IOC Register Placement for
Timing option is turned on. If there is no fast I/O assignment, the Quartus II software determines
whether to place registers in I/O elements if the Optimize IOC Register Placement for Timing option is
turned on.
You can also use the four fast I/O options (Fast Input Register, Fast Output Register, Fast Output
Enable Register, and Fast OCT Register) to override the location of a register that is in a LogicLock
region and force it into an I/O cell. If you apply this assignment to a register that feeds multiple pins, the
register is duplicated and placed in all relevant I/O elements. In MAX II series devices, the register is
duplicated and placed in each distinct LAB location that is next to an I/O pin with a pin location
assignment.
Programmable Delays
You can use various programmable delay options to minimize the tSU and tCO times. For Arria, Cyclone,
MAX II, MAX V, and Stratix series devices, the Quartus II software automatically adjusts the applicable
programmable delays to help meet timing requirements. Programmable delays are advanced options to
use only after you compile a project, check the I/O timing, and determine that the timing is unsatisfactory.
For detailed information about the effect of these options, refer to the device family handbook or data
sheet.
After you have made a programmable delay assignment and compiled the design, you can view the
implemented delay values for every delay chain for every I/O pin in the Delay Chain Summary section of
the Compilation Report.
You can assign programmable delay options to supported nodes with the Assignment Editor. You can
also view and modify the delay chain setting for the target device with the Chip Planner and Resource
Property Editor. When you use the Resource Property Editor to make changes after performing a full
compilation, recompiling the entire design is not necessary; you can save changes directly to the netlist.
Because these changes are made directly to the netlist, the changes are not made again automatically when
you recompile the design. The change management features allow you to reapply the changes on
subsequent compilations.
Although the programmable delays in newer devices are user-controllable, Altera recommends their use
for advanced users only. However, the Quartus II software might use the programmable delays internally
during the Fitter phase.
For details about the programmable delay logic options available for Altera devices, refer to the following
Quartus II Help topics:
Input Delay from Pin to Input Register logic option
Input Delay from Pin to Internal Cells logic option
Output Enable Pin Delay logic option
Delay from Output Register to Output Pin logic option
Input Delay from Dual-Purpose Clock Pin to Fan-Out Destinations logic option
Send Feedback
QII5V2
12-14 Use PLLs to Shift Clock Edges 2014.12.15
Related Information
• Engineering Change Management with the Chip Planner documentation on page 17-1
Information about using the Chip Planner and Resource Property Editor
You can achieve the same type of effect in certain devices by using the programmable delay called Input
Delay from Dual Purpose Clock Pin to Fan-Out Destinations.
Related Information
Input Delay from Dual-Purpose Clock Pin to Fan-Out Destinations Logic Option online help
Send Feedback
QII5V2
2014.12.15 Change How Hold Times are Optimized for MAX II Devices 12-15
Note: Register packing, a Fitter optimization option, may ignore LogicLock regions. If this occurs, disable
register packing for specific instances through the Quartus II Assignment Editor.
• Some periphery features may ignore LogicLock region assignments. When this happens, the
global promotion process may not function properly. To ensure that the global promotion
process uses the correct locations, assign specific pins to the I/Os using these periphery features.
• By default, some IP MegaCore functions apply a global signal assignment with a value of dual-
regional clock. If you constrain your logic to a regional clock region and set the global signal
assignment to Regional instead of Dual-Regional, you can reduce clock resource contention.
Related Information
Recommended Design Practices documentation
Details about synchronous design practices and coding styles
Send Feedback
QII5V2
12-16 Improving Register-to-Register Timing Summary 2014.12.15
tool treats them as generic logic. In the Quartus II software, you can check the State Machine report under
Analysis & Synthesis in the Compilation Report. This report provides details, including state encoding
for each state machine that was recognized during compilation. If your state machine is not recognized,
you might have to change your source code to enable it to be recognized.
Related Information
• Recommended HDL Coding Styles documentation
Coding style guidelines including examples of HDL code for inferring memory, functions, guidelines,
and sample HDL code for state machines
• AN 584: Timing Closure Methodology for Advanced FPGA Designs application note.
Send Feedback
QII5V2
2014.12.15 Physical Synthesis Optimizations 12-17
If these techniques do not achieve performance requirements, additional design source code modifica‐
tions might be required.
Related Information
Design Space Explorer II online help
Send Feedback
QII5V2
12-18 Turn Off Extra-Effort Power Optimization Settings 2014.12.15
Related Information
• Perform WYSIWYG Primitive Resynthesis Logic Option online help
• Optimization Technique Logic Option online help
• Working With Assignments in the Assignment Editor online help
Related Information
PowerPlay Power Optimization Logic Option online help
Power Optimization documentation on page 13-1
Related Information
• Optimization Technique Logic Option online help
• Synthesis documentation
Information about setting timing requirements and synthesis options in Quartus II integrated
synthesis and third-party synthesis tools
• Design Space Explorer II online help
Send Feedback
QII5V2
2014.12.15 Set the Synthesis Effort to High 12-19
design across design partitions. Incremental compilation always preserves the hierarchical boundaries
between design partitions. Follow Altera’s recommendations for design partitioning, such as registering
partition boundaries to reduce the effect of cross-boundary optimizations.
Related Information
Quartus II Incremental Compilation for Hierarchical and Team-Based Design documentation
Related Information
State Machine Processing Logic Option online help
Send Feedback
QII5V2
12-20 Prevent Shift Register Inference 2014.12.15
Note: Various Fitter optimizations may cause a small violation to the Maximum Fan-Out assignments to
improve timing.
Related Information
Manual Logic Duplication Logic Option online help
Fitter Seed
The Fitter seed affects the initial placement configuration of the design. Changing the seed value changes
the Fitter results because the fitting results change whenever there is a change in the initial conditions.
Each seed value results in a somewhat different fit, and you can experiment with several different seeds to
attempt to obtain better fitting results and timing performance.
When there are changes in your design, there is some random variation in performance between compila‐
tions. This variation is inherent in placement and routing algorithms—there are too many possibilities to
try them all and get the absolute best result, so the initial conditions change the compilation result.
Note: Any design change that directly or indirectly affects the Fitter has the same type of random effect as
changing the seed value. This includes any change in source files, Compiler Settings or Timing
Analyzer Settings. The same effect can appear if you use a different computer processor type or
different operating system, because different systems can change the way floating point numbers
are calculated in the Fitter.
If a change in optimization settings slightly affects the register-to-register timing or number of failing
paths, you cannot always be certain that your change caused the improvement or degradation, or whether
it could be due to random effects in the Fitter. If your design is still changing, running a seed sweep
(compiling your design with multiple seeds) determines whether the average result has improved after an
optimization change and whether a setting that increases compilation time has benefits worth the
increased time (such as setting the Physical Synthesis Effort to Extra). The sweep also shows the amount
of random variation to expect for your design.
If your design is finalized, you can compile your design with different seeds to obtain one optimal result.
However, if you subsequently make any changes to your design, you might need to perform seed sweep
again.
On the Assignments menu, select Compiler Settings to control the initial placement with the seed. You
can use the DSE II to perform a seed sweep easily.
Send Feedback
QII5V2
2014.12.15 Set Maximum Router Timing Optimization Level 12-21
You can use the following Tcl command from a script to specify a Fitter seed:
Related Information
Design Space Explorer II online help
Information about compiling your design with different seeds using Design Space Explorer II
Related Information
Router Timing Optimization Level Logic Option online help
LogicLock Assignments
Using LogicLock assignments to improve timing performance is only recommended for older Altera
devices, such as the MAX II family. For other device families, especially for larger devices such as Arria
and Stratix series devices, Altera does not recommend using LogicLock assignments to improve timing
performance. For these devices, use the LogicLock feature for performance preservation and to floorplan
your design.
LogicLock assignments do not always improve the performance of the design. In many cases, you cannot
improve upon results from the Fitter by making location assignments. If there are existing LogicLock
assignments in your design, remove the assignments if your design methodology permits it. Recompile
the design, and then check if the assignments are making the performance worse.
When making LogicLock assignments, it is important to consider how much flexibility to give the Fitter.
LogicLock assignments provide more flexibility than hard location assignments. Assignments that are
more flexible require higher Fitter effort, but reduce the chance of design overconstraint. The following
types of LogicLock assignments are available, listed in the order of decreasing flexibility:
• Auto size, floating location regions
• Fixed size, floating location regions
• Fixed size, locked location regions
If you are unsure of how big or where a LogicLock region should go, the Auto/Floating options are useful
for your first pass. After you determine where a LogicLock region must go, modify the Fixed/Locked
regions, as Auto/Floating LogicLock regions can hurt your overall performance. To determine what to put
into a LogicLock region, refer to the timing analysis results and analyze the critical paths in the Chip
Planner. The register-to-register timing paths in the Timing Analyzer section of the Compilation Report
help you recognize patterns.
Related Information
• Analyzing and Optimizing the Design Floorplan with the Chip Planner documentation on page 15-
1
Send Feedback
QII5V2
12-22 Hierarchy Assignments 2014.12.15
Hierarchy Assignments
For a design with the hierarchy shown in the figure, which has failing paths in the timing analysis results
similar to those shown in the table, mod_A is probably a problem module. In this case, a good strategy to
fix the failing paths is to place the mod_A hierarchy block in a LogicLock region so that all the nodes are
closer together in the floorplan.
Figure 12-6: Design Hierarchy
Top
mod_A mod_B
From To
|mod_A|reg1 |mod_A|reg9
|mod_A|reg3 |mod_A|reg5
|mod_A|reg4 |mod_A|reg6
|mod_A|reg7 |mod_A|reg10
|mod_A|reg0 |mod_A|reg2
Hierarchical LogicLock regions are also important if you are using an incremental compilation flow. Place
each design partition for incremental compilation in a separate LogicLock region to reduce conflicts and
ensure good results as the design develops. You can use the auto size and floating location regions to find
a good design floorplan, but fix the size and placement to achieve the best results in future compilations.
Related Information
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design documentation
• Best Practices for Incremental Compilation and Floorplan Assignments documentation
• Analyzing and Optimizing the Design Floorplan with the Chip Planner documentation on page 15-
1
Location Assignments
If a small number of paths are failing to meet their timing requirements, you can use hard location
assignments to optimize placement. Location assignments are less flexible for the Quartus II Fitter than
LogicLock assignments. In some cases, when you are familiar with your design, you can enter location
constraints in a way that produces better results.
Send Feedback
QII5V2
2014.12.15 Metastability Analysis and Optimization Techniques 12-23
Note: Improving fitting results, especially for larger devices, such as Arria and Stratix series devices, can
be difficult. Location assignments do not always improve the performance of the design. In many
cases, you cannot improve upon the results from the Fitter by making location assignments.
Related Information
• Understanding Metastability in FPGAs white paper
• Managing Metastability with the Quartus II Software documentation
Send Feedback
QII5V2
12-24 Evaluate Fitter Netlist Optimizations 2014.12.15
such as register duplication, retiming, and removal. These reports can be found in the Compilation
Report panel.
Figure 12-7: Optimization Results Reports
When physical synthesis is enabled, compilation messages include a summary of the physical synthesis
algorithms that were run, the performance improvement each algorithm achieved, and the elapsed time.
The reported improvement is the sum of the largest improvement estimated to be achievable in each
timing-critical clock domain. The values for the slack improvements can vary between compiles because
of the random starting point of the compilation algorithms, but the values should be similar. The figure
shows an example of the messages.
Figure 12-8: Compilation Messages
Send Feedback
QII5V2
2014.12.15 Evaluate Optimization Results 12-25
The Non-Global High Fan-Out Signals report lists the highest fan-out nodes that are not routed on global
signals. Reset and enable signals are at the top of the list. If there is routing congestion in the design, and
there are high fan-out non-global nodes in the congested area, consider using global or regional signals to
fan-out the nodes, or duplicate the high fan-out registers so that each of the duplicates can have fewer fan-
outs. Use the Chip Planner to locate high fan-out nodes, to report routing congestion, and to determine
whether the alternatives are viable.
Routing Usage
Review routing usage reported in the Fitter Resource Usage Summary report. The figure shows an
example of the report.
Send Feedback
QII5V2
12-26 Wires Added for Hold 2014.12.15
The average interconnect usage reports the average amount of interconnect that is used, out of what is
available on the device. The peak interconnect usage reports the largest amount of interconnect used in
the most congested areas. Designs with an average value below 50% typically do not have any problems
with routing. Designs with an average between 50-65% may have difficulty routing. Designs with an
average over 65% typically have difficulty meeting timing unless the RTL is well designed to tolerate a
highly utilized chip. Peak values at or above 90% are likely to have problems with timing closure; a 100%
peak value indicates that all routing in an area of the device has been used, so there is a high possibility of
degradation in timing performance. The figure shows the Report Routing Utilization report.
Figure 12-11: Report Routing Utilization Report
Send Feedback
QII5V2
2014.12.15 Wires Added for Hold 12-27
An example of an incorrect constraint which can cause the router to add wire for hold requirements is
when there is data transfer from 1x to 2x clocks. Assume the design intent is to allow two cycles per
transfer. Data can arrive any time in the two destination clock cycles by adding a multicycle setup
constraint as shown in the example:
The timing requirement is relaxed by one 2x clock cycle, as shown in the black line in the waveform in the
figure.
Figure 12-13: Timing Requirement Relaxed Waveform
However, the default hold requirement, shown with the dashed blue line, may cause the router to add wire
to guarantee that data is delayed by one cycle. To correct the hold requirement, add a multicycle
constraint with a hold option.
Send Feedback
QII5V2
12-28 Wires Added for Hold 2014.12.15
The orange dashed line in the figure above represents the hold relationship, and no extra wire is required
to delay the data.
The router can also add wire for hold timing requirements when data is transferred in the same clock
domain, but between clock branches that use different buffering. Transferring between clock network
types happens more often between the periphery and the core. The figure below shows a case where data
is coming into a device, and uses a periphery clock to drive the source register, and a global clock to drive
the destination register. A global clock buffer has larger insertion delay than a periphery clock buffer. The
clock delay to the destination register is much larger than to the source register, hence extra delay is
necessary on the data path to ensure that it meets its hold requirement.
Figure 12-14: Clock Delay
To identify cases where a path has different clock network types, review the path in the TimeQuest timing
analyzer, and check nodes along the source and destination clock paths. Also, check the source and
destination clock frequencies to see whether they are the same, or multiples, and whether there are
multicycle exceptions on the paths. In some cases, cross-domain paths may also be false by intent, so
make sure there are false path exceptions on those.
If you suspect that routing is added to fix real hold problems, then disable the Optimize hold timing
option. Recompile the design and rerun timing analysis to uncover paths that fail hold time.
Figure 12-15: Optimize Hold Timing Option
Send Feedback
QII5V2
2014.12.15 Evaluate Other Reports and Adjust Settings Accordingly 12-29
Disabling the Optimize hold timing option is a debug step, and should be left enabled (default state)
during normal compiles. Wire added for hold is a normal part of timing optimization during routing and
is not always a problem.
Review Floorplan
Use the Chip Planner for reviewing placement. The Chip Planner can be used to locate hierarchical
entities, and colors each located entity in the floorplan. Look for logic that seems out of place, based on
where you would expect it to be. For example, logic that interfaces with I/Os should be close to the I/Os,
and logic that interfaces with an IP or memory must be close to the IP or memory. The figure shows an
example of a floorplan with color-coded entities. In the floorplan, the green block is spread apart. Check
to see if those paths are failing timing, and if so, what connects to that module that could affect placement.
The blue and aqua blocks are spread out and mixed together. Check and see if there are many connections
between the two modules that may contribute to this. The pink logic at the bottom should interface with
I/Os at the bottom edge.
Send Feedback
QII5V2
12-30 Evaluate Placement and Routing 2014.12.15
Check fan-in and fan-out of a highlighted module by using the buttons on the task bar shown in the figure
below.
Figure 12-17: Fan-in and Fan-Out Buttons
Look for signals that go a long way across the chip and see if they are contributing to timing failures.
Check global signal usage for signals that may affect logic placement. Logic feeding a global buffer may be
pulled close to the buffer, away from related logic. High fan-out on non-global resource may pull logic
together.
Check for routing congestion. Highly congested areas may cause logic to be spread out, and the design
may be difficult to route.
Send Feedback
QII5V2
2014.12.15 Adjust Fitter Effort 12-31
reviewing and optimizing other settings and RTL. Try an increased value, up to 4, and reset to default if
performance or compile time does not improve.
Figure 12-18: Placement Effort Multiplier
Send Feedback
QII5V2
12-32 Review Timing Constraints 2014.12.15
Send Feedback
QII5V2
2014.12.15 Global Network Buffers 12-33
The Extra Fitter Information tab shows a miniature floorplan with the path highlighted. The path can
also be located in the Chip Planner for viewing routing congestion, and to view whether nodes in a path
are placed close together or far apart.
Source Location
If the register feeding the global buffer cannot be moved closer, then consider changing either the design
logic or the routing type.
Insertion Delay
If a global signal is required, consider adding half a cycle to timing by using a negative-edge triggered
register to generate the signal (top figure) and use a multicycle setup constraint (bottom figure).
Figure 12-21: Negative-Edge Triggered Register
Fan-Out
Nodes with very high fan-out that use local routing tend to pull logic that they drive close to the source
node. This can make other paths fail timing. Duplicating registers can help reduce the impact of high fan-
out paths. Consider manually duplicating and preserving these registers. Using a MAX_FANOUT assignment
Send Feedback
QII5V2
12-34 Global Networks 2014.12.15
may make arbitrary groups of fan-out nodes, whereas a designer can make more intelligent fan-out
groups.
Global Networks
If a signal should use a different type of global signal than it has automatically been assigned, use the
Global Signal assignment to control the global signal usage on a per-signal basis. For example, if local
routing is desired, set the Global Signal assignment to OFF.
Figure 12-23: Global Signal Assignment
Suspicious Setup
Suspicious setup failures include paths with very small or very large requirements. One typical cause is
math precision error. For example, 10Mhz/3 = 33.33 ns per period. In three cycles, the time would be
99.999 ns vs 100.000 ns. Setting a maximum delay could provide an appropriate setup relationship.
Another cause of failure would be paths that should be false by design intent, such as:
• asynchronous paths that are handled through FIFOs, or
• slow asynchronous paths that rely on handshaking for data that remain available for multiple clock
cycles.
To prevent the Fitter from having to meet unnecessarily restrictive timing requirements, consider adding
false or multicycle path statements.
Logic Depth
The Statistics tab in the TimeQuest path report shows the levels of logic in a path. If the path fails timing
and the number of logic levels is high, consider adding pipelining in that part of the design.
Clocking Architecture
Review the clock region boundaries in the Chip Planner. You must place registers driven by a regional
clock in one quadrant of the chip.
Send Feedback
QII5V2
2014.12.15 Timing Closure Recommendations 12-35
Timing failure can occur when the I/O interface at the top of the device connects to logic driven by a
regional clock which is in one quadrant of the device, and placement restrictions force long paths to and
from some of the I/Os to logic across quadrants.
Use a different type of clock source to drive the logic - global, which covers the whole device, or dual-
regional which covers half the device. Alternatively, you can reduce the frequency of the I/O interface to
accommodate the long path delays. You can also redesign the pinout of the device to place all the specified
I/Os adjacent to the regional clock quadrant. This issue can happen when register locations are restricted,
such as with LogicLock regions, clocking resources, or hard blocks (memories, DSPs, IPs). The Extra
Fitter Information tab in the TimeQuest report informs you when placement is restricted for nodes in a
path.
Send Feedback
QII5V2
12-36 Making Adjustments and Recompiling 2014.12.15
Scripting Support
You can run procedures and make settings described in this manual in a Tcl script. You can also run some
procedures at a command prompt. For detailed information about scripting command options, refer to
the Quartus II command-line and Tcl API Help browser. To run the Help browser, type the following
command at the command prompt:
quartus_sh --qhelp
You can specify many of the options described in this section either in an instance, or at a global level, or
both.
Use the following Tcl command to make a global assignment:
Note: If the <value> field includes spaces (for example, ‘Standard Fit’), you must enclose the value in
straight double quotation marks.
Related Information
Tcl Scripting documentation on page 5-1
Quartus II Settings Reference File Manual
Send Feedback
QII5V2
2014.12.15 Initial Compilation Settings 12-37
Send Feedback
QII5V2
12-38 I/O Timing Optimization Techniques (LUT-Based Devices) 2014.12.15
Send Feedback
QII5V2
2014.12.15 Register-to-Register Timing Optimization Techniques (LUT-Based Devices) 12-39
Send Feedback
QII5V2
12-40 Document Revision History 2014.12.15
November 2013 13.1.0 • Added Design Evaluation for Timing Closure section.
• Removed Optimizing Timing (Macrocell-Based CPLDs) section.
• Updated Optimize Multi-Corner Timing and Fitter Aggressive
Routability Optimization.
• Updated Timing Analysis with the TimeQuest Timing Analyzer to
show how to access the Report All Summaries command.
• Updated Ignored Timing Constraints to include a help link to
Fitter Summary Reports with the Ignored Assignment Report
information.
May 2013 13.0.0 • Renamed chapter title from Area and Timing Optimization to
Timing Closure and Optimization.
• Removed design and area/resources optimization information.
• Added the following sections:
Fitter Aggressive Routability Optimization.
Tips for Analyzing Paths from/to the Source and Destination of
Critical Path.
Tips for Locating Multiple Paths to the Chip Planner.
Tips for Creating a .tcl Script to Monitor Critical Paths Across
Compiles.
Send Feedback
QII5V2
2014.12.15 Document Revision History 12-41
November 2011 11.1.0 • Updated the “Timing Requirement Settings”, “Standard Fit”, “Fast
Fit”, “Optimize Multi-Corner Timing”, “Timing Analysis with the
TimeQuest Timing Analyzer”, “Debugging Timing Failures in the
TimeQuest Analyzer”, “LogicLock Assignments”, “Tips for
Analyzing Failing Clock Paths that Cross Clock Domains”, “Flatten
the Hierarchy During Synthesis”, “Fast Input, Output, and Output
Enable Registers”, and “Hierarchy Assignments” sections
• Updated Table 13–6
• Added the “Spine Clock Limitations” section
• Removed the Change State Machine Encoding section from page
19
• Removed Figure 13-5
• Minor text edits throughout the chapter
Send Feedback
QII5V2
12-42 Document Revision History 2014.12.15
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Send Feedback
2015.05.04
Power Optimization
13
QII5V2 Subscribe Send Feedback
Power Optimization
The Quartus II software offers power-driven compilation to fully optimize device power consumption.
®
Power-driven compilation focuses on reducing your design’s total power consumption using power-
driven synthesis and power-driven place-and-route.
This chapter describes the power-driven compilation feature and flow in detail, as well as low power
design techniques that can further reduce power consumption in your design. The techniques primarily
target Arria , Stratix , and Cyclone series of devices. These devices utilize a low-k dielectric material that
® ® ®
dramatically reduces dynamic power and improves performance. Arria series, Stratix IV, and Stratix V
device families include efficient logic structures called adaptive logic modules (ALMs) that obtain
maximum performance while minimizing power consumption. Cyclone device families offer the optimal
blend of high performance and low power in a low-cost FPGA.
Altera provides the Quartus II PowerPlay Power Analyzer to aid you during the design process by
delivering fast and accurate estimations of power consumption. You can minimize power consumption,
while taking advantage of the industry’s leading FPGA performance, by using the tools and techniques
described in this chapter.
Total FPGA power consumption is comprised of I/O power, core static power, and core dynamic power.
This chapter focuses on design optimization options and techniques that help reduce core dynamic power
and I/O power. In addition to these techniques, there are additional power optimization techniques
available for specific devices. These techniques include:
• Programmable Power Technology
• Device Speed Grade Selection
Related Information
• Literature and Technical Documentation
For more information about a device-specific architecture, refer to the device handbook on the Altera
website.
• PowerPlay Power Analysis
For more information about the PowerPlay Power Analyzer, refer to volume 3 of the Quartus II
Handbook.
• AN 514: Power Optimization in Stratix IV FPGAs
For more information about power optimization techniques available for Stratix IV devices.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
13-2 Power Dissipation 2015.05.04
Power Dissipation
You can refine techniques that reduce power consumption in your design by understanding the sources of
power dissipation.
The following figure shows the power dissipation of Stratix and Cyclone devices in different designs. All
designs were analyzed at a fixed clock rate of 100 MHz and exhibited varied logic resource utilization
across available resources.
Figure 13-1: Average Core Dynamic Power Dissipation
Average Core Dynamic Power Dissipation by Block Average Core Dynamic Power Dissipation by Block
Type in Stratix III Devices at a 12.5% Toggle Rate (1) Type in Cyclone III Devices at a 12.5% Toggle Rate (2)
Memory Memory
21% 20%
Combinational Logic
DSP Blocks Combinational Logic Multipliers 11%
1% (3) 16% 1% (3)
Registered Logic Registered Logic
18% 23%
Notes:
1. 103 different designs were used to obtain these results.
2. 96 different designs were used to obtain these results.
3. In designs using DSP blocks, DSPs consumed 5% of core dynamic power.
In Stratix and Cyclone device families, a series of column and row interconnect wires of varying lengths
provide signal interconnections between logic array blocks (LABs), memory block structures, and digital
signal processing (DSP) blocks or multiplier blocks. These interconnects dissipate the largest component
of device power.
FPGA combinational logic is another source of power consumption. The basic building block of logic in
the latest Stratix series devices is the ALM, and in Cyclone IV GX devices, it is the logic element (LE).
For more information about ALMs and LEs in Cyclone or Stratix devices, refer to the respective device
handbook.
Memory and clock resources are other major consumers of power in FPGAs. Stratix devices feature the
TriMatrix memory architecture. TriMatrix memory includes 512-bit M512 blocks, 4-Kbit M4K blocks,
and 512-Kbit M-RAM blocks, which are configurable to support many features. Stratix IV TriMatrix on-
chip memory is an enhancement based upon the Stratix II FPGA TriMatrix memory and includes three
sizes of memory blocks: MLAB blocks, M9K blocks, and M144K blocks. Stratix IV and Stratix V devices
feature Programmable Power Technology, an advanced architecture that enables a smooth trade-off
between speed and power. The core of each Stratix IV and Stratix V device is divided into tiles, each of
which may be put into a high-speed or low-power mode. The primary benefit of Programmable Power
Send Feedback
QII5V2
2015.05.04 Design Space Explorer II 13-3
Technology is to reduce static power, with a secondary benefit being a small reduction in dynamic power.
Cyclone IV GX devices have 9-Kbit M9K memory blocks.
The power optimizations, under Exploration mode, target overall design power improvements. These
settings focus on applying different options that specifically reduce total design thermal power.
By default, the Quartus II PowerPlay Power Analyzer is run for every exploration performed by DSE II
when power optimizations are selected. This helps you debug your design and determine trade-offs
between power requirements and performance optimization.
Related Information
About Design Space Explorer II
For more information about the DSE II, refer to Quartus II Help.
Send Feedback
QII5V2
13-4 Power-Driven Compilation 2015.05.04
Power-Driven Compilation
The standard Quartus II compilation flow consists of Analysis and Synthesis, placement and routing,
Assembly, and Timing Analysis. Power-driven compilation takes place at the Analysis and Synthesis and
Place-and-Route stages.
Quartus II software settings that control power-driven compilation are located in the PowerPlay power
optimization during synthesis list in the Advanced Settings (Synthesis) dialog box, and the PowerPlay
power optimization during fitting list on the Advanced Fitter Settings dialog box. The following
sections describes these power optimization options at the Analysis and Synthesis and Fitter levels.
Power-Driven Synthesis
Synthesis netlist optimization occurs during the synthesis stage of the compilation flow. The optimization
technique makes changes to the synthesis netlist to optimize your design according to the selection of
area, speed, or power optimization. This section describes power optimization techniques at the synthesis
level.
To access the PowerPlay Power Optimization During Synthesis option, click Assignments > Settings >
Compiler Settings > Advanced Settings (Synthesis).
You can apply these settings on a project or entity level.
Settings Description
Off No netlist, placement, or routing optimizations are performed
to minimize power.
Normal Low compute effort algorithms are applied to minimize power
compilation through netlist optimizations as long as they are not expected
(Default) to reduce design performance.
Extra effort High compute effort algorithms are applied to minimize
power through netlist optimizations. Max performance might
be impacted.
The Normal compilation setting is turned on by default. This setting performs memory optimization and
power-aware logic mapping during synthesis.
Memory blocks can represent a large fraction of total design dynamic power. Minimizing the number of
memory blocks accessed during each clock cycle can significantly reduce memory power. Memory
optimization involves effective movement of user-defined read/write enable signals to associated read-
and-write clock enable signals for all memory types.
A default implementation of a simple dual-port memory block in which write-clock enable signals and
read-clock enable signals are connected to VCC, making both read and write memory ports active during
each clock cycle.
Send Feedback
QII5V2
2015.05.04 Power-Driven Synthesis 13-5
Clock Clock
Memory transformation effectively moves the read-enable and write-enable signals to the respective read-
clock enable and write-clock enable signals. By using this technique, memory ports are shut down when
they are not accessed. This significantly reduces your design’s memory power consumption. For Stratix IV
and Stratix V devices, the memory transformation takes place at the Fitter level by selecting the Normal
compilation settings for the power optimization option.
In Cyclone IV GX and Stratix IV devices, the specified read-during-write behavior can significantly
impact the power of single-port and bidirectional dual-port RAMs. It is best to set the read-during-write
parameter to “Don’t care” (at the HDL level), as it allows an optimization whereby the read-enable
signal can be set to the inversion of the existing write-enable signal (if one exists). This allows the core
of the RAM to shut down (that is, not toggle), which saves a significant amount of power.
The other type of power optimization that takes place with the Normal compilation setting is power-
aware logic mapping. The power-aware logic mapping reduces power by rearranging the logic during
synthesis to eliminate nets with high toggle rates.
The Extra effort setting performs the functions of the Normal compilation setting and other memory
optimizations to further reduce memory power by shutting down memory blocks that are not accessed.
This level of memory optimization can require extra logic, which can reduce design performance.
The Extra effort setting also performs power-aware memory balancing. Power-aware memory balancing
automatically chooses the best memory configuration for your memory implementation and provides
optimal power saving by determining the number of memory blocks, decoder, and multiplexer circuits
required. If you have not previously specified target-embedded memory blocks for your design’s memory
functions, the power-aware balancer automatically selects them during memory implementation.
The following figure is an example of a 4k × 4 (4k deep and 4 bits wide) memory implementation in two
different configurations using M4K memory blocks available in some Stratix devices.
Send Feedback
QII5V2
13-6 Power-Driven Synthesis 2015.05.04
Addr[10:11] Addr
Decoder
Data[0:3]
4
Addr[10:11]
Data[0:3]
The minimum logic area implementation uses M4K blocks configured as 4k × 1. This implementation is
the default in the Quartus II software because it has the minimum logic area (0 logic cells) and the highest
speed. However, all four M4K blocks are active on each memory access in this implementation, which
increases RAM power. The minimum RAM power implementation is created by selecting Extra effort in
the PowerPlay power optimization list. This implementation automatically uses four M4K blocks
configured as 1k × 4 for optimal power saving. An address decoder is implemented by the RAM
megafunction to select which of the four M4K blocks should be activated on a given cycle, based on the
state of the top two user address bits. The RAM megafunction automatically implements a multiplexer to
feed the downstream logic by choosing the appropriate M4K output. This implementation reduces RAM
power because only one M4K block is active on any cycle, but it requires extra logic cells, costing logic
area and potentially impacting design performance.
There is a trade-off between power saved by accessing fewer memories and power consumed by the extra
decoder and multiplexor logic. The Quartus II software automatically balances the power savings against
the costs to choose the lowest power configuration for each logical RAM. The benchmark data shows that
the power-driven synthesis can reduce memory power consumption by as much as 60% in Stratix devices.
Memory optimization options can also be controlled by the Low_Power_Mode parameter in the Default
Parameters page of the Settings dialog box. The settings for this parameter are None, Auto, and ALL.
None corresponds to the Off setting in the PowerPlay power optimization list. Auto corresponds to the
Normal compilation setting and ALL corresponds to the Extra effort setting, respectively. You can apply
PowerPlay power optimization either on a compiler basis or on individual entities. The Low_Power_Mode
parameter always takes precedence over the Optimize Power for Synthesis option for power optimiza‐
tion on memory.
You can also set the MAXIMUM_DEPTH parameter manually to configure the memory for low power
optimization. This technique is the same as the power-aware memory balancer, but it is manual rather
than automatic like the Extra effort setting in the PowerPlay power optimization list. You can set the
MAXIMUM_DEPTH parameter for memory modules manually in the megafunction instantiation or in the IP
Catalog for power optimization. The MAXIMUM_DEPTH parameter always takes precedence over the
Optimize Power for Synthesis options for power optimization on memory optimization.
Related Information
• Reducing Memory Power Consumption on page 13-11
For more information about clock enable signals.
Send Feedback
QII5V2
2015.05.04 Power-Driven Fitter 13-7
Power-Driven Fitter
The Compiler Settings page provides access to PowerPlay power optimization settings.
You can apply these settings only on a project-wide basis. The Extra effort setting for the Fitter requires
extensive effort to optimize the design for power and can increase the compilation time.
Settings Description
Off No netlist, placement, or routing optimizations are performed to minimize power.
Normal Low compute effort algorithms are applied to minimize power through placement
compilation and routing optimizations as long as they are not expected to reduce design
(Default) performance.
Extra effort High compute effort algorithms are applied to minimize power through placement
and routing optimizations. Max performance might be impacted.
The Normal compilation setting is selected by default and performs DSP optimization by creating
power-efficient DSP block configurations for your DSP functions. For Stratix IV and Stratix V devices,
this setting, which is based on timing constraints entered for the design, enables the Programmable Power
Technology to configure tiles as high-speed mode or low-power mode. Programmable Power Technology
is always turned ON even when the OFF setting is selected for the PowerPlay power optimization
option. Tiles are the combination of LAB and MLAB pairs (including the adjacent routing associated with
LAB and MLAB), which can be configured to operate in high-speed or low-power mode. This level of
power optimization does not have any affect on the fitting, timing results, or compile time.
The Extra effort setting performs the functions of the Normal compilation setting and other place-and-
route optimizations during fitting to fully optimize the design for power. The Fitter applies an extra effort
to minimize power even after timing requirements have been met by effectively moving the logic closer
during placement to localize high-toggling nets, and using routes with low capacitance. However, this
effort can increase the compilation time.
The Extra effort setting uses a Value Change Dump File (.vcd) that guides the Fitter to fully optimize the
design for power, based on the signal activity of the design. The best power optimization during fitting
results from using the most accurate signal activity information. Signal activities from full post-fit netlist
(timing) simulation provide the highest accuracy because all node activities reflect the actual design
behavior, provided that supplied input vectors are representative of typical design operation. If you do not
have a .vcd file, the Quartus II software uses assignments, clock assignments, and vectorless estimation
values (PowerPlay Power Analyzer Tool settings) to estimate the signal activities. This information is used
to optimize your design for power during fitting. The benchmark data shows that the power-driven Fitter
technique can reduce power consumption by as much as 19% in Stratix devices. On average, you can
reduce core dynamic power by 16% with the Extra effort synthesis and Extra effort fitting settings, as
compared to the Off settings in both synthesis and Fitter options for power-driven compilation.
Note: Only the Extra effort setting in the PowerPlay power optimization list for the Fitter option uses
the signal activities (from .vcd files) during fitting. The settings made in the PowerPlay Power
Analyzer Settings page in the Settings dialog box are used to calculate the signal activity of your
design.
Send Feedback
QII5V2
13-8 Area-Driven Synthesis 2015.05.04
Related Information
• AN 514: Power Optimization in Stratix IV FPGAs
For more information about Stratix IV power optimization.
• PowerPlay Power Analysis
For more information about .vcd files and how to create them, refer to the Quartus II Handbook.
• Running a Power-Optimized Compilation
For step-by-step instructions on how to perform power-driven fitting, refer to Quartus II Help.
Area-Driven Synthesis
Using area optimization rather than timing or delay optimization during synthesis saves power because
you use fewer logic blocks. Using less logic usually means less switching activity. The Quartus II
integrated synthesis tool provides Speed, Balanced, or Area for the Optimization Technique option. You
can also specify this logic option for specific modules in your design with the Assignment Editor in cases
where you want to reduce area using the Area setting (potentially at the expense of register-to-register
timing performance) while leaving the default Optimization Technique setting at Balanced (for the best
trade-off between area and speed for certain device families). The Speed Optimization Technique can
increase the resource usage of your design if the constraints are too aggressive, and can also result in
increased power consumption.
The benchmark data shows that the area-driven technique can reduce power consumption by as much as
31% in Stratix devices and as much as 15% in Cyclone devices.
Before
10 ns 5 ns
After
7 ns 8 ns
Send Feedback
QII5V2
2015.05.04 Design Guidelines 13-9
Note: Gate-level register retiming makes changes at the gate level. If you are using an atom netlist from a
third-party synthesis tool, you must also select the Perform WYSIWYG primitive resynthesis
option to undo the atom primitives to gates mapping (so that register retiming can be performed),
and then to remap gates to Altera primitives. When using Quartus II integrated synthesis, retiming
occurs during synthesis before the design is mapped to Altera primitives. The benchmark data
shows that the combination of WYSIWYG remapping and gate-level register retiming techniques
can reduce power consumption by as much as 6% in Stratix devices and as much as 21% in Cyclone
devices.
Related Information
• Netlist Optimizations and Physical Synthesis on page 16-1
For more information about register retiming, refer to the Quartus II Handbook.
Design Guidelines
Several low-power design techniques can reduce power consumption when applied during FPGA design
implementation. This section provides detailed design techniques for Cyclone IV GXdevices that affect
overall design power. The results of these techniques might be different from design to design.
ena
inclk 3×
inclk 2×
outclk
inclk 1×
inclk 0×
clkselect[1..0]
Send Feedback
QII5V2
13-10 LAB-Wide Clock Enable Example 2015.05.04
The enable signal is applied to the clock signal before being distributed to global routing. Therefore, the
enable signal can either have a significant timing slack (at least as large as the global routing delay) or it
can reduce the fMAX of the clock signal.
Another contributor to clock power consumption is the LAB clock that distributes a clock to the registers
within a LAB. LAB clock power can be the dominant contributor to overall clock power. For example, in
Cyclone devices, each LAB can use two clocks and two clock enable signals, as shown in the following
figure. Each LAB’s clock signal and clock enable signal are linked. For example, an LE in a particular LAB
using the labclk1 signal also uses the labclkena1 signal.
Figure 13-7: LAB-Wide Control Signals
Dedicated 6
LAB Row
Clocks
Local
Interconnect
Local
Interconnect
Local
Interconnect
Local
Interconnect
To reduce LAB-wide clock power consumption without disabling the entire clock tree, use the LAB-wide
clock enable to gate the LAB-wide clock. The Quartus II software automatically promotes register-level
clock enable signals to the LAB-level. All registers within an LAB that share a common clock and clock
enable are controlled by a shared gated clock. To take advantage of these clock enables, use a clock enable
construct in the relevant HDL code for the registered logic.
Related Information
Clock Control Block Megafunction User Guide (ALTCLKCTRL)
For more information about using clock control blocks.
Send Feedback
QII5V2
2015.05.04 Reducing Memory Power Consumption 13-11
1
Enable 0 Internal Memory Clk
Clk
Using the clock enable signal enables the memory only when necessary and shuts it down for the rest of
the time, reducing the overall memory power consumption. You can create these enable signals by
selecting the Clock enable signal option for the appropriate port when generating the memory block
function.
Send Feedback
QII5V2
13-12 Reducing Memory Power Consumption 2015.05.04
For example, consider a design that contains a 32-bit-wide M4K memory block in ROM mode that is
running at 200 MHz. Assuming that the output of this block is only required approximately every four
cycles, this memory block will consume 8.45 mW of dynamic power according to the demands of the
downstream logic. By adding a small amount of control logic to generate a read clock enable signal for the
memory block only on the relevant cycles, the power can be cut 75% to 2.15 mW.
You can also use the MAXIMUM_DEPTH parameter in your memory megafunction to save power in
Cyclone IV GX, Stratix IV, and Stratix V devices; however, this approach might increase the number of
LEs required to implement the memory and affect design performance.
You can set the MAXIMUM_DEPTH parameter for memory modules manually in the megafunction instantia‐
tion. The Quartus II software automatically chooses the best design memory configuration for optimal
power.
Send Feedback
QII5V2
2015.05.04 Memory Power Reduction Example 13-13
Related Information
• Power-Driven Compilation on page 13-4
• Clock Power Management on page 13-9
For more information on clock network-wide gating.
Table 13-3: 4K × 36 Simple Dual-Port Memory Implemented Using Multiple M4K Blocks
Using the MAXIMUM_DEPTH parameter can save power. For all implementations, a user-provided read
enable signal is present to indicate when read data is required. Using this power-saving technique can
reduce power consumption by as much as 60%.
Send Feedback
QII5V2
13-14 Pipelining and Retiming 2015.05.04
70%
60%
50%
Power Savings
40%
30%
20%
10%
0%
4K × 1 2K × 2 1K × 4 512 × 9 256 × 18 128 × 36
M4K Configuration
As the memory depth becomes more shallow, memory dynamic power decreases because unaddressed
M4K blocks can be shut off using a decoded combination of address bits and the read enable signal. For a
128-deep memory block, power used by the extra LEs starts to outweigh the power gain achieved by using
a more shallow memory block depth. The power consumption of the memory blocks and associated LEs
depends on the memory configuration.
Note: The SOPC Builder and Qsys system do not offer specific power savings control for on-chip
memory block. There is no read enable, write enable, or clock enable that you can enable in the on-
chip RAM megafunction to shut down the RAM block in the SOPC Builder and Qsys system.
A
Q B Glitch
B
XOR (Exclusive OR) Gate
Q
t
Timing Diagram for the 2-Input XOR Gate
This glitch can propagate to subsequent logic and create unnecessary switching activity, increasing power
consumption. Circuits with many XOR functions, such as arithmetic circuits or cyclic redundancy check
(CRC) circuits, tend to have many glitches if there are several levels of combinational logic between
registers.
Pipelining can reduce design glitches by inserting flipflops into long combinational paths. Flipflops do not
allow glitches to propagate through combinational paths. Therefore, a pipelined circuit tends to have less
glitching. Pipelining has the additional benefit of generally allowing higher clock speed operations,
although it does increase the latency of a circuit (in terms of the number of clock cycles to a first result).
An example where pipelining is applied to break up a long combinational path.
Send Feedback
QII5V2
2015.05.04 Architectural Optimization 13-15
Non-Pipelined
Combinational
Logic
Long Logic
Depth
Pipelined
Combinational Combinational
Logic Logic
Pipelining is very effective for glitch-prone arithmetic systems because it reduces switching activity,
resulting in reduced power dissipation in combinational logic. Additionally, pipelining allows higher-
speed operation by reducing logic-level numbers between registers. The disadvantage of this technique is
that if there are not many glitches in your design, pipelining can increase power consumption by adding
unnecessary registers. Pipelining can also increase resource utilization. The benchmark data shows that
pipelining can reduce dynamic power consumption by as much as 30% in Cyclone and Stratix devices.
Architectural Optimization
You can use design-level architectural optimization by taking advantage of specific device architecture
features. These features include dedicated memory and DSP or multiplier blocks available in FPGA
devices to perform memory or arithmetic-related functions. You can use these blocks in place of LUTs to
reduce power consumption. For example, you can build large shift registers from RAM-based FIFO
buffers instead of building the shift registers from the LE registers.
The Stratix device family allows you to efficiently target small, medium, and large memories with the
TriMatrix memory architecture. Each TriMatrix memory block is optimized for a specific function. M512
memory blocks are more power-efficient than the distributed memory structures in some competing
FPGAs. The M4K memory blocks are used to implement buffers for a wide variety of applications,
including processor code storage, large look-up table implementation, and large memory applications.
The M-RAM blocks are useful in applications where a large volume of data must be stored on-chip.
Effective utilization of these memory blocks can have a significant impact on power reduction in your
design.
The latest Stratix and Cyclone device families have configurable M9K memory blocks that provide various
memory functions such as RAM, FIFO buffers, and ROM.
Related Information
• Area and Timing Optimization on page 12-1
For more information about using DSP and memory blocks efficiently, refer to the Quartus II
Handbook.
Send Feedback
QII5V2
13-16 I/O Power Guidelines 2015.05.04
Send Feedback
QII5V2
2015.05.04 Power Optimization Advisor 13-17
The following is an example of power saving for a DDR3 interface using on-chip parallel termination.
The static current consumed by parallel OCT is equal to the VCCIO voltage divided by 100 W . For DDR3
interfaces that use SSTL-15, the static current is 1.5 V/100 W = 15 mA per pin. Therefore, the static power
is 1.5 V ×15 mA = 22.5 mW. For an interface with 72 DQ and 18 DQS pins, the static power is 90 pins ×
22.5 mW = 2.025 W. Dynamic parallel OCT disables parallel termination during write operations, so if
writing occurs 50% of the time, the power saved by dynamic parallel OCT is 50% × 2.025 W = 1.0125 W.
Related Information
Stratix IV Device I/O Features
For more information about dynamic OCT in Stratix IV devices, refer to the chapter in the Stratix IV
Device Handbook.
The Power Optimization Advisor shows the recommendations that can reduce power in your design. The
recommendations are split into stages to show the order in which you should apply the recommended
settings. The first stage shows mostly CAD setting options that are easy to implement and highly effective
in reducing design power. An icon indicates whether each recommended setting is made in the current
project. The checkmark icons for Stage 1 shows the recommendations that are already implemented. The
warning icons indicate recommendations that are not followed for this compilation. The information icon
shows the general suggestions. Each recommendation includes the description, summary of the effect of
the recommendation, and the action required to make the appropriate setting.
Send Feedback
QII5V2
13-18 Document Revision History 2015.05.04
There is a link from each recommendation to the appropriate location in the Quartus II user interface
where you can change the setting. After making the recommended changes, recompile your design. The
Power Optimization Advisor indicates with green check marks that the recommendations were
implemented successfully. You can use the PowerPlay Power Analyzer to verify your design power results.
Figure 13-15: Implementation of Power Optimization Advisor Recommendations
The recommendations listed in Stage 2 generally involve design changes, rather than CAD settings
changes as in Stage 1. You can use these recommendations to further reduce your design power consump‐
tion. Altera recommends that you implement Stage 1 recommendations first, then the Stage 2 recommen‐
dations.
Send Feedback
QII5V2
2015.05.04 Document Revision History 13-19
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook on the Altera website.
Send Feedback
2014.12.15
Area Optimization
14
QII5V2 Subscribe Send Feedback
This chapter describes techniques to reduce resource usage when designing for Altera devices.
®
Resource Utilization
Determining device utilization is important regardless of whether your design achieved a successful fit. If
your compilation results in a no-fit error, resource utilization information is important for analyzing the
fitting problems in your design. If your fitting is successful, review the resource utilization information to
determine whether the future addition of extra logic or other design changes might introduce fitting
difficulties. Also, review the resource utilization information to determine if it is impacting timing
performance.
To determine resource usage, refer to the Flow Summary section of the Compilation Report. This section
reports resource utilization, including pins, memory bits, digital signal processing (DSP) blocks, and
phase-locked loops (PLLs). Flow Summary indicates whether your design exceeds the available device
resources. More detailed information is available by viewing the reports under Resource Section in the
Fitter section of the Compilation Report.
Flow Summary shows the overall logic utilization. The Fitter can spread logic throughout the device,
which may lead to higher overall utilization.
As the device fills up, the Fitter automatically searches for logic functions with common inputs to place in
one ALM. The number of packed registers also increases. Therefore, a design that has high overall utiliza‐
tion might still have space for extra logic if the logic and registers can be packed together more tightly.
The reports under the Resource Section in the Fitter section of the Compilation Report provide more
detailed resource information. The Fitter Resource Usage Summary report breaks down the logic utiliza‐
tion information and provides other resource information, including the number of bits in each type of
memory block. This panel also contains a summary of the usage of global clocks, PLLs, DSP blocks, and
other device-specific resources.
You can also view reports describing some of the optimizations that occurred during compilation. For
example, if you use Quartus II integrated synthesis, the reports in the Optimization Results folder in the
®
Analysis & Synthesis section include information about registers that integrated synthesis removed
during synthesis. Use this report to estimate device resource utilization for a partial design to ensure that
registers were not removed due to missing connections with other parts of the design.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
14-2 Optimizing Resource Utilization (LUT-Based Devices) 2014.12.15
If a specific resource usage is reported as less than 100% and a successful fit cannot be achieved, either
there are not enough routing resources or some assignments are illegal. In either case, a message appears
in the Processing tab of the Messages window describing the problem.
If the Fitter finishes unsuccessfully and runs much faster than on similar designs, a resource might be
over-utilized or there might be an illegal assignment. If the Quartus II software seems to run for an
excessively long time compared to runs on similar designs, a legal placement or route probably cannot be
found. In the Compilation Report, look for errors and warnings that indicate these types of problems.
You can use the Chip Planner to find areas of the device that have routing congestion on specific types of
routing resources. If you find areas with very high congestion, analyze the cause of the congestion. Issues
such as high fan-out nets not using global resources, an improperly chosen optimization goal (speed
versus area), very restrictive floorplan assignments, or the coding style can cause routing congestion. After
you identify the cause, modify the source or settings to reduce routing congestion.
Related Information
• Fitter Resources Report
For more information about Fitter Resources Report
• Displaying Resources and Information
For information about how to view routing congestion
• About the Chip Planner
For information about using the Chip Planner tool
• Analyzing and Optimizing the Design Floorplan with the Chip Planner on page 15-1
For details about using the Chip Planner tool
Related Information
• Design Optimization Overview on page 10-1
Provides information about setting basic constraints
• Timing Closure and Optimization on page 12-1
Provides information about optimizing I/O timing. These tips are valid for all FPGA families and the
MAX II family of CPLDs.
Send Feedback
QII5V2
2014.12.15 Resolving Resource Utilization Issues Summary 14-3
tions in these categories might conflict with each other. Altera recommends evaluating the options and
choosing the settings that best suit your requirements.
Related Information
Resource Optimization Advisor Command Tools Menu
For more information about the Resource Optimization Advisor
Related Information
• I/O Pin Utilization or Placement on page 14-3
• Logic Utilization or Placement on page 14-4
• Routing on page 14-8
Send Feedback
QII5V2
14-4 Guideline: Modify Pin Assignments or Choose a Larger Package 2014.12.15
Send Feedback
QII5V2
2014.12.15 Guideline: Restructure Multiplexers 14-5
If resource utilization is an important concern, some synthesis tools offer an easy way to optimize for area
instead of speed. If you are using Quartus II integrated synthesis, select Balanced or Area for the
Optimization Technique. You can also specify an Optimization Technique logic option for specific
modules in your design with the Assignment Editor in cases where you want to reduce area using the
Area setting (potentially at the expense of register-to-register timing performance) while leaving the
default Optimization Technique setting at Balanced (for the best trade-off between area and speed for
certain device families) or Speed. You can also use the Speed Optimization Technique for Clock
Domains logic option to specify that all combinational logic in or between the specified clock domain(s)
is optimized for speed.
In some synthesis tools, not specifying an fMAX requirement can result in less resource utilization.
Note: In the Quartus II software, the Balanced setting typically produces utilization results that are very
similar to those produced by the Area setting, with better performance results. The Area setting
can give better results in some cases.
The Quartus II software provides additional attributes and options that can help improve the quality of
your synthesis results.
Related Information
Synthesis
For information about setting the timing requirements and synthesis options in Quartus II integrated
synthesis and other synthesis tools
Related Information
• Restructure Multiplexers logic option
For more information about the Restructure Multiplexers option
• Recommended HDL Coding Styles
For design guidelines to achieve optimal resource utilization for multiplexer designs
Send Feedback
QII5V2
14-6 Guideline: Use Register Packing 2014.12.15
Related Information
Auto Packed Registers logic option
For more information about the Auto Packed Registers logic option
Send Feedback
QII5V2
2014.12.15 Guideline: Use Physical Synthesis Options to Reduce Area 14-7
blocks cannot be targeted to a device with only one M-RAM block. You might be able to obtain a fit by
building one of the memories with a different size memory block, such as an M4K memory block.
If the memory block was created with a parameter editor, open the parameter editor and edit the RAM
block type so it targets a new memory block size.
ROM and RAM memory blocks can also be inferred from your HDL code, and your synthesis software
can place large shift registers into memory blocks by inferring the Shift register (RAM-based) IP core.
This inference can be turned off in your synthesis tool to cause the memory or shift registers to be placed
in logic instead of in memory blocks. Also, for improved timing performance, you can turn this inference
off to prevent registers from being moved into RAM.
Depending on your synthesis tool, you can also set the RAM block type for inferred memory blocks. In
Quartus II integrated synthesis, set the ramstyle attribute to the desired memory type for the inferred
RAM blocks, or set the option to logic, to implement the memory block in standard logic instead of a
memory block.
Consider the Resource Utilization by Entity report in the report file and determine whether there is an
unusually high register count in any of the modules. Some coding styles can prevent the Quartus II
software from inferring RAM blocks from the source code because of the blocks’ architectural implemen‐
tation, and force the software to implement the logic in flipflops. As an example, a function such as an
asynchronous reset on a register bank might make the resistor bank incompatible with the RAM blocks in
the device architecture, so that the register bank is implemented in flipflops. It is often possible to move a
large register bank into RAM by slight modification of associated logic.
Related Information
• Auto RAM Replacement logic option
• Auto ROM Replacement logic option
• Auto Shift Register Replacement logic option
• Synthesis
For more information about memory inference control in other synthesis tools
• Recommended HDL Coding Styles
For more information about coding styles and HDL examples that ensure memory inference
Send Feedback
QII5V2
14-8 Guideline: Retarget or Balance DSP Blocks 2014.12.15
DSP blocks also can be inferred from your HDL code for multipliers, multiply-adders, and multiply-
accumulators. You can turn off this inference in your synthesis tool. When you are using Quartus II
integrated synthesis, you can disable inference by turning off the Auto DSP Block Replacement logic
option for your entire project. Click Assignments > Settings > Compiler Settings > Advanced Settings
(Synthesis). Turn off Auto DSP Block Replacement. Alternatively, you can disable the option for a
specific block with the Assignment Editor.
The Quartus II software also offers the DSP Block Balancing logic option, which implements DSP block
elements in logic cells or in different DSP block modes. The default Auto setting allows DSP block
balancing to convert the DSP block slices automatically as appropriate to minimize the area and maximize
the speed of the design. You can use other settings for a specific node or entity, or on a project-wide basis,
to control how the Quartus II software converts DSP functions into logic cells and DSP blocks. Using any
value other than Auto or Off overrides the DEDICATED_MULTIPLIER_CIRCUITRY parameter used in IP
core variations.
Related Information
• Synthesis
For more information about disabling DSP block inference in other synthesis tools
• Auto DSP Block Replacement logic option
• DSP Block Balancing logic option
Routing
Resolve routing resource problems with these guidelines.
Related Information
Auto Packed Registers logic option
Send Feedback
QII5V2
2014.12.15 Guideline: Increase Router Effort Multiplier 14-9
On average, this option can save up to 6% wire utilization, but can also reduce performance by up to 4%,
depending on the device.
Related Information
Fitter Aggressive Routability Optimizations logic option
Send Feedback
QII5V2
14-10 Guideline: Optimize Source Code 2014.12.15
register timing performance). You can apply the setting to specific modules while leaving the default
Optimization Technique setting at Balanced (for the best trade-off between area and speed for certain
device families) or Speed. You can also use the Speed Optimization Technique for Clock Domains logic
option to specify that all combinational logic in or between the specified clock domain(s) is optimized for
speed.
Note: In the Quartus II software, the Balanced setting typically produces utilization results that are very
similar to those obtained with the Area setting, with better performance results. The Area setting
can yield better results in some unusual cases.
In some synthesis tools, not specifying an fMAX requirement can result in less resource utilization, which
can improve routability.
Related Information
Synthesis
For information about setting the timing requirements and synthesis options in Quartus II integrated
synthesis and other synthesis tools
Scripting Support
You can run procedures and make settings described in this chapter in a Tcl script. You can also run some
procedures at a command prompt. For detailed information about scripting command options, refer to
the Quartus II command-line and Tcl API Help browser. To run the Help browser, type the following
command at the command prompt:
quartus_sh --qhelp
You can specify many of the options described in this section either in an instance, or at a global level, or
both.
Use the following Tcl command to make a global assignment:
Note: If the <value> field includes spaces (for example, ‘Standard Fit’), you must enclose the value in
straight double quotation marks.
Send Feedback
QII5V2
2014.12.15 Initial Compilation Settings 14-11
Related Information
Tcl Scripting on page 5-1
For more information about Tcl scripting
Quartus II Settings File Manual
For more information about all settings and constraints in the Quartus II software
Command-Line Scripting on page 4-1
For more information about command-line scripting
(1)
Allowed values for this setting depend on the device family that you select.
Send Feedback
QII5V2
14-12 Document Revision History 2014.12.15
Send Feedback
QII5V2
2014.12.15 Document Revision History 14-13
Send Feedback
2015.05.04
Analyzing and Optimizing the Design
Floorplan with the Chip Planner 15
QII5V2 Subscribe Send Feedback
Analyzing and Optimizing the Design Floorplan with the Chip Planner
As FPGA designs grow larger in density, the ability to analyze the design for performance, routing
congestion, and logic placement to meet the design requirements becomes critical. This chapter discusses
how to analyze the design floorplan with the Chip Planner.
Design floorplan analysis is a valuable method for achieving timing closure and optimal performance in
highly complex designs. With analysis capability, the Quartus II Chip Planner helps you close timing
®
quickly on your designs. Using the Chip Planner together with LogicLock and Incremental Compilation
enables you to compile your designs hierarchically, preserving the timing results from individual compila‐
tion runs. You can use LogicLock regions as part of an incremental compilation methodology to improve
your productivity.
You can perform design analysis, as well as creating and optimizing the design floorplan with the Chip
Planner. To make I/O assignments, use the Pin Planner.
Related Information
• I/O Management on page 2-1
For information about the Pin Planner.
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design
• Best Practices for Incremental Compilation Partitions and Floorplan Assignments
You can use the Design Partition Planner with the Chip Planner to customize the floorplan of your
design.
• About the Chip Planner
For a list of devices supported by the Chip Planner.
• Altera Training
For more information about the Chip Planner.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
15-2 Starting the Chip Planner 2015.05.04
You can also make assignment changes with the Chip Planner, such as creating and deleting resource
assignments, and you can perform post-compilation changes such as creating, moving, and deleting logic
cells and I/O atoms. With the Chip Planner, you can view and create assignments for a design floorplan,
perform power and design analyses, and implement ECOs. With the Chip Planner and Resource Property
Editor, you can change connections between resources and make post-compilation changes to the
properties of logic cells, I/O elements, PLLs, and RAM and digital signal processing (DSP) blocks.
Related Information
• Engineering Change Management with the Chip Planner on page 17-1
For details about how to implement ECOs in your design using the Chip Planner in the Quartus II
software.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Locate History Window 15-3
LogicLock Regions
LogicLock regions are floorplan location constraints that help you place logic on the target device. When
you assign entity instances or nodes to a LogicLock region, you direct the Fitter to place those entity
instances or nodes within the region during fitting. Your floorplan can contain several LogicLock regions.
A LogicLock region is defined by its height, width, and location; you can specify the size or location of a
region, or both, or the Quartus II software can generate these properties automatically. The Quartus II
software bases the size and location of a region on the contents of the region and the timing requirements
of the module. LogicLock regions are color coded to indicate the percentage of resources available in the
region. An orange LogicLock region indicates a nearly full LogicLock region.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-4 Creating LogicLock Regions 2015.05.04
device families, the origin is located at the upper left corner of the LogicLock
region.
Note: The Quartus II software cannot automatically define the size of a region if the location is locked.
Therefore, if you want to specify the exact location of the region, you must also specify the size.
You can use the Design Partition Planner in conjunction with LogicLock regions to create a floorplan for
your design.
Related Information
Quartus II Incremental Compilation for Hierarchical and Team-Based Designs
For more information about using the Design Partition Planner.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Hierarchical (Parent and Child) LogicLock Regions 15-5
You might also create a nonrectangular LogicLock region to place certain parts of your design around
specific device resources to improve performance.
To create a nonrectangular region with the Merge LogicLock Region command, follow these steps:
1. In the Chip Planner, create two or more contiguous or non-contiguous rectangular regions.
2. Arrange the regions that you have created into the locations where you want the nonrectangular
region to be.
3. Select all the individual regions that you want to merge by clicking each of them while pressing the
Shift key.
4. Right-click the title bar of any of the LogicLock regions that you want to merge, point to LogicLock
Regions, and then click Merge LogicLock Region. The individual regions that you select merge to
create a single new region.
By default, the new LogicLock region has the same name as the component region containing the
greatest number of resources; however, you can rename the new region. In the LogicLock Regions
Window, the new region is shown as having a Custom Shape.
You can use the Merge LogicLock Region command to form a nonrectangular LogicLock region by
merging two rectangular LogicLock regions.
Figure 15-1: Using the Merge LogicLock Region command to create a nonrectangular region
Related Information
Creating LogicLock Regions on page 15-4
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-6 Placing LogicLock Regions 2015.05.04
To make one LogicLock region a child of another LogicLock region, in the LogicLock Regions window,
select the new child region and drag and drop the new child region into its new parent region.
Note: The LogicLock region hierarchy does not have to be the same as the design hierarchy.
You can create both auto-sized and fixed-sized LogicLock regions within a parent LogicLock region;
however, the parent of a fixed-sized child region must also be fixed-sized. The location of a locked parent
region is locked relative to the device; the location of a locked child region is locked relative to its parent
region. If you change the parent’s location, the locked child’s origin changes, but maintains the same
placement relative to the origin of its parent. The location of a floating child region can float within its
parent. Complex region hierarchies might result in some LABs not being used, effectively increasing the
resource utilization in the device. Do not create more levels of hierarchy than you need.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Reserved LogicLock Region 15-7
The LogicLock Regions window also has a recommendations toolbar; select a LogicLock region from the
drop-down list in the recommendations toolbar to display the relevant suggestions to optimize that
LogicLock region. You can customize the LogicLock Regions window by dragging and dropping the
columns to change their order; you can also show and hide optional columns by right-clicking any
column heading and then selecting the appropriate columns in the shortcut menu.
Figure 15-2: LogicLock Regions Window
The LogicLock Region Properties dialog box provides a summary of all LogicLock regions in your
design. Use the LogicLock Region Properties dialog box to obtain detailed information about your
LogicLock region, such as which entities and nodes are assigned to your region and which resources are
required. The LogicLock Region Properties dialog box shows the properties of the current selected
regions and allows you to modify them. To open the LogicLock Region Properties dialog box, double-
click any region in the LogicLock Regions window, or right-click the region and click Properties.
Note: For designs that target Arria series, Cyclone series, Stratix series, MAX II, and MAX V devices, the
Quartus II software automatically creates a LogicLock region that encompasses the entire device.
This default region is labelled Root_Region, and is locked and fixed.
Note: For Arria series, Cyclone series, Stratix series, MAX II, and MAX V devices, the origin of the
LogicLock region is located at the lower-left corner of the region. For all other supported devices,
the origin is located at the upper-left corner of the region.
Excluded Resources
The Excluded Resources feature allows you to easily exclude specific device resources such as DSP blocks
or M4K memory blocks from a LogicLock region.
For example, you can assign a specific entity to a LogicLock region but allow the DSP blocks of that entity
to be placed anywhere on the device. Use the Excluded Resources feature on a per-LogicLock region
member basis.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-8 Additional Quartus II LogicLock Design Features 2015.05.04
To exclude certain device resources from an entity, in the LogicLock Region Properties dialog box,
highlight the entity in the Design Element column, and click Edit. In the Edit Node dialog box, under
Excluded Element Types, click the Browse button. In the Excluded Resources Element Types dialog
box, you can select the device resources you want to exclude from the entity. When you have selected the
resources to exclude, the Excluded Resources column is updated in the LogicLock Region Properties
dialog box to reflect the excluded resources.
Note: The Excluded Resources feature prevents certain resource types from being included in a region,
but it does not prevent the resources from being placed inside the region unless you set the region’s
Reserved property to On. To indicate to the Fitter that certain resources are not required inside a
LogicLock region, define a resource filter.
Related Information
Best Practices for Incremental Compilation Partitions and Floorplan Assignments
For more information about resource filters.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Virtual Pins 15-9
Related Information
Understanding Assignment Priority
For more information about LogicLock assignment precedence.
Virtual Pins
A virtual pin is an I/O element that is temporarily mapped to a logic element and not to a pin during
compilation, and is then implemented as a LUT.
When you apply the Virtual Pin assignment to an input pin, the pin no longer appears as an FPGA pin,
but is fixed to GND or VCC in the design. The assigned pin is not an open node.
Virtual pins should be used only for I/O elements in lower-level design entities that become nodes when
imported to the top-level design. You can create virtual pins by assigning the Virtual Pin logic option to
an I/O element.
You might use virtual pin assignments when you compile a partial design, because not all the I/Os from a
partial design drive chip pins at the top level.
The virtual pin assignment identifies the I/O ports of a design module that are internal nodes in the top-
level design. These assignments prevent the number of I/O ports in the lower-level modules from
exceeding the total number of available device pins. Every I/O port that you designate as a virtual pin
becomes mapped to either a logic cell or an adaptive logic module (ALM), depending on the target device.
Note: The Virtual Pin logic option must be assigned to an input or output pin. If you assign this option to
a bidirectional pin, tri-state pin, or registered I/O element, Analysis and Synthesis ignores the
assignment. If you assign this option to a tri-state pin, the Fitter inserts an I/O buffer to account for
the tri-state logic; therefore, the pin cannot be a virtual pin. You can use multiplexer logic instead
of a tri-state pin if you want to continue to use the assigned pin as a virtual pin. Do not use tri-state
logic except for signals that connect directly to device I/O pins.
In the top-level design, you connect these virtual pins to an internal node of another module. By making
assignments to virtual pins, you can place those pins in the same location or region on the device as that
of the corresponding internal nodes in the top-level module. You can use the Virtual Pin option when
compiling a LogicLock module with more pins than the target device allows. The Virtual Pin option can
enable timing analysis of a design module that more closely matches the performance of the module after
you integrate it into the top-level design.
Note: In the Node Finder, you can set Filter Type to Pins: Virtual to display all assigned virtual pins in
the design. Alternatively, to access the Node Finder from the Assignment Editor, double-click the
To field; when the arrow appears on the right side of the field, click the arrow and select Node
Finder.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-10 Using LogicLock Regions with the Design Partition Planner 2015.05.04
as a single bundled connection rather than as individual connection lines. To use this option, open the
Chip Planner and on the View menu, click Inter-region Bundles.
Related Information
Inter-region Bundles Dialog Box
For more information about the Inter-region Bundles dialog box, refer to Quartus II Help.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Chip Planner Floorplan Views 15-11
Properties Window
The Properties Window displays detailed properties of the objects (such as atoms, paths, LogicLock
regions, or routing elements) currently selected in the Chip Planner. To display the Properties Window,
click Properties on the View menu in the Chip Planner.
Related Information
• Engineering Change Management with the Chip Planner on page 17-1
For more information about Chip Planner floorplan views.
• Displaying Resources and Information
• Bird’s Eye View
For more information about displaying information in the Bird’s Eye View.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-12 Viewing Available Clock Networks in the Device 2015.05.04
In addition, you can modify the following device properties with the Chip Planner:
• LEs and ALMs
• I/O cells
• PLLs
• Registers in RAM and DSP blocks
• Connections between elements
• Placement of elements
For more information about LEs, ALMs, and other resources of an FPGA device, refer to the relevant
device handbook.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Viewing Routing Congestion 15-13
Related Information
The Quartus II TimeQuest Timing Analyzer
For more information about performing static timing analysis with the Quartus II TimeQuest Timing
Analyzer.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-14 Generating Fan-In and Fan-Out Connections 2015.05.04
Highlight Routing
The Show Physical Routing command in the Locate History pane enables you to highlight the routing
resources used by a selected path or connection.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Show Delays 15-15
Related Information
• Engineering Change Management with the Chip Planner on page 17-1
For more information on how you can view and edit resources in the FPGA using the Resource
Property Editor.
Show Delays
With the Show Delays command, you can view timing delays for paths located from TimeQuest Timing
Analyzer reports. For example, you can view the delay between two logic resources or between a logic
resource and a routing resource.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-16 Exploring Paths in the Chip Planner 2015.05.04
Locate Path from the Timing Analysis Report to the Chip Planner
To locate a path from the Timing Analysis report to the Chip Planner, perform the following steps:
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Analyzing Connections for a Path 15-17
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-18 Viewing High-Speed and Low-Power Tiles in the Chip Planner 2015.05.04
You can make node and pin location assignments to LogicLock regions and custom regions using the
drag-and-drop method in the Chip Planner. The Fitter applies the assignments that you create during the
next place-and-route operation.
Related Information
Working With Assignments in the Chip Planner
For more information about managing assignments in the Chip Planner.
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Scripting Support 15-19
Figure 15-8: Viewing High-Speed and Low Power Tiles in a Stratix Device
Related Information
AN 514: Power Optimization in Stratix IV FPGAs
To learn more about power analyses and optimizations in Stratix IV devices.
Scripting Support
You can run procedures and specify the settings described in this chapter in a Tcl script. You can also run
some procedures at a command prompt.
For detailed information about scripting command options, refer to the Quartus II command-line and Tcl
API Help browser. To run the Help browser, type the following command at the command prompt:
quartus_sh --qhelp
Related Information
API Functions for Tcl on page 5-1
For more information about Tcl scripting in Quartus II Help.
Tcl Scripting on page 5-1
API Functions for Tcl For more information about Tcl scripting .
Command-Line Scripting on page 4-1
For more information about command-line scripting.
Quartus II Settings File Manual
For information about all settings and constraints in the Quartus II software.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-20 Initializing and Uninitializing a LogicLock Region 2015.05.04
initialize_logiclock
Use the following Tcl command to uninitialize the LogicLock data structures before closing your project:
uninitialize_logiclock
Note: The command in the above example sets the size of the region to auto and the state to floating.
If you specify a region name that does not exist in the design, the command creates the region with the
specified properties. If you specify the name of an existing region, the command changes all properties
you specify and leaves unspecified properties unchanged.
Related Information
Creating LogicLock Regions on page 15-4
You can also make path-based assignments with the following Tcl command:
Save a Node-Level Netlist for the Entire Design into a Persistent Source File
Make the following assignments to cause the Quartus II Fitter to save a node-level netlist for the entire
design into a .vqm file:
set_global_assignment-name LOGICLOCK_INCREMENTAL_COMPILE_ASSIGNMENT ON
set_global_assignment-name LOGICLOCK_INCREMENTAL_COMPILE_FILE <file name>
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Setting LogicLock Assignment Priority 15-21
Any path specified in the file name is relative to the project directory. For example, specifying atom_
netlists/top.vqm places top.vqm in the atom_netlists subdirectory of your project directory.
A .vqm file is saved in the directory specified at the completion of a full compilation.
Note: The saving of a node-level netlist to a persistent source file is not supported for designs targeting
newer devices such as MAX V, Stratix IV, or Stratix V.
Related Information
Virtual Pins on page 15-9
Tcl Scripting on page 5-1
For more information about Tcl scripting.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
QII5V2
15-22 Document Revision History 2015.05.04
Altera Corporation Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QII5V2
2015.05.04 Document Revision History 15-23
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Analyzing and Optimizing the Design Floorplan with the Chip Planner Altera Corporation
Send Feedback
2014.12.15
Netlist Optimizations and Physical Synthesis
16
QII5V2 Subscribe Send Feedback
file or a Verilog Quartus Mapping (.vqm) file generated by a third-party synthesis tool, or a netlist used
internally by the Quartus II software. Physical synthesis optimizations are applied at different stages of the
Quartus II compilation flow, either during synthesis, fitting, or both.
This chapter explains how the physical synthesis optimizations in the Quartus II software can modify
your design’s netlist to improve the quality of results. This chapter also provides information about
preserving compilation results through back-annotation and writing out a new netlist, and provides
guidelines for applying the various options.
Note: Because the node names for primitives in the design can change when you use physical synthesis
optimizations, you should evaluate whether your design flow requires fixed node names. If you use
a verification flow that might require fixed node names, such as the SignalTap II Logic Analyzer,
®
formal verification, or the LogicLock based optimization flow (for legacy devices), you must turn
off physical synthesis options.
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
16-2 Perform WYSIWYG Primitive Resynthesis 2014.12.15
process. This feature re-maps the design using the Optimization Technique specified for your project
(Speed, Area, or Balanced).
The Perform WYSIWYG primitive resynthesisoption unmaps and remaps only logic cells, also referred
to as LCELL or LE primitives, and regular I/O primitives (which may contain registers). Double data rate
(DDR) I/O primitives, memory primitives, digital signal processing (DSP) primitives, and logic cells in
carry/cascade chains are not remapped. Logic specified in an encrypted .vqm file or an .edf file, such as
third-party intellectual property (IP), is not touched.
The Perform WYSIWYG primitive resynthesis option can change node names in the .vqm file or .edf file
from your third-party synthesis tool, because the primitives in the atom netlist are broken apart and then
remapped by the Quartus II software. The remapping process removes duplicate registers, but registers
that are not removed retain the same name after remapping.
Any nodes or entities that have the Netlist Optimizations logic option set to Never Allow are not affected
during WYSIWYG primitive resynthesis. You can use the Assignment Editor to apply the Netlist
Optimizations logic option. This option disables WYSIWYG resynthesis for parts of your design.
Note: Primitive node names are specified during synthesis. When netlist optimizations are applied, node
names might change because primitives are created and removed. HDL attributes applied to
preserve logic in third-party synthesis tools cannot be maintained because those attributes are not
written into the atom netlist read by the Quartus II software.
If you use the Quartus II software to synthesize, you can use the Preserve Register (preserve) and Keep
Combinational Logic (keep) attributes to maintain certain nodes in the design.
Figure 16-1: Quartus II Flow for WYSIWYG Primitive Resynthesis
Send Feedback
QII5V2
2014.12.15 Performing Physical Synthesis Optimizations 16-3
Related Information
Compiler Settings Page (Settings Dialog Box
For more information about physical synthesis optimizations, refer to Quartus II Help.
Send Feedback
QII5V2
16-4 Viewing Netlist Optimization Reports 2014.12.15
verification flow involves formal verification, you might have to keep the registers intact. To view and
modify physical synthesis optimization options, perform the following steps:
1. On the Assignments menu, click Settings. The Settings dialog box appears.
2. Click Compiler Settings > Advanced Settings (Fitter).
3. Specify the options for performing physical synthesis optimizations.
Send Feedback
QII5V2
2014.12.15 Physical Synthesis for Combinational Logic 16-5
analysis is turned on by default. Pipelining is allowed only on asynchronous signals that have the
following properties:
• The asynchronous signal is synchronized to a clock (a synchronization register drives the signal)
• The asynchronous signal fans-out only to asynchronous control ports of registers
The Quartus II software does not perform automatic asynchronous signal pipelining on asynchronous
signals that have the Netlist Optimization logic option set to Never Allow.
Send Feedback
QII5V2
16-6 Physical Synthesis for Registers—Register Retiming 2014.12.15
Retiming can create multiple registers at the input of a combinational block from a register at the output
of a combinational block. In this case, the new registers have the same clock and clock enable. The
asynchronous control signals and power-up level are derived from previous registers to provide
equivalent functionality. Retiming can also combine multiple registers at the input of a combinational
block to a single register.
Figure 16-3: Combining Registers with Register Retiming
Send Feedback
QII5V2
2014.12.15 Preventing Register Movement During Retiming 16-7
To move registers across combinational logic to balance timing, click Assignments > Settings >
Compiler Settings > Advanced Settings (Fitter). Specify your preferred option under Optimize for
performance (physical synthesis) and Effort level .
To avoid this circumstance, provide individual fMAX requirements to each clock when using Classic
Timing Analysis. When you constrain each clock individually, the Quartus II software assumes no
relationship between different clock domains and considers each clock domain to be asychronous
to other clock domains; hence no register-to-register paths crossing clock domains are retimed.
When you use the TimeQuest Timing Analyzer, register-to-register paths across clock domains are
never retimed, because the TimeQuest Timing Analyzer treats all clock domains as asychronous to
each other unless they are intentionally grouped.
• Contain registers that are constrained to a single LAB location
• Contain registers that are connected to SERDES
• Are considered virtual I/O pins
• Registers that have the Netlist Optimizations logic option set to Never Allow
The Quartus II software assumes that a synchronization register chain consists of two registers. If your
design has synchronization register chains with more than two registers, you must indicate the number of
Send Feedback
QII5V2
16-8 Preserving Your Physical Synthesis Results 2014.12.15
registers in your synchronization chains so that they are not affected by register retiming. To do this,
perform the following steps:
1. Click Assignments > Settings > Compiler Settings > Advanced Settings (Synthesis).
2. Modify the Synchronization Register Chain Length setting to match the synchronization register
length used in your design. If you set a value of 1 for the Synchronization Register Chain Length, it
means that any registers connected to the first register in a register-to-register connection can be
moved during retiming. A value of n > 1 means that any registers in a sequence of length 1, 2,… n are
not moved during register retiming.
If you want to consider logic cells that meet any of these conditions for physical synthesis, you can
override these rules by setting the Netlist Optimizations logic option to Always Allow on a given set
of registers.
Related Information
• Analyzing and Optimizing the Design Floorplan on page 15-1
For more information about virtual I/O pins.
Related Information
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design
• About Incremental Compilation
For information about the incremental compilation design methodology.
Send Feedback
QII5V2
2014.12.15 Physical Synthesis Options for Fitting 16-9
placement changes the results from physical synthesis. Changing the results means that node names are
different, and your back-annotated locations are no longer valid.
You should not use a Quartus II-generated .vqm file or back-annotated location assignments with physical
synthesis optimizations unless you have finalized the design. Making any changes to the design invalidates
your physical synthesis results and back-annotated location assignments. If you require changes later, use
the new source HDL code as your input files, and remove the back-annotated assignments corresponding
to the Quartus II-generated .vqm file.
To back-annotate logic locations for a design that was compiled with physical synthesis optimizations,
first create a .vqm file. When recompiling the design with the hard logic location assignments, use the
new .vqm file as the input source file and turn off the physical synthesis optimizations for the new
compilation.
If you are importing a .vqm file and back-annotated locations into another project that has any Netlist
Optimizations turned on, you must apply the Never Allow constraint to make sure node names don’t
change; otherwise, the back-annotated location or LogicLock assignments are invalid.
To preserve the nodes from Quartus II physical synthesis optimization options for older devices that do
not support incremental compilation (such as Max II devices), perform the following steps:
1. On the Assignments menu, click Settings. The Settings dialog box appears.
2. In the Category list, select Compilation Process Settings. The Compilation Process Settings page
appears.
3. Turn on Save a node-level netlist of the entire design into a persistent source file. This setting is not
available for Cyclone III, Stratix III, and newer devices.
Click OK.
Note: For newer devices use incremental compilation to preserve compilation results instead of using
logic back-annotation.
Option Function
Physical Synthesis When you select this option, the Fitter detects duplicate combinational logic
for Combinational and optimizes combinational logic to improve the fit.
Logic for Fitting
Perform Logic to When you select this option, the Fitter can remap registers and combina‐
Memory Mapping tional logic in your design into unused memory blocks and achieves a fit.
Send Feedback
QII5V2
16-10 Scripting Support 2014.12.15
You may have to experiment with available options to see which combination of settings works best for a
particular design. Refer to the messages in the compilation report to see the magnitude of improvement
with each option, and to help you decide whether you should turn on a given option or specific effort
level.
Turning on more netlist optimization options can result in more changes to the node names in the design;
bear this in mind if you are using a verification flow, such as the SignalTap II Logic Analyzer or formal
verification that requires fixed or known node names.
Applying all of the physical synthesis options at the Extra effort level generally produces the best results
for those options, but adds significantly to the compilation time. You can also use the Physical synthesis
effort level options to decrease the compilation time. The WYSIWYG primitive resynthesis option does
not add much compilation time relative to the overall design compilation time.
To find the best results, you can use the Quartus II Design Space Explorer II (DSE) to apply various sets of
netlist optimization options.
Related Information
About Design Space Explorer II
For more information about DSE II, refer to Quartus II Help.
Scripting Support
You can run procedures and make settings described in this chapter in a Tcl script. You can also run some
procedures at a command prompt. For detailed information about scripting command options, refer to
the Quartus II Command-Line and Tcl API Help browser. To run the Help browser, type the following
command at the command prompt:
quartus_sh --qhelp
You can specify many of the options described in this section on either an instance or global level, or both.
Use the following Tcl command to make a global assignment:
Related Information
• Tcl Scripting on page 5-1
• API Functions for Tcl
For more information about Tcl scripting.
• Command-Line Scripting on page 4-1
For more information about command-line scripting, refer to Quartus II Help.
• Quartus II Settings File Manual
For information about all settings and constraints in the Quartus II software.
Send Feedback
QII5V2
2014.12.15 Synthesis Netlist Optimizations 16-11
Related Information
WYSIWYG Primitive Resynthesis on page 16-1
For more information on the Quartus II Settings File (.qsf), variable names and applicable values for the
settings.
Send Feedback
QII5V2
16-12 Back-Annotating Assignments 2014.12.15
Related Information
• Performing Physical Synthesis Optimizations on page 16-3
For more information on the Quartus II Settings File (.qsf), variable names and applicable values for
the settings.
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design
For information about scripting and command line usage for incremental compilation.
Back-Annotating Assignments
You can use the logiclock_back_annotate Tcl command to back-annotate resources in your design.
This command can back-annotate resources in LogicLock regions, and resources in designs without
LogicLock regions.
The following Tcl command back-annotates all registers in your design:
Send Feedback
QII5V2
2014.12.15 Document Revision History 16-13
Related Information
Preserving Your Physical Synthesis Results on page 16-8
For more information about back-annotating assignments.
Send Feedback
QII5V2
16-14 Document Revision History 2014.12.15
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook.
Send Feedback
2014.06.30
Engineering Change Orders with the Chip
Planner 17
QII5V2 Subscribe Send Feedback
Programmable logic can accommodate changes to a system specification late in the design cycle. In a
typical engineering project development cycle, the specification of the programmable logic portion is
likely to change after engineering begins or while integrating all system elements. Last-minute design
changes, commonly referred to as engineering change orders (ECOs), are small targeted changes to the
functionality of a design after the design has been fully compiled.
The Chip Planner supports ECOs by allowing quick and efficient changes to your logic late in the design
cycle. The Chip Planner provides a visual display of your post-place-and-route design mapped to the
device architecture of your chosen FPGA and allows you to create, move, and delete logic cells and I/O
atoms.
Note: In addition to making ECOs, the Chip Planner allows you to perform detailed analysis on routing
congestion, relative resource usage, logic placement, LogicLock regions, fan-ins and fan-outs,
™
Related Information
• About the Chip Planner
For a list of supported devices
• Analyzing and Optimizing the Design Floorplan on page 15-1
For more information about using the Chip Planner for design analysis
• Literature
For more information about the architecture of your device
© 2015 Altera Corporation. All rights reserved. ALTERA, ARRIA, CYCLONE, ENPIRION, MAX, MEGACORE, NIOS, QUARTUS and STRATIX words and logos are
trademarks of Altera Corporation and registered in the U.S. Patent and Trademark Office and in other countries. All other words and logos identified as
trademarks or service marks are the property of their respective holders as described at www.altera.com/common/legal.html. Altera warrants performance ISO
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any 9001:2008
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information, Registered
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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
QII5V2
17-2 Performance Preservation 2014.06.30
loss of previous design optimizations. Making ECOs, instead of performing a full recompilation on your
design, limits the change only to the affected portions of logic.
Performance Preservation
You can preserve the results of previous design optimizations when you make changes to an existing
design with one of the following methods:
• Incremental compilation
• Rapid recompile
• ECOs
Choose the method to modify your design based on the scope of the change. The methods above are
arranged from the larger scale change to the smallest targeted change to a compiled design.
The incremental compilation feature allows you to preserve compilation results at an RTL component or
module level. After the initial compilation of your design, you can assign modules in your design
hierarchy to partitions. Upon subsequent compilations, incremental compilation recompiles changed
partitions based on the chosen preservation levels.
The rapid recompilation feature leverages results from the latest post-fit netlist to determine the changes
required to honor modifications you have made to the source code. If you run a rapid recompilation, the
Compiler refits only changed portion of the netlist.
ECOs provide a finer granularity of control compared to the incremental compilation and the rapid
recompilation feature. All modifications are performed directly on the architectural elements of the
device. You should use ECOs for targeted changes to the post-fit netlist.
Note: In the Quartus II software versions 10.0 and later, the software does not preserve ECO modifica‐
tions to the netlist when you recompile a design with the incremental compilation feature turned
on. You can reapply ECO changes made during a previous compilation with the Change Manager.
Related Information
Quartus II Incremental Compilation for Hierarchical and Team-Based Design
Compilation Time
In the traditional programmable logic design flow, a small change in the design requires a complete
recompilation of the design. A complete recompilation of the design consists of synthesis and place-and-
route. Making small changes to the design to reach the final implementation on a board can be a long
process. Because the Chip Planner works only on the post-place-and-route database, you can implement
your design changes in minutes without performing a full compilation.
Verification
After you make a design change, you can verify the impact on your design. To verify that your changes do
not violate timing requirements, perform static timing analysis with the Quartus II TimeQuest Timing
Analyzer after you check and save your netlist changes in the Chip Planner.
Additionally, you can perform a gate-level or timing simulation of the ECO-modified design with the
post-place-and-route netlist generated by the Quartus II software.
Related Information
Quartus II TimeQuest Timing Analyzer
Send Feedback
QII5V2
2014.06.30 Change Modification Record 17-3
Send Feedback
QII5V2
17-4 ECO Design Flow 2014.06.30
Verilog HDL VHDL AHDL Block Design EDIF Netlist VQM Netlist
(.v) (.vhdl) (.tdf) File (.bdf) (.edf) (.vqm)
PartitionTop
Partition 1
Design Partition Assignment Partition 2
Assembler
Modify
Logic cells, I/O cells,
PLL, Floorplan location
Timing Analyzer Analysis and Synthesis Changes
assignments in Chip Planner
Program/Configuration Device
no Requirements no
Make ECO Satisfied? Make design change
at Netlist level in your HDL
yes
A typical ECO application occurs when you uncover a problem on the board and isolate the problem to
the appropriate nodes or I/O cells on the device. You must be able to correct the functionality quickly and
generate a new programming file. By making small changes with the Chip Planner, you can modify the
post-place-and-route netlist directly without having to perform synthesis and logic mapping, thus
decreasing the turnaround time for programming file generation during the verification cycle. If the
Send Feedback
QII5V2
2014.06.30 The Chip Planner Overview 17-5
change corrects the problem, no modification of the HDL source code is necessary. You can use the Chip
Planner to perform the following ECO-related changes to your design:
• Document the changes made with the Change Manager
• Easily recreate the steps taken to produce design changes
• Generate EDA simulation netlists for design verification
Note: For more complex changes that require HDL source code modifications, the incremental compila‐
tion feature can help reduce recompilation time.
Send Feedback
QII5V2
17-6 The Chip Planner Tasks and Layers 2014.06.30
Related Information
• Performing ECOs in the Resource Property Editor on page 17-6
• About the Chip Planner
• Analyzing and Optimizing the Design Floorplan on page 15-1
Related Information
Performing ECOs in the Resource Property Editor on page 17-6
Related Information
Creating, Deleting, and Moving Atoms
Logic Elements
An Altera LE contains a four-input LUT, which is a function generator that can implement any function
®
of four variables. In addition, each LE contains a register fed by the output of the LUT or by an
independent function generated in another LE.
Send Feedback
QII5V2
2014.06.30 Logic Element Properties 17-7
You can use the Resource Property Editor to view and edit any LE in the FPGA. To open the Resource
Property Editor for an LE, on the Project menu, point to Locate, and then click Locate in Resource
Property Editor in one of the following views:
• RTL Viewer
• Technology Map Viewer
• Node Finder
• Chip Planner
For more information about LE architecture for a particular device family, refer to the device family
handbook or data sheet.
You can use the Resource Property Editor to change the following LE properties:
• Data input to the LUT
• LUT mask or LUT
Modes of Operation
LUTs in an LE can operate in either normal or arithmetic mode.
When an LE is configured in normal mode, the LUT in the LE can implement a function of four inputs.
When the LE is configured in arithmetic mode, the LUT in the LE is divided into two 3-input LUTs. The
first LUT generates the signal that drives the output of the LUT, while the second LUT generates the
carry-out signal. The carry-out signal can drive only a carry-in signal of another LE.
For more information about LE modes of operation, refer to volume 1 of the appropriate device
handbook.
Send Feedback
QII5V2
17-8 sload and sclr Signals 2014.06.30
The LUT mask is the hexadecimal representation of the LUT equation output. When you change the LUT
equation, the Quartus II software automatically changes the LUT mask. Conversely, when you change the
LUT mask, the Quartus II software automatically computes the LUT equation.
Send Feedback
QII5V2
2014.06.30 Adaptive Logic Modules 17-9
Send Feedback
QII5V2
17-10 Adaptive Logic Module Properties 2014.06.30
Send Feedback
QII5V2
2014.06.30 Stratix V I/O Elements 17-11
• Extend OE disable
• PCI I/O
• Register reset mode
• Register synchronous reset mode
• Register power up
• Register mode
complete embedded bidirectional single data rate (SDR) or double data rate (DDR) transfer.
I/O registers are composed of the input path for handling data from the pin to the core, the output path
for handling data from the core to the pin, and the output enable path for handling the output enable
signal to the output buffer. These registers allow faster source-synchronous register-to-register transfers
and resynchronization. The input path consists of the DDR input registers, alignment and synchroniza‐
tion registers, and half data rate blocks; you can bypass each block in the input path. The input path uses
the deskew delay to adjust the input register clock delay across process, voltage, and temperature (PVT)
variations.
By default, the Quartus II software displays the used resources in blue and the unused resources in gray.
Figure 17-5: Stratix V Device I/O Element Structure
Related Information
Stratix V Device Handbook
Send Feedback
QII5V2
17-12 Arria V I/O Elements 2014.06.30
The I/O registers are composed of the input path for handling data from the pin to the core, the output
path for handling data from the core to the pin, and the output enable path for handling the output enable
signal for the output buffer. Each path consists of a set of delay elements that allow you to fine-tune the
timing characteristics of each path for skew management. By default, the Quartus II software displays the
used resources in blue and the unused resources in gray.
Figure 17-6: Stratix IV I/O Element and Structure
Related Information
Literature
For more information about I/O elements in Stratix IV devices
Send Feedback
QII5V2
2014.06.30 Cyclone V I/O Elements 17-13
Send Feedback
QII5V2
17-14 MAX V I/O Elements 2014.06.30
adjacent LABs to or from the bidirectional I/O buffer of the I/O element. By default, the Quartus II
software displays the used resources in blue and the unused resources in gray.
Figure 17-9: MAX V Device I/O Elements and Structure
Send Feedback
QII5V2
2014.06.30 FPGA DSP Blocks 17-15
input and output ports. By default, the Quartus II software displays the used resources in blue and the
unused resources in gray.
Figure 17-10: M9K RAM View in a Stratix V Device
Send Feedback
QII5V2
17-16 Change Manager 2014.06.30
and from the DSP blocks. By default, the Quartus II software displays the used resources in blue and the
unused resources in gray.
Figure 17-11: DSP Block View in a Stratix V Device
Change Manager
The Change Manager maintains a record of every change you perform with the Chip Planner, the
Resource Property Editor, the SignalProbe feature, or a Tcl script. Each row of data in the Change
Manager represents one ECO.
Send Feedback
QII5V2
2014.06.30 Complex Changes in the Change Manager 17-17
The Change Manager allows you to apply changes, roll back changes, delete changes, and export change
records to a Text File (.txt), a Comma-Separated Value File (.csv), or a Tcl Script File (.tcl). The Change
Manager tracks dependencies between changes, so that when you apply, roll back, or delete a change, any
prerequisite or dependent changes are also applied, rolled back, or deleted.
Related Information
About the Change Manager
Related Information
Example of Managing Changes With the Change Manager
Related Information
Quick Design Debugging Using SignalProbe
Exporting Changes
You can export changes to a .txt, a .csv, or a .tcl. Tcl scripts allow you to reapply changes that were deleted
during compilation.
Related Information
• Managing Changes With the Change Manager
• Quartus II Incremental Compilation for Hierarchical and Team-Based Design
Scripting Support
You can run procedures and make settings described in this chapter in a Tcl script. You can also run some
procedures at a command prompt. The Tcl commands for controlling the Chip Planner are located in the
chip_planner package of the quartus_cdb executable.
Related Information
• About Quartus II Scripting
• Tcl Scripting on page 5-1
• Quartus II Settings File Manual
• Command Line Scripting on page 4-1
Send Feedback
QII5V2
17-18 Common ECO Applications 2014.06.30
Related Information
Modify the PLL Properties With the Chip Planner on page 17-19
1. In the Editing Mode list at the top of the Chip Planner, select the ECO editing mode.
2. Locate the I/O in the Resource Property Editor.
3. In the Resource Property Editor, point to the Current Strength option in the Properties pane and
double-click the value to enable the drop-down list.
4. Change the value for the Current Strength option.
5. Right-click the ECO change in the Change Manager and click Check & Save All Netlist Changes to
apply the ECO change.
Send Feedback
QII5V2
2014.06.30 Modify the PLL Properties With the Chip Planner 17-19
Note: You can change the pin locations of input or output ports with the ECO flow. You
can drag and move the signal from an existing pin location to a new location while
in the Post Compilation Editing (ECO) task in the Chip Planner. You can then
click Check & Save All Netlist Changes to compile the ECO.
Send Feedback
QII5V2
17-20 PLL Properties 2014.06.30
Figure 17-13: PLL View in the Resource Property Editor of a Stratix Device
PLL Properties
The Resource Property Editor allows you to modify PLL options, such as phase shift, output clock
frequency, and duty cycle.
You can also change the following PLL properties with the Resource Property Editor:
• Input frequency
• M VCO tap
• M initial
• M value
• N value
Send Feedback
QII5V2
2014.06.30 Adjusting the Duty Cycle 17-21
• M counter delay
• N counter delay
• M2 value
• N2 value
• SS counter
• Charge pump current
• Loop filter resistance
• Loop filter capacitance
• Counter delay
• Counter high
• Counter low
• Counter mode
• Counter initial
• VCO tap
You can also view post-compilation PLL properties in the Compilation Report. To do so, in the Compila‐
tion Report, select Fitter and then select Resource Section.
Counter High
High % = (Counter High + Counter Low)
For normal mode, Tap VCO, Initial VCO, and Period VCO are governed by the following settings:
Tap VCO= Counter Delay- M Tap VCO
Initial VCO= Counter Delay- M Initial
Period VCO= In Clock Period x N÷M
For external feedback mode, Tap VCO, Initial VCO, and Period VCO are governed by the following settings:
Tap VCO= Counter Delay- M Tap VCO
Initial VCO= Counter Delay- M Initial
Period VCO= In Clock Period x N
(M+ Counter High+Counter Low)
Related Information
Stratix Device Handbook
Send Feedback
QII5V2
17-22 Adjusting the Output Clock Frequency 2014.06.30
M Value
Output Clock Frequency = Input Frequency • N Value + Counter High + Counter Low
Use the equation to adjust the PLL output clock in external feedback mode.
M Value + External Feedback Counter High + External Feedback Counter Low
OUTCLK = N Value + Counter High + Counter Low
MN
% Spread = M2N1
1 2
Send Feedback
QII5V2
2014.06.30 Post ECO Steps 17-23
you position your mouse pointer over the appropriate resource. Refer to the device data sheet
for more information about the architecture of the routing interconnects of your device.
Related Information
Quartus II TimeQuest Timing Analyzer
For more information about performing a static timing analysis of your design
Send Feedback
QII5V2
17-24 Document Revision History 2014.06.30
November 8.1.0 • Corrected preservation attributes for ECOs in the section “Using
2008 Incremental Compilation in the ECO Flow” on page15–32.
• Minor editorial updates.
• Changed to 8½” x 11” page size.
Related Information
Quartus II Handbook Archive
For previous versions of the Quartus II Handbook
Send Feedback