Run Quartus II fitter and TimeQuest Timing Analyzer automatically using Tcl script
This is a Quartus II Tcl script that will automate the fitter and TimeQuest Timing Analyzer automatically sequentially. By default in Quartus II, the tasks flow customization does not allow running fitter first without running elaboration and synthesis first. This is one of the pre-requisites Altera enforce on the tasks flow. Some times when optimizing a FPGA design by playing around the fitter settings, you will just need to rerun fitter and TimeQuest to get the timing analysis results of the fitter settings change.
This script is intended to be use as the script file argument for the "quartus_sh" command line.
This script is intended to be use as the script file argument for the "quartus_sh" command line.
Steps
- Copy and paste the Tcl code example into a text editor.
- Change the "top" design name according to the Quartus II design name.
- Save the text file as Tcl script with ".tcl" as extension.
Example Tcl codes
load_package flow
load_package report
set project_name top
set project_revision top
project_open -revision $project_revision $project_name
# Place & Route
if {[catch {execute_module -tool fit} result]} {
puts "\nResult: $result\n"
puts "ERROR: Quartus II Fitter failed. See the report file.\n"
qexit -error
} else {
puts "\nInfo: Quartus II Fitter was successful.\n"
}
# TimeQuest Timing Analyzer
if {[catch {execute_module -tool sta} result]} {
puts "\nResult: $result\n"
puts "ERROR: TimeQuest Analyzer failed. See the report file.\n"
qexit -error
} else {
puts "\nInfo: TimeQuest Analyzer was successful.\n"
}
project_close
Command line usage
quartus_sh -t script.tcl
Comments
Post a Comment