- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have an existing project already setup in the quartus GUI - files added via the Project - Add/remove files window etc.
But now I need to add some code that is the output of a Simulink model. Because it can change the names of files depending on what day of the week it is when you generate the code ;) , it can also output a TCL file to make your life a little less stressful. So is there a way to add a TCL file to the files list and have that execute to add a load of VHDL to the "files in project" list, or am I going to have to script the whole project now?Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two options:
1) A .qsf can have "source otherfile.tcl" in it. The other file MUST be in the .qsf syntax though, so unless the output file happens to match it, it won't work. But you're going to need some way to get its output format into .qsf format. 2) You can run a pre-flow script. Search the forums on this(the common one is for creating a timestamp). I believe there are examples in Altera literature. This just executes a .tcl script at the beginning of the Quartus compile.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe something like PRE_FLOW_SCRIPT_FILE?
http://www.altera.com/support/examples/tcl/auto_processing.html- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ok, thanks for that - it executes.
Just the problem is I get this error: --- Quote Start --- Error: Tcl error: ERROR: Open project does not exist. Open an existing project or create a new project. while executing "set_global_assignment -name VHDL_FILE "$src_dir/Firmware7H3V_pkg.vhd"" (file "../Firmware7H3V_quartus.tcl" line 4) --- Quote End --- I dont get itm, because its being run from inside an open project. All I want to do is add these source files to this open project, and then compile the whole project.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If your external file is just adding files and doesn't really need a Tcl interpreter, then I would source it from the .qsf. Much easier and more direct. But it appears that you're using a variable $src_dir, which wouldn't work. If that's really necessary, then the pre-flow script is better, which it sounds like you're doing. Note that the pre-flow script does not really have an open project(which is confusing, because you have it open in front of you). This allows the script to do things outside of the project, although admittedly, that is seldom required. Just bracket your script with project open and project close:
project_open <project_name> <add file commands> project_close
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page