Intel® Quartus® Prime Standard Edition User Guide: Programmer

ID 683528
Date 9/24/2018
Public
Document Table of Contents

1.5.2. Obtaining Project Hash for Intel® Arria® 10 Devices

To obtain the project hash value of a .sof programming file for a design targeted to Intel® Arria® 10 devices, create a file named project_hash.tcl. In your file, copy and paste the following code:

############################################
## Begin project_hash.tcl
#
##
## @copyright Intel 2017
##
proc main_run {} {
global quartus
set qargs $quartus(args)
set nargs [llength $qargs]
load_package asm2
load_devices
set handle -1
set sof_file [lindex $qargs 0]
if [file exists $sof_file] {
set handle [open_sof $sof_file]
}
print "/metadata/0/project_hash"
if { $handle != -1 } {
close_handle $handle
}
}
#############################################
main_run
## End of project_hash.tcl
#############################################

Save the project_hash.tcl file in the same directory that contains your programming file, and type in the command line:

quartus_asm -t project_hash.tcl <sof-file>

The script prints the project hash value to the command line output.

Output of Project Hash Extraction:

In this example, the programming file is one_and.sof.

Info: *******************************************************************
Info: Running Quartus Prime Assembler
Info: Version 17.0.0 Build 594 04/18/2017 SJ Standard Edition
Info: Copyright (C) 2017  Intel Corporation. All rights reserved.
Info: Your use of Intel Corporation's design tools, logic functions
Info: and other software and tools, and its AMPP partner logic
Info: functions, and any output files from any of the foregoing
Info: (including device programming or simulation files), and any
Info: associated documentation or information are expressly subject
Info: to the terms and conditions of the Intel Program License
Info: Subscription Agreement, the Intel Quartus Prime License Agreement,
Info: the Intel MegaCore Function License Agreement, or other
Info: applicable license agreement, including, without limitation,
Info: that your use is for the sole purpose of programming logic
Info: devices manufactured by Intel and sold by Intel or its
Info: authorized distributors.  Please refer to the applicable
Info: agreement for further details.
Info: Processing started: Sat Apr 22 00:44:19 2017
Info: Command: quartus_asm -t project_hash.tcl one_and.sof
Info: Quartus(args): one_and.sof
Info: Using INI file /data/msandova/qmap/quartus.ini
0x16cc7e6773644d398b740451aa0b26e3
Info (23030): Evaluation of Tcl script project_hash.tcl was successful
Info: Quartus Prime Assembler was successful. 0 errors, 0 warnings
Info: Peak virtual memory: 1111 megabytes
Info: Processing ended: Sat Apr 22 00:44:27 2017
Info: Elapsed time: 00:00:08