0% found this document useful (0 votes)
19 views16 pages

An 309

Uploaded by

rangicut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views16 pages

An 309

Uploaded by

rangicut
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Command-Line Scripting in

the Quartus II Software

June 2003, ver. 1.0 Application Note 309

Introduction FPGA design software that is easy to integrate into a design flow saves
time and improves productivity. The Altera® Quartus II® software
provides designers modular executables for each step in an FPGA design
flow to make the design process customizable and flexible.

The benefits provided by modular executables include command-line


control over each step of the design flow, easy integration with scripted
design flows including Makefiles, reduced memory requirements, and
improved performance. The modular executables are also completely
compatibile with the Quartus II graphical user interface (GUI), allowing
you to use the exact combination of tools you prefer.

This application note describes how to take advantage of Quartus II


modular executables, and provides several examples of their use in
certain design situations.

The Benefits of The Quartus II modular executables reduce the amount of design system
memory required during any step in the design flow. Because it targets
Modular only one step in the design flow, each executable is relatively compact,
Executables both in terms of file size and the amount of memory used when running.
This improves performance for all designers and is particularly beneficial
in design enviroments with heavily-used computer networks or mature
workstations with low amounts of RAM.

The modular executables also provide command-line control over each


step of the design flow. Each modular executable has a variety of
command-line options to control commonly-used software settings.
Additionally, each modular executable provides detailed, built-in help
describing its function, available command-line options and settings.

Modular executables allow for easy integration with scripted design


flows. It is simple to create scripts in any language with a series of
modular executable commands. These scripts can be batch-processed,
allowing for integration with distributed computing in server farms. The
Quartus II modular executables can also be integrated in Makefile-based
design flows. All these features enhance the ease of integration between
the Quartus II software and other EDA synthesis, simulation, and
verification software.

Altera Corporation 1
AN-309-1.0 Preliminary
Command-Line Scripting in the Quartus II Software Introductory Example

Modular executables add integration and scripting flexibility for


designers who want it without sacrificing the ease-of-use of the
Quartus II GUI. You can seamlessly use the Quartus II GUI and modular
executables at different stages in the design flow. As an example, you
might use the Quartus II GUI to edit the floor plan for the design, use the
modular executables to perform place and route, and return to the
Quartus II GUI to perform debugging with the chip editor.

Introductory The following introduction to design flow with modular executables


shows how to create a project, fit the design, perform timing analysis, and
Example generate programming files.

The tutorial design included with the Quartus II software is used to


demonstrate this functionality. If installed, the tutorial design is found in
the <Quartus II directory>/qdesigns/tutorial directory.

Before making changes, copy the tutorial directory and type the following
four commands at a command prompt in the new project directory that
you have created.

1 The <quartus>/bin directory must be in your PATH environment


variable.

quartus_map filtref --source=filtref.bdf --family=APEX20KE


quartus_fit filtref --part=EP20K30EQC208-1 --fmax=80MHz --tsu=8ns
quartus_tan filtref
quartus_asm filtref

The quartus_map filtref --source=filtref.bdf


--family=APEX20KE command creates a new Quartus II project called
filtref with the filtref.bdf file as the top-level entity. It targets an
APEXTM 20KE device and performs logic synthesis and technology
mapping on the design files.

The quartus_fit filtref --part=EP20K30EQC208-1


--fmax=80MHz --tsu=8ns command performs fitting on the
filtref project. The command specifies an APEX 20KE
EP20K30EQC208-1 device and the fitter attempts to meet a global fMAX
requirement of 80 MHz and a global tSU requirement of 8 ns.

The quartus_tan filtref command performs timing analysis on the


filtref project to determine whether the design meets the timing
requirements that were specified by the quartus_fit command.

The quartus_asm filtref command creates programming files for


the filtref project.

2 Altera Corporation
Preliminary
Design Flow Command-Line Scripting in the Quartus II Software

These four commands can be stored in a batch file for use on PCs or a shell
script file for use on UNIX workstations.

Design Flow Figure 1 illustrates a typical design flow.

Figure 1. Typical Design Flow

Design Entry (TDF, BDF,


VQM, Verilog HDL, VHDL,
EDIF Netlist files)

Synthesis

Fitter

Timing Analysis

Netlist Writers Assembler Simulator

Programmer

Quartus II Shell
(quartus_sh)
VO, VHO files

Altera Corporation 3
Preliminary
Command-Line Scripting in the Quartus II Software Design Flow

