- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Folks,
I have been trying to get a tcl script to run before compile to no avail. I have a tcl script to create a vhd file with the build date and time in it, gleaned from the examples on the net. I can run this script from the tcl cmd line in qts (15.1). The tcl file runs and creates the correct vhd file contents. I put this in the projects qsf file: set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:build_date.tcl" build_date.tcl resides in the projects root dir, ext to the .qsf file When I initiate a build, I dont see it running I tried entering this command manually at the tcl command line in qts as well - still does not get run. Questions: Where is the build_date.tcl file supposed to be placed? when does the .qsf file get read? How do I debug this? Thanks, EdLink Copied
7 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Refer the following old thread especially “readme.txt” as reference, https://www.alteraforum.com/forum/showthread.php?t=46559 It is probably useful as you might be looking for. Let me know if this has helped resolve the issue you are facing or if you need any further assistance. Best Regards Vikas Jathar (This message was posted on behalf of Intel Corporation)- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vikas,
Thanks for responding. The link you referred to is the one I used initially to set up my build date idea. What is is missing is the command in the .qsf to get the synth_preflow.tcl running. This is specifically called out in the Quartus II handbook v 13.1 on page 3-10. It sez to put the set_global_assignment line in the projects .qsf, which I did. There are other links on the web for doing this and they all appear to have the same procedure, which I followed I experimented with the location of the .tcl file but got nowhere. Right now it is at the project top. I added a post_message line in it but I never see anything come out on the messages window. I intentionally misspelled a command in the .qsf file and qts found that immediately. It must be have a settings cache because it "reverted" the qsf settings and wrote them back to the qsf file. I put an error in my build_date.tcl file and there is never a complaint when I run A&S. I dont think qts is even processing the command in the qsf file. I tried restarting qts, does not run the script Its like the PRE and POST script running is disabled... Questions: How do I list the current working directory in the tcl console? ls and dir dont work. There doesnt seem to be a solution for this on the web either. Is this function removed from the quartus tcl implementation? Thanks, Ed --- Quote Start --- Hi, Refer the following old thread especially “readme.txt” as reference, https://www.alteraforum.com/forum/showthread.php?t=46559 It is probably useful as you might be looking for. Let me know if this has helped resolve the issue you are facing or if you need any further assistance. Best Regards Vikas Jathar (This message was posted on behalf of Intel Corporation) --- Quote End ---- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Ed,
I'm using a preflow script for generating a VHDL-file with tiem stamp, build id, ... The syntax you are using is correct (In my case: set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:build_id.tcl") I have the tcl in the same directory like the qsf. Check the Messages in Quartus after starting a compile: Info (23030): Evaluation of Tcl script build_id.tcl was successful Just to see if Quartus recognize the preflow command try to remove the script from the project directory. Start a compile and you may see some error messages in Quartus: Error (23018): Tcl Script File build_id.tcl not found Error (23031): Evaluation of Tcl script build_id.tcl unsuccessful Best Regards Jens- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Jens,
I never see the Info message after starting A&S in the messages window. Also, if the .tcl file is not in the top-level dir, there is no error shown. I think this is the heart of the problem, qts is just ignoring the set_global_assignment in the qsf. I kno it is being "looked at" because if I damage the command somehow, qts repairs the line in the .qsf, apparently from a cache somehwere. I even edited the .qsf file with qts not running, installed a set_global_assignment pointing to a non-existing file and A&S ran. I even tried entering the set_global_assignment in the tcl console in qts. It adds the entry to the qsf but still ignores it. This is why I think this feature is disabled somehow. Thanks, Ed --- Quote Start --- Hi Ed, I'm using a preflow script for generating a VHDL-file with tiem stamp, build id, ... The syntax you are using is correct (In my case: set_global_assignment -name PRE_FLOW_SCRIPT_FILE "quartus_sh:build_id.tcl") I have the tcl in the same directory like the qsf. Check the Messages in Quartus after starting a compile: Info (23030): Evaluation of Tcl script build_id.tcl was successful Just to see if Quartus recognize the preflow command try to remove the script from the project directory. Start a compile and you may see some error messages in Quartus: Error (23018): Tcl Script File build_id.tcl not found Error (23031): Evaluation of Tcl script build_id.tcl unsuccessful Best Regards Jens --- Quote End ---- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ed,
I don't know for sure but I don't think the pre-flow is executed with A&S. You need to do a full compile. At least that is how it works for me on Q17.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This behavior is so stupid, vivado has pre and post scripts for each step.
Still not fixed in 2024, such a shame Altera's software is seriously the worst I've ever used.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You are correct! Literally one minute before you posted this, I discovered just that. I was fooling around with signal tap and hit the compile button. It ran the entire compile flow, starting with my pre-compile script.
And thats the answer.... --- Quote Start --- Ed, I don't know for sure but I don't think the pre-flow is executed with A&S. You need to do a full compile. At least that is how it works for me on Q17. --- Quote End ---
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