Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
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
# HLS using Vitis HLS
# ###################
HLS_SRC ?= hls_top.cpp
HLS_TOP ?= hls_top
###
PART := xc7z020-1clg400
.PHONY: default-hls
default-hls: ip
HLS_IP = hls-proj/s/impl/export.zip
.PHONY: hls ip
hls ip: $(HLS_IP)
$(HLS_IP): hls.tcl hls-proj/hls.app $(HLS_SRC)
vitis_hls -f $<
hls-proj/hls.app: hls-proj.tcl
vitis_hls -f $<
hls.tcl:
@echo open_project hls-proj > $@
@echo open_solution s >> $@
@echo csynth_design >> $@
@echo export_design -format ip_catalog >> $@
@echo exit >> $@
hls-proj.tcl:
@echo open_project -reset hls-proj > $@
@echo add_files $(HLS_SRC) >> $@
@echo set_top $(HLS_TOP) >> $@
@echo open_solution s >> $@
@echo set_part $(PART) >> $@
@echo exit >> $@
clean-hls:
$(RM) vitis_hls.log
$(RM) -r hls-proj
clean: clean-hls
clean-hls-all: clean-hls
$(RM) hls{,-proj}.tcl
clean-all: clean-hls-all