Forum Discussion
Altera_Forum
Honored Contributor
19 years agoHi Andrew,
Glad that this was helpful for you -- Thanks for writing back! We've actually refined the process a bit further -- not because any more files needed to be checked in, but because Quartus performs so much unnecessary touching of its QSF and PTF files that the repository needs to be protected from needless recommits after each run of Quartus. We accomplished this by doing a 'make volatiles' immediately after the SVN checkout. What this does is create the QSF, QPF and PTF files (that Quartus will hack) from fixed templates that are kept in the repository. I've attached parts of the Makefiles below if you're curious. The Makefile in the Quartus project itself is:__TOP_LEVEL_ENTITY = toplevel
__USER_LIBRARIES = ../../../libs/fpga
__QSF_FILES =
../../../libs/templates/kit2s60_board.qsf
../../../libs/templates/kit2s60_phy_pins.qsf
../../../libs/templates/phy_timing.qsf
include ../../../include/quartus.mk Which includes the following 'quartus.mk' fragment: # *******************************************# * *# * Generic Makefile for QUARTUS Projects *# * *# *******************************************
# This Makefile fragment assumes that the following symbols have been# defined on entry:# # __TOP_LEVEL_ENTITY : Top hierarchy name for the project# __USER_LIBRARIES : List of library directories for Quartus# __QSF_FILES : Component template files for the .QSF
# The Quartus GUI handles actual building, so there is nothing to do# for the usual rules.#
all :;
clean :;
distclean :;
.PHONY : all clean distclean
# Create the volatile files from the repository templates. Quartus# makes countless 'unnecessary' changes to these files during normal# operation and it would be incorrect to update the repository each# time.#
volatiles : toplevel.qsf toplevel.qpf syscore.ptf
.PHONY : volatiles
# The .QSF file is composed from all of the pin definition and timing# constraint files that are relevant to this project.#
toplevel.qsf : $(__QSF_FILES)
@echo Making $@...
cat $(__QSF_FILES) |
sed "s:__TOP_LEVEL_ENTITY:$(__TOP_LEVEL_ENTITY):" |
sed "s:__USER_LIBRARIES:$(__USER_LIBRARIES):" > $@
cp $@ $(subst .,_,$@)
# The .QPF file merely mentions the toplevel entity#
toplevel.qpf : ../../../libs/templates/project.qpf
@echo Making $@...
sed "s:__TOP_LEVEL_ENTITY:$(__TOP_LEVEL_ENTITY):" < $< > $@
cp $@ $(subst .,_,$@)
# The .PTF (SOPC) file is simply renamed to protect the repository from# spurious checkins.#
syscore.ptf : syscore_ptf
@echo Making $@...
cp $< $@ And the checked in as 'kit2s60_board.qsf' begins with # **********************************************# * *# * Altera Stratix-II RoHS Development Board *# * Top-Level Pin and Project Assignments *# * *# **********************************************#
set_global_assignment -name TOP_LEVEL_ENTITY __TOP_LEVEL_ENTITY
set_global_assignment -name USER_LIBRARIES "__USER_LIBRARIES"
....
.... Note that each of the volatile files that are produced is accompanied by an original copy with the '.' in the filename replaced with '_'. This allows you to check later on what Quartus has done to those files, just in case some of its changes really should make their way back into the repository. Good Luck! -alan