[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: gEDA-user: PALs GALs and SPLDs going the way of the Dodo?
> Funny, I was just trying to hack my Xilinx-on-Linux Makefiles
> (actually the script called by the Makefile) that work with FPGAs,
> to make it target an XC9536XL. I've posted my xil_syn script here
> before, has anyone else put something together like it for an
> XC95xx?
Here's my Makefile for the bin2seven project:
# Makefile for bin-to-sevensegment CPLD on XC9500XL
VERILOG = bcd.v sevenseg.v top.v
BASE = bin7
CHIP = XC9572XL-10-VQ44
TMP = tmp
LOG = logs
all : dirs $(BASE).xsvf
flash : $(BASE).xsvf
sudo ../host/xsvf/xsvf $(BASE).xsvf
# ------------------------------------------------------------
# ISE commands
$(BASE).ngc : $(TMP)/$(BASE).xst $(TMP)/$(BASE).prj $(VERILOG)
xst \
-ifn $(TMP)/$(BASE).xst \
-ofn $(LOG)/$(BASE).xst.log \
-intstyle silent
$(BASE).ngd : $(BASE).ngc $(BASE).ucf
ngdbuild \
-p $(CHIP) \
-dd $(TMP) \
-intstyle silent \
-uc $(BASE).ucf \
$(BASE).ngc $(BASE).ngd
$(BASE).vm6 : $(BASE).ngd
cpldfit \
-p $(CHIP) \
-intstyle silent \
-log $(LOG)/$(BASE).fit.log \
-optimize density \
-nomlopt \
-ignoretspec \
$(BASE).ngd
$(BASE).jed : $(BASE).vm6
hprep6 \
-i $(BASE).vm6 \
-intstyle silent
$(BASE).xsvf : $(BASE).jed $(BASE).ibat
impact \
-batch $(BASE).ibat
# ------------------------------------------------------------
# Bookkeeping and other targets
.PHONY: dirs
dirs : $(TMP)/.here $(LOG)/.here
$(TMP)/.here :
@test -d $(TMP) || mkdir $(TMP)
@true > $(TMP)/.here
$(LOG)/.here :
@test -d $(LOG) || mkdir $(LOG)
@true > $(LOG)/.here
$(TMP)/$(BASE).prj : $(TMP)/.here Makefile
@true > $@.tmp
@for i in $(VERILOG); do \
echo verilog work $$i >> $@.tmp; \
done
@cmp -s $@ $@.tmp || mv $@.tmp $@
$(TMP)/$(BASE).xst : $(TMP)/.here $(BASE).xst Makefile
@echo set -$(TMP)dir $(TMP) > $@.tmp
@sed 's/PART/$(CHIP)/' < $(BASE).xst \
| sed 's/BASE/$(BASE)/' \
>> $@.tmp
@echo -ifn $(TMP)/$(BASE).prj >> $@.tmp
@echo -ofn $(BASE).ngc >> $@.tmp
@echo -p $(CHIP) >> $@.tmp
@cmp -s $@ $@.tmp || mv $@.tmp $@
clean :
@rm -rf $(TMP) $(LOG)
@rm -f *~ *.err
# xst
@rm -f *.ngc *.srp *.lso
@rm -rf xst
# ngdbuild
@rm -f *.ngd *.bld
# cpldfit
@rm -f *.xml *.vm6 *.rpt *.pnx *.pad *.mfd *.gyd *_pad.csv *_build.xml
# hprep6
@rm -f *.jed
# impact
@rm -f _impact*
distclean : clean
@rm -f *.xsvf
_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user