Modular executables are provided for each stage in the design flow
shown in Figure 1. Additional modular executables are provided for
specific tasks. Table 1 lists each Quartus II modular executable and
provides a brief description of its function.

Table 1. Quartus II Modular Executables and Descriptions (Part 1 of 2)

Executable Description
quartus_map Quartus II Analysis & Synthesis builds a single project database that
integrates all the design files in a design entity or project hierarchy,
performs logic synthesis to minimize the logic of the design, and
performs analysis and synthesis on the logic in the design.
quartus_fit The Quartus II Fitter fits the logic of a design into a device. The Fitter
selects appropriate interconnection paths, pin assignments, and logic
cell assignments.
quartus_tan The Quartus II Timing Analyzer computes delays for the given design
and device and annotates them on the netlist for subsequent use by the
Simulator. Then, the Timing Analyzer performs timing analysis,
allowing you to analyze the performance of all logic in your design.
quartus_sim The Quartus II Simulator performs one of two types of simulation:
functional simulation or timing simulation. The Quartus II Simulator is a
powerful tool for testing and debugging the logical operation and
internal timing of the design entities in your project.
quartus_asm The Quartus II Assembler converts the Fitter's device, logic cell, and
pin assignments into a programming image for the device, in the form
of one or more Programmer Object Files (.pof), SRAM Object Files
(.sof), Hexadecimal (Intel-Format) Output Files (.hexout), Tabular Text
Files (.ttf), and Raw Binary Files (.rbf).
quartus_pgm The Quartus II Programmer programs the Altera provided devices. The
programmer will use one of the valid supported file format: SOF, POF,
jam, and JAM Byte-Code File (.jbc).
quartus_pgmw The Quartus II programmer GUI is a stand-alone application to
program Altera provided devices. The programmer will use one of the
valid supported file format: SOF, POF, JAM, JBC.
quartus_swb The Quartus II Software Builder creates object code from source files
to run on either the ARM-based Excalibur devices or the Nios
embedded processor.
quartus_drc The Quartus II Design Assistant checks the reliability of a design based
on a set of design rules. The Design Assistant is especially useful for
checking the reliability of a design before converting the design for
HardCopy devices.
quartus_cdb The Quartus II Compiler Database Interface generates and accesses
information on atoms. It can be used to back-annotate designs.
quartus_eda The Quartus II Netlist Writer generates output netlist files for use with
other EDA tools.

4 Altera Corporation
Preliminary
Design Flow Command-Line Scripting in the Quartus II Software

Table 1. Quartus II Modular Executables and Descriptions (Part 2 of 2)

Executable Description
quartus_cpf The Quartus II Convert Programming Files converts one programing
file format to a different possible format.
quartus_sh The Quartus II Shell is a simple Quartus II Tcl interpreter.The Shell may
be started with a Tcl script to evaluate, as an interactive Tcl interpreter
(shell), or as a quick Tcl command evaluator, evaluating the remaining
command-line arguments as one or more Tcl commands.

Text-based Report Files


Each modular executable creates a text-format report file when run. These
files report success or failure, and contain information on the processing
performed by the modular executable.

Report file names are drawn from compiler setting names and the part of
the name of the modular executable that generated the report file. The
report file name format is <compiler setting name>.<modular executable
part>.rpt. For example, using the quartus_fit modular executable to
place-and-route a project with the compiler setting name design_top
will generate a report file named design_top.fit.rpt. Likewise, using the
quartus_tan modular executable to perform timing analysis reporting
on a project with the compiler setting name fir_filter will generate a
report file named fir_filter.tan.rpt.

As an alternative to parsing text-based report files, designers may use the


Tcl scripting package called ::quartus::report. For more
information on this package, see “More Help with Quartus II Modular
Executables” on page 16.

Compilation with quartus_sh --flow


Use the quartus_sh executable with the --flow option to perform a
complete compilation flow with a single command. (For information on
specialized flows, type quartus_sh --help=flow at a command
prompt.) The --flow option supports the smart recompile feature, and
efficiently sets command-line arguments for each executable in the flow.

1 If you used the quartus_cmd command to perform command-


line compilations in earlier versions of the Quartus II software,
Altera recommends you use the quartus_sh --flow option
in the Quartus II software version 3.0.

The following example starts compilation—to include timing analysis


and programming file generation—with a single command.

Altera Corporation 5
Preliminary
Command-Line Scripting in the Quartus II Software Command-Line Scripting Help

quartus_sh -flow compile fir_filter -c filtref

