X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/raggedstone/blobdiff_plain/bd0f9a9ab3480a1c19a41d02089d7a290cf5c8bf..27f6f6203a7917361c6b1e482b03ab69c0e428a2:/common/Makefile.common?ds=sidebyside diff --git a/common/Makefile.common b/common/Makefile.common index e573c1e..bbf4218 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -7,13 +7,16 @@ CABLE ?= auto INTSTYLE := silent -SOURCES = $(wildcard sources/*.v source/*.vhd) +SOURCES := $(shell find . -name "*.vhd" -print) $(shell find . -name "*.v" -print) +PART ?= xc3s1500-fg456-4 +TARGET ?= bit +CLEANFILES ?= ifdef DRIVER PRELOAD = LD_PRELOAD=$(DRIVER) endif -all: $(PROJECT).bit final +all: $(PROJECT).$(TARGET) final log: time make all &>build.log @@ -22,17 +25,17 @@ xst: $(PROJECT).ngc ngdbuild: $(PROJECT).ngd -$(PROJECT).ngc: $(SOURCES) $(PROJECT).prj $(PROJECT).ucf $(PROJECT).ut $(PROJECT).xst +$(PROJECT).ngc: $(SOURCES) $(PROJECT).prj $(PROJECT).ucf $(PROJECT).xst @# echo synclib > $(PROJECT).lso # hmm. things are different in ise 9.1 echo work > $(PROJECT).lso xst -intstyle $(INTSTYLE) -ifn $(PROJECT).xst -ofn $(PROJECT).syr @#cat $(PROJECT).syr $(PROJECT).ngd: $(PROJECT).ngc - ngdbuild -intstyle $(INTSTYLE) -dd "$(PWD)/_ngo" -nt timestamp -uc $(PROJECT).ucf -p xc3s1500-fg456-4 $(PROJECT).ngc $(PROJECT).ngd + ngdbuild -intstyle $(INTSTYLE) -dd "$(PWD)/_ngo" -nt timestamp -uc $(PROJECT).ucf -p $(PART) $(PROJECT).ngc $(PROJECT).ngd $(PROJECT)_map.ngm $(PROJECT).pcf: $(PROJECT).ngd - map -intstyle $(INTSTYLE) -p xc3s1500-fg456-4 -cm area -pr b -k 4 -c 100 -o $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf + map -intstyle $(INTSTYLE) -p $(PART) -cm area -pr b -k 4 -c 100 -o $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf $(PROJECT).ncd: $(PROJECT)_map.ngm $(PROJECT).pcf @#par -w -intstyle $(INTSTYLE) -ol std -n 4 -t 1 $(PROJECT)_map.ncd $(PROJECT).dir $(PROJECT).pcf @@ -48,6 +51,12 @@ $(PROJECT).bit: $(PROJECT).ncd @#cat $(PROJECT).drc @#cat $(PROJECT).bgn +$(PROJECT).vm6: $(PROJECT).ngd + cpldfit -intstyle $(INTSTYLE) -p $(PART) -ofmt vhdl -optimize speed -loc on -slew fast -init low -inputs 54 -pterms 25 -unused float -power std -terminate keeper $(PROJECT).ngd + +$(PROJECT).jed: $(PROJECT).vm6 + hprep6 -intstyle $(INTSTYLE) -s IEEE1149 -n $(PROJECT) -i $(PROJECT) + $(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs: $(PROJECT).bit promgen -intstyle $(INTSTYLE) -w -p mcs -u 0 $(PROJECT) -o $(PROJECT)-xcf02s $(PROJECT)-xcf04s -x xcf02s xcf04s @@ -64,17 +73,24 @@ load: $(PROJECT).bit $(PRELOAD) impact -batch xc3s1500.batch.tmp @rm xc3s1500.batch.tmp -flash: $(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs +flash: + @echo "NO" + +i-really-want-to-flash: $(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs @sed -e "s|%CABLE%|$(CABLE)|g" -e "s|%PROJECT%|$(PROJECT)|g" ../common/xcf.batch >xcf.batch.tmp $(PRELOAD) impact -batch xcf.batch.tmp @rm xcf.batch.tmp +analyzer: + $(CHIPSCOPE)/bin/lin/analyzer.sh -project $(PWD)/$(PROJECT).cpj + clean: - @rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd \ + @rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd *.edn *.ncf *.ngo *.cdc \ *.ngr *.pad *.par *.pcf *.prm *.syr *.twr *.twx *.xpi *.lso *.prm *.mcs _impact* \ + *.vm6 *.jed *.gyd *.mfd *.pnx *.rpt *.err *.log \ $(PROJECT)_map.* $(PROJECT)_pad.* \ _ngo xst \ build.log \ - $(PROJECT).unroutes *.xml + $(PROJECT).unroutes *.xml $(CLEANFILES) -.PHONY: all final burn load flash clean xst ngdbuild log +.PHONY: all final burn load flash clean xst ngdbuild log analyzer i-really-want-to-flash