2013-06-11 12:49:35 -05:00
|
|
|
|
|
|
|
include generate.lst
|
|
|
|
|
|
|
|
test: $(TARGETS)
|
|
|
|
|
2013-06-26 05:34:06 -05:00
|
|
|
vivado: $(addprefix check_vivado/,$(notdir $(TARGETS)))
|
|
|
|
|
2013-07-03 13:40:54 -05:00
|
|
|
quartus: $(addprefix check_quartus/,$(notdir $(TARGETS)))
|
|
|
|
|
2013-07-05 07:21:24 -05:00
|
|
|
report:
|
|
|
|
ls check check_quartus/ check_vivado | grep '\.err$$' | sort -u | cut -f1 -d. | gawk '{ print "report/" $$0 ".html"; }' | xargs -r $(MAKE)
|
|
|
|
|
|
|
|
report/%.html:
|
|
|
|
bash report.sh $(notdir $(basename $@))
|
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
check/%.log: rtl/%.v xst/%.v
|
|
|
|
bash run-check.sh $(notdir $(basename $<))
|
|
|
|
|
2013-06-26 05:34:06 -05:00
|
|
|
check_vivado/%.log: rtl/%.v vivado/%.v
|
|
|
|
bash run-check.sh -vivado $(notdir $(basename $<))
|
|
|
|
|
2013-07-03 13:40:54 -05:00
|
|
|
check_quartus/%.log: rtl/%.v quartus/%.v
|
2013-07-04 07:50:03 -05:00
|
|
|
bash run-check.sh -quartus $(notdir $(basename $<))
|
2013-07-03 13:40:54 -05:00
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
xst/%.v: rtl/%.v
|
|
|
|
bash run-xst.sh $(notdir $(basename $<))
|
|
|
|
|
2013-06-26 05:34:06 -05:00
|
|
|
vivado/%.v: rtl/%.v
|
|
|
|
bash run-vivado.sh $(notdir $(basename $<))
|
|
|
|
|
2013-07-03 13:40:54 -05:00
|
|
|
quartus/%.v: rtl/%.v
|
|
|
|
bash run-quartus.sh $(notdir $(basename $<))
|
|
|
|
|
2013-06-11 12:49:35 -05:00
|
|
|
generate.lst: generate.cc
|
|
|
|
clang -Wall -o generate generate.cc -lstdc++
|
|
|
|
./generate
|
|
|
|
{ echo -n "TARGETS := "; ls rtl/ | sed 's,\.v$$,.log,; s,^,check/,;' | tr '\n' ' '; } > generate.lst
|
|
|
|
|
|
|
|
check_xl_cells:
|
|
|
|
../../yosys xl_cells_tb.ys
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf generate generate.lst check_temp xst_temp
|
|
|
|
|
|
|
|
mrproper: clean
|
|
|
|
rm -rf rtl xst check
|
|
|
|
|
2013-07-03 04:19:18 -05:00
|
|
|
backup:
|
|
|
|
mkdir -p ~/.yosys/xhammer
|
|
|
|
tar cvzf ~/.yosys/xhammer/xst_files.tar.gz xst
|
|
|
|
tar cvzf ~/.yosys/xhammer/vivado_files.tar.gz vivado
|
2013-07-03 13:40:54 -05:00
|
|
|
tar cvzf ~/.yosys/xhammer/quartus_files.tar.gz quartus
|
2013-07-03 04:19:18 -05:00
|
|
|
|
|
|
|
restore:
|
|
|
|
tar xvzf ~/.yosys/xhammer/xst_files.tar.gz
|
|
|
|
tar xvzf ~/.yosys/xhammer/vivado_files.tar.gz
|
2013-07-03 13:40:54 -05:00
|
|
|
tar xvzf ~/.yosys/xhammer/quartus_files.tar.gz
|
2013-07-03 04:19:18 -05:00
|
|
|
|
2013-07-05 07:21:24 -05:00
|
|
|
.PHONY: test vivado quartus report check_xl_cells clean mrproper backup restore
|
2013-07-03 13:40:54 -05:00
|
|
|
.PRECIOUS: check/%.log xst/%.v vivado/%.v quartus/%.v rtl/%.v generate.lst
|
2013-06-11 12:49:35 -05:00
|
|
|
|