Command-Line Complete help information is integrated with each modular executable.


For more information about the modular executable command-line
Scripting Help options, use the help information integrated with the modular
executables. Access help for a modular executable using the -h
command-line option. For example, to view help for the quartus_map
modular executable, run the command quartus_map -h. The following
is the result of running quartus_map -h:

C:\>quartus_map -h
Quartus II Analysis & Synthesis
Version 3.0 Internal Build 180 05/15/2003 SJ Full Version
Copyright (C) 1991-2003 Altera Corporation

Usage:
------

quartus_map [-h | --help[=<option|topic>] | -v]


quartus_map <project name> [<options>]

Description:
------------

Quartus(R) II Analysis & Synthesis builds a single project


database that integrates all the design files in a design
entity or project hierarchy, performs logic synthesis to
minimize the logic of the design, and performs analysis and
synthesis on the logic in the design.

Options:
--------

-f <argument file>
-c <.csf file> | --csf=<.csf file>
-l <path1;path2;...;pathN> | --lib_path=<path1;path2;...;pathN>
--lower_priority
--optimize=<area|speed>
--family=<device family>
--part=<device part>
--state_machine_encoding=<auto|minimal_bits|one_hot|user_encoded>
--enable_register_retiming[=on|off]
--enable_wysiwyg_resynthesis[=on|off]
--ignore_carry_buffers[=on|off]
--ignore_cascade_buffers[=on|off]
--analyze_project
--analyze_file=<design file>
--generate_symbol=<design file>
--generate_inc_file=<design file>
--convert_bdf_to_verilog=<.bdf file>
--convert_bdf_to_vhdl=<.bdf file>
--export_settings_files[=on|off]
--generate_sim_netlist[=on|off]
--source=<source file>
--update_wysiwyg_parameters

6 Altera Corporation
Preliminary
Command-Line Option Details Command-Line Scripting in the Quartus II Software

Help Topics:
------------

arguments

For more information on specific options, use --help=<option|topic>.

Detailed help about a particular command-line option is also available.


For example, to view detailed help about the --optimize command-
line option, run quartus_map --help=optimize. The following is the
result of running quartus_map --help=optimize:

C:\>quartus_map --help=optimize

Option: --optimize=<area|speed>

Directs Analysis & Synthesis to use the Optimization Technique


logic option that specifies the overall goal for logic
optimization, that is, whether to attempt to achieve maximum speed
performance or minimum area usage during compilation.

You can select one of the following settings:

"Area" : Makes the design as small as possible in order to


minimize resource usage.

"Speed" : Chooses a design implementation that has the fastest


fmax.

1 Help on Quartus II modular executables is also available by


typing quartus_sh --qhelp.For more informaion see
“More Help with Quartus II Modular Executables” on page 16.

Command-Line Command-line options are provided for making many common global
project settings and performing common tasks. You can use either of two
Option Details methods to make assignments to an individual entity. If the project exists,
open the project in the Quartus II GUI, change the assignment, and close
the project. The changed assignment is updated in the Quartus II project
files. Any modular executables that are run after this will use the updated
assignment. See “Command-Line Option Precedence” on page 7 for more
information. You can also make assignments using the Quartus II Tcl
scripting API. If you want to completely script the creation of a Quartus II
project you should choose this method.

Command-Line Option Precedence


Designers using the modular executables need to be aware of the
precedence of various project assignments and how to control the
precedence. Assignments for a particular project exist in Quartus II

Altera Corporation 7
Preliminary
Command-Line Scripting in the Quartus II Software Command-Line Option Details

project Files (.quartus), Compiler Settings Files (.csf), Entity Settings Files
(.esf), and Project Settings Files (.psf). Assignments for a particular
project can also be made by using command-line options, as described
earlier in this document. Project assignments are reflected in compiler
database files that hold intermediate compilation results and reflect
assignments made in the previous project compilation.

All command-line options override any conflicting assignments found in


either the Quartus II project files or the compiler database files. There are
two command-line options to specify whether Quartus II project files or
compiler database files take precedence for any assignments not specified
as command-line options.

1 Any assignment not specified as a command-line option or


found in the Quartus II project files or compiler database files
will be set to its default value.

The file precedence command-line options are


--import_settings_files and --export_settings_files. By
default, the --import_settings_files and
--export_settings_files options are enabled. Enabling
--import_settings_files causes a modular executable to read
assignments from Quartus II project files instead of the compiler database
files, as happens when opening a project in the Quartus II GUI. Enabling
the --export_settings_files option causes a modular executable
to update the Quartus II project files to reflect any specified command-
line options, as happens when closing a project in the Quartus II GUI.

