QSF Assignment Descriptions
QSF Assignment Descriptions
Descriptions
Version 1.0
January 6, 2004
By
Altera Corporation
QSF Assignment Descriptions Version 1.0
Table of Contents
1. OVERVIEW............................................................................................................................3
2. EXECUTIVE SUMMARY.......................................................................................................3
1. Overview
The Altera® QSF (Quartus® Settings File) file is used to store key information about compiler
settings, simulator settings and project settings for a Quartus® II project. This information
includes any location assignments given to blocks used in the design. As a result, the QSF file
represents a simple way for 3rd party developers to use their own placements for a design in
Quartus II.
2. Executive Summary
This document describes the file format of a QSF file and, in particular, the format of location
assignments. It has the following purposes:
• Describe the QSF file format for Quartus II 4.0
• Explain how users can use their own placement in a Quartus II flow via the QSF file
• Explain how to compare results of a 3rd party placement to Quartus II placement
After reading this file and referenced material you should be able to do the following:
• Import placement results obtained with a 3rd party tool into the Quartus II flow
• Compare results of 3rd party placement tools with Quartus II placement
made to a setting through the GUI, the QSF file is automatically modified to reflect this change,
and vice-versa).
Please note that the QSF file replaces the CSF (Compiler Settings File), which stored location
assignments in previous versions of the Quartus II design software. If you have a project from an
older version of the Quartus II software and wish to import location assignments made in a CSF
file, simply open the project with the new Quartus II 4.0 design file and a QSF file that preserves
all CSF settings (including location assignments) will automatically be generated. Any further
changes or additions should be made to the QSF file as described in this document because the
CSF file is only used for creation of the QSF file.
For more details on the contents of the QSF file, please see the Quartus II design software on-
line Help.
As mentioned previously, assignments can be made by either directly editing the QSF file or by
using Tcl commands. Since the Tcl interface should not change from one distribution of Quartus
II design software to the next, using it will help make your tools more forward compatible. For
more information on Tcl scripting in the Quartus II flow, please see [6] and [7].
The Tcl commands necessary to make QSF assignments can be found in the Quartus II Project
Tcl package. To load this package the following command must be executed:
package require ::quartus::project
After loading the package, assignments can be added to the QSF file through Tcl commands. To
execute a series of Tcl instructions a script containing all commands should be created
(remember to load the package in the script!) and run with the Quartus Tcl interpreter by
executing the following command line directive:
quartus_sh –t <file_name>
Alternatively, to execute the script through the Quartus II design software GUI, one would open
the view menu and choose Utility Windows Æ Tcl Console to bring up the console window. Next,
in the console window enter the following command:
source <file_name>
For this command to work properly, your working directory must either contain the Tcl source file
or you must specify the path as part of the file name (To check which directory you are currently
in type “pwd” from the Tcl Console window).
The Tcl commands pertaining to location assignments that can be placed directly in the QSF file
or in a separate script use the formats specified in the following subsections (for more information
on the blocks described please see the WYSIWYG guide).
Parameter Description
<node_name> String that represents the name of the node being placed. This should
match the name of the node in the atom netlist (vqm file) exactly.
Parameter Description
4.3 Pins
It is possible to assign inputs and outputs of a design to specific pins on the destination device.
This can be accomplished by adding a statement of the following form to the QSF file or a Tcl
script:
<io_name> String that represents the name of the input or output node being placed.
This should match the name in the atom netlist (vqm file) exactly
<pin_name> String that represents the name of the pin to which the assignment is
being made. The pin names can be found in [4] and are typically a letter
followed by a number with no spaces in between (i.e. A1).
e.g. The statement: set_location_assignment Pin_B3 -to input_a assigns the node
‘input_a’ to the pin named B3 on the device.
Alternatively, you can specify which IO cell in the FPGA a given node should be implemented in,
without specifying the pin name. This assignment has the form:
set_location_assignment IOC_X<x_loc>_Y<y_loc>_N<subloc> -to <node_name>
Parameter Description
<node_name> String that represents the name of the node being placed. This should
match the name of the node in the atom netlist (vqm file) exactly.
<x_loc> Integer valued X position of the destination MAC’s lower left corner.
<y_loc> Integer valued Y position of the destination MAC’s lower left corner.
Parameter Description
<node_name> String that represents the name of the node being placed. This should
match the name of the node in the atom netlist (vqm file) exactly.
<ram_type> String that represents the type of RAM block to which the node is being
<x_loc> Integer valued X position of the destination RAM’s lower left corner.
<y_loc> Integer valued Y position of the destination RAM’s lower left corner.
Parameter Description
<name> String that represents the name of the node or entity being placed. This
should match the name of the node or entity in the atom netlist (vqm file)
exactly.
# Project-Wide Assignments
# ========================
set_global_assignment -name BDF_FILE quip_des.bdf
# Timing Assignments
# ==================
set_global_assignment -name
INCLUDE_EXTERNAL_PIN_DELAYS_IN_FMAX_CALCULATIONS OFF
# Fitter Assignments
# ==================
set_global_assignment -name SEED 11
set_global_assignment -name AUTO_RESTART_CONFIGURATION OFF
set_global_assignment -name DEVICE EP1S10F484C5
# Simulator Assignments
# =====================
set_global_assignment -name GLITCH_INTERVAL 1NS
# ============================
set_global_assignment -name HCPY_ALOAD_SIGNALS OFF
set_global_assignment -name HCPY_VREF_PINS OFF
set_global_assignment -name HCPY_CAT OFF
# SignalTap II Assignments
# ========================
set_global_assignment -name HUB_INSTANCE_NAME SLD_HUB_INST
set_global_assignment -name HUB_ENTITY_NAME SLD_HUBCOMPILER_SETTINGS
Figure 1: QSF File Example
project_close
Next, to compile this design, from the command line one could invoke the following commands:
quartus_sh -t setup_project.tcl
quartus_sh --flow compile quip_des
This will compile a project with the desired assignments, and makes no assumptions about the
format of the QSF file.
The suggested series of steps required to obtain results with a 3rd party placement is as follows:
Following these steps will allow the user to benchmark their placement tools.
• Make the Setting equal to On using the drop down menu in the upper portion of the
window
Alternatively, one can disable carry chains with the following Tcl command:
set_global_assignment -name "IGNORE_CARRY_BUFFERS" "On"
7. Referenced Documents
1. “WYSIWYG Device Primitives User Guide For Stratix.”
6. “Scripting with Tcl in the Quartus II Software.”, Altera Application Note #312, available at:
http://www.altera.com/literature/an/an312.pdf
7. “Command Line Scripting in the Quartus II Software.”, Altera Application Note #309,
available at: http://www.altera.com/literature/an/an309.pdf
Copyright © 2003 Altera Corporation. All rights reserved. Altera, The Programmable Solutions Company, the stylized
Altera logo, specific device designations, and all other words and logos that are identified as trademarks and/or service
marks are, unless noted otherwise, the trademarks and service marks of Altera Corporation in the U.S. and other
countries. All other product or service names are the property of their respective holders. Altera products are protected
under numerous U.S. and foreign patents and pending applications, mask work rights, and copyrights. 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 Corporation. 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.
This document is being provided on an "as-is" basis and as an accommodation and therefore all warranties,
representations or guarantees of any kind (whether express, implied or statutory) including, without limitation, warranties
of merchantability, non-infringement, or fitness for a particular purpose, are specifically disclaimed.