-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
94 lines (66 loc) · 2.47 KB
/
Makefile
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
88
89
90
91
92
93
94
VIVADO?=/opt/Xilinx/Vivado/2020.1
VITIS?=/opt/Xilinx/Vitis/2020.1
DESIGN=$(wildcard design/*.v)
CONSTR=$(wildcard constr/*.xdc)
XCI=$(patsubst ip/%.xci,%,$(wildcard ip/*.xci))
FONT?=/usr/share/fonts/TTF/Consolas-Regular.ttf
export VIVADO
export VITIS
PART=xc7z020clg400-1
export PART
include config
export H_WIDTH
export H_START
export H_TOTAL
export V_HEIGHT
export FREQ
export KH
export KV
export SMOOTH_T
export FONT_SZ
image: build/BOOT.bin
build: build/output.bit
program: script/program.tcl script/common.tcl build/output.bit
./script/launch.sh $<
build/post_synth.dcp: script/synth.tcl script/common.tcl $(DESIGN) constr/timing.xdc config
./script/launch.sh $< $(XCI)
define IP_TEMPLATE
build/ip/$1/$1.dcp: script/synth_ip.tcl ip/$1.xci script/common.tcl
./script/launch.sh $$^
build/post_synth.dcp: build/ip/$1/$1.dcp
endef
$(foreach x,$(XCI),$(eval $(call IP_TEMPLATE,$(x))))
vivado-library/dvi2rgb/src/dgl_1080p_cea.data: design/edid.txt
mkdir -p build/
awk '{ if (a) { sub(/ \|/,":"); print; } } /--/ { a = 1; }' $< \
| xxd -r | xxd -b -c 1 | awk '{ print $$2; }' >$@
build/ip/dvi2rgb_1080p/dvi2rgb_1080p.dcp: vivado-library/dvi2rgb/src/dgl_1080p_cea.data
build/post_opt.dcp: script/opt.tcl script/common.tcl build/post_synth.dcp constr/debug.xdc
./script/launch.sh $<
build/post_place.dcp: script/place.tcl script/common.tcl build/post_opt.dcp constr/zybo-z7-20.xdc
./script/launch.sh $<
build/output.bit: script/route.tcl script/common.tcl build/post_place.dcp
./script/launch.sh $<
build/system.hdf: script/fsbl.tcl
./script/launch.sh $<
build/fsbl/fsbl.sdk/fsbl/Release/fsbl.elf: script/fsbl-sdk.tcl build/system.hdf
./script/launch-sdk.sh $<
build/BOOT.bin: script/fsbl.bif build/fsbl/fsbl.sdk/fsbl/Release/fsbl.elf build/output.bit
$(VITIS)/bin/bootgen -arch zynq -image $< -w -o build/BOOT.bin
build/overlay/node_modules: script/overlay/package.json script/overlay/package-lock.json
mkdir -p build/overlay/
cp -f $^ build/overlay/
cd build/overlay/ && npm ci
build/overlay/font_info.json: build/overlay/node_modules config
./build/overlay/node_modules/lv_font_conv/lv_font_conv.js --font $(FONT) -r 0x30-0x37 --size $(FONT_SZ) --format dump --bpp 1 -o build/overlay/
build/overlay/overlay.js: script/overlay/overlay.js
mkdir -p build/overlay/
cp $< $@
build/overlay/rom.bin: build/overlay/overlay.js build/overlay/font_info.json
node $^ >$@
build/BOOT.bin: build/overlay/rom.bin
constr/debug.xdc:
touch $@
clean:
rm -rf build/
.PHONY: image build program clean