Table 2 lists the precedence for reading assignments depending on the


value of the --import_settings option.

Table 2. Precedence for Reading Assignments

Option Specified Precedence for Reading Assignments


--import_settings_files=on 1. Command-line options
(Default) 2. Quartus II Project files (QUARTUS, CSF, ESF, PSF)
3. Project database (db directory, if it exists)
4. Quartus II software defaults
--import_settings_files=off 1. Command-line options
2. Project database (db directory, if it exists)
3. Quartus II software defaults

8 Altera Corporation
Preliminary
Command-Line Option Details Command-Line Scripting in the Quartus II Software

Table 3 lists the locations to which assignments are written depending on


the value of the --export_settings option.

Table 3. Location for Writing Assignments

Option Specified Location for Writing Assingments


--export_settings_files=on (Default) Quartus II Project files (QUARTUS, CSF, ESF, PSF)
and compiler database
--export_settings_files=off Compiler database

The following example assumes a project named fir_filter exists,


and that the analysis and synthesis step has been performed (using the
quartus_map command).

quartus_fit fir_filter --fmax=80MHz


quartus_tan fir_filter
quartus_tan fir_filter --fmax=100MHz --tao=timing_result-100.tao
--export_settings_files=off

The first command, quartus_fit fir_filter --fmax=80MHz, runs


the Quartus II fitter with the quartus_fit modular executable and
specifies a global fMAX requirement of 80 MHz.

The second command, quartus_tan fir_filter, runs Quartus II


timing analysis for the results of the previous fit.

The third command reruns Quartus II timing analysis with a global fMAX
requirement of 100 MHz and saves the result in a file called
timing_result-100.tao. By specifying the
--export_settings_files=off command-line option, the modular
executable does not update the Quartus II project files to reflect the
different fMAX requirement. The compiler database files reflect the
changed fMAX requirement. If the --export_settings_files=off
command-line option had not been specified, the modular executable
would have updated the Quartus II project files to reflect the 100 MHz
global fMAX requirement.

Designers should use the --import_settings_files=off and


--export_settings_files=off (where appropriate) to optimize the
way that Quartus II software reads and updates settings files. The
following example shows how to avoid unnecessary importing and
exporting.

quartus_map filtref --source=filtref --part=ep1s10f780c5


quartus_fit filtref --fmax=100MHz --import_settings_files=off
quartus_tan filtref --import=off --export_settings_files=off
quartus_asm filtref --import=off --export_settings_files=off

Altera Corporation 9
Preliminary
Command-Line Scripting in the Quartus II Software Command-Line Scripting Examples

The quartus_tan and quartus_asm commands do not need to import


or export settings files because they do not change any settings in the
project.

Command-Line This section of the application note presents various examples of


command-line executable use.
Scripting
Examples Perform a Syntax Check on Project Design Files
This shell script example assumes that the Quartus II software tutorial
project called fir_filter exists in the current directory defined in a file
called fir_filter.quartus. (This project exists in the <Quartus II
directory>/qdesigns directory unless the Quartus II software tutorial files
have not been installed.) Because the top level entity in the project does
not have the same name as the project, it is necessary to specify the
compiler settings file for the top level entity with the -c or --csf
command-line option. The --analyze_file command-line option
specifies each file to perform a syntax check on. The script checks the exit
code of the quartus_map executable to determine whether there was an
error during the syntax check. Files with syntax errors are added to the
FILES_WITH_ERRORS variable, and when all files have been checked for
syntax, the script prints a string indicating whether there were any syntax
errors. Any command-line options that are not specified default to the
values from the project database. If they are not specified there, they
default to the Quartus II software default values. For example, the
fir_filter project is set to target the APEX 20KE device family, so it is not
necessary to specify the --family command-line option.

This shell script is specifically designed for use on UNIX systems


employing the sh shell.

#!/bin/sh
FILES_WITH_ERRORS=""
# Iterate over each file with a .bdf or .v extension
for filename in `ls *.bdf *.v`
do
# Perform a syntax check on the specified file
quartus_map fir_filter --csf=filtref --analyze_file=$filename
# If the exit code is non-zero, the file has a syntax error
if [ $? -ne 0 ]
then
FILES_WITH_ERRORS="$FILES_WITH_ERRORS $filename"
fi
done

