Intel® Quartus® Prime Standard Edition User Guide: Scripting

ID 683325
Date 9/24/2018
Document Table of Contents

1.4.1. Option Precedence

Project assignments follow a set of precedence rules.
Assignments for a project can exist in three places:
  • Intel® Quartus® Prime Settings File (.qsf)
  • The compiler database
  • Command-line options

The .qsf file contains all the project-wide and entity-level assignments and settings for the current revision for the project. The compiler database contains the result of the last compilation in the /db directory, and reflects the assignments at the moment when the project was compiled. Updated assignments first appear in the compiler database and later in the .qsf file.

Command-line options override any conflicting assignments in the .qsf file or the compiler database files. To specify whether the .qsf or compiler database files take precedence for any assignments not specified in the command-line, use the option --read_settings_files.

Table 1.  Precedence for Reading Assignments
Option Specified Precedence for Reading Assignments
--read_settings_files = on


  1. Command-line options
  2. The .qsf for the project
  3. Project database (db directory, if it exists)
  4. Intel® Quartus® Prime software defaults
--read_settings_files = off
  1. Command-line options
  2. Project database (db directory, if it exists)
  3. Intel® Quartus® Prime software defaults

The --write_settings_files command-line option lists the locations to which assignments are written..

Table 2.  Location for Writing Assignments
Option Specified Location for Writing Assignments
--write_settings_files = on (Default) .qsf file and compiler database
--write_settings_files = off Compiler database

Any assignment not specified as a command-line option or found in the .qsf file or compiler database file is set to its default value.

The example assumes that a project named fir_filter exists, and that the analysis and synthesis step has been performed.

quartus_fit fir_filter --pack_register=off 
quartus_sta fir_filter 
mv fir_filter_sta.rpt fir_filter_1_sta.rpt 
quartus_fit fir_filter --pack_register=minimize_area     --write_settings_files=off 
quartus_sta fir_filter 
mv fir_filter_sta.rpt fir_filter_2_sta.rpt 

The first command, quartus_fit fir_filter --pack_register=off, runs the quartus_fit executable with no aggressive attempts to reduce device resource usage.

The second command, quartus_sta fir_filter, performs basic timing analysis for the results of the previous fit.

The third command uses the UNIX mv command to copy the report file output from quartus_sta to a file with a new name, so that the results are not overwritten by subsequent timing analysis.

The fourth command runs quartus_fit a second time, and directs it to attempt to pack logic into registers to reduce device resource usage. With the --write_settings_files=off option, the command-line executable does not update the .qsf to reflect the changed register packing setting. Instead, only the compiler database files reflect the changed setting. If the --write_settings_files=off option is not specified, the command-line executable updates the .qsf to reflect the register packing setting.

The fifth command reruns timing analysis, and the sixth command renames the report file, so that it is not overwritten by subsequent timing analysis.

Use the options --read_settings_files=off and --write_settings_files=off (where appropriate) to optimize the way that the Intel® Quartus® Prime software reads and updates settings files.

In this example, the quartus_asm executable does not read or write settings files:

quartus_map filtref --source=filtref --part=EP3C10F256C8 
quartus_fit filtref --pack_register=off --read_settings_files=off 
quartus_asm filtref --read_settings_files=off --write_settings_files=off 

Did you find the information on this page useful?

Characters remaining:

Feedback Message