checksum (::quartus::misc)

The following table displays information for the checksum Tcl command:

Tcl Package and Version

Belongs to ::quartus::misc 1.0

Syntax checksum [-h | -help] [-long_help] [-algorithm <crc32|adler32> ]
 
<input_file>
Arguments -h | -help Short help
-long_help Long help with examples and possible return values
-algorithm <crc32|adler32> Option to specify the checksum algorithm. Uses the CRC-32 algorithm by default.
<input_file> Option to specify the input file
Description
Returns the checksum value in hexadecimal format based on the
specified algorithm which defaults to crc32.
Example Usage
set file "one_wire.sof"
	# Use CRC-32
puts "$file -> [checksum $file]"
puts "$file -> [checksum $file -algorithm crc32]"
	# Use ADLER-32
puts "$file -> [checksum $file -algorithm adler32]"
Return Value Code Name Code String Return
TCL_OK 0 INFO: Operation successful
TCL_ERROR 1 ERROR: Can't read file: <string>. Make sure the file exists and is not a directory, and you have permission to read the file.