Newer
Older
###############################################################################
# Global receipes
none:
$(info You should specify what to make: ip, sim, clean, clean-all)
ip:component.xml
sim:
###############################################################################
# Configuration
# TODO: better way to configure ?
hdlpkgsrc :=
#hdl_pkg/combpm_gtwrapper_CAENELS4SFP_1L_pkg.vhd
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
###############################################################################
# Generate a source list, depending on the config
rdlsrc := $(shell ls rdl/*.rdl)
rdltarget := $(rdlsrc:rdl/%.rdl=hdl/%.vhd)
hdlsrc := $(shell ls hdl/*.vhd) $(rdltarget) $(hdlpkgsrc)
# TODO: depends on the configuration
tcl/sources.tcl:
echo read_vhdl {$(hdlsrc)} > $@
###############################################################################
# Compute interface from rdl files
# TODO: generic rule from variables
hdl/combpm_protocol_electron_ctrl.vhd: rdl/combpm_protocol_electron_ctrl.rdl
hectare --axi-vhdl $@ $<
###############################################################################
# Package IP
component.xml:tcl/sources.tcl tcl/combpm.tcl $(hdlsrc) $(xcisrc)
vivado -mode batch -source tcl/combpm.tcl
###############################################################################
# Cleaner Rules
clean:
rm -f vivado*.log vivado*.jou
clean-ip:
rm -rf ip_proj ip_user_files xgui
rm -f component.xml
clean-sim:
rm -f *.wdb
clean-all:clean-ip clean
rm -f tcl/sources.tcl
.PHONY: clean clean-ip clean-sim clean-all none ip sim