if [ -z "$FILES_WITH_ERRORS" ]
then
echo "All files passed the syntax check"
exit 0
else

10 Altera Corporation
Preliminary
Command-Line Scripting Examples Command-Line Scripting in the Quartus II Software

echo "There were syntax errors in the following file(s)"


echo $FILES_WITH_ERRORS
exit 1
fi

Create a Project and Synthesize a Netlist Using Netlist


Optimizations
This example creates a new Quartus II project with a file top.edf as the
top-level entity. The --enable_retiming=on and
--enable_unmapping=on command-line options allow the technology
mapper to optimize the design using gate-level register retiming and
technology remapping.

f For more details about register retiming, technology remapping, and


other netlist optimization options, consult the Quartus II Help.

The --part command-line option forces the technology mapper to


target an EP20K600EBC652-1X device. To create the project and
synthesize it using the netlist optimizations described above, type the
following command:

quartus_map top --source=top.edf --enable_retiming=on


--enable_unmapping=on --part=EP20K600EBC652-1X

Attempt to Fit a Design as Quickly as Possible


This example assumes a project called top (defined in a file called
top.quartus) exists in the current directory, and that the name of the top
level entity is top. The --fast_fit=on command-line option forces the
fitter to use the fast fit algorithm to increase compilation speed, possibly
at the expense of reduced fMAX performance. The
--one_fit_attempt=on command-line option restricts the fitter to
only one fitting attempt for the design.

To attempt to fit the project called top as quickly as possible, type the
following command:

quartus_fit top --fast_fit=on --one_fit_attempt=on

Fit a Design Using Multiple Seeds


