Example – Altera Quartus II Scripting User Manual

Page 230

Advertising
background image

3–100

Chapter 3: Tcl Packages & Commands

flow

Quartus II Scripting Reference Manual

© July 2013

Altera Corporation

INCREMENTAL_COMPILATION_EXPORT_NETLIST_TYPE global assignment (which can either have
value POST_SYNTH or POST_FIT) determines whether post-synthesis or post-fitting results should be
exported. Finally, the value of the INCREMENTAL_COMPILATION_EXPORT_ROUTING global
assignment specifies whether routing should be exported when a post-fit netlist is generated.

The "-incremental_compilation_import" option uses the following partition assignments to determine the
location of the QXP files, and how importation should be performed, on a per-partition basis:

PARTITION_IMPORT_FILE PARTITION_IMPORT_PROMOTE_ASSIGNMENTS
PARTITION_IMPORT_NEW_ASSIGNMENTS PARTITION_IMPORT_EXISTING_ASSIGNMENTS
PARTITION_IMPORT_EXISTING_LOGICLOCK_REGIONS

The "-vqm_writer" option uses the value of the LOGICLOCK_INCREMENTAL_COMPILE_FILE
assignment for the VQM output directory, defaulting to "atom_netlists".

All assignments are exported first automatically, as if you called the "export_assignments" command first,
unless the -dont_export_assignments option is specified.

You must use the Tcl command "catch" to determine whether the predefined flow ran successfully or not,
as in the following example:

if {[catch {execute_flow -compile} result]} {

puts "\nResult: $result\n"
puts "ERROR: Compilation failed. See report files.\n"

} else {

puts "\nINFO: Compilation was successful.\n"

}

Example

# To run quartus_map, quartus_fit, quartus_tan, quartus_asm
# or other executables based on options. (Refer to "Using
# Compilation Flows," "Compiling Designs," and "Specifying
# Compiler Settings" in Quartus(R) II online Help for more
# information.)
execute_flow -compile

# To determine if compilation was successful or not
# and print out a personalized message.
if {[catch {execute_flow -compile} result]} {

puts "\nResult: $result\n"
puts "ERROR: Compilation failed. See report files.\n"

} else {

puts "\nINFO: Compilation was successful.\n"

}

# To perform a full compilation followed by a simulation
execute_flow -compile_and_simulate

Advertising