- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The tcl script that supposed to update .v file runs fine if I run it from the tcl console but it does not run during compilation.
Both .tcl and .v files are in the project files list. Any idea?Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To run a script during before compilation, you have to add it to your .qsf like so:
set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:assign_pin.tcl Note that when the script runs, it does not act like Quartus is open. So you need to open and close the project. For example, if I had a project named gocubs and I wanted to create a pre-flow script called assign_pin.tcl that made a pin assignment, it would look like: project_open gocubs set_location_assignment PIN_M4 -to blaa project_close The big benefit is that it's true Tcl interpreter(unlike the .qsf reader) so you can script about whatever you want.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- To run a script during before compilation, you have to add it to your .qsf like so: set_global_assignment -name PRE_FLOW_SCRIPT_FILE quartus_sh:assign_pin.tcl Note that when the script runs, it does not act like Quartus is open. So you need to open and close the project. For example, if I had a project named gocubs and I wanted to create a pre-flow script called assign_pin.tcl that made a pin assignment, it would look like: project_open gocubs set_location_assignment PIN_M4 -to blaa project_close The big benefit is that it's true Tcl interpreter(unlike the .qsf reader) so you can script about whatever you want. --- Quote End --- Thanks! I have already this line in my .qsf: set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:version_and_time.tcl". Do I have to add those lines to my .qsf? project_open <project_name> set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:version_and_time.tcl" project_close
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "project_open...project_close" lines go in the .tcl script. When you press compile, you should see messages that it's running the pre-flow script. (If the script is just writing out an HDL file that has version and time, i.e. it's not doing anything to the project, then you don't need the project_open/project_close.
http://www.alterawiki.com/wiki/tcl_scripts_for_automatic_build_identification- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- The "project_open...project_close" lines go in the .tcl script. When you press compile, you should see messages that it's running the pre-flow script. (If the script is just writing out an HDL file that has version and time, i.e. it's not doing anything to the project, then you don't need the project_open/project_close. http://www.alterawiki.com/wiki/tcl_scripts_for_automatic_build_identification --- Quote End --- Thanks for the sharing. The wiki link is useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great info sharing. Thanks.

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