This shell script example assumes the Quartus II software tutorial project
called fir_filter exists in the current directory (defined in a file called
fir_filter.quartus. If the tutorial files are installed on your system, this
project exists in the <Quartus II directory>/qdesigns directory. Because the
top level entity in the project does not have the same name as the project,

Altera Corporation 11
Preliminary
Command-Line Scripting in the Quartus II Software Command-Line Scripting Examples

you must specify the compiler settings file for the top level entity with the
--csf command-line option. The --seed command-line option specifies
the seeds to use for fitting.

A seed is a parameter that affects the random initial placement of the


quuartus II fitter. Varying the seed can result in better performace for
some designs.

After each fit, the script creates new directories for the results of each fit
and copies the complete project to the new directory so that the results are
available for viewing and debugging after the script has completed.

This shell script is specifically designed for use on UNIX systems


employing the sh shell.

#/bin/sh
ERROR_SEEDS=""
quartus_map fir_filter
# 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 --csf=filtref --seed=$seed
# 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

Use the design space explorer (by typing quartus_sh --dse) included
with the Quartus II software to improve design perfomance by
performing automated seed sweeping. For more information on the
design space explorer type quartus_sh --help=dse at the command
prompt or see AN 198: Timing Closure with the Quartus II Software.

12 Altera Corporation
Preliminary
Command-Line Scripting Examples Command-Line Scripting in the Quartus II Software

Makefile Implementation
You can also use the Quartus II modular executables in conjunction with
the make utility to automatically update files when other files they
depend on change. The file dependencies and commands used to update
files are specified in a text file called a Makefile. The following example is
one way of implementing a makefile with modular executables.

################################################################
# Project Configuration:
#
# Specify the name of the design (project) and compiler setting
# (csf) and the list of source files used.
################################################################

PROJECT = chiptrip
SOURCE_FILES = auto_max.v chiptrip.v speed_ch.v tick_cnt.v
time_cnt.v
ASSIGNMENT_FILES = chiptrip.quartus chiptrip.psf chiptrip.csf

################################################################
# Main Targets
#
# all: build everything
# clean: remove output files and database
# clean_all: removes settings files as well as clean.
################################################################

all: smart.log $(PROJECT).asm.rpt $(PROJECT).tan.rpt

clean:
rm -rf *.rpt *.chg smart.log *.htm *.eqn *.pin *.sof *.pof db
clean_all: clean
rm -rf *.ssf *.csf *.esf *.fsf *.psf *.quartus *.qws

map: smart.log $(PROJECT).map.rpt


fit: smart.log $(PROJECT).fit.rpt
asm: smart.log $(PROJECT).asm.rpt
tan: smart.log $(PROJECT).tan.rpt
smart: smart.log

################################################################
# Executable Configuration
################################################################

MAP_ARGS = --family=Stratix
FIT_ARGS = --part=EP1S20F484C6
ASM_ARGS =
TAN_ARGS =

################################################################
# Target implementations
################################################################

STAMP = echo done >

Altera Corporation 13
Preliminary
Command-Line Scripting in the Quartus II Software Command-Line Scripting Examples

$(PROJECT).map.rpt: map.chg $(SOURCE_FILES)


quartus_map $(MAP_ARGS) $(PROJECT)
$(STAMP) fit.chg

$(PROJECT).fit.rpt: fit.chg $(PROJECT).map.rpt


quartus_fit $(FIT_ARGS) $(PROJECT)
$(STAMP) asm.chg
$(STAMP) tan.chg

$(PROJECT).asm.rpt: asm.chg $(PROJECT).fit.rpt


quartus_asm $(ASM_ARGS) $(PROJECT)

$(PROJECT).tan.rpt: tan.chg $(PROJECT).fit.rpt


quartus_tan $(TAN_ARGS) $(PROJECT)

smart.log: $(ASSIGNMENT_FILES)
quartus_sh --determine_smart_action $(PROJECT) > smart.log

################################################################
# Project initialization
################################################################

$(ASSIGNMENT_FILES):
quartus_sh --tcl_eval project_new $(PROJECT) -overwrite

map.chg:
$(STAMP) map.chg
fit.chg:
$(STAMP) fit.chg
tan.chg:
$(STAMP) tan.chg
asm.chg:
$(STAMP) asm.chg

A Tcl script is provided with the Quartus II software to create or modify


files which can be specified as dependencies in the make rules, assisting
designers in Makefile development. Complete information about this Tcl
script and how to integrate it with Makefiles is available by running the
command quartus_sh --help=determine_smart_action.

The QFlow Script


A Tcl/Tk-based graphical interface called QFlow is included with the
modular executables. Designers can use QFlow to open projects, launch
some of the modular executables, view report files, and make some global
project assignments. The QFlow interface can run the following modular
executables:

■ quartus_map (Analysis & Synthesis)


■ quartus_fit (Fitter)
■ quartus_tan (Timing Analysis)
■ quartus_asm (Assembler)
■ quartus_eda (EDA Netlist Writer)

14 Altera Corporation
Preliminary
Command-Line Scripting Examples Command-Line Scripting in the Quartus II Software

To view floorplans or perform other GUI-intensive tasks, designers


should launch the Quartus II GUI.

Start QFlow with the following command: quartus_sh -g. Figure 2


shows the QFlow GUI.

Figure 2. QFlow GUI

1 The QFlow script is located at <Quartus II installation


Directory>/tcl_scripts/qflow/ directory

The qcmd Script


Altera provides a Perl script, qcmd, which can also be used to perform
command-line compilations. The script displays help information when
run without any options or arguments. The qcmd.pl script can
automatically determine which commands need to be run for a
compilation, and it uses the --import_settings_files and
--export_settings_files command-line options efficiently. The
qcmd script is located in the <Quartus II installation directory>\bin
directory on PCs, and in the <Quartus II installation directory>/<platform>
directory on UNIX and Linux workstations.

Altera Corporation 15
Preliminary
More Help with Quartus II Modular Executables Command-Line Scripting in the Quartus II Software

More Help with More information on modular executable use and the Quartus II Tcl API
is available by typing quartus_sh --qhelp. This command starts the
Quartus II Quartus II Command Line and Tcl API Help GUI, a browser for
Modular information on the Quartus II modular executables and Tcl API
(Figure 3).
Executables
Figure 3. Quartus II Command Line and Tcl API Help

Click items under Help Topics to get more information on the topics
listed.

Conclusion Quartus II command-line scripting provides important benefits to


designers, including increased flexibility and easy integration with other
EDA software in FPGA design flows. They reduce memory usage,
improve performance, and bring true command-line control to all stages
of FPGA design.

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 re-
spective holders. Altera products are protected under numerous U.S. and foreign patents and pending
101 Innovation Drive applications, maskwork rights, and copyrights. Altera warrants performance of its semiconductor products
San Jose, CA 95134 to current specifications in accordance with Altera's standard warranty, but reserves the right to make chang-
(408) 544-7000 es 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
www.altera.com herein except as expressly agreed to in writing by Altera Corporation. Altera customers
Applications Hotline: are advised to obtain the latest version of device specifications before relying on any pub-
(800) 800-EPLD lished information and before placing orders for products or services.

Literature Services:
Printed on recycled paper
lit_req@altera.com

Altera Corporation 16
Preliminary

You might also like