Line 1... |
Line 1... |
# $Id: generic_xflow.mk 477 2013-01-27 14:07:10Z mueller $
|
# $Id: generic_xflow.mk 539 2013-10-13 17:06:35Z mueller $
|
#
|
#
|
# Revision History:
|
# Revision History:
|
# Date Rev Version Comment
|
# Date Rev Version Comment
|
|
# 2013-10-12 539 1.9 use xtwi; support trce tsi file; use -C for cpp
|
# 2013-01-27 477 1.8 remove defaults for ISE_(BOARD|PATH) and XFLOWOPT_*
|
# 2013-01-27 477 1.8 remove defaults for ISE_(BOARD|PATH) and XFLOWOPT_*
|
# use dontincdep.mk to suppress .dep include on clean
|
# use dontincdep.mk to suppress .dep include on clean
|
# 2013-01-05 470 1.7.6 remove '-r' from all non-dir clean rm's
|
# 2013-01-05 470 1.7.6 remove '-r' from all non-dir clean rm's
|
# 2012-02-05 456 1.7.5 use vbomvonv --get_top for xflow calls
|
# 2012-02-05 456 1.7.5 use vbomvonv --get_top for xflow calls
|
# 2012-01-08 451 1.7.4 use xilinx_ghdl_sdf_filter
|
# 2012-01-08 451 1.7.4 use xilinx_ghdl_sdf_filter
|
Line 83... |
Line 84... |
(cd ./ise; touch $*.xcf)
|
(cd ./ise; touch $*.xcf)
|
if [ -r $*.xcf ]; then cp $*.xcf ./ise; fi
|
if [ -r $*.xcf ]; then cp $*.xcf ./ise; fi
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ]; then \
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ]; then \
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ./ise; fi
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ./ise; fi
|
if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
|
if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
|
${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} \
|
xtwi ${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} \
|
-g top_entity:`vbomconv --get_top $<` $*.prj
|
-g top_entity:`vbomconv --get_top $<` $*.prj
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
|
if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
|
if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
|
if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
|
@ echo "==============================================================="
|
@ echo "==============================================================="
|
Line 105... |
Line 106... |
(cd ./ise; touch $*.xcf)
|
(cd ./ise; touch $*.xcf)
|
if [ -r $*.xcf ]; then cp $*.xcf ./ise; fi
|
if [ -r $*.xcf ]; then cp $*.xcf ./ise; fi
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ]; then \
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ]; then \
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ./ise; fi
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_SYN} ./ise; fi
|
if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
|
if [ -r ${XFLOWOPT_SYN} ]; then cp ${XFLOWOPT_SYN} ./ise; fi
|
${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} \
|
xtwi ${XFLOW} -wd ise -synth ${XFLOWOPT_SYN} \
|
-g top_entity:`vbomconv --get_top $<` $*.prj
|
-g top_entity:`vbomconv --get_top $<` $*.prj
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
|
if [ -r ./ise/$*.ngc ]; then cp -p ./ise/$*.ngc .; fi
|
if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
|
if [ -r ./ise/$*_xst.log ]; then cp -p ./ise/$*_xst.log .; fi
|
@ echo "==============================================================="
|
@ echo "==============================================================="
|
Line 126... |
Line 127... |
# %.pcf
|
# %.pcf
|
# %_tra.log translate (ngdbuild) log file (renamed %.bld)
|
# %_tra.log translate (ngdbuild) log file (renamed %.bld)
|
# %_map.log map log file (renamed %_map.mrp)
|
# %_map.log map log file (renamed %_map.mrp)
|
# %_par.log par log file (renamed %.par)
|
# %_par.log par log file (renamed %.par)
|
# %_pad.log pad file (renamed %_pad.txt)
|
# %_pad.log pad file (renamed %_pad.txt)
|
|
# %_tsi.log trce tsi file (renamed %.tsi)
|
# %_twr.log trce log file (renamed %.twr)
|
# %_twr.log trce log file (renamed %.twr)
|
#
|
#
|
%.ncd %.pcf: %.ngc
|
%.ncd %.pcf: %.ngc
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
if [ -r $*.ucf ]; then cp -p $*.ucf ./ise; fi
|
if [ -r $*.ucf ]; then cp -p $*.ucf ./ise; fi
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_IMP} ]; then \
|
if [ -r ${RETROBASE}/rtl/make/${XFLOWOPT_IMP} ]; then \
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_IMP} ./ise; fi
|
cp ${RETROBASE}/rtl/make/${XFLOWOPT_IMP} ./ise; fi
|
if [ -r ${XFLOWOPT_IMP} ]; then cp -p ${XFLOWOPT_IMP} ./ise; fi
|
if [ -r ${XFLOWOPT_IMP} ]; then cp -p ${XFLOWOPT_IMP} ./ise; fi
|
${XFLOW} -wd ise -implement ${XFLOWOPT_IMP} $<
|
xtwi ${XFLOW} -wd ise -implement ${XFLOWOPT_IMP} $<
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.ncd ]; then cp -p ./ise/$*.ncd .; fi
|
if [ -r ./ise/$*.ncd ]; then cp -p ./ise/$*.ncd .; fi
|
if [ -r ./ise/$*.pcf ]; then cp -p ./ise/$*.pcf .; fi
|
if [ -r ./ise/$*.pcf ]; then cp -p ./ise/$*.pcf .; fi
|
if [ -r ./ise/$*.bld ]; then cp -p ./ise/$*.bld ./$*_tra.log; fi
|
if [ -r ./ise/$*.bld ]; then cp -p ./ise/$*.bld ./$*_tra.log; fi
|
if [ -r ./ise/$*_map.mrp ]; then cp -p ./ise/$*_map.mrp ./$*_map.log; fi
|
if [ -r ./ise/$*_map.mrp ]; then cp -p ./ise/$*_map.mrp ./$*_map.log; fi
|
if [ -r ./ise/$*.par ]; then cp -p ./ise/$*.par ./$*_par.log; fi
|
if [ -r ./ise/$*.par ]; then cp -p ./ise/$*.par ./$*_par.log; fi
|
if [ -r ./ise/$*_pad.txt ]; then cp -p ./ise/$*_pad.txt ./$*_pad.log; fi
|
if [ -r ./ise/$*_pad.txt ]; then cp -p ./ise/$*_pad.txt ./$*_pad.log; fi
|
if [ -r ./ise/$*.twr ]; then cp -p ./ise/$*.twr ./$*_twr.log; fi
|
if [ -r ./ise/$*.twr ]; then cp -p ./ise/$*.twr ./$*_twr.log; fi
|
|
if [ -r ./ise/$*.tsi ]; then cp -p ./ise/$*.tsi ./$*_tsi.log; fi
|
@ if [ -r $*.mfset ]; then \
|
@ if [ -r $*.mfset ]; then \
|
echo "=============================================================";\
|
echo "=============================================================";\
|
echo "* Translate Diagnostic Summary *";\
|
echo "* Translate Diagnostic Summary *";\
|
echo "=============================================================";\
|
echo "=============================================================";\
|
isemsg_filter tra $*.mfset $*_tra.log;\
|
isemsg_filter tra $*.mfset $*_tra.log;\
|
Line 169... |
Line 172... |
# %_bgn.log bitgen log file (renamed %.bgn)
|
# %_bgn.log bitgen log file (renamed %.bgn)
|
#
|
#
|
%.bit: %.ncd
|
%.bit: %.ncd
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ -r $*.ncd ]; then cp -p $*.ncd ./ise; fi
|
if [ -r $*.ncd ]; then cp -p $*.ncd ./ise; fi
|
(cd ./ise; bitgen -l -w -m -g ReadBack -g UserId:${ISE_USERID} -intstyle xflow $*.ncd)
|
(cd ./ise; xtwi bitgen -l -w -m -g ReadBack -g UserId:${ISE_USERID} -intstyle xflow $*.ncd)
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.bit ]; then cp -p ./ise/$*.bit .; fi
|
if [ -r ./ise/$*.bit ]; then cp -p ./ise/$*.bit .; fi
|
if [ -r ./ise/$*.msk ]; then cp -p ./ise/$*.msk .; fi
|
if [ -r ./ise/$*.msk ]; then cp -p ./ise/$*.msk .; fi
|
if [ -r ./ise/$*.bgn ]; then cp -p ./ise/$*.bgn ./$*_bgn.log; fi
|
if [ -r ./ise/$*.bgn ]; then cp -p ./ise/$*.bgn ./$*_bgn.log; fi
|
@ if [ -r $*.mfset ]; then \
|
@ if [ -r $*.mfset ]; then \
|
Line 187... |
Line 190... |
# Create svf from bitstream
|
# Create svf from bitstream
|
# input: %.bit
|
# input: %.bit
|
# output: %.svf
|
# output: %.svf
|
#
|
#
|
%.svf: %.bit
|
%.svf: %.bit
|
config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} bit2svf $*.bit
|
xtwi config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} bit2svf $*.bit
|
|
|
#
|
#
|
# Configure FPGA with impact
|
# Configure FPGA with impact
|
# input: %.bit
|
# input: %.bit
|
# output: .PHONY
|
# output: .PHONY
|
#
|
#
|
%.iconfig: %.bit
|
%.iconfig: %.bit
|
config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} iconfig $*.bit
|
xtwi config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} iconfig $*.bit
|
|
|
#
|
#
|
# Configure FPGA with jtag
|
# Configure FPGA with jtag
|
# input: %.svf
|
# input: %.svf
|
# output: .PHONY
|
# output: .PHONY
|
Line 208... |
Line 211... |
FX2LOAD_OPT = --file=${FX2_FILE}
|
FX2LOAD_OPT = --file=${FX2_FILE}
|
endif
|
endif
|
#
|
#
|
%.jconfig: %.svf
|
%.jconfig: %.svf
|
fx2load_wrapper --board=${ISE_BOARD} ${FX2LOAD_OPT}
|
fx2load_wrapper --board=${ISE_BOARD} ${FX2LOAD_OPT}
|
config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} jconfig $*.svf
|
xtwi config_wrapper --board=${ISE_BOARD} --path=${ISE_PATH} jconfig $*.svf
|
|
|
#
|
#
|
# Print log file summary
|
# Print log file summary
|
# input: %_*.log (not depended)
|
# input: %_*.log (not depended)
|
# output: .PHONY
|
# output: .PHONY
|
Line 237... |
Line 240... |
# %_ngn_ssim.log netgen log file (renamed %.nlf)
|
# %_ngn_ssim.log netgen log file (renamed %.nlf)
|
#
|
#
|
%_ssim.vhd: %.ngc
|
%_ssim.vhd: %.ngc
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
(cd ise; netgen -sim -intstyle xflow -ofmt vhdl -w $*.ngc)
|
(cd ise; xtwi netgen -sim -intstyle xflow -ofmt vhdl -w $*.ngc)
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.vhd ]; then cp -p ./ise/$*.vhd ./$*_ssim.vhd; fi
|
if [ -r ./ise/$*.vhd ]; then cp -p ./ise/$*.vhd ./$*_ssim.vhd; fi
|
if [ -r ./ise/$*.nlf ]; then cp -p ./ise/$*.nlf ./$*_ngn_ssim.log; fi
|
if [ -r ./ise/$*.nlf ]; then cp -p ./ise/$*.nlf ./$*_ngn_ssim.log; fi
|
if [ -r $*_ssim.vhd ]; then xst_count_bels -xsts $*_ssim.vhd; fi
|
if [ -r $*_ssim.vhd ]; then xst_count_bels -xsts $*_ssim.vhd; fi
|
#
|
#
|
Line 251... |
Line 254... |
# %_ngn_fsim.log netgen log file (renamed %.nlf)
|
# %_ngn_fsim.log netgen log file (renamed %.nlf)
|
#
|
#
|
%_fsim.vhd: %.ngc
|
%_fsim.vhd: %.ngc
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
if [ -r $*.ngc ]; then cp -p $*.ngc ./ise; fi
|
(cd ise; ngdbuild -p ${ISE_PATH} -nt timestamp -intstyle xflow \
|
(cd ise; xtwi ngdbuild -p ${ISE_PATH} -nt timestamp -intstyle xflow \
|
$*.ngc $*.ngd)
|
$*.ngc $*.ngd)
|
(cd ise; netgen -sim -intstyle xflow -ofmt vhdl -w $*.ngd)
|
(cd ise; netgen -sim -intstyle xflow -ofmt vhdl -w $*.ngd)
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*.vhd ]; then cp -p ./ise/$*.vhd ./$*_fsim.vhd; fi
|
if [ -r ./ise/$*.vhd ]; then cp -p ./ise/$*.vhd ./$*_fsim.vhd; fi
|
if [ -r ./ise/$*.nlf ]; then cp -p ./ise/$*.nlf ./$*_ngn_fsim.log; fi
|
if [ -r ./ise/$*.nlf ]; then cp -p ./ise/$*.nlf ./$*_ngn_fsim.log; fi
|
Line 273... |
Line 276... |
#
|
#
|
%_tsim.vhd %_tsim.sdf: %.ncd
|
%_tsim.vhd %_tsim.sdf: %.ncd
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ ! -d ./ise ]; then mkdir ./ise; fi
|
if [ -r $*.ncd ]; then cp -p $*.ncd ./ise; fi
|
if [ -r $*.ncd ]; then cp -p $*.ncd ./ise; fi
|
if [ -r $*.pcf ]; then cp -p $*.pcf ./ise; fi
|
if [ -r $*.pcf ]; then cp -p $*.pcf ./ise; fi
|
(cd ise; netgen -ofmt vhdl -sim -w -intstyle xflow -pcf \
|
(cd ise; xtwi netgen -ofmt vhdl -sim -w -intstyle xflow -pcf \
|
$*.pcf $*.ncd $*_tsim.vhd )
|
$*.pcf $*.ncd $*_tsim.vhd )
|
(cd ./ise; chmod -x *.* )
|
(cd ./ise; chmod -x *.* )
|
if [ -r ./ise/$*_tsim.vhd ]; then cp -p ./ise/$*_tsim.vhd .; fi
|
if [ -r ./ise/$*_tsim.vhd ]; then cp -p ./ise/$*_tsim.vhd .; fi
|
if [ -r ./ise/$*_tsim.sdf ]; then cp -p ./ise/$*_tsim.sdf .; fi
|
if [ -r ./ise/$*_tsim.sdf ]; then cp -p ./ise/$*_tsim.sdf .; fi
|
if [ -r ./ise/$*_tsim.nlf ]; then cp -p ./ise/$*_tsim.nlf ./$*_ngn_tsim.log; fi
|
if [ -r ./ise/$*_tsim.nlf ]; then cp -p ./ise/$*_tsim.nlf ./$*_ngn_tsim.log; fi
|
Line 290... |
Line 293... |
vbomconv --dep_xst $< > $@
|
vbomconv --dep_xst $< > $@
|
#
|
#
|
# generate cpp'ed ucf files from ucf_cpp
|
# generate cpp'ed ucf files from ucf_cpp
|
#
|
#
|
%.ucf : %.ucf_cpp
|
%.ucf : %.ucf_cpp
|
cpp -I${RETROBASE}/rtl $*.ucf_cpp $*.ucf
|
cpp -C -I${RETROBASE}/rtl $*.ucf_cpp $*.ucf
|
#
|
#
|
# generate nested dependency rules for cpp'ed ucf files from ucf_cpp
|
# generate nested dependency rules for cpp'ed ucf files from ucf_cpp
|
#
|
#
|
%.dep_ucf_cpp : %.ucf_cpp
|
%.dep_ucf_cpp : %.ucf_cpp
|
cpp -I${RETROBASE}/rtl -MM $*.ucf_cpp |\
|
cpp -C -I${RETROBASE}/rtl -MM $*.ucf_cpp |\
|
sed 's/\.o:/\.ucf:/' > $*.dep_ucf_cpp
|
sed 's/\.o:/\.ucf:/' > $*.dep_ucf_cpp
|
#
|
#
|
include $(RETROBASE)/rtl/make/dontincdep.mk
|
include $(RETROBASE)/rtl/make/dontincdep.mk
|
#
|
#
|
.PHONY : ise_clean ise_tmp_clean
|
.PHONY : ise_clean ise_tmp_clean
|
Line 318... |
Line 321... |
rm -f *_tra.log
|
rm -f *_tra.log
|
rm -f *_map.log
|
rm -f *_map.log
|
rm -f *_par.log
|
rm -f *_par.log
|
rm -f *_pad.log
|
rm -f *_pad.log
|
rm -f *_twr.log
|
rm -f *_twr.log
|
|
rm -f *_tsi.log
|
rm -f *_bgn.log
|
rm -f *_bgn.log
|
rm -f *_ngn_[sft]sim.log
|
rm -f *_ngn_[sft]sim.log
|
rm -f *_svn.log
|
rm -f *_svn.log
|
rm -f *_sum.log
|
rm -f *_sum.log
|
#
|
#
|