Makefile 1.48 KB
Newer Older
1 2 3 4 5 6
TARGET = cute_top
PROJECT = cute_top_wrc

include ../../../dir_list.mk

.PHONY: all
Qiang Du's avatar
Qiang Du committed
7
all: $(TARGET)_wrc.bin
8 9 10 11 12 13 14 15

$(PROJECT).xise: Manifest.py
	python2.7 $(TOP)submodules/hdl-make/hdlmake ise-project

# Xilinx UG658
$(TARGET)_wrc.bit: $(FW_DIR)/wrc.elf $(TARGET).bit $(TARGET)_bd.bmm
	data2mem -bm $(word 3, $^) -bd $< -bt $(word 2, $^) -o b $@

Qiang Du's avatar
Qiang Du committed
16 17 18
$(TARGET)_wrc.bin: $(TARGET)_wrc.bit
	promgen -u 0x0 $< -p bin -w -b

19 20 21 22 23 24 25 26 27
$(TARGET).bmm:  $(GW_DIR)/top/cute_wr/wr_core_demo/cute.bmm
	cp $< $@

$(TARGET)_bd.bmm $(TARGET).bit: $(PROJECT).xise $(TARGET).bmm
	printf "project open $< \n\
	    project set {Hierarchy Separator} / \n\
	    xfile add $(word 2, $^) \n\
	    process run {Generate Programming File} -force rerun" | xtclsh

Qiang Du's avatar
Qiang Du committed
28
ISE_CRAP := *.b *.html $(TARGET).bgn $(TARGET).bld $(TARGET).cmd_log *.drc $(TARGET).lso *.ncd $(TARGET).ngc $(TARGET).ngd $(TARGET).ngr $(TARGET).pad $(TARGET).par $(TARGET).pcf $(TARGET).prj $(TARGET).ptwx $(TARGET).stx $(TARGET).syr $(TARGET).twr $(TARGET).twx $(TARGET).gise $(TARGET).unroutes $(TARGET).ut $(TARGET).xpi $(TARGET).xst $(TARGET)_bitgen.xwbt $(TARGET)_guide.ncd $(TARGET)_map.map $(TARGET)_map.mrp $(TARGET)_map.ncd $(TARGET)_map.ngm $(TARGET)_map.xrpt $(TARGET)_ngdbuild.xrpt $(TARGET)_pad.csv $(TARGET)_pad.txt $(TARGET)_par.xrpt $(TARGET)_summary.xml $(TARGET)_usage.xml $(TARGET)_xst.xrpt webtalk.log webtalk_pn.xml run.tcl $(PROJECT).gise $(TARGET)_wrc.prm $(TARGET)_wrc.cfi
29 30 31 32

clean:
	rm -f $(PROJECT).xise $(ISE_CRAP) *.bmm
	rm -rf xst xlnx_auto_*_xdb iseconfig _xmsgs _ngo