Quartus Prime Pro Edition Handbook Volume 2
Quartus Prime Pro Edition Handbook Volume 2
Quartus Prime Pro Edition Handbook Volume 2
and Optimization
Subscribe
Send Feedback
QPP5V2
2015.11.02
Constraining Designs
2015.11.02
QPP5V2
Subscribe
Send Feedback
Constraints, sometimes known as assignments or logic options, control the way the Quartus Prime
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 Prime 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 Prime 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 Prime 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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
1-2
Global Constraints
QPP5V2
2015.11.02
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 Prime Fitter optimizes the placement of logic in
the device to meet your specified constraints.
Global Constraints
Global constraints affect the entire Quartus Prime 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.
Settings that direct compilation and analysis flows in the Quartus Prime software are also stored in the
Quartus Prime Settings File for your project, including the following global software settings:
Settings for EDA tool integration such as third-party synthesis tools, simulation tools, timing analysis
tools, and formal verification tools.
Settings and settings file specifications for the Quartus Prime Assembler, SignalTap II Logic Analyzer,
PowerPlay power analyzer, and SSN Analyzer.
Global constraints and software settings stored in the Quartus Prime settings file are specific to each
revision of your design, allowing you to control the operation of the software differently for different
revisions. For example, different revisions can specify different operating temperatures and different
devices, so that you can compare results.
Only the valid assignments made in the Assignment Editor are saved in the Quartus Prime Settings File,
which is located in the project directory. When you make a design constraint, the new assignment is
placed on a new line at the end of the file.
When you create or update a constraint in the GUI, the Quartus Prime 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.
Altera Corporation
Constraining Designs
Send Feedback
QPP5V2
2015.11.02
1-3
Related Information
The Pin Planner helps you visualize, plan, and assign device I/O pins to ensure compatibility with your
PCB layout. The Pin Planner provides a graphical view of the I/O resources in the target device package.
You can quickly locate various I/O pins and assign them design elements or other properties.
The Quartus Prime software uses these assignments to place and route your design during device
programming. The Pin Planner also helps with early pin planning by allowing you to plan and assign IP
interface or user nodes not yet defined in the design.
The Pin Planner Task window provides one-click access to common pin planning tasks. After clicking a
pin planning task, you view and highlight the results in the Report window by selecting or deselecting I/O
types.You can quickly identify I/O banks, VREF groups, edges, and differential pin pairings to assist you
in the pin planning process. You can verify the legality of new and existing pin assignments with the live
I/O check feature and view the results in the Live I/O Check Status window.
Altera Corporation
1-4
QPP5V2
2015.11.02
You can also locate nodes in the Assignment Editor and other constraint tools from other windows within
the Quartus Prime software. First, select the node or nodes in the appropriate window. For example, select
an entity in the Entity list in the Hierarchy tab in the Project Navigator, or select nodes in the Chip
Planner. Next, right-click the selected object, point to Locate, and click Locate in Assignment Editor.
The Assignment Editor opens, or it is brought to the foreground if it is already open.
Altera Corporation
Constraining Designs
Send Feedback
QPP5V2
2015.11.02
1-5
The example shows the way that the set_global_assignment Quartus Prime 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 Prime 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 Prime Settings file itself.
To export your constraints as an executable Tcl script, on the Project menu, click Generate Tcl File for
Project.
# Quartus Prime: Generate Tcl File for Project
# File: chiptrip.tcl
# Generated on: Tue Jun 08 13:08:48 2010
# Load Quartus Prime Tcl Project package
package require ::quartus::project
set need_to_close_project 0
set make_assignments 1
# Check that the right project is open
if {[is_project_open]} {
if {[string compare $quartus(project) "chiptrip"]} {
puts "Project chiptrip is not open"
set make_assignments 0
}
} else {
# Only open if not already open
if {[project_exists chiptrip]} {
project_open -revision chiptrip chiptrip
} else {
project_new -revision chiptrip chiptrip
}
Constraining Designs
Send Feedback
Altera Corporation
1-6
QPP5V2
2015.11.02
set need_to_close_project 1
}
# Make assignments
if {$make_assignments} {
set_global_assignment -name FAMILY "Cyclone II"
set_global_assignment -name DEVICE EP2C35F672C6
set_global_assignment -name TOP_LEVEL_ENTITY chiptrip
set_global_assignment -name ORIGINAL_QUARTUS_VERSION 10.0
set_global_assignment -name PROJECT_CREATION_TIME_DATE "11:45:02 JUNE 08, 2010"
set_global_assignment -name LAST_QUARTUS_VERSION 10.0
set_global_assignment -name MIN_CORE_JUNCTION_TEMP 0
set_global_assignment -name MAX_CORE_JUNCTION_TEMP 85
set_instance_assignment -name PARTITION_HIERARCHY root_partition -to | -section_id
Top
set_global_assignment -name PARTITION_NETLIST_TYPE SOURCE -section_id Top
set_global_assignment -name PARTITION_FITTER_PRESERVATION_LEVEL
PLACEMENT_AND_ROUTING \ -section_id Top
set_global_assignment -name PARTITION_COLOR 16764057 -section_id Top
set_global_assignment -name LL_ROOT_REGION ON -section_id "Root Region"
set_global_assignment -name LL_MEMBER_STATE LOCKED -section_id "Root Region"
set_global_assignment -name STRATIX_DEVICE_IO_STANDARD "3.3-V LVTTL"
set_location_assignment PIN_P2 -to clk2
set_location_assignment PIN_AE4 -to ticket[0]
set_location_assignment PIN_J23 -to ticket[2]
set_location_assignment PIN_Y12 -to timeo[1]
set_location_assignment PIN_N2 -to reset
set_location_assignment PIN_R2 -to timeo[7]
set_location_assignment PIN_P1 -to clk1
set_location_assignment PIN_M3 -to ticket[1]
set_location_assignment PIN_AE24 -to ~LVDS150p/nCEO~
set_location_assignment PIN_C2 -to accel
set_location_assignment PIN_K4 -to ticket[3]
set_location_assignment PIN_B3 -to stf
set_location_assignment PIN_T9 -to timeo[0]
set_location_assignment PIN_M5 -to timeo[6]
set_location_assignment PIN_J8 -to dir[1]
set_location_assignment PIN_C5 -to timeo[5]
set_location_assignment PIN_F6 -to gt1
set_location_assignment PIN_P24 -to timeo[2]
set_location_assignment PIN_B2 -to at_altera
set_location_assignment PIN_P3 -to timeo[4]
set_location_assignment PIN_M4 -to enable
set_location_assignment PIN_E3 -to ~ASDO~
set_location_assignment PIN_E5 -to dir[0]
set_location_assignment PIN_R25 -to timeo[3]
set_location_assignment PIN_D3 -to ~nCSO~
set_location_assignment PIN_G4 -to gt2
set_global_assignment -name MISC_FILE "D:/altera/chiptrip/chiptrip.dpf"
set_global_assignment -name USE_TIMEQUEST_TIMING_ANALYZER ON
set_global_assignment -name POWER_PRESET_COOLING_SOLUTION \
"23 MM HEAT SINK WITH 200 LFPM AIRFLOW"
set_global_assignment -name POWER_BOARD_THERMAL_MODEL "NONE (CONSERVATIVE)"
set_global_assignment -name SDC_FILE chiptrip.sdc
# Commit assignments
export_assignments
# Close project
if {$need_to_close_project} {
project_close
}
}
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.
Altera Corporation
Constraining Designs
Send Feedback
QPP5V2
2015.11.02
1-7
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 Prime Settings File and then closes the project.
Similar to the constraints in the Quartus Prime 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.
Constraining Designs
Send Feedback
Altera Corporation
1-8
QPP5V2
2015.11.02
Versio
n
Changes
2015.11.02
15.1.0
June 2014
14.0.0
Formatting updates.
November
2012
12.1.0
June 2012
12.0.0
November
2011
10.0.2
Template update.
December
2010
10.0.1
Template update.
July 2010
10.0.0
November
2009
9.1.0
Altera Corporation
Constraining Designs
Send Feedback
QPP5V2
2015.11.02
Date
Versio
n
1-9
Changes
November
2008
8.1.0
May 2008
8.0.0
Related Information
Constraining Designs
Send Feedback
Altera Corporation
QPP5V2
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
Task and
Report
Windows
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
2-2
QPP5V2
2015.11.02
Click to Access
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
Altera Corporation
QPP5V2
2015.11.02
2-3
1. Click Assignments > Device and select a target device that meets your logic, performance, and I/O
requirements. Consider and specify /O standards, voltage and power supply requirements, and
available I/O pins.
2. Click Assignments > Pin Planner.
3. Assign I/O properties to match your device and PCB characteristics, including assigning logic, I/O
standards, output loading, slew rate, and current strength.
4. Click Run I/O Assignment Analysis in the Tasks pane to validate assignments and generate a
synthesized design netlist. Correct any problems reported.
5. Click Processing > Start Compilation. During compilation, the Quartus Prime software runs I/O
assignment analysis.
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
Altera Corporation
2-4
QPP5V2
2015.11.02
PCB Tool
.fx
FPGA Xchange
File
Design Files
(if available)
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 Prime
Handbook.
Related Information
Altera Corporation
QPP5V2
2015.11.02
2-5
Altera Corporation
2-6
QPP5V2
2015.11.02
Note: You can increase the accuracy of I/O assignment analysis by reserving specific device pins to
accommodate undefined but expected I/O.
To assign I/O pins in the Pin Planner, follow these steps:
1. Open a Quartus Prime project, and then click Assignments > Pin Planner.
2. Click Processing > Start Analysis & Elaboration to elaborate the design and display All Pins in the
device view.
3. To locate or highlight pins for assignment, click Pin Finder or a pin type under Highlight Pins in the
Tasks pane.
4. (Optional) To define a custom group of nodes for assignment, select one or more nodes in the Groups
or All Pins list, and then click Create Group.
5. Enter assignments of logic, I/O standards, interface IP, and properties for device I/O pins in the All
Pins spreadsheet, or by drag and drop into the package view.
6. To assign properties to differential pin pairs, click Show Differential Pin Pair Connections. A red
connection line appears between positive (p) and negative (n) differential pins.
7. (Optional) To create board trace model assignments, right-click an output or bidirectional pin, and
then click Board Trace Model. For differential I/O standards, the board trace model uses a differential
pin pair with two symmetrical board trace models. Specify board trace parameters on the positive end
of the differential pin pair. The assignment applies to the corresponding value on the negative end of
the differential pin pair.
8. To run a full I/O assignment analysis, click Run I/O Assignment Analysis. The Fitter reports analysis
results. Only reserved pins are analyzed prior to design synthesis.
Altera Corporation
QPP5V2
2015.11.02
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
Package View (Top)
Top Edge
Top Edge
Left Edge
Right Edge
Bottom Edge
Left Edge
Right Edge
Bottom Edge
Altera Corporation
2-8
QPP5V2
2015.11.02
Related Information
Altera Corporation
QPP5V2
2015.11.02
2-9
Export Assignments
Scenario
Command
File formats
Notes
N/A
Altera Corporation
2-10
QPP5V2
2015.11.02
Description
Pin Name/Usage
The name of the design pin, or whether the pin is GND or VCC pin
Location
Dir
I/O Standard
Voltage
I/O Bank
User Assignment
Related Information
Altera Corporation
QPP5V2
2015.11.02
2-11
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 Prime 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
Altera Corporation
2-12
QPP5V2
2015.11.02
Description
Click to Run
I/O
Assignment
Analysis
Advanced I/
O Timing
Description
HDL Required?
No
I/O bank VCCIO voltage compati Checks that no more than one VCCIO is required for
bility
the pins assigned to the I/O bank.
No
No
Checks that open drain is turned off for all pins with a No
differential I/O standard.
Altera Corporation
QPP5V2
2015.11.02
Rule
Description
HDL Required?
No
Electromigration check
No
PCI_IO clamp diode, location, and Checks whether the pin location along with the I/O
I/O standard conflicts
standard assigned supports PCI_IO clamp diode.
No
Yes
PLL and I/O pin location compati Checks whether pins connected to a PLL are assigned
bility check
to the dedicated PLL pin locations.
2-13
Yes
Description
HDL Required?
I/O bank can not have singleended I/O when DPA exists
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
Altera Corporation
2-14
QPP5V2
2015.11.02
Rule
Description
HDL Required?
No
Too many outputs or bidirectional Checks that there are no more than a certain number
pins in a VREFGROUP when a
of outputs or bidirectional pins in a VREFGROUP
VREF is used
when a VREF is used.
No
No
Altera Corporation
QPP5V2
2015.11.02
2-15
Assignments
Correct?
No
Yes
Pin Assignments Complete
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.
Altera Corporation
2-16
QPP5V2
2015.11.02
.edf
.vqm
.v
.vhd
.bdf
.tdf
Assignments
Correct?
No
Yes
Back-Annotate I/O Assignment
Analysis Pin Placements
Pin-Related Assignments Complete
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.
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.
Altera Corporation
QPP5V2
2015.11.02
2-17
Without
Start I/O Assignment Analysis
Command
With
Start I/O Assignment Analysis
Command
I/O
Assignment
Analysis
Errors
Reported
and Fixed
Compilation
T ime
Altera Corporation
2-18
QPP5V2
2015.11.02
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
Altera Corporation
QPP5V2
2015.11.02
2-19
Description
Advanced I/O
timing analysis
Analyze I/O timing with your board trace model to report accurate, board-aware
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.
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 userspecified value for a capacitive load.
Altera Corporation
2-20
QPP5V2
2015.11.02
Description
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 Prime 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 Prime Handbook.
Related Information
Altera Corporation
QPP5V2
2015.11.02
2-21
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 Prime 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.
Altera Corporation
2-22
QPP5V2
2015.11.02
Click Assignments > Device and then click Device and Pin Options.
Click Board Trace Model and define board trace model values for each I/O standard.
Click I/O Timing and define default I/O timing options at board trace near and far ends.
Click Assignments > Pin Planner and assign board trace model values to individual pins.
## setting the near end series resistance model of sel_p output pin to 25
ohms
Altera Corporation
QPP5V2
2015.11.02
2-23
Related Information
Description
TimeQuest Report
Summarizes the board trace model component settings for each output and
bidirectional signal.
Contains all the signal integrity metrics calculated during advanced I/O
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.
Managing Device I/O Pins
Send Feedback
Altera Corporation
2-24
QPP5V2
2015.11.02
Related Information
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
Altera Corporation
QPP5V2
2015.11.02
Reserve Pins
2-25
Reserve Pins
Use the following Tcl command to reserve a pin:
set_instance_assignment -name RESERVE_PIN <value> -to <signal name>
"AS BIDIRECTIONAL"
"AS INPUT TRI STATED"
"AS OUTPUT DRIVING AN UNSPECIFIED SIGNAL"
"AS OUTPUT DRIVING GROUND"
"AS SIGNALPROBE OUTPUT"
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:
set_location_assignment <location> -to <signal name>
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
Related Information
Altera Corporation
2-26
QPP5V2
2015.11.02
Version
Changes
2015.11.02
15.1.0
Removed early pin planning and Live I/O Check support from Quartus
Prime Pro Edition handbook
Changed instances of Quartus II to Quartus Prime.
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
2014.06.30
14.0.0
May 2013
13.0.0
Updated Pin Planner description for new task and report windows.
June 2012
12.0.0
Template update
July 2010
10.0.0
Altera Corporation
QPP5V2
2015.11.02
Date
March 2009
Version
9.0.0
2-27
Changes
Related Information
Altera Corporation
2015.11.02
QPP5V2
Subscribe
Send Feedback
Design planningthe feasibility analysis of physical constraintsis a fundamental early step in advanced
FPGA design. The BluePrint Platform Designer helps you to accurately plan constraints for physical
implementation. Use BluePrint to prototype interface implementations and rapidly define a legal device
floorplan. BluePrint supports only Arria 10 devices.
BluePrint interacts dynamically with the Quartus Prime Fitter to accurately verify placement legality while
you plan. You can evaluate different floorplans using interactive, real-time reporting to accurately plan
the best implementation without iterative compilation. Fitter verification ensures the highest correlation
between your BluePrint plan and actual implementation results. You can apply the BluePrint plan
constraints to your project with high confidence in the final implementation.
Figure 3-1: BluePrint Platform Designer GUI
Drag elements
or click locations
to place elements
Design
elements
Selected
elements
properties
Tcl console
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
3-2
QPP5V2
2015.11.02
Video Demo: Using BluePrint to Place DDR-3 and PCI Express Gen3
DDR3
PLL
GPIOs
BluePrint shows
legal placement
Apply Constraints
for Compilation
Quartus Prime
Software
Altera FPGAs contain core and periphery device locations. The device core locations are adaptive look-up
tables (ALUTs), core flip-flops, RAMs, and digital signal processors (DSPs). Device periphery locations
include I/O elements, phase-locked loops (PLLs), clock buffers, and hard processor systems (HPS).
Altera's advanced FPGAs contain many silicon features in the periphery, such as hard PCI Express IP
cores, high speed transceivers, hard memory interface circuitry, and embedded processors. Interactions
among these periphery atoms can be complex. BluePrint allows you to quickly plan I/O interface and
periphery locations for interfaces such as:
Altera Corporation
I/O elements
LVDS interfaces
PLLs
Clocks
QPP5V2
2015.11.02
3-3
After initialization, BluePrint displays your project's logical hierarchy, post-synthesis design elements, and
Fitter-created design elements, alongside a view of target device locations. You can directly place these
elements and instantly verify placement in the Fitter to ensure accurate correlation with the final
implementation.
Figure 3-3: BluePrint Planning Flow
Dynamic
status
icons
Related Information
Altera Corporation
3-4
QPP5V2
2015.11.02
Drag elements
or click locations
to place elements
Design
elements
Selected
elements
properties
Tcl console
You can disable or enable imported project assignments to resolve any conflicts and evaluate different
implementations. Once you are satisfied with the BluePrint plan for important interfaces, you validate the
plan to confirm that the Fitter can place all remaining logic. Once validated, you can apply the BluePrint
plan to your project via a generated Tcl file.
Figure 3-5: BluePrint Chip and Package Views
Chip View
Package View
Location
coordinates
I/O bank
coloring
Icons for
I/O types
Hover for
tooltip
File tab
Altera Corporation
Planning Task
QPP5V2
2015.11.02
BluePrint Interface
3-5
Planning Task
Home tab
Assignments tab
Plan tab
Reports tab
The BluePrint Tcl console displays the underlying Tcl commands executed by
the BluePrint user interface. You can also run valid Tcl commands by typing
them in the console directly or by sourcing them from a Tcl script.
Related Information
Altera Corporation
3-6
QPP5V2
2015.11.02
Starts Fitter
verification engine
and imports
assignments
Check shows
complete steps
Description
Initialize BluePrint
Loads the synthesis netlist, starts the Fitter verification engine, and
imports assignments from your Quartus Prime project.
Reset Plan
Altera Corporation
QPP5V2
2015.11.02
3-7
Imported
project
assignments
Disabled
assignments
The BluePrint Assignments tab contains the following controls for resolving any potential conflicts with
imported project assignments. Enable or disable specific or classes of assignments until you resolve all
potential conflicts. After you are satisfied with the status of all project assignments, click Update Plan to
update your BluePrint plan with the enabled project assignments. BluePrint reports an error for any
remaining assignment conflicts.
Description
Filter field
Update Plan
Enabled/Disabled
Clear
Altera Corporation
3-8
QPP5V2
2015.11.02
Command
Quartus Prime
Description
Closes BluePrint and opens the Quartus Prime software, allowing you to
change and resynthesize your project assignments before planning with
Blueprint. The Quartus Prime software automatically closes when you
open BluePrint.
Drag elements
or click locations
to place elements
Design
elements
Selected
elements
properties
Tcl console
You can assign design elements by dragging them from the Design Elements list and dropping them onto
button next to any
available device resources in the Chip or Package view. Alternatively, click the
design element to display a list of legal locations. Single-click any legal location in the list to highlight the
location in the floorplan. Double-click any legal location in the list to place in the floorplan. BluePrint
displays the approximate number of legal locations in the Legal Locations column. Clicking the
button verifies the number of legal locations.
Altera Corporation
QPP5V2
2015.11.02
3-9
You can apply various filters to locate specific design elements or target device resources. Device resources
are color coded by type, allowing quick access to any structure. BluePrint accurately evaluates the
constraints using the Fitter in real time. Place elements in the following order for efficiency:
1. All I/O pins or elements, such as PLLs, with known specific location requirements
2. All known periphery interface IP
3. (Optional) Remaining unplaced cells (Autoplace Fixed or right-click any individual unplaced element
to Autoplace Selected Element).
Select any physical design element and click Report Placeability of Selected Element to generate a report
listing all legal placement options on the Reports tab. You can Export the contents of the report for
analysis.
Note: Changes made in BluePrint do not apply to your Quartus Prime project until you apply the
generated BluePrint plan constraints script to your project.
The BluePrint Plan tab contains the following controls to help you place logic in the BluePrint plan.
Placement or unplacement in the BluePrint plan does not apply to your Quartus Prime project until you
add the generated BluePrint constraints script to your project.
Description
Autoplace Fixed
Attempts to place all unplaced design elements that have only one legal
location into the BluePrint plan.
Unplace All
Altera Corporation
3-10
QPP5V2
2015.11.02
Command
Description
Validate plan
Verifies that all constraints in the BluePrint plan are compatible with
placement of all remaining unplaced design elements. You can then
directly locate and resolve the source of any reported validation errors.
You must successfully validate the plan before running Write Plan File.
Attempts to place the selected design element and all of its children in a
legal location in the BluePrint plan.
Chip View
Package View
Copies the current BluePrint plan to the clipboard for pasting into other
files, such as word processing or presentation files.
Altera Corporation
QPP5V2
2015.11.02
3-11
Report
description
Reports
generated
Report
data links
directly to
details in Plan
tab
Report cell
details
Alternatively, you can source the script from the Quartus Prime GUI.
4. In the Quartus Prime software, click Start > Start Analysis & Synthesis to synthesis and apply the
BluePrint plan in your project.
Altera Corporation
3-12
QPP5V2
2015.11.02
Description
Initialize BluePrint
Loads the synthesis netlist, starts the Fitter verification engine, and
imports assignments from your Quartus Prime project.
Reset Plan
Description
Filter field
Update Plan
Enabled/Disabled
Clear
Quartus Prime
Closes BluePrint and opens the Quartus Prime software, allowing you to
change and resynthesize your project assignments before planning with
Blueprint. The Quartus Prime software automatically closes when you
open BluePrint.
Altera Corporation
QPP5V2
2015.11.02
3-13
Description
Autoplace Fixed
Attempts to place all unplaced design elements that have only one legal
location into the BluePrint plan.
Unplace All
Validate plan
Verifies that all constraints in the BluePrint plan are compatible with
placement of all remaining unplaced design elements. You can then
directly locate and resolve the source of any reported validation errors.
You must successfully validate the plan before running Write Plan File.
Attempts to place the selected design element and all of its children in a
legal location in the BluePrint plan.
Chip View
Package View
Copies the current BluePrint plan to the clipboard for pasting into other
files, such as word processing or presentation files.
Description
3-14
QPP5V2
2015.11.02
BluePrint Reports
Command
Description
Report All Placed/Unplaced Reports the name, parent (if any), and type of all placed (Report All
Pins
Placed Pins) or unplaced (Report All Unplaced Pins) pins in the
BluePrint plan, respectively. The Placed Pins report includes the
placement location name. The Unplaced Pins report includes the number
of potential placement locations. Right-click any cell to place, unplace, or
report connectivity or location information.
Report All Placed/Unplaced Reports the name, parent (if any), and type of all placed (Report All
Channels
Placed HSSI Channels) or unplaced (Report All Unplaced HSSI
Channels) channels in the BluePrint plan, respectively. The Placed HSSI
Channels report includes the placement location name. The Unplaced
HSSI Channels report includes the number of potential placement
locations. Right-click any cell to place, unplace, or report connectivity or
location information.
Right-click > Report Placed/ Reports the name, parent (if any), and type of placed (Report Placed
Unplaced Periphery Cells of Periphery Cells of Selected Type) or unplaced (Report Unplaced
Selected Type
Periphery Cells of Selected Type) cells matching the selected type. The
placed cells report includes the placement location name. The unplaced
cells report includes the number of potential placement locations. Rightclick any cell to place, unplace, or report connectivity or location informa
tion.
Right-click > Report
Periphery Locations of
Selected Type
Reports all locations in the device of the selected type, and whether the
location supports merging.
Reports the preferred legal locations for the selected cell in the BluePrint
plan in the Legal Location report. Right-click to immediately place the cell
in a location or report all periphery location of the selected type.
Copies the current report view to the clipboard for pasting into other
applications.
BluePrint Reports
BluePrint provides detailed, actionable feedback to help you quickly implement the best plan for your
design. You can access placement and further reporting functions directly from BluePrint reports. Use the
reports to help locate cells and assign suitable placement locations for specific interfaces and elements in
your design. BluePrint generates the following reports that provide detailed planning information.
Altera Corporation
QPP5V2
2015.11.02
Report Summary
3-15
Report Summary
Click the Create all Summary Reports on the Reports tab to generate summary reports about periphery
cells in the BluePrint plan. Right-click any cell type to report placed, unplaced, connectivity, or location
information.
Figure 3-11: Summary Reports
Summary
reports
Description
Report Pins
Click the following Reports tab commands to generate reports about I/O pins in the design. Right-click
any cell type to place, unplace, or report connectivity or location information.
Altera Corporation
3-16
QPP5V2
2015.11.02
Report Pins
Description
Generates the Placed Pins report. This report lists the name, parent, type,
and location of all placed pins in the BluePrint plan.
Generates the Unplaced Pins report. This report lists the name, parent,
type, and the number of potential placements for all unplaced pins in the
BluePrint plan.
Unplace or
report data
Figure 3-13: Unplaced Pins Report
Place cells
or report data
Altera Corporation
QPP5V2
2015.11.02
3-17
Description
Generates the Placed HSSI Channels report. This report lists the name,
parent, type, and location of all placed HSSI RX/TX channels in the
BluePrint plan.
Generates the Unplaced HSSI Channels report. This report lists the
name, parent, type, and location of all unplaced HSSI RX/TX channels in
the BluePrint plan.
Report Clocks
Click the following Reports tab commands to generate reports showing clock networks in the plan. Use
this report to analyze clock network scenarios and ensure that specific device regions are fed by high fanout signals.
Table 3-12: Report Clocks Commands
Command
Report Clocks
Description
Altera Corporation
3-18
QPP5V2
2015.11.02
Description
Altera Corporation
QPP5V2
2015.11.02
3-19
Description
Accessible from the All Periphery Cells report. This command reports
the name, parent (if any), type, and location of the selected placed
periphery cells matching the selected type. Right-click any cell to place,
unplace, or report connectivity or location information.
Accessible from the All Periphery Cells report. This command reports
the name, parent (if any), type, and number of suitable locations for the
selected unplaced periphery cells matching the selected type. Right-click
any cell to place, unplace, or report connectivity or location information.
Reports all locations in the device of the selected type, and whether the
location supports merging.
Altera Corporation
3-20
QPP5V2
2015.11.02
Description
Version
Changes
2015.11.02
15.1.0
2015.05.04
15.0.0
2014.12.15
Altera Corporation
14.1.
Overview information
Reset Plan command
Legal Assignments list and prompt
Tcl console
QPP5V2
Subscribe
Send Feedback
FPGA design software that easily integrates into your design flow saves time and improves productivity.
The Altera Quartus Prime software provides you with a command-line executable for each step of the
FPGA design flow to make the design process customizable and flexible.
The benefits provided by command-line executables include:
Command-line control over each step of the design flow
Reduced memory requirements
Improved performance
The command-line executables are also completely interchangable with the Quartus Prime GUI,
allowing you to use the exact combination of tools that you prefer.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
4-2
QPP5V2
2015.11.02
Introductory Example
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 Prime software is used to demonstrate this functionality. If
installed, the tutorial design is found in the <Quartus Prime 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 Prime directory>/quartus/bin directory must be in your PATH environment variable.
quartus_syn
quartus_fit
quartus_asm
quartus_sta
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 Prime 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=Arria 10
PART=<part>
PACKING_OPTION=minimize_area
quartus_syn $PROJECT --source=$TOP_LEVEL_FILE --family=$FAMILY
quartus_fit $PROJECT --part=$PART --pack_register=$PACKING_OPTION
quartus_asm $PROJECT
quartus_sta $PROJECT
Altera Corporation
QPP5V2
2015.11.02
4-3
This command starts the Quartus Prime Command-Line and Tcl API Help browser, a viewer for
information about the Quartus Prime Command-Line executables and Tcl API.
Use the -h option with any of the Quartus Prime 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 Prime Command-Line and Tcl API Help Browser
Altera Corporation
4-4
QPP5V2
2015.11.02
Option Precedence
updated assignment. You can also make assignments using the Quartus Prime Tcl scripting API. If you
want to completely script the creation of a Quartus Prime project, choose this method.
Related Information
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 Prime
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 Prime 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.
Table 4-1: Precedence for Reading Assignments
Option Specified
--read_settings_files = on
Command-line options
(Default)
Altera Corporation
QPP5V2
2015.11.02
Option Precedence
Option Specified
--read_settings_files = off
4-5
Command-line options
Project database (db directory, if it
exists)
Quartus Prime software defaults
The table lists the locations to which assignments are written, depending on the value of the --
(Default)
--write_settings_files = off
Compiler database
The example assumes that a project named fir_filter exists, and that the analysis and synthesis step has
been performed.
quartus_fit fir_filter --pack_register=off
quartus_sta fir_filter
mv fir_filter_sta.rpt fir_filter_1_sta.rpt
quartus_fit fir_filter --pack_register=minimize_area
quartus_sta fir_filter
mv fir_filter_sta.rpt fir_filter_2_sta.rpt
--write_settings_files=off
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 Prime software reads and updates settings files. In the following
Altera Corporation
4-6
QPP5V2
2015.11.02
example, the quartus_asm executable does not read or write settings files because doing so would not
change any settings for the project.
quartus_syn filtref --source=filtref --part=<part>
quartus_fit filtref --pack_register=off --read_settings_files=off
quartus_asm filtref --read_settings_files=off --write_settings_files=off
TimeQuest
Timing Analyzer
quartus_sta
Fitter
quartus_fit
Assembler
quartus_asm
Programmer
quartus_pgm
Programming File
Converter
quartus_cpf
Design Assistant
quartus_drc
Compiler Database
quartus_cdb
PowerPlay Power
Analyzer
quartus_pow
SignalTap II Logic
Analyzer
quartus_stp
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 commandline arguments for each executable in the flow.
Altera Corporation
QPP5V2
2015.11.02
4-7
The following example runs compilation, timing analysis, and programming file generation with a single
command:
quartus_sh --flow compile filtref
Tip: For information about specialized flows, type quartus_sh --help=flow at a command prompt.
Mentor Graphics ModelSim software, and then compiles the design targeting a Cyclone V device.
#!/bin/sh
# Run synthesis first.
# This example assumes you use Synplify software
synplify -batch synthesize.tcl
# If your Quartus Prime 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
# Use the quartus_sta executable to do fast and slow-model
# timing analysis
Command Line Scripting
Send Feedback
Altera Corporation
4-8
QPP5V2
2015.11.02
Related Information
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 slowcorner 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
Altera Corporation
QPP5V2
2015.11.02
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.
to optimize the design using gate-level register retiming and technology remapping.
The --part option causes quartus_syn to target a device. To create the project and synthesize it using the
netlist optimizations described above, type the command shown in this example at a command prompt.
quartus_syn top --source=top.edf --enable_register_retiming=on
--enable_wysiwyg_resynthesis=on --part=<part>
Command Line Scripting
Send Feedback
Altera Corporation
4-10
QPP5V2
2015.11.02
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.
quartus_sh --archive <project name> -output <filename>
To restore a project archive, type the command shown in the example at a command prompt.
quartus_sh --restore <archive name>
The command restores the project archive to the current directory and overwrites existing files.
Related Information
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.
quartus_cdb --update_mif %1 --rev=%2
quartus_asm %1 --rev=%2
To run the batch file, type the following command at a command prompt:
update_memory.bat <project name> <revision name>
Altera Corporation
QPP5V2
2015.11.02
4-11
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:
quartus_cpf --convert --option=<filename>.opt --device=EPCS64 <file>.sof <file>.pof
Alternatively, you can use the Convert Programming Files utility in the Quartus Prime 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.
quartus_cpf --convert <file>.cof
Altera Corporation
4-12
QPP5V2
2015.11.02
cp db/* ../fir_filter-seed_$seed/db
else
ERROR_SEEDS="$ERROR_SEEDS $seed"
fi
done
if [
then
echo
exit
else
echo
echo
exit
fi
-z "$ERROR_SEEDS" ]
"Seed sweeping was successful"
0
"There were errors with the following seed(s)"
$ERROR_SEEDS
1
#!/bin/sh
ERROR_SEEDS=""
quartus_syn 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"
# Perform a fitting attempt with the specified seed
quartus_fit fir_filter --seed=$seed --rev=filtref
# If the exit-code is non-zero, the fitting attempt was
# successful, so copy the project to a new directory
if [ $? -eq 0 ]
then
mkdir ../fir_filter-seed_$seed
mkdir ../fir_filter-seed_$seed/db
cp * ../fir_filter-seed_$seed
cp db/* ../fir_filter-seed_$seed/db
else
ERROR_SEEDS="$ERROR_SEEDS $seed"
fi
done
if [ -z "$ERROR_SEEDS" ]
then
echo "Seed sweeping was successful"
exit 0
else
echo "There were errors with the following seed(s)"
echo $ERROR_SEEDS
exit 1
fi
Tip: Use Design Space Explorer II (DSE) included with the Quartus Prime software script (by typing
quartus_dse at a command prompt) to improve design performance by performing automated seed
sweeping.
Altera Corporation
QPP5V2
2015.11.02
4-13
To view floorplans or perform other GUI-intensive tasks, launch the Quartus Prime software.
Start QFlow by typing the following command at a command prompt:
quartus_sh -g
Version
Changes
2015.11.02
15.1.0
2015.05.04
15.0.0
December
2014
14.1.0
June 2014
14.0.0
Updated formatting.
November
2013
13.1.0
June 2012
12.0.0
November
2011
11.0.1
Template update.
May 2011
11.0.0
December
2010
10.1.0
Template update.
Added section on using a script to regenerate megafunction variations.
Removed references to the Classic Timing Analyzer (quartus_tan).
Removed Qflow illustration.
July 2010
10.0.0
4-14
QPP5V2
2015.11.02
Date
November
2009
Version
9.1.0
Changes
No change to content.
November
2008
8.1.0
May 2008
8.0.0
Related Information
Altera Corporation
Tcl Scripting
2015.11.02
QPP5V2
Subscribe
Send Feedback
Tcl Scripting
You can use Tcl scripts to control the Altera Quartus Prime software and to perform a wide range of
functions, such as compiling a design or scripting common tasks.
For example, use Tcl scripts to perform the following tasks:
Tcl scripts also facilitate project or assignment migration. For example, when designing in different
projects with the same prototype or development board, you can write a script to automate reassignment
of pin locations in each new project. The Quartus Prime 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 Prime 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 tasks in the Quartus Prime 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.
Related Information
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
5-2
QPP5V2
2015.11.02
Package Description
chip_planner
Identify and modify resource usage and routing with the Chip Editor
design
device
external_memif_
toolkit
fif
Contains the set of Tcl functions for using the Fault Injection File (FIF)
Driver
flow
insystem_
memory_edit
insystem_source_ Interact with the In-System Sources and Probes tool in an Altera device
probe
interactive_
synthesis
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
Package Name
5-3
Package Description
iptclgen
Generate memory IP
jtag
logic_analyzer_
interface
Query and modify the Logic Analyzer Interface output pin state
misc
names
periph
project
Create and manage projects and revisions, make any project assignments
including timing assignments
report
rtl
rtm
sdc
sdc_ext
simulator
sta
Contain the set of Tcl functions for obtaining advanced information from
the TimeQuest Timing Analyzer
stp
synthesis_report
Contain the set of Tcl functions for the Dynamic Synthesis Report tool
tdc
By default, only the minimum number of packages loads automatically with each Quartus Prime
executable. This keeps the memory requirement for each executable as low as possible. Because the
number of packages that the Quartus Prime executable loads is limited, 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:
quartus_fit --tcl_eval help
Tcl Scripting
Send Feedback
Altera Corporation
5-4
QPP5V2
2015.11.02
Loading Packages
Loading Packages
To load a Quartus Prime Tcl package, use the load_package command as follows:
load_package [-version <version number>] <package name>
This command is similar to the package require Tcl command, but you can easily alternate between
different versions of a Quartus Prime Tcl package with the load_package command because of the version option.
Related Information
This command runs the Quartus Prime Command-Line and Tcl API help browser, which documents all
commands and options in the Quartus Prime Tcl API.
Quartus Prime Tcl help allows easy access to information about the Quartus Prime Tcl commands. To
access the help information, type help at a Tcl prompt.
Tcl Help Output
Table 5-2: Help Options Available in the Quartus Prime Tcl Environment
Help Command
help
help -tcl
Description
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
Help Command
<command_name> -h
or
<command_name> -help
5-5
Description
To view short help for a Quartus Prime Tcl command for which
the package is loaded.
Examples:
project_open -h
project_open -help
package
require ::quartus::<pack
age name> [<version>]
or
If you do not specify the -version option, help for the command
in the currently loaded package version is displayed by default.
<command_name> -long_
help
If the package version for which you want help is not loaded, help
for the latest version of the package is displayed by default.
Examples:
project_open -long_help
help -cmd project_open
help -cmd project_open -version 1.0
help -examples
help -quartus
quartus_sh --qhelp
help -timequestinfo
Tcl Scripting
Send Feedback
5-6
QPP5V2
2015.11.02
The Tcl API help is also available in Quartus Prime online help. Search for the command or package
name to find details about that command or package.
Related Information
Description
--shell
-s
Running an executable with the -t option runs the specified Tcl script. You can also specify arguments to
the script. Access the arguments through the argv variable, or use a package such as cmdline, which
supports arguments of the following form:
-<argument name> <argument value>
Related Information
Running an executable with the -s option starts an interactive Tcl shell. For example, to open the
Quartus Prime TimeQuest Timing Analyzer executable in interactive shell mode, type the following
command:
quartus_sta -s
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
Evaluate as Tcl
5-7
Commands you type in the Tcl shell are interpreted when you press Enter. You can run a Tcl script in the
interactive shell with the following command:
source <script name>
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.
For example, the following command runs the Tcl command that prints out the commands available in
the project package.
quartus_sh --tcl_eval help -pkg project
Tcl Scripting
Send Feedback
Altera Corporation
5-8
QPP5V2
2015.11.02
the execute_flow Tcl command. If you can make settings in the Quartus Prime software and run a flow
to get your desired result, you can make the same settings and run the same flow in a Tcl script.
Note: The assignments created or modified while a project is open are not committed to the Quartus
Prime 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 Prime software automatically commits the changes.
Related Information
Compiling Designs
You can run the Quartus Prime command-line executables from Tcl scripts. Use the included flow
package to run various Quartus Prime compilation flows, or run each executable directly.
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
5-9
Reporting
You can extract information from the Compilation Report to evaluate results. The Quartus Prime 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 report 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 row 0 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.
Print All Report Panel Names
load_package report
project_open myproject
Tcl Scripting
Send Feedback
Altera Corporation
5-10
QPP5V2
2015.11.02
Timing Analysis
The Quartus Prime TimeQuest Timing Analyzer includes support for industry-standard SDC commands
in the sdc package. The Quartus Prime software includes comprehensive Tcl APIs and SDC extensions for
the TimeQuest Timing Analyzer in the sta, and sdc_ext packages. The Quartus Prime software also
includes a tdc package that obtains information from the TimeQuest Timing Analyzer.
Related Information
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
Execution Example
5-11
The following three global assignments control when a script is run automatically:
PRE_FLOW_SCRIPT_FILE before a flow starts
POST_MODULE_SCRIPT_FILE after a module finishes
POST_FLOW_SCRIPT_FILE after a flow finishes
A module is another term for a Quartus Prime executable that performs one step in a flow. For example,
two modules are Analysis and Synthesis (quartus_syn), and timing analysis (quartus_sta).
A flow is a series of modules that the Quartus Prime software runs with predefined options. For example,
compiling a design is a flow that typically consists of the following steps (performed by the indicated
module):
1.
2.
3.
4.
Other flows are described in the help for the execute_flow Tcl command. In addition, many commands
in the Processing menu of the Quartus Prime GUI correspond to this design flow.
To make an assignment automatically run a script, add an assignment with the following form to the .qsf
for your project:
set_global_assignment -name <assignment name> <executable>:<script 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.
set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:first.tcl
set_global_assignment -name POST_MODULE_SCRIPT_FILE quartus_sh:next.tcl
set_global_assignment -name POST_FLOW_SCRIPT_FILE quartus_sh:last.tcl
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 Prime software starts compilation with analysis and synthesis, performed by the
quartus_syn 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_syn top rev_1
Tcl Scripting
Send Feedback
Altera Corporation
5-12
Controlling Processing
QPP5V2
2015.11.02
Then, the Quartus Prime 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.
Restrict Processing to a Single Module
set module [lindex $quartus(args) 0]
if [string match "quartus_sta" $module] {
# Include commands here that are run
# after timing analysis
# Use the post-message command to display
# messages
post_message "Running after timing analysis"
}
Displaying Messages
Because of the way the Quartus Prime 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
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
5-13
address can be identified as address[0] instead of address\[0\]. You can take advantage of natural bus
The Quartus Prime 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
-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 Prime 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 Prime Tcl API uses a collection ID to
access the collection.
There are two Quartus Prime 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 Prime Tcl commands return collection IDs.
The foreach_in_collection command is similar to the foreach Tcl command. Use it to iterate through
all elements in a collection. The following example prints all instance assignments in an open project.
foreach_in_collection Example
set all_instance_assignments [get_all_instance_assignments -name *]
foreach_in_collection asgn $all_instance_assignments {
# Information about each assignment is
# returned in a list. For information
# about the list elements, refer to Help
# for the get-all-instance-assignments command.
Tcl Scripting
Send Feedback
Altera Corporation
5-14
QPP5V2
2015.11.02
Use the get_collection_size command to get the number of elements in a collection. The following
example prints the number of global assignments in an open project.
get_collection_size Example
set all_global_assignments [get_all_global_assignments -name *]
set num_global_assignments [get_collection_size $all_global_assignments]
puts "There are $num_global_assignments global assignments in your project"
info (default)
extra_info
warning
critical_warning
error
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
5-15
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.
Passing Command-Line Arguments to Scripts
quartus_sh -t print_args.tcl my_project 100MHz
The value at index 0 is my_project
The value at index 1 is 100MHz
You can use the cmdline package included with the Quartus Prime software for more robust and selfdocumenting command-line argument passing. The cmdline package supports command-line arguments
with the form -<option><value> .
cmdline Package
package require cmdline
variable ::argv0 $::quartus(args)
set options {
{ "project.arg" "" "Project name" }
{ "frequency.arg" "" "Frequency" }
}
set usage "You need to specify options and values"
array set optshash [::cmdline::getoptions ::argv $options $usage]
puts "The project name is $optshash(project)"
puts "The frequency is $optshash(frequency)"
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.
Passing Command-Line Arguments for Scripts
quartus_sh -t print_cmd_args.tcl -project my_project -frequency 100MHz
The project name is my_project
The frequency is 100MHz
Virtually all Quartus Prime 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.
Full-Featured Method to Open Projects
package require cmdline
variable ::argv0 $::quartus(args)
set options { \
{ "project.arg" "" "Project Name" } \
{ "revision.arg" "" "Revision Name" } \
}
array set optshash [::cmdline::getoptions ::argv0 $options]
# Ensure the project exists before trying to open it
if {[project_exists $optshash(project)]} {
if {[string equal "" $optshash(revision)]} {
# There is no revision name specified, so default
# to the current revision
project_open $optshash(project) -current_revision
Tcl Scripting
Send Feedback
Altera Corporation
5-16
QPP5V2
2015.11.02
If you do not require this flexibility or error checking, you can use just the project_open command.
Simple Method to Open Projects
set proj_name [lindex $argv 0]
project_open $proj_name
Create a new project called fir_filter, with a revision called filtref by typing the following command at a Tcl
prompt:
project_new -revision filtref fir_filter
Note: If the project file and project name are the same, the Quartus Prime 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:
set_global_assignment -name family <device family name>
To learn more about assignment names that you can use with the -name option, refer to Quartus Prime
Help.
Note: For assignment values that contain spaces, enclose the value in quotation marks.
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
5-17
To 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
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_syn, 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 Prime GUI.
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.
Tcl Scripting
Send Feedback
Altera Corporation
5-18
QPP5V2
2015.11.02
Variables
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:
Variable value substitution
Nested command substitution
Backslash substitution
Variable value substitution, refers to accessing the value stored in a variable with a dollar sign ($) before
the variable name.
Nested command substitution refers to how the Tcl interpreter evaluates Tcl code in square brackets. The
Tcl interpreter evaluates nested commands, starting with the innermost nested command, and commands
nested at the same level from left to right. Each nested command result is substituted in the outer
command.
set a [string length foo]
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.
set this_is_a_long_variable_name [string length "Hello \
world."]
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).
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
Lists
5-19
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 zerobased. 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]
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:
set days(Mon) Monday
The array set command requires a list of index/value pairs. This example sets the array called days:
array set days { Sun Sunday Mon Monday Tue Tuesday \
Wed Wednesday Thu Thursday Fri Friday Sat Saturday }
set day_abbreviation Mon
puts $days($day_abbreviation)
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.
foreach day [array names days] {
puts "The abbreviation $day corresponds to the day \
name $days($day)"
}
Arrays are a very flexible way of storing information in a Tcl script and are a good way to build complex
data structures.
Tcl Scripting
Send Feedback
Altera Corporation
5-20
QPP5V2
2015.11.02
Control 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
} elseif { $a
puts "The
} else {
puts "The
}
{
value is positive"
< 0 } {
value is negative"
value is zero"
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.
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
File I/O
5-21
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
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.
Accessing Global Variables
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.
Open a File for Writing
set output [open myfile.txt w]
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
set output [open myfile.txt w]
puts $output "This text is written to the file."
close $output
Tcl Scripting
Send Feedback
Altera Corporation
5-22
QPP5V2
2015.11.02
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.
Read from a File
set input [open myfile.txt]
set line_num 1
while { [gets $input line] >= 0 } {
# Process the line of text here
puts "$line_num: $line"
incr line_num
}
close $input
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:
Brent B. Welch and Ken Jones, and Jeffery Hobbs, Practical Programming in Tcl and Tk (Upper Saddle
River: Prentice Hall, 2003)
John Ousterhout and Ken Jones, Tcl and the Tk Toolkit (Boston: Addison-Wesley Professional, 2009)
Mark Harrison and Michael McLennan, Effective Tcl/Tk Programming: Writing Better Programs in Tcl
and Tk (Boston: Addison-Wesley Professional, 1997)
Related Information
Altera Corporation
Tcl Scripting
Send Feedback
QPP5V2
2015.11.02
5-23
2015.11.02
Versio
n
15.1.0
Changes
June 2014
14.0.0
June 2012
12.0.0
November
2011
11.0.1
Template update
Updated supported version of Tcl in the section Tool Command
Language.
minor editoral changes
May 2011
11.0.0
December
2010
10.1.0
Template update
July 2010
10.0.0
November
2009
9.1.0
November
2008
8.1.0
May 2008
8.0.0
Updated references.
Related Information
Tcl Scripting
Send Feedback
Altera Corporation
2015.11.02
QPP5V2
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 Prime 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 Prime software also provides the Pin Planner and the SSN
Analyzer to assist you during your PCB schematic review process.
Related Information
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
6-2
QPP5V2
2015.11.02
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
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
The Unused Pin page specifies the behavior of all unused pins in your design. Use the Unused Pin page
to ensure that unused pin settings are compatible with your PCB. For example, if you reserve all unused
pins as outputs driving ground, you must ensure that you do not connect unused I/O pins to VCC pins on
your PCB. Connecting unused I/O pins to VCC pins may result in contention that could lead to higher
than expected current draw and possible device overstress.
The Reserve all unused pins list shows available unused pin state options for the target device. The
default state for each pin is the recommended setting for each device family.
When you reserve a pin as output driving ground, the Fitter connects a ground signal to the output pin
internally. You should connect the output pin to the ground plane on your PCB, although you are not
required to do so. Connecting the output driving ground to the ground plane is known as creating a
virtual ground pin, which helps to minimize simultaneous switching noise (SSN) and ground bounce
effects.
Altera Corporation
Reviewing Printed Circuit Board Schematics with the Quartus Prime Software
Send Feedback
QPP5V2
2015.11.02
Voltage Settings
6-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
The Error Detection CRC page specifies error detection cyclic redundancy check (CRC) use for the target
device. When Enable error detection CRC is turned on, the device checks the validity of the
programming data in the devices. Any changes made in the data while the device is in operation generates
an error.
Turning on the Enable open drain on CRC error pin option allows the CRC ERROR pin to be set as an
open-drain pin in some devices, which decouples the voltage level of the CRC ERROR pin from VCCIO
voltage. You must connect a pull-up resistor to the CRC ERROR pin on your PCB if you turn on this
option.
In addition to settings in the Device dialog box, you should verify settings in the Voltage page of the
Settings dialog box.
Related Information
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
Altera Corporation
6-4
QPP5V2
2015.11.02
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 6-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 Prime Software
Send Feedback
QPP5V2
2015.11.02
6-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_GNDUnused GXB receiver or dedicated reference clock pin. This pin must be connected to
GXB_GND through a 10k Ohm resistor.
GXB_NCUnused 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.
Altera Corporation
6-6
QPP5V2
2015.11.02
Pin Planner
The Quartus Prime 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
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.
Versio
n
Changes
2015.11.02
15.1.0
June 2014
14.0.0
Template update.
November
2012
12.1.0
Minor update of Pin Planner description for task and report windows.
June 2012
12.0.0
Altera Corporation
Reviewing Printed Circuit Board Schematics with the Quartus Prime Software
Send Feedback
QPP5V2
2015.11.02
Date
Versio
n
6-7
Changes
November
2011
10.0.2
Template update.
December
2010
10.0.1
July 2010
10.0.0
Initial release.
Related Information
Reviewing Printed Circuit Board Schematics with the Quartus Prime Software
Send Feedback
Altera Corporation
QPP5V2
Subscribe
Send Feedback
Device Settings
Device assignments determine the timing model that the Quartus Prime 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.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
7-2
QPP5V2
2015.11.02
I/O Assignments
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 Prime 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
Altera Corporation
QPP5V2
2015.11.02
Physical Implementation
7-3
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 Prime 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 Prime TimeQuest Timing Analyzer or the report_ucp Tcl command.
Related Information
Physical Implementation
Most optimization issues involve preserving previous results, reducing area, reducing critical path delay,
reducing power consumption, and reducing runtime.
The Quartus Prime 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
Altera Corporation
7-4
Reducing Area
QPP5V2
2015.11.02
Finally, not all designs can be realized in a hardware circuit with limited resources and given constraints.
If you encounter resource limitations, timing constraints, or power constraints that cannot be resolved by
the Fitter, consider rewriting parts of the HDL code.
Related Information
Reducing Area
By default, the Quartus Prime 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
Altera Corporation
QPP5V2
2015.11.02
Reducing Runtime
7-5
Related Information
Reducing Runtime
Many Fitter settings influence compilation time. Most of the default settings in the Quartus Prime
software are set for reduced compilation time. You can modify these settings based on your project
requirements.
The Quartus Prime 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.
Design Analysis
The Quartus Prime 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-androute.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.
Advisors
The Quartus Prime 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 following advisor. These
advisors give recommendations based on your project settings and your design constraints:
Altera Corporation
7-6
QPP5V2
2015.11.02
Version
Changes
2015.11.02 15.1.0
2014.12.15 14.1.0
Updated format.
November 13.1.0
2013
November 10.0.3
2011
Template update.
December 10.0.2
2010
August
2010
10.0.1
Corrected link
July 2010
10.0.0
Related Information
Altera Corporation
QPP5V2
Subscribe
Send Feedback
The Quartus Prime 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.
Info: Placement optimizations have been running for 4 hour(s)
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
8-2
QPP5V2
2015.11.02
Rapid Recompile automatically reuses previous synthesis, placement, and routing results to reduce
subsequent recompilation time and timing variations after making small design changes.
A
B
C
D
Unchanged
Regular Compile
Rapid
Recompile
You can use Rapid Recompile to implement HDL-based functional ECO changes that affect a small subset
of a large or complex design (less than 5% of total design logic), without full recompilation. Rapid
Recompile can achieve up to 4x reduction in compilation time for impacted portions of the design.
To start Rapid Recompilation following an initial compilation, click Processing > Start > Start Rapid
Recompile. Rapid Recompile implements the following type of design changes without full recompilation:
The Rapid Recompile Preservation Summary report provides detailed information about the percentage
of preserved compilation results.
Altera Corporation
QPP5V2
2015.11.02
8-3
The Quartus Prime software can detect the number of processors available on a computer and use
multiple processors to reduce compilation time.
You can control the number of processors used during a compilation on a per user basis. The Quartus
Prime software can use up to 16 processors to run algorithms in parallel and reduce compilation time.
The Quartus Prime software turns on parallel compilation by default to enable the software to detect
available multiple processors. You can specify the maximum number of processors that the software can
use if you want to reserve some of the available processors for other tasks.
Note: Do not consider processors with Intel Hyper-Threading as more than one processor. If you have a
single processor with Intel Hyper-Threading enabled, you should set the number of processors to
one. Do not use the Intel Hyper-Threading feature for Quartus Prime compilations, because it can
increase run times.
The Quartus Prime 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.
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.
You can also set the number of processors available for Quartus Prime compilation using the following
Tcl command in your script:
set_global_assignment -name NUM_PARALLEL_PROCESSORS <value>
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 Prime software uses one processor or
multiple processors. The only difference between compilations using a different number of processors is
the compilation time.
The Parallel Compilation report provides detailed information about compilation using multiple
processors.
Reducing Compilation Time
Send Feedback
Altera Corporation
8-4
QPP5V2
2015.11.02
Related Information
You can use Quartus Prime integrated synthesis to synthesize and optimize HDL designs, and you can use
synthesis netlist optimizations to optimize netlists that were synthesized by third-party EDA software.
When using Quartus Prime Integrated Synthesis, you can also enable Physical Synthesis Optimization
before performing Analysis and Synthesis. Netlist optimizations can cause the Analysis and Synthesis
module to take much longer to run. Read the Analysis and Synthesis messages to determine how much
Altera Corporation
QPP5V2
2015.11.02
8-5
time these optimizations take. The compilation time spent in Analysis and Synthesis is usually short
compared to the compilation time spent in the Fitter.
If your design meets your performance requirements without synthesis netlist optimizations, turn off the
optimizations to save time. If you require synthesis netlist optimizations to meet performance, you can
optimize parts of your design hierarchy separately to reduce the overall time spent in Analysis and
Synthesis.
Turn off settings that are not useful. In general, if you carry over compilation settings from a previous
project, evaluate all settings and keep only those that you need.
Your HDL coding style can also affect the synthesis time. For example, if you want to infer RAM blocks
from your code, you must follow the guidelines for inferring RAMs. If RAM blocks are not inferred
properly, the software implements those blocks as registers.
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
The highest Fitter effort setting, Standard Fit, requires the most runtime, but does not always yield a
better result than using the default Auto Fit.
For designs with very tight timing requirements, both Auto Fit and Standard Fit use the maximum effort
during optimization. Altera recommends using Auto Fit for reducing compilation time. If you are certain
that your design has only easy-to-meet timing constraints, you can select Fast Fit for an even greater
runtime savings.
You can control the amount of time the Fitter spends in placement by reducing with the Placement
Effort Multiplier option.
Click Assignments > Settings > Compiler Settings > Advanced Settings (Fitter) and specify a value for
Placement Effort Multiplier. The default is 1.0. Legal values must be greater than 0 and can be noninteger values. Numbers between 0 and 1 can reduce fitting time, but also can reduce placement quality
and design performance.
Altera Corporation
8-6
QPP5V2
2015.11.02
Physical synthesis options enable you to optimize your post-synthesis netlist and improve your timing
performance. These options, which affect placement, can significantly increase compilation time.
If your design meets your performance requirements without physical synthesis options, turn them off to
reduce compilation time. For example, if some or all of the physical synthesis algorithm information
messages display an improvement of 0 ps, turning off physical synthesis can reduce compilation time.
You also can use the Physical synthesis effort setting on the Advanced Fitter Settings dialog box to
reduce the amount of extra compilation time used by these optimizations.
The Fast setting directs the Quartus Prime software to use a lower level of physical synthesis optimization.
Compared to the Normal physical synthesis effort level, using the Fast setting can cause a smaller increase
in compilation time. However, the lower level of optimization can result in a smaller increase in design
performance.
To identify areas of routing congestion in your design, open the Chip Planner from the Tools menu.
To view the routing congestion in the Chip Planner, double-click the Report Routing Utilization
command in the Tasks list. Click Preview in the Report Routing Utilization dialog box to preview the
default congestion display. Change the Routing utilization type to display congestion for specific
resources. The default display uses dark blue for 0% congestion and red for 100%. Adjust the slider for
Threshold percentage to change the congestion threshold level.
Even if average congestion is not very high, your design may have areas where congestion is very high in a
specific type of routing. You can use the Chip Planner to identify areas of high congestion for specific
interconnect types. You can change the connections in your design to reduce routing congestion. If the
area with routing congestion is in a LogicLock Plus region or between LogicLock Plus regions, change or
remove the LogicLock Plus regions and recompile your design. If the routing time remains the same, the
time is a characteristic of your design and the placement. If the routing time decreases, consider changing
the size, location, or contents of LogicLock Plus regions to reduce congestion and decrease routing time.
Sometimes, routing congestion may be a result of the HDL coding style used in your design. After you
identity congested areas using the Chip Planner, review the HDL code for the blocks placed in those areas
to determine whether you can reduce interconnect usage by code changes.
The Quartus Prime compilation messages contain information about average and peak interconnect
usage. Peak interconnect usage over 75%, or average interconnect usage over 60%, could be an indication
that it might be difficult to fit your design. Similarly, peak interconnect usage over 90%, or average
interconnect usage over 75%, are likely to have increased chances of not getting a valid fit.
Related Information
Altera Corporation
QPP5V2
2015.11.02
8-7
Version
Changes
2015.11.02 15.1.0
2014.12.15 14.1.0
2014.08.18 14.0a10.0
Updated format.
Altera Corporation
8-8
QPP5V2
2015.11.02
Date
Version
Changes
November 11.0.1
2011
Template update.
December 10.1.0
2010
July 2010
Initial release.
10.0.0
Template update.
Added details about peak and average interconnect usage.
Added new section Reducing Static Timing Analysis Time.
Minor changes throughout chapter.
Related Information
Altera Corporation
2015.11.02
QPP5V2
Subscribe
Send Feedback
The application techniques vary between designs. Applying each technique does not always improve
results. Settings and options in the Quartus Prime software have default values that provide the best tradeoff between compilation time, resource utilization, and timing performance. You can adjust these settings
to determine whether other settings provide better results for your design.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
9-2
QPP5V2
2015.11.02
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 9-1: Optimize Hold Timing Option Fixing an Internal Hold Time Violation
D
Q
Fitter Adds Routing Delay Here
clk
Logic
Derived Clock
Hold-Time Violation
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
Altera Corporation
QPP5V2
2015.11.02
9-3
When this option is off, the Fitter optimizes designs considering only slow-corner delays from the slowcorner timing model (slowest manufactured device for a given speed grade, operating in low-voltage
conditions).
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
Automatically
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 Prime
software.
You should analyze any constraints that the Quartus Prime 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.
Altera Corporation
9-4
QPP5V2
2015.11.02
Related Information
TimeQuest analyzer supports the Synopsys Design Constraints (SDC) format for constraining your
design. When using the TimeQuest analyzer for timing analysis, use the set_input_delay constraint to
specify the data arrival time at an input port with respect to a given clock. For output ports, use the
set_output_delay command to specify the data arrival time at an output ports receiver with respect to a
given clock. You can use the report_timing Tcl command to generate the I/O timing reports.
The I/O paths that do not meet the required timing performance are reported as having negative slack
and are highlighted in red in the TimeQuest analyzer Report pane. In cases where you do not apply an
explicit I/O timing constraint to an I/O pin, the Quartus Prime timing analysis software still reports the
Actual number, which is the timing number that must be met for that timing parameter when the device
runs in your system.
Related Information
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.
Altera Corporation
QPP5V2
2015.11.02
9-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
When you are analyzing failing paths, examine the reports and waveforms to determine if the correct
constraints are being applied, and add timing exceptions as appropriate. A multicycle constraint relaxes
setup or hold relationships by the specified number of clock cycles. A false path constraint specifies paths
that can be ignored during timing analysis. Both constraints allow the Fitter to work harder on affected
paths.
Focus on improving the paths that show the worst slack. The Fitter works hardest on paths with the worst
slack. If you fix these paths, the Fitter might be able to improve the other failing timing paths in the
design.
Check for particular nodes that appear in many failing paths. These nodes will appear in a timing report
panel at the top of the list, along with their minimum slacks. Look for paths that have common source
registers, destination registers, or common intermediate combinational nodes. In some cases, the registers
might not be identical, but are part of the same bus.
In the timing analysis report panels, clicking on the From or To column headings can help to sort the
paths by the source or destination registers. Clicking first on From, then on To, uses the registers in the
To column as the primary sort and the registers in the From column as the secondary sort. If you see
common nodes, these nodes indicate areas of your design that might be improved through source code
changes or Quartus Prime optimization settings. Constraining the placement for just one of the paths
might decrease the timing performance for other paths by moving the common node further away in the
device.
Related Information
Altera Corporation
9-6
Tips for Analyzing Failing Clock Paths that Cross Clock Domains
QPP5V2
2015.11.02
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.
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
Altera Corporation
QPP5V2
2015.11.02
Tips for Analyzing Paths from/to the Source and Destination of Critical...
9-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.
set wrst_src <insert_source_of_worst_path_here>
set wrst_dst <insert_destination_of_worst_path_here>
report_timing -setup -npaths 50 -detail path_only -from $wrst_src \
-panel_name "Worst Path||wrst_src -> *"
report_timing -setup -npaths 50 -detail path_only -to $wrst_dst \
-panel_name "Worst Path||* -> wrst_dst"
report_timing -setup -npaths 50 -detail path_only -to $wrst_src \
-panel_name "Worst Path||* -> wrst_src"
report_timing -setup -npaths 50 -detail path_only -from $wrst_dst \
-panel_name "Worst Path||wrst_dst -> *"
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 9-3: Timing Report
Source Register
of Worst Path
LUT
LUT
LUT
LUT
LUT
LUT
LUT
LUT
Legend
wrst_src -> *
* -> wrst_dst
* -> wrst_src
wrst_dst -> *
Critical Path
LUT
Destination
Register of
Worst Path
LUT
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
Timing Closure and Optimization
Send Feedback
Altera Corporation
9-8
QPP5V2
2015.11.02
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.
The Chip Planner can be used as a visual aid in locating timing critical paths. To view these paths from
timing reports, do the following:
1.
2.
3.
4.
5.
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:
report_timing setup npaths 50 detail path_only \
to main_system: main_system_inst|app_cpu:cpu|* \
panel_name Critical Paths||s: * -> app_cpu
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:
report_timing setup npaths 50 detail path_only \
from main_system: main_system_inst|egress_count_sm:egress_inst|update \
to *count_sync* panel_name Critical Paths||s: egress_sm|update -> count_sync
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.
Global routing resources are designed to distribute high fan-out, low-skew signals (such as clocks)
without consuming regular routing resources. Depending on the device, these resources can span the
entire chip, or some smaller portion, such as a quadrant. The Quartus Prime software attempts to assign
signals to global routing resources automatically, but you might be able to make more suitable
assignments manually.
Altera Corporation
QPP5V2
2015.11.02
9-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.
Altera Corporation
9-10
QPP5V2
2015.11.02
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
Altera Corporation
QPP5V2
2015.11.02
9-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 Prime 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.
The table lists the recommended order in which to use techniques to reduce tSU and tCO times. Yes
indicates which timing parameters are affected by each technique. Reducing tSU times increases hold (tH)
times.
Affects tSU
Affects tCO
Ensure that the appropriate constraints are set for the failing I/Os (refer to the
Initial Compilation: Required Settings section in the Design Optimization
Overviewchapter of the Quartus Prime Handbook.)
Yes
Yes
Use timing-driven compilation for I/O (Fast Input, Output, and Output Enable
Registers )
Yes
Yes
Yes
N/A
Use fast output register, fast output enable register, and fast OCT register
(Programmable Delays )
N/A
Yes
Decrease the value of Input Delay from Pin to Input Register or set Decrease
Input Delay to Input Register = ON
Yes
N/A
Altera Corporation
9-12
QPP5V2
2015.11.02
Timing-Driven Compilation
Technique
Decrease the value of Input Delay from Pin to Internal Cells or set Decrease
Input Delay to Internal Cells = ON
Affects tSU
Yes
Affects tCO
N/A
Decrease the value of Delay from Output Register to Output Pin or set Increase N/A
Delay to Output Pin = OFF (Fast Input, Output, and Output Enable Registers )
Yes
Increase the value of Input Delay from Dual-Purpose Clock Pin to Fan-Out
Destinations (Fast Input, Output, and Output Enable Registers )
Yes
N/A
Use PLLs to shift clock edges (Use PLLs to Shift Clock Edges )
Yes
Yes
Use the Fast Regional Clock (Change How Hold Times are Optimized for
MAX II Devices )
N/A
Yes
For MAX II or MAX V family devices, set Guarantee I/O Paths Have Zero Hold Yes
Time at Fast Corner to OFF, or When TSU and TPD Constraints Permit (Change
How Hold Times are Optimized for MAX II Devices )
N/A
Increase the value of Delay to output enable pin or set Increase delay to output
enable pin (Use PLLs to Shift Clock Edges )
Yes
N/A
Note to table :
1. These options may not apply to all device families.
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:
Registers with the characteristics listed are optimized using the regular Quartus Prime Fitter optimiza
tions.
Related Information
Optimize IOC Register Placement for Timing Logic Option online help
Normally, with correct timing assignments, the Fitter already places the I/O registers in the correct I/O
cell or in the core, to meet the performance requirement. However, you can place individual registers in
I/O cells manually by making fast I/O assignments with the Assignment Editor.
Altera Corporation
QPP5V2
2015.11.02
Programmable Delays
9-13
For more information about the Fast Input Register option, Fast Output Register option, Fast Output
Enable Register option, and Fast OCT (on-chip termination) Register option, refer to Quartus Prime
Help.
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 Prime 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 Plus
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 Prime 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 Prime 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 Prime 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
Altera Corporation
9-14
QPP5V2
2015.11.02
Input Delay from Dual-Purpose Clock Pin to Fan-Out Destinations logic option
Using a PLL typically improves I/O timing automatically. If the timing requirements are still not met,
most devices allow the PLL output to be phase shifted to change the I/O timing. Shifting the clock
backwards gives a better tH at the expense of tSU, while shifting it forward gives a better tSU at the expense
of tH. You can use this technique only in devices that offer PLLs with the phase shift option.
Figure 9-5: Shift Clock Edges Forward to Improve tSU at the Expense of tH
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
Altera devices have a variety of hierarchical clock structures. These include dedicated global clock
networks, regional clock networks, fast regional clock networks, and periphery clock networks. The
available resources differ between the various Altera device families.
For the number of clocking resources available in your target device, refer to the appropriate device
handbook.
In general, fast regional clocks have less delay to I/O elements than regional and global clocks, and are
used for high fan-out control signals. Regional clocks provide the lowest clock delay and skew for logic
contained in a single quadrant. Placing clocks on these low-skew and low-delay clock nets provides better
tCO performance.
Global clock networks, regional clock networks, and periphery clock networks have an additional level of
clock hierarchy known as spine clocks. Spine clocks drive the final row and column clocks to their
registers; thus, the clock to every register in the chip is reached through spine clocks. Spine clocks are not
directly user controllable.
If your project has high clock routing demands, due to limitations in the Quartus Prime software, you
may see spine clock errors. These errors are often seen with designs using multiple memory interfaces and
high-speed serial interface (HSSI) channels (especially PMA Direct mode).
To reduce these spine clock errors, you can constrain your design to better use your regional clock
resources using the following techniques:
If your design does not use LogicLock Plus regions, or if the LogicLock Plus regions are not aligned to
your clock region boundaries, create additional LogicLock Plus regions and further constrain your
logic.
Note: Register packing, a Fitter optimization option, may ignore LogicLock Plus regions. If this occurs,
disable register packing for specific instances through the Quartus Prime Assignment Editor.
Altera Corporation
QPP5V2
2015.11.02
9-15
Some periphery features may ignore LogicLock Plus 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 dualregional 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.
For MAX II devices, you can use the Guarantee I/O Paths Have Zero Hold Time at Fast Corner option
to control how hold time is optimized by the Quartus Prime software.
In many cases, optimizing the designs source code can have a very significant effect on your design
performance. In fact, optimizing your source code is typically the most effective technique for improving
the quality of your results and is often a better choice than using LogicLock Plus or location assignments.
Be aware of the number of logic levels needed to implement your logic while you are coding. Too many
levels of logic between registers could result in critical paths failing timing. Try restructuring the design to
use pipelining or more efficient coding techniques. Also, try limiting high fan-out signals in the source
code. When possible, duplicate and pipeline control signals. Make sure the duplicate registers are
protected by a preserve attribute, to avoid merging during synthesis.
If the critical path in your design involves memory or DSP functions, check whether you have code blocks
in your design that describe memory or functions that are not being inferred and placed in dedicated
logic. You might be able to modify your source code to cause these functions to be placed into highperformance dedicated memory or resources in the target device. When using RAM/DSP blocks, enable
the optional input and output registers.
Ensure that your state machines are recognized as state machine logic and optimized appropriately in
your synthesis tool. State machines that are recognized are generally optimized better than if the synthesis
tool treats them as generic logic. In the Quartus Prime software, you can check the State Machine report
under Analysis & Synthesis in the Compilation Report. This report provides details, including state
Altera Corporation
9-16
QPP5V2
2015.11.02
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
The choice of options and settings to improve the timing margin (slack) or to improve register-to-register
timing depends on the failing paths in the design. To achieve the results that best approximate your
performance requirements, apply the following techniques and compile the design after each step:
1. Ensure that your timing assignments are complete and correct. For details, refer to the Initial
Compilation: Required Settings section in the Design Optimization Overview chapter of the Quartus
Prime Handbook.
2. Ensure that you have reviewed all warning messages from your initial compilation and check for
ignored timing assignments.
3. Apply netlist synthesis optimization options.
4. To optimize for speed, apply the following synthesis options:
Optimize Synthesis for Speed, Not Area
Flatten the Hierarchy During Synthesis
Set the Synthesis Effort to High
Change State Machine Encoding
Prevent Shift Register Inference
Use Other Synthesis Options Available in Your Synthesis Tool
5. To optimize for performance using physical synthesis, apply the following options:
Perform physical synthesis for combinational logic
Perform automatic asynchronous signal pipelining
Perform register duplication
Perform register retiming
Perform logic to memory mapping
6. Try different Fitter seeds. If there are very few paths that are failing by small negative slack, then you
can try with a different seed to see if there is a fit that meets constraints in the Fitter seed noise.
Note: Omit this step if a large number of critical paths are failing or if the paths are failing badly.
7. To control placement, make LogicLock Plus assignments.
8. Make design source code modifications to fix areas of the design that are still failing timing require
ments by significant amounts.
9. Make location assignments, or as a last resort, perform manual placement by back-annotating the
design.
You can use Design Space Explorer II (DSE) to automate the process of running several different
compilations with different settings.
If these techniques do not achieve performance requirements, additional design source code modifica
tions might be required.
Altera Corporation
QPP5V2
2015.11.02
9-17
Related Information
The Quartus Prime software offers physical synthesis optimizations that can help improve the
performance of many designs regardless of the synthesis tool used. Physical synthesis optimizations can
be applied both during synthesis and during fitting.
Physical synthesis optimizations that occur during the synthesis stage of the Quartus Prime compilation
operate either on the output from another EDA synthesis tool or as an intermediate step in Quartus Prime
integrated synthesis. These optimizations make changes to the synthesis netlist to improve either area or
speed, depending on your selected optimization technique and effort level.
To view and modify the synthesis netlist optimization options, click Assignments > Settings > Compiler
Settings > Advanced Settings (Fitter).
If you use a third-party EDA synthesis tool and want to determine if the Quartus Prime software can
remap the circuit to improve performance, you can use the Perform WYSIWYG Primitive Resynthesis
option. This option directs the Quartus Prime software to unmap the LEs in an atom netlist to logic gates
and then map the gates back to Altera-specific primitives. Using Altera-specific primitives enables the
Fitter to remap the circuits using architecture-specific techniques.
The Quartus Prime technology mapper optimizes the design to achieve maximum speed performance,
minimum area usage, or balances high performance and minimal logic usage, according to the setting of
the Optimization Technique option. Set this option to Speed or Balanced.
The physical synthesis optimizations occur during the Fitter stage of the Quartus Prime compilation.
Physical synthesis optimizations make placement-specific changes to the netlist that improve speed
performance results for a specific Altera device.
The following physical synthesis optimizations are available during the Fitter stage for improving
performance:
Physical synthesis for combinational logic
Automatic asynchronous signal pipelining
Physical synthesis for registers
Register duplication
Register retiming
Note: If you want the performance gain from physical synthesis only on parts of your design, you can
apply the physical synthesis options on specific instances.
To apply physical synthesis assignments for fitting on a per-instance basis, use the Quartus Prime
Assignment Editor. The following assignments are available as instance assignments:
Related Information
Altera Corporation
9-18
QPP5V2
2015.11.02
If PowerPlay power optimization settings are set to Extra Effort, your design performance can be affected.
If improving timing performance is more important than reducing power use, set the PowerPlay power
optimization setting to Normal.
Related Information
The manner in which the design is synthesized has a large impact on design performance. Design
performance varies depending on the way the design is coded, the synthesis tool used, and the options
specified when synthesizing. Change your synthesis options if a large number of paths are failing or if
specific paths are failing badly and have many levels of logic.
Set your device and timing constraints in your synthesis tool. Synthesis tools are timing-driven and
optimized to meet specified timing requirements. If you do not specify a target frequency, some synthesis
tools optimize for area.
Some synthesis tools offer an easy way to instruct the tool to focus on speed instead of area.
You can also specify this logic option for specific modules in your design with the Assignment Editor
while leaving the default Optimization Technique setting at Balanced (for the best trade-off between
area and speed for certain device families) or Area (if area is an important concern). You can also use the
Speed Optimization Technique for Clock Domains option in the Assignment Editor to specify that all
combinational logic in or between the specified clock domain(s) is optimized for speed.
To achieve best performance with push-button compilation, follow the recommendations in the following
sections for other synthesis settings. You can use DSE II to experiment with different Quartus Prime
synthesis options to optimize your design for the best performance.
Related Information
Synthesis tools typically let you preserve hierarchical boundaries, which can be useful for verification or
other purposes. However, the best optimization results generally occur when the synthesis tool optimizes
across hierarchical boundaries, because doing so often allows the synthesis tool to perform the most logic
minimization, which can improve performance. Whenever possible, flatten your design hierarchy to
achieve the best results.
Some synthesis tools offer varying synthesis effort levels to trade off compilation time with synthesis
results. Set the synthesis effort to high to achieve best results when applicable.
Altera Corporation
QPP5V2
2015.11.02
9-19
Duplicating logic or registers can help improve timing in cases where moving a register in a failing timing
path to reduce routing delay creates other failing paths or where there are timing problems due to the fanout of the registers. Most often, timing failures occur not because of the high fan-out registers, but because
of the location of those registers. Duplicating registers, where source and destination registers are
physically close, can help improve slack on critical paths.
Many synthesis tools support options or attributes that specify the maximum fan-out of a register. When
using Quartus Prime integrated synthesis, you can set the Maximum Fan-Out logic option in the
Assignment Editor to control the number of destinations for a node so that the fan-out count does not
exceed a specified value. You can also use the maxfan attribute in your HDL code. The software duplicates
the node as required to achieve the specified maximum fan-out.
Logic duplication using Maximum Fan-Out assignments normally increases resource utilization and can
potentially increase compilation time, depending on the placement and the total resource usage within the
selected device. The improvement in timing performance that results because of Maximum Fan-Out
assignments is very design-specific. This is because when you use the Maximum Fan-Out assignment,
although the Fitter duplicates the source logic to limit the fan-out, it may not be able to control the
destinations that each of the duplicated sources drive. Since the Maximum Fan-Out destination does not
specify which of the destinations the duplicated source should drive, it is possible that it might still be
driving logic located all around the device. To avoid this situation, you could use the Manual Logic
Duplication logic option.
If you are using Maximum Fan-Out assignments, Altera recommends benchmarking your design with
and without these assignments to evaluate whether they give the expected improvement in timing
performance. Use the assignments only when you get improved results.
You can manually duplicate registers in the Quartus Prime software regardless of the synthesis tool used.
To duplicate a register, apply the Manual Logic Duplication logic option to the register with the
Assignment Editor.
Note: Various Fitter optimizations may cause a small violation to the Maximum Fan-Out assignments to
improve timing.
Related Information
In some cases, turning off the inference of shift registers increases performance. Doing so forces the
software to use logic cells to implement the shift register instead of implementing the registers in memory
blocks using the ALTSHIFT_TAPS IP core. If you implement shift registers in logic cells instead of
memory, logic utilization is increased.
With your synthesis tool, experiment with the following options if they are available:
Altera Corporation
9-20
QPP5V2
2015.11.02
Fitter Seed
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 algorithmsthere 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.
You can use the following Tcl command from a script to specify a Fitter seed:
set_global_assignment -name SEED <value>
Related Information
To improve routability in designs where the router did not pick up the optimal routing lines, set the
Router Timing Optimization Level to Maximum. This setting determines how aggressively the router
tries to meet the timing requirements. Setting this option to Maximum can increase design speed slightly
at the cost of increased compilation time. Setting this option to Minimum can reduce compilation time at
the cost of slightly reduced design speed. The default value is Normal.
Related Information
Altera Corporation
QPP5V2
2015.11.02
9-21
Analyzing and Optimizing the Design Floorplan with the Chip Planner on page 12-1
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 Plus region so that all the nodes
are closer together in the floorplan.
mod_A
mod_B
Altera Corporation
9-22
QPP5V2
2015.11.02
Location Assignments
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
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner on page 12-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 Prime Fitter
than LogicLock Plus assignments. In some cases, when you are familiar with your design, you can enter
location constraints in a way that produces better results.
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.
Altera Corporation
QPP5V2
2015.11.02
9-23
Core Placement
Routing
Design Implementation
Related Information
Setting Periphery to Core Optimizations in the Advanced Fitter Setting Dialog Box on page 9-23
Setting Periphery to Core Optimizations in the Assignment Editor on page 9-24
Viewing Periphery to Core Optimizations in the Fitter Report on page 9-25
Setting Periphery to Core Optimizations in the Advanced Fitter Setting Dialog Box
The Periphery to Core Placement and Routing Optimization setting specifies whether the Fitter should
perform targeted placement and routing optimization on direct connections between periphery logic and
registers in the FPGA core.
Timing Closure and Optimization
Send Feedback
Altera Corporation
9-24
QPP5V2
2015.11.02
You can optionally perform periphery to core optimizations by instance with settings in the Assignment
Editor.
1. In the Quartus Prime software, click Assignments > Settings > Compiler Settings > Advanced
Settings (Fitter).
2. In the Advanced Fitter Settings dialog box, for the Periphery to Core Placement and Routing
Optimization option, select one of the following options depending on how you want to direct
periphery to core optimizations in your design:
a. Select Auto to direct the software to automatically identify transfers with tight timing windows,
place the core registers, and route all connections to or from the periphery.
b. Select On to direct the software to globally optimize all transfers between the periphery and core
registers, regardless of timing requirements.
Note: Setting this option to On in the Advanced Fitter Settings is not recommended. The
intended use for this setting is in the Assignment Editor to force optimization for a targeted
set of nodes or instance.
c. Select Off to disable periphery to core path optimization in your design.
Related Information
Altera Corporation
QPP5V2
2015.11.02
9-25
Related Information
Table 9-4: Fitter Report - Periphery to Core Transfer Optimization (P2C) Summary
From Path
To Path
Status
Node 1
Node 2
Node 3
Node 4
Altera Corporation
9-26
QPP5V2
2015.11.02
From Path
Node 5
To Path
Node 6
Status
Related Information
After compiling your design, review the messages in each section of the compilation report. Most designs
that fail timing start out with other problems that are reported as warning messages during compilation.
Determine what causes a warning message, and whether the warning should be fixed or ignored. After
reviewing the warning messages, review the informational messages. Take note of anything unexpected,
Altera Corporation
QPP5V2
2015.11.02
9-27
for example, unconnected ports, ignored constraints, missing files, and assumptions or optimizations that
the software made.
If physical synthesis is enabled, the software can duplicate and retime registers, and modify combinatorial
logic during synthesis. After compilation, review the Optimization Results reports in the Analysis &
Synthesis section. The reports list the optimizations performed by the physical synthesis optimizations,
such as register duplication, retiming, and removal. These reports can be found in the Compilation
Report panel.
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 9-9: Compilation Messages
Altera Corporation
9-28
QPP5V2
2015.11.02
The Fitter can also perform netlist optimizations to the design netlist. Major changes include register
packing, duplicating or deleting logic cells, retiming registers, inverting signals, or modifying nodes in a
general way such as moving an input from one logic cell to another. These reports can be found in the
Netlist Optimizations results of the Fitter section, and they should also be reviewed.
After checking what optimizations were done and how they improved performance, evaluate the runtime
it took to get the extra performance. To reduce compilation time, review the physical synthesis and netlist
optimizations over a couple of compilations, and edit the RTL to reflect the changes that physical
synthesis performed. If a particular set of registers consistently get retimed, edit the RTL to retime the
registers the same way. If the changes are made to match what the physical synthesis algorithms did, the
physical synthesis options can be turned off to save compile time while getting the same type of
performance improvement.
Evaluate a variety of resources used in the design, including global and non-global signal usage, routing
utilization, and clustering difficulty.
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 fanouts. Use the Chip Planner to locate high fan-out nodes, to report routing congestion, and to determine
whether the alternatives are viable.
Altera Corporation
QPP5V2
2015.11.02
Routing Usage
9-29
Routing Usage
Review routing usage reported in the Fitter Resource Usage Summary report. The figure shows an
example of the report.
Figure 9-11: Fitter Resource Usage Summary Report
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 9-12: Report Routing Utilization Report
Altera Corporation
9-30
QPP5V2
2015.11.02
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:
set_multicycle_path -from 1x -to 2x -setup -end 2
The timing requirement is relaxed by one 2x clock cycle, as shown in the black line in the waveform in the
figure.
Figure 9-14: 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.
set_multicycle_path -from 1x -to 2x -setup -end 2
set_multicycle_path -from 1x -to 2x -hold -end 1
Altera Corporation
QPP5V2
2015.11.02
9-31
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 9-15: 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 9-16: Optimize Hold Timing Option
Altera Corporation
9-32
QPP5V2
2015.11.02
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.
Altera Corporation
QPP5V2
2015.11.02
9-33
Check fan-in and fan-out of a highlighted module by using the buttons on the task bar shown in the figure
below.
Figure 9-18: 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.
Evaluate Placement and Routing
Review duration of parts of compile time in Fitter messages. If routing takes much more time than
placement, then meeting timing may be more difficult than the placer predicted.
Adjust Placement Effort
Increasing the Placement Effort Multiplier to improve placement quality may be a good tradeoff at the
cost of higher compile time, but the benefit is design dependent. The value should be adjusted after
Timing Closure and Optimization
Send Feedback
Altera Corporation
9-34
QPP5V2
2015.11.02
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 9-19: Placement Effort Multiplier
Altera Corporation
QPP5V2
2015.11.02
9-35
Showing routing for a path can help uncover unusual routing delays. In the TimeQuest Tasks panel,
enable the Report panel name option, and then select Report Timing. Then, turn on the Show routing
option to show routing wires in the path.
Altera Corporation
9-36
QPP5V2
2015.11.02
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.
A routing path can be used to identify global network buffers that fail timing. Buffer locations are named
according to the network they drive.
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 fanout paths. Consider manually duplicating and preserving these registers. Using a MAX_FANOUT assignment
Altera Corporation
QPP5V2
2015.11.02
Global Networks
9-37
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 9-24: Global Signal Assignment
Reset signals are often routed on global networks. Sometimes, the use of a global network causes recovery
failures. Consider reviewing the placement of the register that generates the reset and the routing path of
the signal.
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.
Shift registers or register chains can be converted to RAM during synthesis to save area. However,
conversion to RAM often reduces speed. The names of the converted registers will include "altshift_taps".
If paths that fail timing begin or end in shift registers, consider disabling the Auto Shift Register Replace
ment option. Registers that are intended for pipelining should not be converted. For shift registers that
are converted to a chain, evaluate area/speed trade off of implementing in RAM or logic cells. If a design is
close to full, shift register conversion to RAM may benefit non-critical clock domains by saving area. The
settings can be changed globally or on a register or hierarchy basis from the default of AUTO to OFF.
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.
Altera Corporation
9-38
QPP5V2
2015.11.02
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 dualregional 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 Plus 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.
The Report Timing Closure Recommendations task in the TimeQuest analyzer analyzes paths and
provides specific recommendations based on path characteristics.
Altera Corporation
QPP5V2
2015.11.02
9-39
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 Prime 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:
set_global_assignment -name <.qsf variable name> <value>
Note: If the <value> field includes spaces (for example, Standard Fit), you must enclose the value in
straight double quotation marks.
Related Information
Altera Corporation
9-40
QPP5V2
2015.11.02
Optimize IOC
Register
Placement For
Timing
Optimize Hold
Timing
OPTIMIZE_HOLD_TIMING
Values
Type
ON, OFF
Global
Global
Router
ROUTER_TIMING_OPTIMIZATION_LEVEL
Timing
Optimization
level
Values
Type
Global
Auto Packed
Registers (1)
Perform
WYSIWYG
Primitive
Resynthesis
Altera Corporation
ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP
Values
Type
OFF, NORMAL,
MINIMIZE AREA,
MINIMIZE AREA WITH
CHAINS, AUTO
ON, OFF
Global,
Instance
Global,
Instance
QPP5V2
2015.11.02
Setting Name
Physical
Synthesis for
Combina
tional Logic
for Reducing
Area
Physical
Synthesis for
Mapping
Logic to
Memory
Optimization
Technique
ON, OFF
PHYSICAL_SYNTHESIS_MAP_LOGIC_TO_MEMORY_FOR AREA
ON, OFF
Speed
SYNTH_CRITICAL_CLOCK
Optimization
Technique for
Clock
Domains
State Machine STATE_MACHINE_PROCESSING
Encoding
Auto RAM
Replacement
Auto ROM
Replacement
Auto Shift
Register
Replacement
Auto Block
Replacement
Values
PHYSICAL_SYNTHESIS_COMBO_LOGIC_FOR_AREA
Type
Global,
Instance
Global,
Instance
AREA, SPEED,
BALANCED
Global,
Instance
ON, OFF
Instance
AUTO, ONE-HOT,
GRAY, JOHNSON,
MINIMAL BITS,
SEQUENTIAL, USERENCODE
AUTO_RAM_RECOGNITION
ON, OFF
AUTO_ROM_RECOGNITION
ON, OFF
AUTO_SHIFT_REGISTER_RECOGNITION
ON, OFF
AUTO_DSP_RECOGNITION
ON, OFF
Number of
NUM_PARALLEL_PROCESSORS
Processors for
Parallel
Compilation
9-41
Global,
Instance
Global,
Instance
Global,
Instance
Global,
Instance
Global,
Instance
Global
Note to table :
1. Allowed values for this setting depend on the device family that you select.
Altera Corporation
9-42
QPP5V2
2015.11.02
Values
Type
OPTIMIZE_IOC_REGISTER_PLACEMENT_FOR_TIMING
ON, OFF
Global
FAST_INPUT_REGISTER
ON, OFF
Instan
ce
FAST_OUTPUT_REGISTER
ON, OFF
Instan
ce
FAST_OUTPUT_ENABLE_REGISTER
ON, OFF
Instan
ce
FAST_OCT_REGISTER
ON, OFF
Instan
ce
Perform
WYSIWYG
Primitive
Resynthesis
Values
Type
ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP
ON, OFF
Global,
Instance
PHYSICAL_SYNTHESIS_COMBO_LOGIC
ON, OFF
Global,
Instance
ON, OFF
Global,
Instance
ON, OFF
Global,
Instance
ON, OFF
Global,
Instance
Physical Synthesis
Effort
PHYSICAL_SYNTHESIS_EFFORT
Global
SEED
<integer>
Global
<integer>
Instance
Manual Logic
Duplication
<node name>
Instance
Perform Physical
Synthesis for
Combinational
Logic
Perform Register
Duplication
Perform Register
Retiming
Fitter Seed
Optimize Power
during Synthesis
Altera Corporation
PHYSICAL_SYNTHESIS_REGISTER_
DUPLICATION
PHYSICAL_SYNTHESIS_REGISTER_RETIMING
DUPLICATE_ATOM
OPTIMIZE_POWER_DURING_SYNTHESIS
NORMAL, OFF
EXTRA_EFFORT
Global
QPP5V2
2015.11.02
Setting Name
Optimize Power
during Fitting
OPTIMIZE_POWER_DURING_FITTING
Values
9-43
Type
Global
NORMAL, OFF
EXTRA_EFFORT
Version
Changes
2015.11.02
15.1.0
2014.12.15
14.1.0
June 2014
14.0.0
Dita conversion.
Removed content about obsolete devices that are no longer
supported in QII software v14.0: Arria GX, Arria II, Cyclone III,
Stratix II, Stratix III.
Replaced Megafunction content with IP core content.
November 2013
13.1.0
Altera Corporation
9-44
QPP5V2
2015.11.02
Date
May 2013
Version
13.0.0
Changes
November 2012
12.1.0
June 2012
12.0.0
November 2011
11.1.0
Altera Corporation
QPP5V2
2015.11.02
Date
Version
9-45
Changes
May 2011
11.0.0
December 2010
10.1.0
August 2010
10.0.1
Corrected link
July 2010
10.0.0
Related Information
Altera Corporation
Power Optimization
10
2015.11.02
QPP5V2
Subscribe
Send Feedback
Power Optimization
The Quartus Prime software offers power-driven compilation to fully optimize device power
consumption. Power-driven compilation focuses on reducing your designs 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 Prime 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 industrys 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
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
10-2
QPP5V2
2015.11.02
Power Dissipation
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 10-1: Average Core Dynamic Power Dissipation
Average Core Dynamic Power Dissipation by Block
Type in Stratix III Devices at a 12.5% Toggle Rate (1)
Global Clock Routing
14%
Routing
30%
Memory
21%
Routing
29%
Memory
20%
DSP Blocks
1% (3)
Combinational Logic
16%
Registered Logic
18%
Combinational Logic
11%
Multipliers
1% (3)
Registered Logic
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 onchip 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
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
10-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 Prime 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.
DSE II automatically tries different combinations of netlist optimizations and advanced Quartus Prime
software compiler settings, and reports the best settings for your design, based on your chosen primary
Power Optimization
Send Feedback
Altera Corporation
10-4
QPP5V2
2015.11.02
Power-Driven Compilation
optimization goal. You can try different seeds with DSE II if you are fairly close to meeting your timing or
area requirements and find one seed that meets timing or area requirements. Finally, DSE II can run
compilations on a remote compute farm, which shortens the timing closure process
Name your DSE II session and specify the type of compilation to perform.
Set Exploration Points and specify Exploration mode and the number and types of Seeds to use.
Specify the Design File Setup including the use of a specified Quartus Archive File (.qar) or create a
new one.
Specify Limits to the operation of DSE II.
Specify the type of Results to save.
When using a remote compute farm, DSE II uses the values in the DSE Server Settings box to specify
a registration host and network ports to connect.
Options in the Advanced settings allow you to specify options such as:
When you have completed your configuration, you can perform an exploration by clicking Start.
Related Information
Power-Driven Compilation
The standard Quartus Prime 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 Prime 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.
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
Power-Driven Synthesis
10-5
Description
Off
Normal
compilation
(Default)
Extra effort
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 readand-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.
Figure 10-3: Memory Transformation
Switch
Data
Data
VCC
Wr Clk
Enable
Write
Enable
Rd Clk
Enable
Read
Enable
Write
Address
Read
Address
Wren
Write
Address
Clock
Data
Data
VCC
Wren
Rden
VCC
Wr Clk
Enable
Write
Enable
Rd Clk
Enable
Read
Enable
Write
Address
Read
Address
Read
Address
Switch
Write
Address
Q
Rden
VCC
Read
Address
Clock
Memory transformation effectively moves the read-enable and write-enable signals to the respective readclock enable and write-clock enable signals. By using this technique, memory ports are shut down when
they are not accessed. This significantly reduces your designs 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 Dont 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 poweraware logic mapping. The power-aware logic mapping reduces power by rearranging the logic during
synthesis to eliminate nets with high toggle rates.
Power Optimization
Send Feedback
Altera Corporation
10-6
QPP5V2
2015.11.02
Power-Driven Synthesis
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 designs 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.
Figure 10-4: 4K 4 Memory Implementation Using Multiple M4K Blocks
4K Words Deep &
4 Bits Wide
Minimum RAM Power
(Power Efficient)
Addr[10:11]
Addr
Decoder
1K Deep 4 Wide
M4K RAM
Addr[0:9]
4K Deep 1 Wide
M4K RAM
Addr[0:11]
Data[0:3]
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 Prime 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 Prime 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
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
Power-Driven Fitter
10-7
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
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.
Table 10-2: Power-Driven Fitter Option
Settings
Description
Off
Normal
compilation
(Default)
Low compute effort algorithms are applied to minimize power through placement
and routing optimizations as long as they are not expected to reduce design
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-androute 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 Prime 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 Optimization
Send Feedback
Altera Corporation
10-8
Area-Driven Synthesis
QPP5V2
2015.11.02
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 compila
tion.
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.
Related Information
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 Prime
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.
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
Design Guidelines
10-9
5 ns
After
7 ns
8 ns
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 Prime 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
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.
Altera Corporation
10-10
QPP5V2
2015.11.02
Stratix IV, and Stratix V devices provide clock control blocks for global clock networks. In addition,
Stratix IV, and Stratix V devices have clock control blocks for regional clock networks. The dynamic clock
enable feature lets internal logic control the clock network. When a clock network is powered down, all
the logic fed by that clock network does not toggle, thereby reducing the overall power consumption of
the device. For example, the following shows a 4-input clock control block diagram.
Figure 10-6: Clock Control Block Diagram
ena
inclk 3
inclk 2
inclk 1
inclk 0
outclk
clkselect[1..0]
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 LABs 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 10-7: LAB-Wide Control Signals
Dedicated
LAB Row
Clocks
Local
Interconnect
Local
Interconnect
Local
Interconnect
Local
Interconnect
labclkena1
labclk1
labclkena2
labclk2
labclr1
syncload
synclr
labclr2
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 Prime software automatically promotes registerlevel 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
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
10-11
This VHDL code makes use of a LAB-wide clock enable. This clock-gating logic is automatically turned
into an LAB-level clock enable signal.
IF clk'event AND clock = '1' THEN
IF logic_is_enabled = '1' THEN
reg <= value;
ELSE
reg <= reg;
END IF;
END IF;
The memory blocks in FPGA devices can represent a large fraction of typical core dynamic power.
Memory consumes approximately 20% of the core dynamic power in typical some device designs.
Memory blocks are unlike most other blocks in the device because most of their power is tied to the clock
rate, and is insensitive to the toggle rate on the data and address lines.
Reducing Memory Power Consumption
The memory blocks in FPGA devices can represent a large fraction of typical core dynamic power.
Memory consumes approximately 20% of the core dynamic power in typical some device designs.
Memory blocks are unlike most other blocks in the device because most of their power is tied to the clock
rate, and is insensitive to the toggle rate on the data and address lines.
When a memory block is clocked, there is a sequence of timed events that occur within the block to
execute a read or write. The circuitry controlled by the clock consumes the same amount of power
regardless of whether or not the address or data has changed from one cycle to the next. Thus, the toggle
rate of input data and the address bus have no impact on memory power consumption.
The key to reducing memory power consumption is to reduce the number of memory clocking events.
You can achieve this through clock network-wide gating, or on a per-memory basis through use of the
clock enable signals on the memory ports.
The logical view of the internal clock of the memory block. Use the appropriate enable signals on the
memory to make use of the clock enable signal instead of gating the clock.
Figure 10-8: Memory Clock Enable Signal
1
Enable
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.
Power Optimization
Send Feedback
Altera Corporation
10-12
QPP5V2
2015.11.02
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 Prime software automatically chooses the best design memory configuration for
optimal power.
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
10-13
Related Information
Power usage measurements for a 4K 36 simple dual-port memory implemented using multiple M4K
blocks in a Stratix device. For each implementation, the M4K blocks are configured with a different
memory depth.
Table 10-3: 4K 36 Simple Dual-Port Memory Implemented Using Multiple M4K Blocks
M4K Configuration
ALUTs
4K 1 (Default setting)
36
2K 2
36
40
1K 4
36
62
512 9
32
143
256 18
32
302
128 36
32
633
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%.
Power Optimization
Send Feedback
Altera Corporation
10-14
QPP5V2
2015.11.02
Power Savings
4K 1
2K 2
1K 4
512 9
M4K Configuration
256 18
128 36
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 onchip RAM megafunction to shut down the RAM block in the SOPC Builder and Qsys system.
B
Q
Glitch
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.
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
Architectural Optimization
10-15
Pipelined
Combinational
Logic
Combinational
Logic
Short Logic
Depth
Short Logic
Depth
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 higherspeed 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
Altera Corporation
10-16
QPP5V2
2015.11.02
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
10-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
After compiling your design, run the PowerPlay Power Analyzer to determine your design power and to
see where power is dissipated in your design. Based on this information, you can run the Power
Optimization Advisor to implement recommendations that can reduce design power.
The Power Optimization Advisor after compiling a design that is not fully optimized for power.
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.
Power Optimization
Send Feedback
Altera Corporation
10-18
QPP5V2
2015.11.02
There is a link from each recommendation to the appropriate location in the Quartus Prime 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 10-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.
2015.11.02
Version
15.1.0
Changes
2015.05.04
15.0.0
2014.12.15
14.1.0
2014.06.30
14.0.0
May 2013
13.0.0
June 2012
12.0.0
Altera Corporation
Power Optimization
Send Feedback
QPP5V2
2015.11.02
Date
Version
10-19
Changes
November
2011
10.0.2
Template update.
December
2010
10.0.1
Template update.
July 2010
10.0.0
November
2009
9.1.0
November
2008
8.1.0
May 2008
8.0.0
Related Information
Power Optimization
Send Feedback
Altera Corporation
Area Optimization
11
2015.11.02
QPP5V2
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 Prime 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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
11-2
QPP5V2
2015.11.02
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 Prime 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
Altera Corporation
Area Optimization
Send Feedback
QPP5V2
2015.11.02
11-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
Refer to
Related Information
To help with pin placement, on the Processing menu, point to Start and click Start I/O Assignment
Analysis. The Start I/O Assignment Analysis command allows you to check your I/O assignments early
in the design process. You can use this command to check the legality of pin assignments before, during,
or after compilation of your design. If design files are available, you can use this command to accomplish
more thorough legality checks on your designs I/O pins and surrounding logic. These checks include
proper reference voltage pin usage, valid pin location assignments, and acceptable mixed I/O standards.
Common issues with I/O placement relate to the fact that differential standards have specific pin pairings
and certain I/O standards might be supported only on certain I/O banks.
If your compilation or I/O assignment analysis results in specific errors relating to I/O pins, follow the
recommendations in the error message. Right-click the message in the Messages window and click Help
to open the Quartus Prime Help topic for this message.
Area Optimization
Send Feedback
Altera Corporation
11-4
QPP5V2
2015.11.02
If a design that has pin assignments fails to fit, compile the design without the pin assignments to
determine whether a fit is possible for the design in the specified device and package. You can use this
approach if a Quartus Prime error message indicates fitting problems due to pin assignments.
If the design fits when all pin assignments are ignored or when several pin assignments are ignored or
moved, you might have to modify the pin assignments for the design or select a larger package.
If the design fails to fit because insufficient I/Os pins are available, a successful fit can often be obtained by
using a larger device package (which can be the same device density) that has more available user I/O
pins.
Related Information
If your design does not fit because of logic utilization, then evaluate and modify the design at the source.
You can often improve logic significantly by making design-specific changes to your source code. This is
typically the most effective technique for improving the quality of your results.
If your design does not fit into available logic elements (LEs) or ALMs, but you have unused memory or
DSP blocks, check if you have code blocks in your design that describe memory or DSP functions that are
not being inferred and placed in dedicated logic. You might be able to modify your source code to allow
these functions to be placed into dedicated memory or DSP resources in the target device.
Ensure that your state machines are recognized as state machine logic and optimized appropriately in
your synthesis tool. State machines that are recognized are generally optimized better than if the synthesis
tool treats them as generic logic. In the Quartus Prime software, you can check for the State Machine
report under Analysis & Synthesis in the Compilation Report. This report provides details, including the
state encoding for each state machine that was recognized during compilation. If your state machine is
not being recognized, you might have to change your source code to enable it to be recognized.
Related Information
If your design fails to fit because it uses too much logic, resynthesize the design to improve the area
utilization. First, ensure that you have set your device and timing constraints correctly in your synthesis
tool. Particularly when area utilization of the design is a concern, ensure that you do not over-constrain
the timing requirements for the design. Synthesis tools generally try to meet the specified requirements,
which can result in higher device resource usage if the constraints are too aggressive.
Altera Corporation
Area Optimization
Send Feedback
QPP5V2
2015.11.02
11-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 Prime 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 Prime 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 Prime 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 Prime integrated
synthesis and other synthesis tools
Multiplexers form a large portion of the logic utilization in many FPGA designs. By optimizing your
multiplexed logic, you can achieve a more efficient implementation in your Altera device.
Related Information
The Perform WYSIWYG Primitive Resynthesis logic option specifies whether to perform WYSIWYG
primitive resynthesis during synthesis. This option uses the setting specified in the Optimization
Technique logic option. The Perform WYSIWYG Primitive Resynthesis logic option is useful for
resynthesizing some or all of the WYSIWYG primitives in your design for better area or performance.
However, WYSIWYG primitive resynthesis can be done only when you use third-party synthesis tools.
Note: The Balanced setting typically produces utilization results that are very similar to the Area setting
with better performance results. The Area setting can give better results in some cases. Performing
WYSIWYG resynthesis for area in this way typically reduces register-to-register timing perform
ance.
Related Information
Area Optimization
Send Feedback
Altera Corporation
11-6
QPP5V2
2015.11.02
The Auto Packed Registers option implements the functions of two cells into one logic cell by combining
the register of one cell in which only the register is used with the LUT of another cell in which only the
LUT is used.
Related Information
A design with conflicting constraints or constraints that are difficult to meet may not fit in the targeted
device. For example, a design might fail to fit if the location or LogicLock Plus assignments are too strict
and not enough routing resources are available on the device.
To resolve routing congestion caused by restrictive location constraints or LogicLock Plus region
assignments, use the Routing Congestion task in the Chip Planner to locate routing problems in the
floorplan, then remove any internal location or LogicLock Plus region assignments in that area. If your
design still does not fit, the design is over-constrained. To correct the problem, remove all location and
LogicLock Plus assignments and run successive compilations, incrementally constraining the design
before each compilation. You can delete specific location assignments in the Assignment Editor or the
Chip Planner. To remove LogicLock Plus assignments in the Chip Planner, in the LogicLock Plus Regions
Window, or on the Assignments menu, click Remove Assignments. Turn on the assignment categories
you want to remove from the design in the Available assignment categories list.
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner on page 12-1
For more information about the Routing Congestion task in the Chip Planner
Synthesis tools typically provide the option of preserving hierarchical boundaries, which can be useful for
verification or other purposes. However, the Quartus Prime software optimizes across hierarchical
boundaries so as to perform the most logic minimization, which can reduce area in a design with no
design partitions.
If your design fails to fit because it runs out of device memory resources, your design may require a
certain type of memory that the device does not have. For example, a design that requires two M-RAM
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 Prime integrated synthesis, set the ramstyle attribute to the desired memory type for the inferred
Altera Corporation
Area Optimization
Send Feedback
QPP5V2
2015.11.02
11-7
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 Prime
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.
The physical synthesis options for fitting help you decrease resource usage. When you enable these
options, the Quartus Prime software makes placement-specific changes to the netlist that reduce resource
utilization for a specific Altera device.
Note: The compilation time might increase considerably when you use physical synthesis options.
With the Quartus Prime software, you can apply physical synthesis options to specific instances, which
can reduce the impact on compilation time. Physical synthesis instance assignments allow you to enable
physical synthesis algorithms for specific portions of your design.
The following physical synthesis optimizations for fitting are available:
Physical synthesis for combinational logic
Map logic into memory
Related Information
A design might not fit because it requires too many DSP blocks. You can implement all DSP block
functions with logic cells, so you can retarget some of the DSP blocks to logic to obtain a fit.
If the DSP function was created with the parameter editor, open the parameter editor and edit the
function so it targets logic cells instead of DSP blocks. The Quartus Prime software uses the
DEDICATED_MULTIPLIER_CIRCUITRY IP core parameter to control the implementation.
DSP blocks also can be inferred from your HDL code for multipliers, multiply-adders, and multiplyaccumulators. You can turn off this inference in your synthesis tool. When you are using Quartus Prime
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 Prime 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 Prime 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.
If a successful fit cannot be achieved because of a shortage of routing resources, you might require a larger
device.
Area Optimization
Send Feedback
Altera Corporation
11-8
QPP5V2
2015.11.02
Routing
Routing
Resolve routing resource problems with these guidelines.
The Auto Packed Registers option reduces LE or ALM count in a design.You can set this option by
clicking Assignment > Settings > Compiler Settings > Advanced Settings (Fitter).
Related Information
The Fitter Aggressive Routability Optimization option is useful if your design does not fit due to
excessive routing wire utilization.
If there is a significant imbalance between placement and routing time (during the first fitting attempt), it
might be because of high wire utilization. Turning on the Fitter Aggressive Routability Optimizations
option can reduce your compilation time.
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
The Router Effort Multiplier controls how quickly the router tries to find a valid solution. The default
value is 1.0 and legal values must be greater than 0. Numbers higher than 1 help designs that are difficult
to route by increasing the routing effort. Numbers closer to 0 (for example, 0.1) can reduce router
runtime, but usually reduce routing quality slightly. Experimental evidence shows that a multiplier of 3.0
reduces overall wire usage by approximately 2%. Using a Router Effort Multiplier higher than the default
value could be beneficial for designs with complex datapaths with more than five levels of logic. However,
congestion in a design is primarily due to placement, and increasing the Router Effort Multiplier does not
necessarily reduce congestion.
Note: Any Router Effort Multiplier value greater than 4 only increases by 10% for every additional 1. For
example, a value of 10 is actually 4.6.
A design with conflicting constraints or constraints that are difficult to achieve may not fit the targeted
device. Conflicting or difficult-to-achieve constraints can occur when location or LogicLock Plus
assignments are too strict and there are not enough routing resources.
In this case, use the Routing Congestion task in the Chip Planner to locate routing problems in the
floorplan, then remove all location and LogicLock Plus region assignments from that area. If the local
constraints are removed, and the design still does not fit, the design is over-constrained. To correct the
problem, remove all location and LogicLock Plus assignments and run successive compilations,
incrementally constraining the design before each compilation. You can delete specific location
assignments in the Assignment Editor or the Chip Planner. To remove LogicLock Plus assignments in the
Chip Planner, in the LogicLock Plus Regions Window, or on the Assignments menu, click Remove
Assignments. Turn on the assignment categories you want to remove from the design in the Available
assignment categories list.
Altera Corporation
Area Optimization
Send Feedback
QPP5V2
2015.11.02
11-9
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner on page 12-1
For more information about the Routing Congestion task in the Chip Planner
In some cases, resynthesizing the design to improve the area utilization can also improve the routability of
the design. First, ensure that you have set your device and timing constraints correctly in your synthesis
tool. Ensure that you do not overconstrain the timing requirements for the design, particularly when the
area utilization of the design is a concern. Synthesis tools generally try to meet the specified requirements,
which can result in higher device resource usage if the constraints are too aggressive.
If resource utilization is important to improve the routing results in your design, some synthesis tools
offer an easy way to optimize for area instead of speed. If you are using Quartus Prime integrated
synthesis, click Assignments > Settings > Compiler Settings > Advanced Settings (Synthesis). For
Optimization Technique, select Balanced or Area.
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-toregister 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 Prime 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 Prime integrated
synthesis and other synthesis tools
If your design does not fit because of routing problems and the methods described in the preceding
sections do not sufficiently improve the routability of the design, modify the design at the source to
achieve the desired results. You can often improve results significantly by making design-specific changes
to your source code, such as duplicating logic or changing the connections between blocks that require
significant routing resources.
If a successful fit cannot be achieved because of a shortage of routing resources, you might require a larger
device.
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
Area Optimization
Send Feedback
Altera Corporation
11-10
QPP5V2
2015.11.02
the Quartus Prime 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:
set_global_assignment -name <.qsf variable name> <value>
Note: If the <value> field includes spaces (for example, Standard Fit), you must enclose the value in
straight double quotation marks.
Related Information
Placement Effort
Multiplier
Router Effort
Multiplier
Router Timing
Optimization
level
Final Placement
Optimization
Altera Corporation
Values
Type
Globa
l
Globa
l
ROUTER_TIMING_OPTIMIZATION_LEVEL
NORMAL, MINIMUM,
MAXIMUM
Globa
l
FINAL_PLACEMENT_OPTIMIZATION
ALWAYS, AUTOMATICALLY,
NEVER
Globa
l
PLACEMENT_EFFORT_MULTIPLIER
ROUTER_EFFORT_MULTIPLIER
Area Optimization
Send Feedback
QPP5V2
2015.11.02
11-11
Auto Packed
Registers (1)
Perform
WYSIWYG
Primitive
Resynthesis
AUTO_PACKED_REGISTERS_
<device family name>
ADV_NETLIST_OPT_SYNTH_WYSIWYG_REMAP
Values
OFF, NORMAL,
MINIMIZE AREA,
MINIMIZE AREA WITH
CHAINS, AUTO
ON, OFF
Type
Global,
Instance
Global,
Instance
Global,
Global,
Optimization
Technique
Global,
Speed Optimiza
tion Technique
for Clock
Domains
State Machine
Encoding
Auto RAM
Replacement
Auto ROM
Replacement
Auto Shift
Register Replace
ment
(1)
STATE_MACHINE_PROCESSING
AUTO_RAM_RECOGNITION
Instance
Instance
Instance
ON, OFF
Instance
Global,
ON, OFF
Global,
Instance
Instance
AUTO_ROM_RECOGNITION
ON, OFF
Global,
Instance
AUTO_SHIFT_REGISTER_RECOGNITION
ON, OFF
Global,
Instance
Allowed values for this setting depend on the device family that you select.
Area Optimization
Send Feedback
Altera Corporation
11-12
QPP5V2
2015.11.02
Setting Name
Auto Block
Replacement
Values
ON, OFF
AUTO_DSP_RECOGNITION
Type
Global,
Instance
Number of
NUM_PARALLEL_PROCESSORS
Processors for
Parallel Compila
tion
Global
Versio
n
Changes
2015.11.02
15.1.0
2014.12.15
14.1.0
June 2014
14.0.0
May 2013
13.0.0
Initial release.
Altera Corporation
Area Optimization
Send Feedback
12
2015.11.02
QPP5V2
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 is critical to meet the design requirements. This chapter discusses how to
analyze the design floorplan with the Chip Planner.
Design floorplan analysis helps to close timing and ensure optimal performance in highly complex
designs. With analysis capability, the Quartus Prime Chip Planner helps you close timing quickly on your
designs. Use the Chip Planner together with LogicLock Plus regions to compile your designs hierarchi
cally, preserving the timing results from individual compilation runs. Use LogicLock Plus regions to
improve your productivity.
You can perform design analysis, as well as create and optimize the design floorplan with the Chip
Planner. To make I/O assignments, use the Pin Planner.
Related Information
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
12-2
QPP5V2
2015.11.02
Make assignment changes with the Chip Planner, such as creating and deleting resource assignments.
Perform post-compilation changes such as creating, moving, and deleting logic cells and I/O atoms.
View and create assignments for a design floorplan.
Perform power and design analyses.
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.
Compilation Report
LogicLock Plus Regions window
Technology Map Viewer
Project Navigator window
RTL source code
Node Finder
Simulation Report
RTL Viewer
Report Timing panel of the TimeQuest Timing Analyzer
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
12-3
The Chip Planner editing modes determine the operations that you can perform. The assignment editing
mode allows you to make assignment changes that are applied by the Fitter during the next place and
route operation.
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-4
QPP5V2
2015.11.02
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
Hierarchical Regions
12-5
Hierarchical Regions
LogicLock Plus regions are fully hierarchical. Parent regions should completely contain child regions and
must overlap with child regions. If the parent and child regions do not overlap, the software issues an
error. The Reserved and Core-Only assignments also apply hierarchically.
LogicLock Plus assignments follow the same precedence as other constraints and assignments.
The Quartus Prime software honors all entity and node assignments to LogicLock Plus regions.
Occasionally, entities and nodes do not occupy an entire region, which leaves some of the regions
resources unoccupied.
To increase the regions resource utilization and performance, the Quartus Prime softwares default
behavior fills the unoccupied resources with other nodes and entities that have not been assigned to
another region. You can prevent this behavior by turning on Reserved in the LogicLock Plus Regions
window. When you turn on this option, your LogicLock Plus region contains only the entities and nodes
that you specifically assigned to your LogicLock Plus region.
The Compilation Report contains an Analysis and Synthesis Resource Utilization by Entity section,
which reports resource usage statistics, including entity-level information. You can use this feature to
verify that any LogicLock Plus region you manually create contains enough resources to accommodate all
the entities you assign to it.
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-6
QPP5V2
2015.11.02
When you evaluate different LogicLock Plus regions in your design, you might want to experiment with
different configurations to achieve your desired results. The Quartus Prime Revisions feature allows you
to organize the same project with different settings until you find an optimum configuration.
To use the Revisions feature, choose Project > Revisions. You can create a revision from the current
design or any previously created revisions. Each revision can have an associated description. You can use
revisions to organize the placement constraints created for your LogicLock Plus regions.
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. The software implements it 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 toplevel 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 & 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 Plus 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.
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
12-7
can also see global and regional clock regions within the device, and the connections between I/O atoms,
PLLs and the different clock regions.
From the Chip Planner, you can launch the Resource Property Editor that changes the properties and
parameters of device resources and modifies connectivity between certain types of device resources. The
Change Manager records any changes that you make to your design floorplan so that you can selectively
undo changes.
The following sections present Chip Planner floorplan views and design analysis procedures which you
can use with any Chip Planner preset, unless a procedure requires a specific preset or editing mode.
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-8
QPP5V2
2015.11.02
Device routing resources used by your designView how blocks are connected, as well as the signal
routing that connects the blocks.
LE configurationView logic element (LE) configuration in your design. For example, you can view
which LE inputs are used; if the LE utilizes the register, the look-up table (LUT), or both; as well as the
signal flow through the LE.
ALM configurationView ALM configuration in your design. For example, you can view which
ALM inputs are used, if the ALM utilizes the registers, the upper LUT, the lower LUT, or all of them.
You can also view the signal flow through the ALM.
I/O configurationView device I/O resource usage. For example, you can view which components of
the I/O resources are used, if the delay chain settings are enabled, which I/O standards are set, and the
signal flow through the I/O.
PLL configurationView phase-locked loop (PLL) configuration in your design. For example, you
can view which control signals of the PLL are used with the settings for your PLL.
TimingView the delay between the inputs and outputs of FPGA elements. For example, you can
analyze the timing of the DATAB input to the COMBOUT output.
In addition, you can modify the following device properties with the Chip Planner:
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
12-9
collapse the path to/from the connections in the path) by clicking Expand Connections in the toolbar, or
by clicking on the +/- on the label.
You can locate failing paths from the timing report in the TimeQuest Timing Analyzer. To locate the
critical paths, click the Report Timing task from the Custom Reports group in the Tasks pane of the
TimeQuest Timing Analyzer. From the View pane, which lists the failing paths, right-click on any failing
path or node, and select Locate Path. From the Locate dialog box, select Chip Planner to see the failing
path in the Chip Planner.
Note: To display paths in the floorplan, you must first make timing settings and perform a timing
analysis.
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-10
QPP5V2
2015.11.02
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.
Figure 12-1: Highlight Routing
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
Show Delays
12-11
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.
Figure 12-2: Show Delays Associated in a TimeQuest Timing Analyzer Path
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:
1. Select the path you want to locate in the Timing Analysis report.
2. Right-click the path and point to Locate Path > Locate in Chip Planner. The path is displayed with its
timing data in the Chip Planner main window and is listed in the Locate History window.
3. To view the routing resources taken for a path you have located in the Chip Planner, use of one the
following methods:
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-12
QPP5V2
2015.11.02
Select the path and then click the Highlight Routing icon in the Chip Planner toolbar, or from the
View menu, click Highlight Routing.
Right-click the path and choose Expand Connections.
To determine the connections between items in the Chip Planner, click the Expand Connections icon on
the toolbar. To add the timing delays for paths you locate from the TimeQuest Timing Analyzer, click the
Show Delays icon on the toolbar. To see the constituent delays on the selected path, click the + sign
next to the path delay displayed in the Chip Planner.
Figure 12-3: Path Analysis in the Chip Planner of a Path Located from TimeQuest
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
12-13
You can make node and pin location assignments to LogicLock Plus 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.
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 Prime command-line
and Tcl API Help browser. To run the Help browser, type the following command at the command
prompt:
quartus_sh --qhelp
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-14
QPP5V2
2015.11.02
Related Information
Note: To specify a non-rectangular or disjoint region, use a semicolon (;) as the delimiter between two or
more bounding boxes.
Assign multiple instances to the same region with multiple PLACE_REGION instance assignments.
Create or Modify a Routing Region
The following assignment creates a routing region with bounding box coordinates 5, 5, 30, 30. Use the
same command format to modify an existing assignment.
set_instance_assignment -name ROUTE_REGION -to <node name(s)> "5 5 30 30"
Note: All instances with a routing region assignment must have a respective placement region; the
routing region must fully contain the placement region.
Routing regions cannot overlap.
Specify a Region as Reserved
The following assignment reserves an existing region:
set_instance_assignment -name <instance name> RESERVE_PLACE_REGION -to <node
name(s)> ON
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
12-15
Related Information
Versio
n
Changes
2015.11.02
15.1.0
2015.05.04
15.0.0
2014.12.15
14.1.0
June 2014
14.0.0
Updated format
November
2013
13.1.0
May 2013
13.0.0
June 2012
12.0.0
November
2011
11.0.1
Template update.
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
12-16
QPP5V2
2015.11.02
Date
May 2011
Versio
n
11.0.0
Changes
December
2010
10.1.0
July 2010
10.0.0
November
2009
9.1.0
Altera Corporation
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
QPP5V2
2015.11.02
Date
May 2008
Versio
n
8.0.0
12-17
Changes
Related Information
Analyzing and Optimizing the Design Floorplan with the Chip Planner
Send Feedback
Altera Corporation
13
2015.11.02
QPP5V2
Subscribe
Send Feedback
a verification flow that might require fixed node names, such as the SignalTap II Logic Analyzer,
formal verification, or the LogicLock Plus based optimization flow (for legacy devices), you must
turn off physical synthesis options.
This chapter explains how physical synthesis optimizations in the Quartus Prime software can modify
your designs netlist to improve the quality of results. This chapter also provides guidelines for applying
the various physical synthesis options, and information about preserving compilation results through
back-annotation.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
13-2
QPP5V2
2015.11.02
(DDR) I/O primitives, memory primitives, digital signal processing (DSP) primitives, and logic cells in
carry/cascade chains are not remapped. This process does not process logic specified in an encrypted .vqm
file or an .edf file, such as third-party intellectual property (IP).
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
re-mapped by the Quartus Prime software. The re-mapping process removes duplicate registers. Registers
that are not removed retain the same name after re-mapping.
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, which the Quartus Prime software reads.
If you use the Quartus Prime software to synthesize your design, you can use the Preserve Register
(preserve) and Keep Combinational Logic (keep) attributes to maintain certain nodes in the design.
Figure 13-1: Quartus Prime Flow for WYSIWYG Primitive Resynthesis
Altera Corporation
QPP5V2
2015.11.02
13-3
The following sections describe the physical synthesis optimizations available in the Quartus Prime
software, and how they can help improve performance and fitting for the selected device.
Nodes or entities that have the Netlist Optimizations logic option set to Never Allow are not affected by
physical synthesis algorithms. You can use the Assignment Editor to apply the Netlist Optimizations
logic option. Use this option to disable physical synthesis optimizations for parts of your design.
Some physical synthesis options affect only registered logic, while others affect only combinational logic.
Select options based on whether you want to keep the registers intact. For example, if your verification
flow involves formal verification, you might want to keep the registers intact.
To choose physical synthesis optimization options, click Assignments > Settings > Compiler Settings >
Advanced Settings (Fitter).
Related Information
You enable Spectra-Q Physical Synthesis options in the Settings dialog box. When you select
Performance (High effort) or Performance (Aggressive), the Spectra-Q Physical Synthesis option is set
Altera Corporation
13-4
QPP5V2
2015.11.02
to On automatically for supported devices. For all other optimization modes, the Spectra-Q Physical
Synthesis option is set to Off by default.
The Quartus Prime software provides physical synthesis optimization options to improve fitting results.
To access these options, click Assignments > Settings > Compiler Settings > Advanced Settings (Fitter).
Altera Corporation
QPP5V2
2015.11.02
13-5
Description
Netlist Optimizations
You can use the Assignment Editor to apply the Netlist Optimizations logic
option. Use this option to disable physical synthesis optimizations for parts of
your design.
Perform asynchronous
signal pipelining
Perform physical
synthesis for combina
tional logic
Swaps the look-up table (LUT) ports within LEs so that the critical path has
fewer layers through which to travel. Also allows the duplication of LUTs to
enable further optimizations on the critical path.
Perform Register
Enables the movement of registers across combinational logic, allowing the
Retiming for Performance Quartus Prime software to trade off the delay between timing-critical paths
and non-critical paths.
Physical Synthesis for
Combinational Logic for
Fitting
Causes registers that do not have a Power-Up Level logic option setting to
power up with a don't care logic level (X). When the Power-Up Don't Care
option is turned on, the Compiler determines when it is beneficial to change
the power-up level of a register to minimize the area of the design. A powerup state of zero is maintained unless there is an immediate area advantage.
Perform WYSIWYG
Primitive Resynthesis
Spectra-Q Physical
Synthesis
Altera Corporation
13-6
QPP5V2
2015.11.02
Related Information
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 Prime 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:
set_global_assignment -name <QSF variable name> <value>
Related Information
Altera Corporation
QPP5V2
2015.11.02
13-7
Perform
WYSIWYG
Primitive
Resynthesis
Optimization
Mode
Power-Up
Dont Care
OPTIMIZATION_MODE
ALLOW_POWER_UP_DONT_CARE
Values
Type
ON, OFF
Global, Instance
BALANCEDHIGH
PERFORMANCE EFFOR
AGGRESSIVE
PERFORMANCE
ON, OFF
Global, Instance
Global
Spectra-Q
Physical
Synthesis
Perform
Register
Retiming
PHYSICAL_SYNTHESIS_REGISTER_
RETIMING
Values
Type
ON, OFF
Global
ON, OFF
Global
Version
Changes
2015.11.02
15.1.0
2014.12.15
14.1.0
June 2014
14.0.0
Updated format.
November
2013
13.1.0
Altera Corporation
13-8
QPP5V2
2015.11.02
Date
Version
Changes
June 2012
12.0.0
November
2011
10.0.2
Template update.
December
2010
10.0.1
Template update.
July 2010
10.0.0
November
2009
9.1.0
November
2008
8.1.0
May 2008
8.0.0
Related Information
Altera Corporation
14
2015.11.02
QPP5V2
Subscribe
Send Feedback
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
14-2
QPP5V2
2015.11.02
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 Prime TimeQuest Timing Analyzer.
Related Information
Mentor Graphics Hyperlynx software. With the ability to create industry-standard model definition files
quickly, you can build accurate simulations that can provide data to help improve board-level signal
integrity.
The I/Os IBIS and HSPICE model creation available in the Quartus Prime 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 Prime 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 chips 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 Prime
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 Prime 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
Altera Corporation
QPP5V2
2015.11.02
14-3
IBIS Model
HSPICE Model
Model
Simple and limitedThe model
Customiza completely describes the I/O buffer
tion
and does not usually have to be
customized.
Simulation
Set Up and
Run Time
Simulation
Accuracy
Altera Corporation
14-4
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
14-5
Customize Files
No
IBIS
HSPICE
IBIS or
HSPICE?
Changes
to FPGA I/O
required?
Run Simulations as
Defined in HSPICE Deck
Run Simulation
Results
OK?
No
Make Adjustments to
Models or Simulation Parameters
and Simulate Again
Yes
Related Information
Altera Corporation
14-6
QPP5V2
2015.11.02
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 Prime 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 Prime 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
Altera Corporation
QPP5V2
2015.11.02
14-7
With IBIS models, you can apply them to input, output, or bidirectional buffer entities and quickly set up
and run simulations. For HSPICE decks, the simulation parameters are included in the files. Open the
files in Synopsys HSPICE and run simulations for each pin as required.
With HSPICE decks generated from the HSPICE Writer, the double counting problem is accounted for,
which ensures that your simulations are accurate. Simulations that involve IBIS models created with
anything other than the default loading settings in the Quartus Prime software must take the change in
the size of the load between the IBIS delay and the Quartus Prime tCO measurement into account.
Warning messages during compilation alert you to this change.
4
Rise
Fall
L_pkg
C_comp
R_pkg
C_pkg
Altera Corporation
14-8
QPP5V2
2015.11.02
1. PulldownA voltage-current table describes the current when the buffer is driven low based on a
pull-down voltage range of VCC to 2 VCC.
2. PullupA voltage-current table describes the current when the buffer is driven high based on a pullup voltage range of VCC to VCC.
3. Ground and Power ClampsVoltage-current tables describe the current when clamping diodes for
electrostatic discharge (ESD) are present. The ground clamp voltage range is VCC to VCC, and the
power clamp voltage range is VCC to ground.
4. Ramp and Rising/Falling WaveformA voltage-time (dv/dt) ratio describes the rise and fall time of
the buffer during a logic transition. Optional rising and falling waveform tables can be added to more
accurately describe the characteristics of the rising and falling transitions.
5. Total Output Capacitance and Package RLCThe total output capacitance includes the parasitic
capacitances of the output pad, clamp diodes (if present), and input transistors. The package RLC is
device package-specific and defines the resistance, inductance, and capacitance of the bond wire and
pin of the I/O.
Related Information
g50c_r50c.
Altera provides IBIS models for almost all FPGA and FPGA configuration devices. You can use the IBIS
models from the website to perform early simulations of the I/O buffers you expect to use in your design
as part of a pre-layout analysis.
Downloaded IBIS models have the RLC package values set to one particular device in each device family.
The .ibs file can be customized for your device package and can be used for any simulation. IBIS models
downloaded and used for simulations in this manner are generic. They describe only a certain set of
models listed for each device on the Altera IBIS Models page of the Altera website. To create customized
models for your design, use the IBIS Writer as described in the next section.
Altera Corporation
QPP5V2
2015.11.02
14-9
To simulate your design with the model accurately, you must adjust the RLC values in the IBIS model file
to match the values for your particular device package by performing the following steps:
1. Download and expand the ZIP file (.zip) of the IBIS model for the device family you are using for your
design. The .zip file contains the .ibs file along with an IBIS model user guide and a model data correla
tion report.
2. Download the Package RLC Values spreadsheet for the same device family.
3. Open the spreadsheet and locate the row that describes the device package used in your design.
4. From the packages I/O row, copy the minimum, maximum, and typical values of resistance,
inductance, and capacitance for your device package.
5. Open the .ibs file in a text editor and locate the [Package] section of the file.
6. Overwrite the listed values copied with the values from the spreadsheet and save the file.
Related Information
If you have started your FPGA design and have created custom I/O assignments, you can use the Quartus
Prime IBIS Writer to create custom IBIS models to accurately reflect your assignments.
Examples of custom assignments include drive strength settings or the enabling of clamping diodes for
ESD protection. IBIS models created with the IBIS Writer take I/O assignment settings into account.
If the Enable Advanced I/O Timing option is turned off, the generated .ibs files are based on the load
value setting for each I/O standard on the Capacitive Loading page of the Device and Pin Options dialog
box in the Device dialog box. With the Enable Advanced I/O Timing option turned on, IBIS models use
an effective capacitive load based on settings found in the board trace model on the Board Trace Model
page in the Device and Pin Options dialog box or the Board Trace Model view in the Pin Planner. The
effective capacitive load is based on the sum of the Near capacitance, Transmission line distributed
capacitance, and the Far capacitance settings in the board trace model. Resistance values and transmis
sion line inductance values are ignored.
Note: If you made any changes from the default load settings, the delay in the generated IBIS model
cannot safely be added to the Quartus Prime tCO measurement to account for the double counting
problem. This is because the load values between the two delay measurements do not match. When
this happens, the Quartus Prime software displays warning messages when the EDA Netlist Writer
runs to remind you about the load value mismatch.
Related Information
You must integrate IBIS models downloaded from the Altera website or created with the Quartus Prime
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.
Signal Integrity Analysis with Third-Party Tools
Send Feedback
Altera Corporation
14-10
QPP5V2
2015.11.02
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.
Figure 14-3: HyperLynx LineSim Free-Form Schematic Editor
Altera Corporation
QPP5V2
2015.11.02
14-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 Prime
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
the Quartus Prime 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.
Altera Corporation
14-12
QPP5V2
2015.11.02
2. Click Edit. A dialog box appears where you can add directories and adjust the order in which LineSim
searches them.
Figure 14-5: LineSim Select Directories Dialog Box
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 LineSims 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.
Altera Corporation
QPP5V2
2015.11.02
14-13
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 symbols right-click menu.
Figure 14-6: LineSim Assign Model Dialog Box
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.
Altera Corporation
14-14
QPP5V2
2015.11.02
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.
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.
Altera Corporation
QPP5V2
2015.11.02
14-15
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.
Figure 14-9: Example of Signal Integrity Anomaly in HyperLynx with IBIS Models
Related Information
Altera Corporation
14-16
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
14-17
The double counting problem is inherent to the method output timing is analyzed versus the method used
for HSPICE models. The timing analyzer tools in the Quartus Prime software measure delay timing for an
output signal from the core logic of the FPGA design through the output buffer ending at the FPGA pin
with a default capacitive load or a specified value for the selected I/O standard. This measurement is the
tCO timing variable.
FPGA Output
Buffer
FPGA Pin
Termination Network/
Trace Model
Signal
Destination
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.
Signal Integrity Analysis with Third-Party Tools
Send Feedback
Altera Corporation
14-18
QPP5V2
2015.11.02
To adjust the measurements to account for the double-counting, the delay between the arbitrary point in
the output buffer selected by the HSPICE model and the FPGA pin must be subtracted from either tCO or
tPD before adding the results together. The subtracted delay must also be based on a common load
between the two measurements. This is done by repeating the HSPICE model measurement, but with the
same load used by the Quartus Prime software for the tCO measurement.
FPGA Output
Buffer
FPGA Pin
Quartus Prime
Test Load
Termination Network/
Trace Model
Signal
Destination
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 Prime 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.
Altera Corporation
QPP5V2
2015.11.02
14-19
The first step in the HSPICE Writer tool flow is to configure the I/O standards and modes for each of the
pins in your design properly. In the Quartus Prime software, these settings are represented by assignments
that map I/O settings, such as pin selection, and I/O standard and drive strength, to corresponding signals
in your design.
The Quartus Prime software provides multiple methods for creating these assignments:
You must enable the HSPICE Writer in the Settings dialog box of the Quartus Prime software to generate
the HSPICE decks from the Quartus Prime software.
Figure 14-12: EDA Tool Settings: Board Level Options Dialog Box
You can also use HSPICE Writer in conjunction with a scripted Tcl flow. To enable HSPICE Writer
during a full compile, include the following lines in your Tcl script.
Altera Corporation
14-20
QPP5V2
2015.11.02
As with command-line invocation, specifying the output directory is optional. If not specified, the output
directory defaults to board/hspice.
HSPICE Writer automatically generates simulation files and names them using the following naming
convention: <device>_<pin #>_<pin_name>_<in/out>.sp.
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 Prime 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
After HSPICE Writer is enabled, the HSPICE simulation files are generated automatically each time the
project is completely compiled. The Quartus Prime software also provides an option to generate a new set
of simulation files without having to recompile manually. In the Processing menu, click Start EDA
Netlist Writer to generate new simulation files automatically.
Note: You must perform both Analysis & Synthesis and Fitting on a design before invoking the
HSPICE Writer tool.
If you use a script-based flow to compile your project, you can create HSPICE model files by including the
following commands in your Tcl script (.tcl file).
The <output_directory> option specifies the location where HSPICE model files are saved. By default, the
<project directory>/board/hspice directory is used.
Invoke HSPICE Writer
To invoke the HSPICE Writer tool through the command line, type:
quartus_eda.exe <project_name> --board_signal_integrity=on --format=HSPICE \
--output_directory=<output_directory>
<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.
HSPICE models generated by the HSPICE Writer can be used for simulation as generated.
Altera Corporation
QPP5V2
2015.11.02
14-21
A default board description is included, and a default simulation is set up to measure rise and fall delays
for both input and output simulations, which compensates for the double counting problem. However,
Altera recommends that you customize the board description to more accurately represent your routing
and termination scheme.
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.
Sample Board Trace Section
* I/O Board Trace and Termination Description
* - Replace this with your board trace and termination description
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.
Sample Source Stimulus Section
* Sample source stimulus placeholder
* - Replace this with your I/O driver model
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 Prime
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.
Signal Integrity Analysis with Third-Party Tools
Send Feedback
Altera Corporation
14-22
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
14-23
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.
Altera Corporation
14-24
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
14-25
If there is a discontinuity or any other anomalies at the destination, adjust the board description in the
Quartus Prime 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.
Altera Corporation
14-26
QPP5V2
2015.11.02
Figure 14-17: Example of Signal Integrity Anomaly in the AvanWaves Waveform Viewer
Related Information
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 Prime 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 Prime software assumes for the given I/O standard.
Altera Corporation
QPP5V2
2015.11.02
Simulation Conditions
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
Device:
Speed Grade:
Pin:
Bank:
I/O Standard:
OCT:
14-27
EP2S60F1020C3
C3
AA4 (out96)
IO Bank 6 (Row I/O)
LVTTL, 12mA
Off
Quartus Primes default I/O timing delays assume the following slow
corner simulation conditions.
Specified Test Conditions For Quartus Prime 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.
Simulation Options
The simulation options block configures the simulation temperature and configures HSPICE with typical
simulation options.
brief=0
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
Note: For a detailed description of these options, consult your HSPICE manual.
Signal Integrity Analysis with Third-Party Tools
Send Feedback
Altera Corporation
14-28
QPP5V2
2015.11.02
Constant Definition
Constant Definition
The constant definition block of the simulation file instantiates the voltage sources that controls the
configuration modes of the I/O buffer.
oeb
opdrain
rambh
rpullup
rpcdp5
rpcdp4
rpcdp3
rpcdp2
rpcdp1
rpcdp0
rpcdn4
rpcdn3
rpcdn2
rpcdn1
rpcdn0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
vc
0
0
0
rp5
rp4
rp3
rp2
rp1
rp0
rn4
rn3
rn2
rn1
rn0
*
*
*
*
*
Set
Set
Set
Set
Set
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.
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.
Altera Corporation
QPP5V2
2015.11.02
14-29
The I/O buffer instantiation block of the simulation SPICE deck instantiates the necessary power supplies
and I/O model components that are necessary to simulate the given I/O.
*
*
*
*
*
FPGA core
FPGA core
IO supply
IO ground
Pre-drive
voltage
ground
voltage
supply voltage
The board trace and termination block of the simulation SPICE deck is provided only as an example.
Replace this block with your own board trace and termination models.
Altera Corporation
14-30
QPP5V2
2015.11.02
Stimulus Model
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.
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
Prime 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 Prime 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.
Altera Corporation
QPP5V2
2015.11.02
Simulation Conditions
14-31
The final section of the header comment lists any warning messages that you must consider when you use
the SPICE decks.
Header Comment Block
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
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.
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.
Signal Integrity Analysis with Third-Party Tools
Send Feedback
Altera Corporation
14-32
QPP5V2
2015.11.02
Simulation Options
Simulation Options
The simulation options block configures the simulation temperature and configures HSPICE with typical
simulation options.
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.
oeb
opdrain
rambh
rpullup
rpci
rpcdp4
rpcdp3
rpcdp2
rpcdp1
rpcdp0
rpcdn4
rpcdn3
rpcdn2
rpcdn1
rpcdn0
din
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
Where:
The I/O buffer netlist block loads all of the models required for the corresponding pin. These include a
model for the I/O output buffer, as well as any loads that might be present on the pin.
Altera Corporation
QPP5V2
2015.11.02
Drive Strength
14-33
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.
Stratix and Cyclone devices have sections for configuring the slew rate and delay chain settings.
The I/O buffer instantiation block of the output simulation spice deck instantiates the necessary power
supplies and I/O model components that are necessary to simulate the given I/O.
*
*
*
*
*
FPGA core
FPGA core
IO supply
IO ground
Pre-drive
voltage
ground
voltage
supply voltage
Altera Corporation
14-34
QPP5V2
2015.11.02
The board trace and termination block of the simulation SPICE deck is provided only as an example.
Replace this block with your specific board loading models.
The double-counting compensation circuitry block of the simulation SPICE deck instantiates a second
I/O buffer that is used to measure double-counting. The buffer is configured identically to the user I/O
buffer but is connected to the Quartus Prime software test load. The simulated delay of this second buffer
can be interpreted as the amount of double-counting between the Quartus Prime software and
HSPICE Writer simulated results.
As the amount of double-counting is constant for a given I/O standard on a given pin, consider separating
the double-counting circuitry from the simulation file. In doing so, you can perform any number of I/O
simulations while referencing the delay only once.
(Part of )Double-Counting Compensation Circuitry Block
*
*
*
*
*
*
*
*
*
*
*
*
*
Altera Corporation
0
0
QPP5V2
2015.11.02
Simulation Analysis
vrpullup_tl
rpullup_tl
* Instantiate
vvccn_tl
vvssn_tl
vvccpd_tl
Power Supplies
vccn_tl
0
vssn_tl
0
vccpd_tl
0
14-35
0
vcn_tl
0
vpd_tl
Related Information
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.
Altera Corporation
14-36
Advanced Topics
QPP5V2
2015.11.02
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 Prime software calculates delays and
is not based on which PVT corner is being simulated. By default, the Quartus Prime 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
Altera recommends performing worst-case hold time analysis using the fast corner models, which use fast
transistors, high voltage, and low temperature. This involves modifying the SPICE decks to select the
correct temperature option, change the supply voltage sources, and load the correct fast transistor models.
The values of these parameters are located in the header comment section of the corresponding
simulation deck files.
For a truly worst-case analysis, combine the HSPICE Writer hold time analysis results with the Quartus
Prime software fast timing model. This requires that you change the double-counting compensation
circuitry in the simulations files to also simulate the fast process corners, as this is what the Quartus Prime
software uses for the fast timing model.
Note: This method of hold time analysis is recommended only for globally synchronous buses. Do not
apply this method of hold-time analysis to source synchronous buses. This is because the source
synchronous clocking scheme is designed to cancel out some of the PVT timing effects. If this is
not taken into account, the timing results will not be accurate. Proper source synchronous timing
analysis is beyond the scope of this document.
Use each of the FPGA family datasheets to verify the recommended operating conditions for supply
voltages. For current FPGA families, the maximum recommended voltage corresponds to the fast corner,
while the minimum recommended voltage corresponds to the slow corner. These voltage
recommendations are specified at the power pins of the FPGA and are not necessarily the same voltage
that are seen by the I/O buffers due to package IR drops.
The automatically generated HSPICE simulation files model this IR effect pessimistically by including a
50-mV IR drop on the VCCPD supply when a high drive strength standard is being used.
Altera Corporation
QPP5V2
2015.11.02
Correlation Report
14-37
Correlation Report
Correlation reports for the HSPICE I/O models are located in the family-specific HSPICE I/O buffer
simulation kits.
Related Information
Versio
n
Changes
2015.11.02
15.1.0
June 2014
14.0.0
Updated format.
December
2010
10.0.1
Template update.
July 2010
10.0.0
November
2009
9.1.0
No change to content.
November
2008
8.1.0
Altera Corporation
14-38
QPP5V2
2015.11.02
Date
May 2008
Versio
n
8.0.0
Changes
Related Information
Altera Corporation
15
2015.11.02
QPP5V2
Subscribe
Send Feedback
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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
15-2
QPP5V2
2015.11.02
Product Comparison
Product Comparison
Table 15-1: Cadence and OrCAD Product Comparison
Description
Cadence Allegro
Design Entry HDL
Cadence Allegro
Design Entry CIS
Former Name
History
Based directly on
OrCAD Capture CIS,
the Cadence Allegro
Design Entry CIS
software is still
developed by OrCAD
but sold and marketed
by Cadence. EMA
provides support and
training.
Related Information
www.cadence.com
www.ema-eda.com
Altera Corporation
QPP5V2
2015.11.02
15-3
Figure 15-1: Design Flow with the Cadence Allegro Design Entry HDL Software
Start FPGA Design
Quartus Prime Software
Create or Change
Pin Assignments
Part Developer
Run I/O Assignment
Analysis
Run Full
Compilation
.pin
Figure 15-2: Design Flow with the Cadence Allegro Design Entry CIS Software
Start FPGA Design
Quartus Prime Software
Create or Change
Pin Assignments
Run Full
Compilation
.pin
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.
Cadence PCB Design Tools Support
Send Feedback
Altera Corporation
15-4
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
15-5
cannot, however, import pin assignment changes from the Cadence design tools into the Quartus Prime
software with the .pin.
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:
Related Information
Altera Corporation
15-6
QPP5V2
2015.11.02
Creating Symbols
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 Prime
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.
Table 15-2: Symbol Fracture Naming Conventions
Cadence Allegro PCB
Librarian
Part Developer Tool
Cadence Allegro
Design Entry HDL
Software
Cadence Allegro
Design Entry
CIS Software
Slots
Sections
Versions
Parts
Related Information
www.cadence.com
Provides information about using the PIC design flow.
Altera Corporation
QPP5V2
2015.11.02
15-7
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
Altera Corporation
15-8
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
15-9
DCLK
DATA0
NCONFIG
NCE
clkx2
follow
newt
yvalid
reset
Slot 1
MSEL0
MSEL1
CONF_DONE
NSTATUS
ASDO
NCSO
filtref NCEO
TDO
TDI
TMS
TCK
VCCA_PLL1
VCCA_PLL2
VCCIO4
filtref
GNDA_PLL1
GNDA_PLL2
GNDG_PLL1
GNDG_PLL2
GND
GND
GND
GND
GND
GND
GND
GND
GND
GND
clk
VCCIO3
VCCINT
filtref
VCCIO2
yn_out[7..0]
VCCIO1
d[7..0]
Slot 2
Slot 3
- This diagram represents a Cyclone device with JTAG or passive serial (PS) mode configuration option settings. Symbols created for other
devices or other configuration modes may have diff erent sets of configuration pins, but can be fractured in a similar manner.
- The power/ground slot shows only a representation of power and ground pins because the device contains a large number of power
and ground
pins.
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.
2.
3.
4.
5.
Altera Corporation
15-10
QPP5V2
2015.11.02
.pin
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 Prime 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
Altera Corporation
QPP5V2
2015.11.02
15-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
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.
2.
3.
4.
In the Cadence Allegro Project Manager tool, switch to the board design flow.
On the Flows menu, click Board Design.
To start the Cadence Allegro Design Entry HDL software, click Design Entry.
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.
Altera Corporation
15-12
QPP5V2
2015.11.02
Figure 15-5: Design Flow with the Cadence Allegro Design Entry CIS Software
Start FPGA Design
Quartus Prime Software
Create or Change
Pin Assignments
Run Full
Compilation
.pin
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 Prime 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.
Altera Corporation
QPP5V2
2015.11.02
Generating a Part
15-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 Prime 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.
Altera Corporation
15-14
QPP5V2
2015.11.02
Splitting a Part
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 15-6: Splitting a Symbol into Multiple Sections
DCLK
DATA0
NCONFIG
NCE
clkx2
follow
newt
yvalid
reset
Section 1
MSEL0
MSEL1
CONF_DONE
NSTATUS
ASDO
NCSO
filtref NCEO
TDI
TMS
TCK
TDO
VCCA_PLL1
VCCA_PLL2
VCCIO4
filtref
GNDA_PLL1
GNDA_PLL2
GNDG_PLL1
GNDG_PLL2
GND
GND
GND
GND
GND
GND
GND
GND
GND
GND
clk
VCCIO3
VCCINT
filtref
VCCIO2
yn_out[7..0]
VCCIO1
d[7..0]
Section 2
Section 3
- This diagram represents a Cyclone device with JTAG or passive serial (PS) mode configuration option settings. Symbols created for
other devices or other configuration modes might have diff erent sets of configuration pins, but can be fractured in a similar manner.
- The power/ground section shows only a representation of power and ground pins because the device contains a high number of
power and ground
pins.
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.
Altera Corporation
QPP5V2
2015.11.02
15-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, doubleclick 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.
Altera Corporation
15-16
QPP5V2
2015.11.02
Altera Libraries for the Cadence Allegro Design Entry CIS Software
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 Prime 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 Prime 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.
Altera Corporation
QPP5V2
2015.11.02
15-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.
Version
Changes
2015.11.02
15.1.0
June 2014
14.0.0
June 2012
12.0.0
November
2011
10.0.2
Template update.
December
2010
10.0.1
Template update.
July 2010
10.0.0
November
2009
9.1.0
November
2008
8.1.0
May 2008
8.0.0
Updated references.
Altera Corporation
15-18
QPP5V2
2015.11.02
Related Information
Altera Corporation
16
2015.11.02
QPP5V2
Subscribe
Send Feedback
You can integrate the Mentor Graphics I/O Designer or DxDesigner PCB design tools into the Quartus
Prime design flow. This combination provides a complete FPGA-to-board design workflow.
With todays 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:
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 pinout and routing requirements in the Mentor Graphics tools and pass the information back to the Quartus
Prime software for placement and routing. Part librarians can also benefit from this chapter by learning
how to use output from the Quartus Prime software to create new library parts and symbols.
The procedures in this chapter require the following software:
The Quartus Prime 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
of its semiconductor products to current specifications in accordance with Altera's standard warranty, but reserves the right to make changes to any
products and services at any time without notice. Altera assumes no responsibility or liability arising out of the application or use of any information,
product, or service described herein except as expressly agreed to in writing by Altera. Altera customers are advised to obtain the latest version of device
specifications before relying on any published information and before placing orders for products or services.
www.altera.com
101 Innovation Drive, San Jose, CA 95134
ISO
9001:2008
Registered
16-2
QPP5V2
2015.11.02
Using I/O
Designer?
I/O Designer
Yes
Create/Update I/O
Designer Database
Set Up to Generate
FPGA Xchange File (.fx)
Compile and Run
EDA Netlist Writer
No
Create or Change
Pin Assignments
.fx (1)
Regenerate .fx
Generate Symbol
DxDesigner
Create New or Open
Existing Project
.pin
Generate Symbol
Instantiate Symbol
in Schematic
Forward to Board
Layout Tool
Board Layout Tool
Yes
Back-Annotate
Changes
No
End
Altera Corporation
QPP5V2
2015.11.02
16-3
Note: The Quartus Prime software generates the .fx in the output directory you specify in the BoardLevel page of the Settings dialog box. However, the Quartus Prime 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 Prime 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 Prime 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 Prime 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 Prime 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 Prime 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.
Altera Corporation
16-4
QPP5V2
2015.11.02
Regenerate .fx
Generate Symbol
DxDesigner
Create New or Open
Existing Project (2)
.pin
Yes
Back-Annotate
Changes
No
End
Note: (2) DxDesigner software-specific steps in the design flow are not part of the I/O Designer flow.
QPP5V2
2015.11.02
16-5
assignments. You cannot import pin assignment changes from a Mentor Graphics .pin into the Quartus
Prime software.
The .fx is an input or output of either the Quartus Prime or I/O Designer software. You can generate
an .fx in the Quartus Prime software for symbol generation in the Mentor Graphics I/O Designer
software. A Quartus Prime .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 Prime 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 Prime software. Use the .fx rather than the .qsf for transferring I/O assignment
information.
Figure 16-3: Generating .pin and .fx files
Start FPGA Design
Create or Change
Pin Assignments
.fx
.pin
Altera Corporation
16-6
QPP5V2
2015.11.02
Altera Corporation
QPP5V2
2015.11.02
16-7
8. Select the appropriate device family, device, package, and speed (if applicable), from the corresponding
menus. Click Next. The Place and route page appears.
9. In the FPGAX file name field, type or browse to the backup copy of the .fx generated by the Quartus
Prime software.
10.In the Pin report file name field, type or browse to the .pin generated by the Quartus Prime 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 Prime 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
Altera Corporation
16-8
QPP5V2
2015.11.02
.pin
Regenerate .fx
Generate Symbol
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. 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 Prime
software. Otherwise, updating the file in the Quartus Prime 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
Prime software, and verify that your I/O Designer database points to the backup copy.
Altera Corporation
QPP5V2
2015.11.02
16-9
Create or Change
Pin Assignments
Import Pin
Assignments
I/O Designer
Create or Update
.fpc
(1)
(1)
Create or Change
Pin Assignments
.fx
Regenerate .fx
Generate Symbol
(2)
Altera Corporation
16-10
QPP5V2
2015.11.02
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 Prime Pin Planner or in the I/O Designer database.
To create a symbol based on a selected Altera FPGA device, follow these steps:
4.
5.
6.
7.
8.
9.
Note: If DEVICE and PKG_TYPE are blank or incorrect, close the Symbol wizard and specify the
correct device information (File > Properties > FPGA Flow).
Under Symbol type, click PCB. Under Use signals, click All, then click Next.
Select fracturing options for your symbol. If you are using the Symbol wizard to edit a previously
created fractured symbol, you must turn on Reuse existing fractures to preserve your current
fractures. Select other options on this page as appropriate for your symbol. Click Next.
Select additional fracturing options for your symbol. Click Next.
Select the options for the appearance of the symbols. Click Next.
Define the information you want to label for the entire symbol and for individual pins. Click Next.
Add any additional signals and pins to the symbol. Click Finish.
You can view your symbol and any fractures you created with the Symbol Editor. You can edit parts of
the symbol, delete fractures, or rerun the Symbol wizard. When you modify pin assignments in I/O
Designer database, I/O Designer symbols automatically reflect these changes. Modify assignments in
the I/O Designer software by supplying and updated .fx from the Quartus Prime software, or by backannotating changes in your board layout tool.
QPP5V2
2015.11.02
16-11
Quartus Prime software. You cannot back-annotate changes made in a board layout tool or in a
DxDesigner symbol to the Quartus Prime software.
Figure 16-6: DxDesigner-only Flow (without I/O Designer)
DxDesigner
Create New or Open
Existing Project
.pin
Generate Symbol
Instantiate in
Schematic
Forward to Board
Layout Tool
Altera Corporation
16-12
QPP5V2
2015.11.02
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 Prime 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_fileupdates the I/O Designer database with assignment updates
from the currently specified .fx.
generate_fpga_xchange_fileupdates the .fx with I/O Designer software changes for transfer back
into the Quartus Prime software.
set_pin_report_file -quartus_pin <file name>imports assignment data from a Quartus Prime
software .pin file.
symbolwizardruns the I/O Designer Symbol wizard.
set_dx_designer_project -path <path>
2015.11.02
Altera Corporation
Version
15.1.0
Changes
QPP5V2
2015.11.02
Date
Version
16-13
Changes
2014.06.30
14.0.0
June 2012
12.0.0
December 2010
10.1.0
Related Information
Altera Corporation