TCL Script - Automation of Compilation process and programming SOF file
Hey,
I am trying to create a TCL script for automating the compilation process and SOF file programming.
I get this Error - "Error:Unknown option: -outdir"
I changed the "-outdir" to "-output_directory" but again I get the same Error
This is the script I wrote:
package require ::quartus::project
# Set the project directory
set project_dir "Y"
# Set the project name
set project_name "X"
# Set the output directory for compiled files
set output_dir "$project_dir/output_files"
# Set the name of the SOF file
set sof_file "$project_name.sof"
# Open the project
project_open $project_dir/$project_name.qpf
# Compile the project
execute_module -tool map
execute_module -tool fit
execute_module -tool asm
execute_module -tool sta
execute_module -tool sign
# Create the output directory if it does not exist
file mkdir $output_dir
# Generate the SOF file
set sof_path $output_dir/$sof_file
execute_module -tool asm_sof -outdir $output_dir -file $sof_path
# Launch the programmer window
launch_programmer -hardware_name "USB-Blaster"
# Wait for the programmer to open
after 1000
# Select the device and file in the programmer window
program_device -position 1 -file $sof_path -operation "Program"
Note - I write X and Y because I can't write the original values here
Thanks!
You may checkout this document for all the supported command-line and tcl scripting in Quartus.
https://www.intel.com/content/www/us/en/docs/programmable/683432/22-4/faq.html
The tcl command "execute_module -tool" support these option [-tool <asm|cdb|drc|eda|fit|map|syn|pow|sta|stp|sim|si|cpf|ipg|pfg> ]
I think the asm_sof is an illegal value. And there is no "output directory" option available for execute_module command.
Best Regards,
Richard Tan