[fbt-commit] SF.net SVN: fbt:[90] trunk/bin/Makefile.inc
Status: Beta
Brought to you by:
dave_infj
From: <dav...@us...> - 2010-04-09 16:29:15
|
Revision: 90 http://fbt.svn.sourceforge.net/fbt/?rev=90&view=rev Author: dave_infj Date: 2010-04-09 16:29:04 +0000 (Fri, 09 Apr 2010) Log Message: ----------- Add support for XST. New symbol now must be defined: SYNTH_TOOL. Should be set to either xst or synplify. defaults to xst. Also add new target: run (for non-gui "non-interative" modelsim) - however, one still needs to manually tell the simulator to run for however long. Update make clean. Modified Paths: -------------- trunk/bin/Makefile.inc Modified: trunk/bin/Makefile.inc =================================================================== --- trunk/bin/Makefile.inc 2010-04-09 14:56:11 UTC (rev 89) +++ trunk/bin/Makefile.inc 2010-04-09 16:29:04 UTC (rev 90) @@ -36,6 +36,9 @@ # # Options parameters may optionally be defined: # +# SYNTH_TOOL Name of the synthesis tool to use (default: xst) +# Current legal values: xst, synplify +# # SIMLIBPATH Paths in which to search for source dependencies for # simulation # SYNTHLIBPATH Paths in which to search for source dependencies for @@ -80,6 +83,8 @@ SIMTOP ?= $(TOP) +SYNTH_TOOL ?= xst + SIMLIBPATH ?= +$(VROOT)/lib . SYNTHLIBPATH ?= +$(VROOT)/lib . NGOLIBPATH += cores @@ -90,6 +95,7 @@ MKVPROJ ?= mkvproj.py SYNWRAP ?= synplify_wrapper.py SYNPLIFY ?= synplify_premier_dp +XST ?= xflow NGDBUILD ?= ngdbuild MAP ?= map PAR ?= par @@ -104,10 +110,12 @@ SIMP_OPTS += -r $(SIMTOP) -p $(PART) $(foreach P,$(SIMLIBPATH) ,-l $(P)) \ $(foreach R,$(SIM_DAR) ,-D $(R)) \ $(foreach A,$(ALIASES) ,-a $(A)) -SYNTH_OPTS += -r $(TOP) -p $(PART) $(foreach P,$(SYNTHLIBPATH),-l $(P)) \ +SYNTH_OPTS += -r $(TOP) -p $(PART) -t $(SYNTH_TOOL) \ + $(foreach P,$(SYNTHLIBPATH),-l $(P)) \ $(foreach F,$(SYN_CONSTR) ,-k $(F)) \ $(foreach R,$(SYN_DAR) ,-D $(R)) \ $(foreach A,$(ALIASES) ,-a $(A)) +XST_OPTS ?= -p $(PART) -synth xst_mixed -wd build -ed .. NGDBUILD_OPTS += -p $(PART) -a $(foreach P,$(NGOLIBPATH) ,-sd $(P)) MAP_OPTS += -w -p $(PART) -pr b PAR_OPTS += -w @@ -154,6 +162,9 @@ irun: $(VSIM) -i $(SIMTOP) $(VSIM_OPTS) & +run: + $(VSIM) $(SIMTOP) $(VSIM_OPTS) + bitstream: $(TOP).bit synth_list: @@ -164,7 +175,7 @@ rm -rf *~ work/ transcript vsim.wlf modelsim.mk \ *.{prj,prd,edf,ncf,log,synlog} build/ \ *_{fpga_editor.out,pad.txt} xlnx_auto_0* \ - *.{lst,bgn,bld,drc,map,mrp,ncd,ng[dmo],pcf} \ + *.{ngc,lst,bgn,bld,drc,map,mrp,ncd,ng[dmo],pcf} \ *.{xml,pad,par,unroutes,xpi,csv,bit,xrpt,ptwx} mrproper: clean @@ -180,13 +191,25 @@ $(if $^,$(MKVDEPS) -v .) # Synplify synthesis +ifeq ($(SYNTH_TOOL), synplify) $(TOP).edf: $(shell test -e $(TOP).prj \ && perl -ne '/add_file.*"(.*)"/ && print "$$1\n"' $(TOP).prj \ || echo FORCE ) $(MKVPROJ) synth $(SYNTH_OPTS) [ -f coregen.mk ] && make -f coregen.mk || true $(SYNWRAP) -e $(SYNPLIFY) $(TOP).prj +endif +# XST synthesis +ifeq ($(SYNTH_TOOL), xst) +$(TOP).ngc: $(shell test -e $(TOP).prj \ + && perl -ne 'chomp; s/(.*)#.*/$$1/; @x = split; $$s = $$x[$$#x]; print "$$s\n" if $$s' $(TOP).prj \ + || echo FORCE ) + $(MKVPROJ) synth $(SYNTH_OPTS) + [ -f coregen.mk ] && make -f coregen.mk || true + $(XST) $(XST_OPTS) $(TOP).prj +endif + # The list of sources for synthesis is determined by mkvproj, so there's no # direct way to include them in the dependencies for the EDIF netlist. # @@ -199,6 +222,10 @@ %.ngd: %.edf $(NGDBUILD) $(NGDBUILD_OPTS) $< $@ +# Xilinx NGDBUILD stage (EDF Netlist format) +%.ngd: %.ngc + $(NGDBUILD) $(NGDBUILD_OPTS) $< $@ + # Xilinx MAP stage %.ncd: %.ngd $(MAP) $(MAP_OPTS) $< -o $@ @@ -213,6 +240,6 @@ $(BITGEN) $(BITGEN_OPTS) $< $@ $(if $(POSTBUILD), && $(POSTBUILD) $@) -.PHONY: default deps alldeps sim irun bitstream synth_list clean FORCE +.PHONY: default deps alldeps sim irun run bitstream synth_list clean mrproper FORCE .PRECIOUS: %.edf %.ngd %.ncd %-timed.ncd %.bit This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |