Altera_Forum
Honored Contributor
11 years agoPRE_FLOW_SCRIPT_FILE problem
Hi.
I am trying to write the script for automatic update compilation time in my project. The script generate_version1.tcl:set str -format {%Y%m%d%H%M}]
set hex_value ${str}
set num_digits
set bit_width
set high_index
set reset_value
set fh
puts $fh "module version_reg (clock, reset, data_out);"
puts $fh " input clock;"
puts $fh " input reset;"
puts $fh " output \ data_out;"
puts $fh " reg \ data_out;"
puts $fh " always @ (posedge clock or negedge reset) begin"
puts $fh " if (!reset)"
puts $fh " data_out <= ${bit_width}'h${reset_value};"
puts $fh " else"
puts $fh " data_out <= ${bit_width}'h${hex_value};"
puts $fh " end"
puts $fh "endmodule"
close $fh
This script generate version_reg.v file which contain the time. version_reg.v file included in my project. I run:Tools->Tck Scripts...->generate_version1.tcl and this method work correct. I try to launch this cript automaticaly by adding in my qsf file: set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:generate_version1.tcl" But then I launch compilation, the script does not execute. Operation system : Windows7 Quartus:13.0.1 PATH: C:\altera\13.0sp1\quartus\bin64 Also I try to use Tcl Console: "quartus_sh generate_version1.tcl" and have error:
Error:invalid command name "quartus_sh"
Error: while executing
Error:"unknown_original quartus_sh generate_version1.tcl"
Error: ("eval" body line 1)
Error: invoked from within
Error:"eval unknown_original $cmd $args"
Error: (procedure "::unknown" line 7)
Error: invoked from within
Error:"quartus_sh generate_version1.tcl"
Please, help me to solve my problem.