Altera Home Page
Literature Licensing
Buy On-Line Download

  Home   |   Products   |   Support   |   End Markets   |   Technology Center   |   Education & Events   |   Corporate   |   Buy On-Line  
  Knowledge Database   |   Devices   |   Design Software   |   Intellectual Property   |   Reference Designs   |   Design Examples   |   mySupport  

 Products
   Quartus II
      SOPC Builder
      MAX+PLUS II
      ModelSim-Altera
  
 Resource Centers
      Overview
      Installation & Licensing
      Scripting
      Board Design & I/O
      Design Entry & Planning
      Synthesis & Netlist Viewers
      Incremental Compilation
      Optimization
      Power Management
   TimeQuest Timing Analyzer
      Classic Timing Analyzer
      Simulation & Verification
      On-Chip Debugging
      HardCopy Design
  
 Software Resources
      OS Support
      Driver Installation
  
 Download & Licensing
      Download
   Licensing
  
 Quartus II EDA Support
      Quartus II Interface
   Synthesis Tools
   Simulation Tools
   Formal Verification Tools
   Timing Analysis Tools
   Physical Synthesis Tools
   Board Level Tools
  
 Legacy Sw. EDA Support
      View by Vendor
      View by Tool
      View by Function
  

Quartus II Scripting Support

Quartus® II software includes comprehensive scripting support for command-line and tool command language (Tcl) script design flows. Separate executables for each stage of the Quartus II design flow (synthesis, fitting, and timing analysis, for example) include options for making common settings and performing common tasks. The Tcl scripting application program interface (API) includes commands covering basic to advanced functionality. The Quartus II Scripting Reference Manual (PDF) provides a complete reference covering all command-line options and Tcl commands. The Quartus II Settings File Reference Manual (PDF) lists and describes all QSF settings.

Command-Line Scripting

You can use Quartus II command-line executables in batch files, shell scripts, makefiles, and other scripts. For instance, use the following command to compile an existing project:

quartus_sh --flow compile <project name>

For more information about command-line scripting, refer to the Command Line Scripting (PDF) chapter in Volume 2 of the Quartus II Development Software Handbook.

You can also use the Quartus II Command-Line and Tcl API Help Utility for a complete list of supported options, descriptions, and examples. Run it by typing the following at a command prompt:

quartus_sh --qhelp

Tcl Scripting

Use the Quartus II Tcl API for any of the following tasks:

  • Create and manage projects
  • Make assignments
  • Compile designs
  • Extract report data
  • Perform timing analysis

For example, the following Tcl script uses design files for the fir_filter tutorial design in the <qdesigns>/tutorial directory. It creates a project, makes pin, clock, and timing assignments, and compiles the design.

load_package flow
project_new fir_filter -revision filtref -overwrite
set_global_assignment -name FAMILY Cyclone
set_global_assignment -name DEVICE EP1C6F256C6
set_global_assignment -name BDF_FILE filtref.bdf
set_global_assignment -name TOP_LEVEL_ENTITY filtref

# You could make other pin assignments here
set_location_assignment -to clk Pin_G1
create_base_clock -fmax "100 MHz" -target clk clocka
create_relative_clock -base_clock clocka -divide 2 \
  -offset "500 ps" -target clkx2 clockb
set_multicycle_assignment -from clk -to clkx2 2
execute_flow -compile

project_close

For more information about Tcl scripting, refer to the Tcl Scripting (PDF) chapter in Volume 2 of the Quartus II Development Software Handbook.

You can also use the Quartus II Command-Line and Tcl API Help Utility for a complete list of Tcl API commands, descriptions, and examples. Run it by typing the following at a command prompt:

quartus_sh --qhelp

Scripting Design Examples

Altera provides Tcl design examples you can learn from, modify, and use in your own designs.

Scripting Training

View online training presentations to get up to speed on scripting in the Quartus II software.

 
Basic Quartus II Software Tcl Scripting Part 1 of 2

Basic Quartus II Software Tcl Scripting Part 2 of 2

  Please Give Us Feedback