Intel® Quartus® Prime Pro Edition User Guide: Scripting

ID 683432
Date 3/28/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

2.7. The Intel® Quartus® Prime Tcl Shell in Interactive Mode Example

This section presents how to make project assignments and then compile the finite impulse response (FIR) filter tutorial project with the quartus_sh interactive shell.

This example assumes you already have the fir_filter tutorial design files in a project directory.

  1. To run the interactive Tcl shell, type the following at the system command prompt:
    quartus_sh -s
  2. Create a new project called fir_filter, with a revision called filtref by typing:
    project_new -revision filtref fir_filter
    Note:
    • If the project file and project name are the same, the Intel® Quartus® Prime software gives the revision the same name as the project.
    • If a .qpf file for this project already exists, the Intel® Quartus® Prime software will display an error stating that the project already exists.
    Because the revision named filtref matches the top-level file, all design files are automatically picked up from the hierarchy tree.
  3. Set a global assignment for the device:
    set_global_assignment -name family <device family name>
    To learn more about assignment names that you can use with the -name option, refer to Intel® Quartus® Prime Help.
    Note: For assignment values that contain spaces, enclose the value in quotation marks.
  4. To compile a design, use the ::quartus::flow package, which properly exports the new project assignments and compiles the design with the proper sequence of the command-line executables. First, load the package:
    load_package flow

    It returns:

    1.1
  5. To perform a full compilation of the FIR filter design, use the execute_flow command with the -compile option:
    execute_flow -compile

    This command compiles the FIR filter tutorial project, exporting the project assignments and running quartus_syn, quartus_fit, quartus_asm , and quartus_sta. This sequence of events is the same as selecting Processing > Start Compilation in the Intel® Quartus® Prime GUI.

  6. When you are finished with a project, close it with the project_close command.
  7. To exit the interactive Tcl shell, type exit at a Tcl prompt.