没有合适的资源?快使用搜索试试~ 我知道了~
command-line scripting for Quartus II,Ver9.1
需积分: 20 1 下载量 155 浏览量
2012-08-20
20:26:33
上传
评论
收藏 328KB PDF 举报
温馨提示
试读
26页
QuartusII的命令行脚本介绍,命令行用熟了,效率还是高,可移植性也强,建议看看。
资源推荐
资源详情
资源评论
© November 2009 Altera Corporation Quartus II Handbook Version 9.1 Volume 2: Design Implementation and Optimization
2. Command-Line Scripting
Introduction
FPGA design software that easily integrates into your design flow saves time and
improves productivity. The Altera
®
Quartus
®
II software provides you with a
command-line executable for each step of the FPGA 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
■ Easy integration with scripted design flows including makefiles
■ Reduced memory requirements
■ Improved performance
The command-line executables are also completely compatible with the Quartus II
GUI, allowing you to use the exact combination of tools that you prefer.
This chapter describes how to take advantage of Quartus II command-line
executables, and provides several examples of scripts that automate different
segments of the FPGA design flow, including the following topics:
■ “The Benefits of Command-Line Executables”
■ “Introductory Example” on page 2–2
■ “Command-Line Executables” on page 2–3
■ “Design Flow” on page 2–9
■ “The MegaWizard Plug-In Manager” on page 2–13
■ “Command-Line Scripting Examples” on page 2–19
The Benefits of Command-Line Executables
The Quartus II command-line executables provide command-line control over each
step of the design flow. Each executable includes options to control commonly used
software settings. Each executable also provides detailed, built-in help describing its
function, available options, and settings.
Command-line executables allow for easy integration with scripted design flows. You
can easily create scripts in any language with a series of commands. These scripts can
be batch-processed, allowing for integration with distributed computing in server
farms. You can also integrate the Quartus II command-line executables in
makefile-based design flows. These features enhance the ease of integration between
the Quartus II software and other EDA synthesis, simulation, and verification
software.
QII52002-9.1.0
2–2 Chapter 2: Command-Line Scripting
Introductory Example
Quartus II Handbook Version 9.1 Volume 2: Design Implementation and Optimization © November 2009 Altera Corporation
Command-line executables add integration and scripting flexibility without
sacrificing the ease-of-use of the Quartus II GUI. You can use the Quartus II GUI and
command-line executables at different stages in the design flow. For example, you
might use the Quartus II GUI to edit the floorplan for the design, use the
command-line executables to perform place-and-route, and return to the Quartus II
GUI to perform debugging with the Chip Editor.
Command-line executables reduce the amount of memory required during each step
in the design flow. Because each executable targets only one step in the design flow, it
is relatively compact, both in file size and the amount of memory used when running.
This memory reduction improves performance, and is particularly beneficial in
design environments where computer networks or workstations are heavily used
with reduced memory.
Introductory Example
The following introduction to design flow with command-line executables shows
how to create a project, fit the design, perform timing analysis, and generate
programming files.
The tutorial design included with the Quartus II software is used to demonstrate this
functionality. If installed, the tutorial design is found in the
<Quartus II irectory>/qdesigns/fir_filter directory.
Before making changes, copy the tutorial directory and type the four commands
shown in Example 2–1 at a command prompt in the new project directory:
1 The <Quartus II directory>/quartus/bin directory must be in your PATH environment
variable.
The quartus_map filtref --source=filtref.bdf --family=CYCLONE
command creates a new Quartus II project called filtref with filtref.bdf as the
top-level file. It targets the Cyclone
®
device family and performs logic synthesis and
technology mapping on the design files.
The quartus_fit filtref --part=EP1C12Q240C6 --fmax=80MHz
--tsu=8ns command performs fitting on the filtref project. This command specifies
an EP1C12Q240C6 device and the Fitter attempts to meet a global f
MAX
requirement of
80 MHz and a global t
SU
requirement of 8 ns.
The quartus_asm filtref command creates programming files for the filtref
project.
The quartus_tan filtref command performs timing analysis on the filtref
project using the Quartus II Classic Timing Analyzer, to determine whether the design
meets the timing requirements that were specified to the quartus_fit executable.
Example 2–1. Introductory Example
quartus_map filtref --source=filtref.bdf --family=CYCLONE r
quartus_fit filtref --part=EP1C12F256C6 --fmax=80MHz --tsu=8ns r
quartus_asm filtref r
quartus_tan filtref r
Chapter 2: Command-Line Scripting 2–3
Command-Line Executables
© November 2009 Altera Corporation Quartus II Handbook Version 9.1 Volume 2: Design Implementation and Optimization
You can put the four commands from Example 2–1 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 Example 2–2.
Edit the script as necessary and compile your project.
Command-Line Executables
Table 2–1 lists the command-line executables and their respective descriptions.
Example 2–2. UNIX Shell Script: compile.sh
#!/bin/sh
PROJECT=filtref
TOP_LEVEL_FILE=filtref.bdf
FAMILY=Cyclone
PART=EP1C12F256C6
FMAX=80MHz
--TSU=8ns
quartus_map $PROJECT --source=$TOP_LEVEL_FILE --family=$FAMILY
quartus_fit $PROJECT --part=$PART --fmax=$FMAX --tsu=$TSU
quartus_asm $PROJECT
quartus_tan $PROJECT
Table 2–1. Quartus II Command-Line Executables and Descriptions (Part 1 of 3)
Executable Description
Analysis and Synthesis
quartus_map
Quartus II Analysis and 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 technology mapping to implement the design logic using
device resources such as logic elements.
Fitter
quartus_fit
The Quartus II Fitter performs place-and-route by fitting the logic of a design into a device.
The Fitter selects appropriate interconnection paths, pin assignments, and logic cell
assignments.
Analysis and Synthesis must be run successfully before running the Fitter.
Assembler
quartus_asm
The Quartus II Assembler generates a device programming image, in the form of one or
more of the following from a successful fit (that is, place-and-route).
■ Programmer Object Files (.pof)
■ SRAM Object Files (.sof)
■ Hexadecimal (Intel-Format) Output Files (.hexout)
■ Tabular Text Fi les ( .ttf)
■ Raw Binary Files (.rbf)
The .pof and .sof files are then processed by the Quartus II Programmer and downloaded to
the device with the MasterBlaster
TM
or the ByteBlaster
TM
II download cable, or the Altera
Programming Unit (APU). The .hexout files, .ttf files, and .rbf files are used by other
programming hardware manufacturers that provide support for Altera devices.
The Fitter must be run successfully before running the Assembler.
2–4 Chapter 2: Command-Line Scripting
Command-Line Executables
Quartus II Handbook Version 9.1 Volume 2: Design Implementation and Optimization © November 2009 Altera Corporation
Classic Timing Analyzer
quartus_tan
The Quartus II Classic Timing Analyzer computes delays for the given design and device, and
annotates them on the netlist. Then, the Classic timing analyzer performs timing analysis,
allowing you to analyze the performance of all logic in your design. The quartus_tan
executable includes Tcl support.
Analysis and Synthesis or the Fitter must be run successfully before running the Classic
timing analyzer.
TimeQuest Timing Analyzer
quartus_sta
The Quartus II TimeQuest Timing Analyzer computes delays for the given design and device,
and annotates them on the netlist. Next, the TimeQuest timing analyzer performs timing
analysis, allowing you to analyze the performance of all logic in your design. The
quartus_sta executable includes Tcl support and SDC support.
Analysis and Synthesis or the Fitter must be run successfully before running the TimeQuest
timing analyzer.
Design Assistant
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. The Design Assistant supports designs that
target any Altera device supported by the Quartus II software, except MAX
®
3000 and
MAX 7000 devices.
Analysis and Synthesis or the Fitter must be run successfully before running the Design
Assistant.
Compiler Database Interface
quartus_cdb
The Quartus II Compiler Database Interface generates incremental netlists for use with
LogicLock
TM
back-annotation, or back-annotates device and resource assignments to
preserve the fit for future compilations. The quartus_cdb executable includes Tcl
support.
Analysis and Synthesis must be run successfully before running the Compiler Database
Interface.
EDA Netlist Writer
quartus_eda
The Quartus II EDA Netlist Writer generates netlist and other output files for use with other
EDA tools.
Analysis and Synthesis, the Fitter, or Timing Analyzer must be run successfully before
running the EDA Netlist Writer, depending on the arguments used.
Simulator
quartus_sim
The Quartus II Simulator tests and debugs the logical operation and internal timing of the
design entities in a project. The Simulator can perform two types of simulation: functional
simulation and timing simulation. The quartus_sim executable includes Tcl support.
Quartus II Analysis and Synthesis must be run successfully before running a functional
simulation.
Timing analysis must be run successfully before running a timing simulation.
Power Analyzer
quartus_pow
The Quartus II PowerPlay Power Analyzer estimates the thermal dynamic power and the
thermal static power consumed by the design. For newer families such as Stratix
®
II and
MAX II, the power drawn from each power supply is also estimated.
Analysis and Synthesis or the Fitter must be run successfully before running the PowerPlay
Power Analyzer.
Table 2–1. Quartus II Command-Line Executables and Descriptions (Part 2 of 3)
Executable Description
Chapter 2: Command-Line Scripting 2–5
Command-Line Executables
© November 2009 Altera Corporation Quartus II Handbook Version 9.1 Volume 2: Design Implementation and Optimization
Command-Line Scripting Help
Help on command-line executables is available through different methods. You can
access help built in to the executables with command-line options. You can use the
Quartus II Command-Line and Tcl API Help browser for an easy graphical view of
the help information. Additionally, you can refer to the Quartus II Scripting Reference
Manual on the Quartus II literature page of the Altera website, which has the same
information in PDF format.
To use the Quartus II Command-Line and Tcl API Help browser, type the following:
quartus_sh --qhelp r
This command starts the Quartus II Command-Line and Tcl API Help browser, a
viewer for information about the Quartus II Command-Line executables and Tcl API
(Figure 2–1).
Use the -h option with any of the Quartus II Command-Line executables to get a
description and list of supported options. Use the --help=<option name> option for
detailed information about each option.
Programmer
quartus_pgm
The Quartus II Programmer programs Altera devices. The Programmer uses one of the
supported file formats:
■ .pof
■ .sof
■ Jam File (.jam)
■ Jam Byte-Code File (.jbc)
Make sure you specify a valid programming mode, programming cable, and operation for a
specified device.
Convert Programming File
quartus_cpf
The Quartus II Convert Programming File module converts one programing file format to a
different possible format.
Make sure you specify valid options and an input programming file to generate the new
requested programming file format.
Quartus Shell
quartus_sh
The Quartus II Shell acts as a simple Quartus II Tcl interpreter. The Shell has a smaller
memory footprint than the other command-line executables that support Tcl. The Shell may
be started as an interactive Tcl interpreter (shell), used to run a Tcl script, or used as a quick
Tcl command evaluator, evaluating the remaining command-line arguments as one or more
Tcl commands.
Quartus JAM STAPL Player
quartus_jli
The Quartus II JAM™ STAPL Player reads and executes .jam files in the STAPL format. A
single Jam file can perform several functions, such as programming, configuring, verifying,
erasing, and blank-checking a programmable device.
Quartus JAM Compiler
quartus_jbcc
The Quartus II JAM Compiler converts .jam files to .jbc files which store data for
programming, configuring, verifying, and blank-checking one or more devices in a JTAG
chain.
TimeQuest Timing Analyzer
GUI
quartus_staw
This executable opens the Quartus II TimeQuest timing analyzer GUI. This is helpful because
you do not have to open the entire Quartus II GUI for certain operations.
Programmer GUI
quartus_pgmw
This executable opens up the programmer—a GUI to the quartus_pgm executable. This
is helpful because users do not have to open the entire Quartus II GUI for certain operations
Table 2–1. Quartus II Command-Line Executables and Descriptions (Part 3 of 3)
Executable Description
剩余25页未读,继续阅读
资源评论
da895
- 粉丝: 32
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功