-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathMakefile.synthesis
87 lines (65 loc) · 2.8 KB
/
Makefile.synthesis
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
TOPDIR=$(shell pwd)/../
TOESCR=$(TOPDIR)/hls/TOE
IPERFSRC=$(TOPDIR)/hls/iperf2_tcp
ECHOSRC=$(TOPDIR)/hls/echo_replay
ARPSRC=$(TOPDIR)/hls/arp_server
ETHSRC=$(TOPDIR)/hls/ethernet_inserter
ICMPSRC=$(TOPDIR)/hls/icmp_server
PKTSRC=$(TOPDIR)/hls/packet_handler
USRSRC=$(TOPDIR)/hls/user_abstraction
UDPSRC=$(TOPDIR)/hls/UDP
PORTSRC=$(TOPDIR)/hls/port_handler
TCLDIR=$(TOPDIR)/scripts
FPGAPART ?= xcu250-figd2104-2L-e
project = TOE_hls_prj IPERF2_TCP_hls_prj ECHOSERVER_hls_prj ARP_hls_prj \
ETH_inserter_hls_prj ICMP_hls_prj PKT_HANDLER_prj userAbstraction_prj \
portHandler_prj UDP_prj
all: build
build: $(project)
@echo -e "\e[94mIP Completed: $(project)\e[39m"
clean:
rm -rf *.log *.jou file* *.bak vivado*.str synlog.tcl .Xil fsm_encoding.os
distclean: clean
rm -rf $(project)
TOE_hls_prj: $(shell find $(TOESCR) -type f) \
$(TCLDIR)/toe_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/toe_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
IPERF2_TCP_hls_prj: $(shell find $(IPERFSRC) -type f) \
$(TCLDIR)/iperf2_tcp_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/iperf2_tcp_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
ECHOSERVER_hls_prj: $(shell find $(ECHOSRC) -type f) $(TCLDIR)/echo_server_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/echo_server_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
ARP_hls_prj: $(shell find $(ARPSRC) -type f) $(TCLDIR)/arp_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/arp_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
ETH_inserter_hls_prj: $(shell find $(ETHSRC) -type f) $(TCLDIR)/ethernet_inserter_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/ethernet_inserter_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
ICMP_hls_prj: $(shell find $(ICMPSRC) -type f) $(TCLDIR)/icmp_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/icmp_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
PKT_HANDLER_prj: $(shell find $(PKTSRC) -type f) $(TCLDIR)/packet_handler_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/packet_handler_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
userAbstraction_prj: $(shell find $(USRSRC) -type f) $(TCLDIR)/userAbstraction.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/userAbstraction.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
portHandler_prj: $(shell find $(PORTSRC) -type f) $(TCLDIR)/portHandler.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/portHandler.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
UDP_prj: $(shell find $(UDPSRC) -type f) $(TCLDIR)/udp_script.tcl
rm -rf $@
vivado_hls -f $(TCLDIR)/udp_script.tcl -tclargs $(TOPDIR) $@ $(FPGAPART)
.PHONY: list help
list:
@(make -rpn | sed -n -e '/^$$/ { n ; /^[^ .#][^% ]*:/p ; }' | sort | egrep --color '^[^ ]*:' )
help:
@echo "The basic usage of this makefile is:"
@echo -e " 1) Create the IPs"
@echo -e " \e[94mmake $(project)\e[39m"
@echo ""
@echo "Remember that you can always review this help with"
@echo -e " \e[94mmake help\e[39m"