- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This zip file associated with this tutorial has an example that works ...
http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-104paper_hawkins.pdf http://www.ovro.caltech.edu/~dwh/correlator/pdf/esc-104code_hawkins.zip Look in the folder, ESC-104Code_Hawkins\dsp_tutorial\vhdl\boards\de0_nano\cyclone4\dsp_tutorial\scripts, at the scripts synth.tcl and synth_preflow.tcl Cheers, Dave- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like to use a pre-flow script to modify design parameters. Typically I used top level Generics in my design and then assign these using the
Assignments/Settings/Default Parameters in Quartus. These appear as 'set parameter -name xxxx yy' in the project .qsf file. When I try to use a similar syntax in my .tcl script to modify the parameters I am informed that I need to open a project first. I wish to modify the project that is already open/about to be compiled. Any suggestions?- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Any suggestions? --- Quote End --- Sure, read the script I referred to. It opens the project. Here's the bit you want ...
# -----------------------------------------------------------------
# Timestamp generic
# -----------------------------------------------------------------
#
# The project must be open before accessing generics
if {!} {
project_open -revision $revision $project
}
# Timestamp integer
set timestamp
# Top-level timestamp generic
set_parameter -name TIMESTAMP $timestamp
# Post an info message
set timestamp_str
set timestamp_hex
post_message -type info "TIMESTAMP = $timestamp_hex ($timestamp_str)"
Cheers, Dave
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page