Hey Frank,
--- Quote Start ---
But this also modifies the respective qsf file permanently which retriggers the version control system. ... I hope there should be an easier way.
--- Quote End ---
There is, don't use the .qsf file, use Tcl, and consider the .qsf file to be a build artifact :)
--- Quote Start ---
As nother inconvenient point if you want to keep your scripts generic is the need for an actual project name in project_open command. I mean, the GUI apparently knows which project it is working with, the information should be available somehow?
--- Quote End ---
Yeah, it is, you can get the info you want as follows
# -----------------------------------------------------------------
# Tcl packages
# -----------------------------------------------------------------
#
package require ::quartus::project
package require ::quartus::report
# -----------------------------------------------------------------
# Script arguments
# -----------------------------------------------------------------
#
set module
set project
set revision
# Path to the directory containing this preflow script
set scripts ]]
# post_message -type info "POSTFLOW: $module $project $revision"
if {} {
post_message -type info "POSTFLOW: Analysis & Synthesis detected!"
post_message -type info "POSTFLOW: Run the DDR3 pin assignment script"
# Check the pin assignments script exists
set fname qsys_system/synthesis/submodules/qsys_system_ddr_p0_pin_assignments.tcl
if {!} {
post_message -type error "POSTFLOW: pin assignments script $fname missing!"
}
# Open the project before running the DDR assignments script
if {!} {
project_open -revision $revision $project
}
post_message -type info "POSTFLOW: Running the DDR3 pin assignments script $fname"
source $fname
# Save the changes
export_assignments
post_message -type info "POSTFLOW: DDR3 pin assignments complete"
}
This is the postflow script for the BeMicro-CV DDR example (see Post#5)
http://www.alteraforum.com/forum/showthread.php?t=43992 and please take a look at this DE0-nano example (Post# 2)
http://www.alteraforum.com/forum/showthread.php?t=45927 Both of these examples show how you can use a synth.tcl script to automate the creation of the Quartus project, i.e., it relegates the .qsf file to being a build artifact. The DE0-nano SDRAM example shows how you can take a Qsys XML file and convert it to Tcl so that it is portable between multiple Quartus versions. I figure that might be of interested to you.
Cheers,
Dave