I'd like to be able to use TCL scripts for an Altera FPGA design instead of the GUI. The GUI is nice, but it would be much simpler and faster if I could use TCL scripts to read the VHDL files in, set the constraints, run the Analysis and Synthesis, Fitter, Assembler, TimeQuest, EDA Netlist Writer, etc. This would allow generating multiple projects very quickly, without having to re-enter the information every time within the GUI.Tony
To script the Quartus steps other than TimeQuest, see the Quartus handbook, Volume 2, Section I, Chapters 2 (Command-Line Scripting) and 3 (Tcl Scripting).If you start in the GUI with TimeQuest, save the Console pane History tab to a file (right-click menu in the History tab) to create a starting point for a script.
I've found a possible way around this......I can use the Quartus II project that I've inherited, and within the Messages window pane, right-click, select Select All, and write the results to a .txt file. That at least gives me a general baseline to start from. I can then use the docs to edit the commands as I see fit. The only problem with this approach, in my situation anyway, is the design that I've inherited is less than desirable (e.g. best digital design practices were not followed, etc). So, while I'm trying to get things cleaned up (the schematic is ridiculous...), I'm also trying to learn the toolset. At least TimeQuest is similar to PrimeTime..... And the most startling thing of all.....there isn't a top-level testbench. It was never created and never used! :eek: Anyway, thanks for the help.
I tend to always use Quartus to start a new project. It's just too easy to make a mistage typing in the device being targeted, or to forget about some setting I might want to change(like doing a Fast Fit for first pass compiles).That being said, if you're targeting the same board and just creating new projects, you can technically script this(building a new project, adding assignments like Add File commands), but the syntax for the assignments is identical to what's in the .qsf. (It's kind of weird, as you basically run Tcl commands through Quartus that get saved in the .qsf in the exact same format as the command you ran.) I generally think it's easier to have a shell .qpf and .qsf, and if I need to edit files, just hand-edit those. Technically they're not a "script to be called" but you would be doing the same edits to a script. Then I run compiles via Tcl as Brad has suggested. Besides the documentation, the .flow.rpt gives you the exact commands executed when you do a compile via the GUI. From a command prompt type "quartus_sh --qhelp", as this is an invaluable quick way to look at commands. Finally, for quickly editing project settings: "quartus_sh --set" is useful. (Look for the syntax examples in the --qhelp". You can build up a project this way, i.e. add each file one-by-one this way, but again I would just edit the .qsf directly.