2020-01-01 05:25:50 +08:00
|
|
|
#
|
|
|
|
# FPGA Makefile
|
|
|
|
#
|
|
|
|
RMDIR = rm -rf
|
|
|
|
# rmdir only if dir is empty, tolerate failure
|
|
|
|
RMDIR_SOFT = -rmdir
|
|
|
|
#
|
2020-07-02 17:47:46 +08:00
|
|
|
all: fpga_lf.bit fpga_hf.bit fpga_felica.bit
|
2009-08-28 07:29:49 +08:00
|
|
|
clean:
|
2020-07-02 17:47:46 +08:00
|
|
|
$(Q)$(RM) *.bgn *.drc *.ncd *.ngd *_par.xrpt *-placed.* *-placed_pad.* *_usage.xml xst_hf.srp xst_lf.srp xst_felica.srp
|
2020-01-01 05:25:50 +08:00
|
|
|
$(Q)$(RM) *.map *.ngc *.xrpt *.pcf *.rbt *.bld *.mrp *.ngm *.unroutes *_summary.xml netlist.lst
|
|
|
|
$(Q)$(RMDIR) *_auto_* xst
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2020-07-02 17:47:46 +08:00
|
|
|
#fpga_hf.ngc: fpga_hf.v fpga.ucf xst_hf.scr util.v hi_simulate.v hi_reader.v hi_iso14443a.v hi_sniffer.v hi_flite.v hi_get_trace.v
|
|
|
|
fpga_hf.ngc: fpga_hf.v fpga.ucf xst_hf.scr util.v hi_simulate.v hi_reader.v hi_iso14443a.v hi_sniffer.v hi_get_trace.v
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [-] XST $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)xst -ifn xst_hf.scr
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2020-07-02 17:47:46 +08:00
|
|
|
fpga_felica.ngc: fpga_felica.v fpga.ucf xst_felica.scr util.v hi_simulate.v hi_reader.v hi_sniffer.v hi_flite.v hi_get_trace.v
|
|
|
|
$(Q)$(RM) $@
|
|
|
|
$(info [-] XST $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)xst -ifn xst_felica.scr
|
2017-10-10 20:01:58 +08:00
|
|
|
|
2015-11-02 02:49:08 +08:00
|
|
|
fpga_lf.ngc: fpga_lf.v fpga.ucf xst_lf.scr util.v clk_divider.v lo_edge_detect.v lo_read.v lo_passthru.v lp20khz_1MSa_iir_filter.v min_max_tracker.v lf_edge_detect.v
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [-] XST $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)xst -ifn xst_lf.scr
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2014-06-20 07:02:59 +08:00
|
|
|
%.ngd: %.ngc
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [-] NGD $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)ngdbuild -aul -p xc2s30-5-vq100 -nt timestamp -uc fpga.ucf $< $@
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2014-06-20 07:02:59 +08:00
|
|
|
%.ncd: %.ngd
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [-] MAP $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)map -p xc2s30-5-vq100 $<
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2014-06-20 07:02:59 +08:00
|
|
|
%-placed.ncd: %.ncd
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [-] PAR $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)par $< $@
|
2009-08-28 07:29:49 +08:00
|
|
|
|
2014-06-20 07:02:59 +08:00
|
|
|
%.bit: %-placed.ncd
|
2019-08-31 03:55:13 +08:00
|
|
|
$(Q)$(RM) $@ $*.drc $*.rbt
|
2019-06-02 06:25:25 +08:00
|
|
|
$(info [=] BITGEN $@)
|
|
|
|
$(Q)$(XILINX_TOOLS_PREFIX)bitgen $< $@
|
2009-08-28 07:29:49 +08:00
|
|
|
|
|
|
|
.PHONY: all clean help
|
|
|
|
help:
|
|
|
|
@echo Possible targets:
|
2019-03-10 18:35:03 +08:00
|
|
|
@echo + all - Make fpga.bit, the FPGA bitstream
|
2009-08-31 06:35:12 +08:00
|
|
|
@echo + clean - Clean intermediate files, does not clean fpga.bit
|
2019-03-10 18:35:03 +08:00
|
|
|
|