Basic usage and examples
Programming with Quartus Prime Programmer via ASP
Run with path to file to programming
$ qp_asp output_files/project.pof
+------------------------------------------------------------------------+
| Quartus Prime Programmer (ASP) programming |
+------------------------------------------------------------------------+
File to Programming: 'output_files/project.pof' Thu, Sep 23, 2021 2:48:49 PM
...Running Quartus Prime Programmer...
Run without path to file to programming
$ qp_asp
+------------------------------------------------------------------------+
| Quartus Prime Programmer (ASP) programming |
+------------------------------------------------------------------------+
file(s) for programming:
1: ./output_files/project_rev1.pof
2: ./output_files/project_rev2.pof
Select file :
1
Would you like burnnig file: './output_files/project_rev1.pof' (y/n)?
y
File to Programming: './output_files/project_rev1.pof' Thu, Sep 23, 2021 2:48:49 PM
...Running Quartus Prime Programmer...
Verifying with Quartus Prime Programmer via ASP
Run with path to file to checking
$ qp_asp_verify output_files/project_rev2.sof
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( ASP ) verification |
+------------------------------------------------------------------------+
Verification file: 'output_files/project_rev2.sof'
...Running Quartus Prime Programmer...
Run without path to file to checking
$ qp_asp_verify
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( ASP ) verification |
+------------------------------------------------------------------------+
file(s) to check:
1: ./output_files/project_rev1.pof
2: ./output_files/project_rev2.pof
Select file :
1
Would you like verification with file: './output_files/project_rev1.pof' (y/n)?
y
Verification file: './output_files/project_rev1.pof'
...Running Quartus Prime Programmer...
Build Quartus Prime project in the current directory
$ qp_build
+------------------------------------------------------------------------+
| Build Quartus Prime project |
+------------------------------------------------------------------------+
project : 'project_name.qpf'
revisions:
1 : revision1.qsf
2 : revision2.qsf
2
revision : revision2.qsf'
Start compilation revision 'revision2.qsf'
...Running Quartus Prime Build...
$ qp_build 2
+------------------------------------------------------------------------+
| Build Quartus Prime project |
+------------------------------------------------------------------------+
project : 'project_name.qpf'
Start compilation revision revision2.qsf'
revision : 'revision2.qsf'
...Running Quartus Prime Build...
Show information about Quartus Prime project
$ qp_info
Project file: ./project_file_name.qpf
Revision(s):
1. revision1_file_name.qsf
Quartus: 20.1.0 Standard Edition
Family/Device: Cyclone V / 5CGTFD5C5F23C7
Config.device: EPCQ16 (scheme: "ACTIVE SERIAL X4")
2. revision2_file_name.qsf
Quartus: 20.1.0 Standard Edition
Family/Device: Cyclone V / 5CGTFD5C5F23C7
Config.device: EPCQ32 (scheme: "ACTIVE SERIAL X4")
Programming with Quartus Prime Programmer via JTAG
Run with path to file to programming
$ qp_jtag output_files/project_rev2.sof
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( JTAG ) |
+------------------------------------------------------------------------+
File to Programming: 'output_files/project_rev2.sof' Thu, Sep 2, 2021 12:17:47 PM
...Running Quartus Prime Programmer...
Run without path to file to programming
$ qp_jtag
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( JTAG ) |
+------------------------------------------------------------------------+
file(s) for programming:
1: ./project_rev1.sof
2: ./output_files/project_rev2.sof
3: ./output_files/project_rev3.sof
4: ./output_files/project_rev2.jic
Select file :
2
Would you like load file: './output_files/project_rev2.sof' (y/n)?
y
File to Programming: './output_files/project_rev2.sof' Thu, Sep 23, 2021 1:34:04 PM
...Running Quartus Prime Programmer...
Verifying with Quartus Prime Programmer via JTAG
Run with path to file to check
$ qp_jtag_verify output_files/project_rev2.jic
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( JTAG ) |
+------------------------------------------------------------------------+
Verification file: 'output_files/project_rev2.jic' Thu, Sep 23, 2021 2:39:24 PM
...Running Quartus Prime Programmer...
Run without path to file to check
$ qp_jtag_verify
+------------------------------------------------------------------------+
| Quartus Prime Programmer ( JTAG ) |
+------------------------------------------------------------------------+
file(s) to check:
1: ./output_files/project_rev1.jic
2: ./output_files/project_rev2.jic
Select sof file :
1
Would you like verification with file: './output_files/project_rev1.jic' (y/n)?
y
Verification file: './output_files/project_rev1.jic' Thu, Sep 23, 2021 1:34:04 PM
...Running Quartus Prime Programmer...
Make Quartus Prime QIP-file
$ qp_make_qip <QIP_file_name> . <path2files1> <path2files2>
+------------------------------------------------------------------------+
| Make Quartus Prime Qip-file |
+------------------------------------------------------------------------+
Input parameters:
qip-file: 'prj.qip'
path1 : '.'
path2 : 'path2files1'
path3 : 'path2files2'
path4 : ''
...
...
----------------------------------
Find <NUM> files
Write file 'QIP_file_name'
Show Intel Nios II stack report
$ qp_nios_stack_rpt
Stack Report
Info: (./cpu/app/project.elf) 68 KBytes program size (code + initialized data).
text data bss dec hex filename
61768 400 8044 70212 11244 ./cpu/app/project.elf
Open Intel Quartus project
$ qp_open
Project : 'project_name.qpf'
Revisions:
1 -> revison1.qsf
2 -> revison2.qsf
Select revision:
2
open revision: 'revision2.qsf'
Show Quartus Prime compilation report
$ qp_report
Warning (12251): Clk_0: Used clock_source 20.1 (instead of 19.1)
Warning (12251): Irq_bridge_0: Used altera_irq_bridge 20.1 (instead of 19.1)
...
...
$ qp_report -c
Quartus report(critical):
Critical Warning (332148): Timing requirements not met
Critical Warning (169085): No exact pin location assignment(s) for 4 pins of 80 total pins.
Report about project latches from Quartus report files
$ qp_report_latches
output_files/project.map.rpt
38289:Info (10041): Inferred latch for "reg_name[1]" at file_name.sv(565) File: C:/path2file/file_name.sv Line: 565
38290:Info (10041): Inferred latch for "reg_name[2]" at file_name.sv(565) File: C:/path2file/file_name.sv Line: 565
Simplification of the Quartus Prime report file
$ qp_report_pin output_files/quartus_pin_file.pin
Input file: output_files/quartus_pin_file.pin (options: )
Output file: output_files/quartus_pin_file.log
Set Intel Quartus path variable
$ qp_set_path
+------------------------------------------------------------------------+
| Set Intel Quartus path variable |
+------------------------------------------------------------------------+
Usage:
qp_set_path [path2quartus]
ARGS:
<path2quartus>
Path to Quartus, example(s):
/c/intelFPGA_pro/21.1/
/opt/altera/19.1/
List of available Quartus directories:
* Path: /c/intelFPGA
20.1
* Path: /c/intelFPGA_pro
21.1
$ qp_set_path /c/intelFPGA_pro/21.1/
+------------------------------------------------------------------------+
| Set Intel Quartus path variable |
+------------------------------------------------------------------------+
Setup of path successful!
Set variables:
QUARTUS_ROOTDIR_OVERRIDE = /c/intelFPGA_pro/21.1/quartus
QUARTUS_ROOTDIR = /c/intelFPGA_pro/21.1/quartus
Add to PATH variable:
/c/intelFPGA_pro/21.1/quartus/bin64
/c/intelFPGA_pro/21.1/quartus/sopc_builder/bin
/c/intelFPGA_pro/21.1/quartus/../nios2eds/bin
Show list of Quartus Prime program files
$ qp_show_prg_files
./output_files/project.sof : Fri, Jun 11, 2021 12:10:36 PM
./output_files/project.pof : Fri, Jun 11, 2021 12:10:37 PM
Show list with md5sum
$ qp_show_prg_files -s
./output_files/project.sof : Fri, Jun 11, 2021 12:10:36 PM
md5sum: 1234567890ABCDEF123456790ABCDEF1
./output_files/project.pof : Fri, Jun 11, 2021 12:10:37 PM
md5sum: 1234567890ABCDEF123456790ABCDEF2
Show verbosity list
$ qp_show_prg_files -v
./output_files/project.sof : Fri, Jun 11, 2021 12:10:36 PM
Quartus Prime Compiler Version 20.1.0 Build 711 06/05/2020 SJ Standard Edition
5CGTFD5C5F23C7
./output_files/project.pof : Fri, Jun 11, 2021 12:10:37 PM
Quartus Prime Programmer Version 20.1.0 Build 711 06/05/2020 SJ Standard Edition
EPCQ32
Show Quartus Prime compilation summary
$ qp_summary
Fitter summary:
Fitter Status : Successful - Fri Jun 11 12:10:22 2021
Quartus Prime Version : 20.1.0 Build 711 06/05/2020 SJ Standard Edition
Revision Name : revision_name
Top-level Entity Name : top_name
Family : Cyclone V
Device : 5CGTFD5C5F23C7
Timing Models : Final
Logic utilization (in ALMs) : 6,716 / 29,080 ( 23 % )
Total registers : 12070
Total pins : 68 / 268 ( 25 % )
Total virtual pins : 0
Total block memory bits : 423,584 / 4,567,040 ( 9 % )
Total RAM Blocks : 71 / 446 ( 16 % )
Total DSP Blocks : 0 / 150 ( 0 % )
Total HSSI RX PCSs : 2 / 6 ( 33 % )
Total HSSI PMA RX Deserializers : 2 / 6 ( 33 % )
Total HSSI TX PCSs : 2 / 6 ( 33 % )
Total HSSI PMA TX Serializers : 2 / 6 ( 33 % )
Total PLLs : 6 / 12 ( 50 % )
Total DLLs : 0 / 4 ( 0 % )
------------------------------------------
Done : Fri Jun 11 12:10:56 2021 (00:05:40)
Open Quartus Prime System Console
$ qp_system_console
Show current Intel Quartus Prime version
$ qp_version
* Quartus Prime (Standard/Pro) version:
Version 20.1.0 Build 711 06/05/2020 SJ Standard Edition
* Variables:
QUARTUS_ROOTDIR_OVERRIDE: /c/intelFPGA/20.1/quartus
Quaruts prime shell: /c/intelFPGA/20.1/quartus/bin64/quartus_sh
Nios: /c/intelFPGA/20.1/quartus/../nios2eds
* JTAG Server:
Version 20.1.0 Build 711 06/05/2020 SJ Standard Edition
Path: c:\intelFPGA\20.1\quartus\bin64\jtagserver.exe
Status: Server is running; Remote clients are disabled
# 1. Remove JTAG server
jtagserver --uninstall
# 2. Check status
$ jtagserver --status # the returned string should be: "JTAG Server not installed"
# 3. Install JTAG server
<Path2QuartusBinDir>jtagserver --install
# 4. Start JTAG sever
jtagserver --start
Prepare templates for simulation using Mentor QuestaSim/ModelSim.
$ mg_questasim_templates prj_name 1us
Write file: alias.do
Write file: wave_prj_name_tb.do
Write file: Makefile
Write file: prj_name_tb.sv
Run Mentor QuestaSim/ModelSim commands
Run compilation
$ rmc src.sv vlog
$ rmc vlog vsim src2.sv
Run compilation, simulation, show coverage report
$ rmc src.sv -c vlog vsim crpt
Make windows by wish(Tcl/Tk Simple windowing shell); show a command return code using GUI(wish_msg script)
Show GUI message
$ wish_msg "Title message" green "message 1" message_2
Show GUI message after compilation
$ qp_build && wish_msg_ok || wish_msg_err
# or
$ wish_cmd qp_build
Open GTKWave (with custom configuration)
$ wopen
# or
$ wopen dump.vcd