-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (49 loc) · 2.12 KB
/
Copy pathMakefile
File metadata and controls
58 lines (49 loc) · 2.12 KB
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
# Adapted from Lab 3 top-level Makefile
DESIGN_NAME ?= FlashAttnKernel
AWS_DESIGN_NAME ?= design_top
SUBMISSION_NAME ?= flashattention-kernel-submission
REPO_TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
SRC_HOME := $(REPO_TOP)/src
HLS_HOME := $(REPO_TOP)/hls
REPORT_HOME := $(REPO_TOP)/reports
AWS_HOME := $(REPO_TOP)/$(AWS_DESIGN_NAME)
AWS_LOGS := $(AWS_HOME)/logs
.PHONY: systemc_sim hls_sim hls_sim_debug clean submission copy_rtl hls
copy_rtl:
mkdir -p $(AWS_HOME)/design
mkdir -p $(REPORT_HOME)/hls
cp $(HLS_HOME)/$(DESIGN_NAME)/Catapult/$(DESIGN_NAME).v1/concat_$(DESIGN_NAME).v $(AWS_HOME)/design || true
cp $(HLS_HOME)/$(DESIGN_NAME)/Catapult/$(DESIGN_NAME).v1/$(DESIGN_NAME).rpt $(REPORT_HOME)/hls/ || true
cp $(HLS_HOME)/$(DESIGN_NAME)/Catapult/$(DESIGN_NAME).v1/scverify/concat_sim_$(DESIGN_NAME)_v_vcs/sim.log $(REPORT_HOME)/hls/$(DESIGN_NAME)_hls_sim.log || true
systemc_sim:
cd $(SRC_HOME)/$(DESIGN_NAME) && make sim_test && make run
hls: hls_sim copy_rtl
hls_sim:
cd $(HLS_HOME)/$(DESIGN_NAME) && make hls
hls_sim_debug:
cd $(HLS_HOME)/$(DESIGN_NAME) && make vcs_debug
verdi -ssf $(HLS_HOME)/$(DESIGN_NAME)/default.fsdb \
-dbdir $(HLS_HOME)/$(DESIGN_NAME)/Catapult/$(DESIGN_NAME).v1/scverify/concat_sim_$(DESIGN_NAME)_v_vcs/sc_main.daidir/
clean:
cd $(SRC_HOME)/$(DESIGN_NAME) && make clean || true
cd $(HLS_HOME)/$(DESIGN_NAME) && make clean || true
rm -rf design_top/build/checkpoints/
rm -rf design_top/build/constraints/generated_cl_clocks_aws.xdc
rm -rf design_top/build/reports/
rm -rf design_top/build/src_post_encryption
rm -rf design_top/build/scripts/hd_visual/
rm -rf design_top/build/scripts/.Xil/
rm -rf design_top/build/scripts/*.jou
rm -rf design_top/build/scripts/*.vivado.log
rm -rf design_top/build/scripts/*.txt
rm -rf design_top/verif/sim/
rm -rf design_top/software/runtime/design_top
rm -rf ./*~ ./*.key ./core* ./Catapult* ./catapult* ./*.log
rm -rf ./design_checker_*.tcl ./DVE* ./verdi* ./slec* ./novas*
rm -rf ./*.fsdb ./*.saif* ./*.vpd
submission:
zip -r $(SUBMISSION_NAME).zip \
src/$(DESIGN_NAME)/FlashAttnKernel.h \
design_top/design/concat_$(DESIGN_NAME).v \
reports \
docs