Skip to content

Commit 0449bff

Browse files
rollinsmGitHub Enterprise
authored andcommitted
New Tutorial: AIE/D/14-Bitonic-sorting
1 parent cbd449c commit 0449bff

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11428
-0
lines changed
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#
2+
# Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved.
3+
# SPDX-License-Identifier: MIT
4+
#
5+
# Author: Mark Rollins
6+
7+
ECHO = @echo
8+
9+
export TARGET := hw
10+
11+
RELEASE=2023.2
12+
BOARD=vck190
13+
BASE_NUM=202320_1
14+
15+
# Platform Selection...
16+
VERSAL_VITIS_PLATFORM = xilinx_${BOARD}\_base_${BASE_NUM}
17+
VITIS_PLATFORM_DIR = ${PLATFORM_REPO_PATHS}/${VERSAL_VITIS_PLATFORM}
18+
export VITIS_PLATFORM_XPFM = ${VITIS_PLATFORM_DIR}/${VERSAL_VITIS_PLATFORM}.xpfm
19+
20+
# Set SysRoot, RootFS and Image
21+
export VITIS_SYSROOTS = ${COMMON_IMAGE_VERSAL}/sysroots/cortexa72-cortexa53-xilinx-linux
22+
export SDKTARGETSYSROOT = ${VITIS_SYSROOTS}
23+
export KERNEL_IMAGE = ${COMMON_IMAGE_VERSAL}/Image
24+
export ROOTFS = ${COMMON_IMAGE_VERSAL}/rootfs.ext4
25+
export XLNX_VERSAL = ${COMMON_IMAGE_VERSAL}
26+
export PLATFORM = ${VITIS_PLATFORM_XPFM}
27+
export SYSROOT = ${SDKTARGETSYSROOT}
28+
29+
##############
30+
# Build Flow #
31+
##############
32+
.PHONY: clean help
33+
34+
help::
35+
$(ECHO) "Makefile Usage:"
36+
$(ECHO) " make all"
37+
$(ECHO) " Command to compile and simulate all designs"
38+
$(ECHO) ""
39+
$(ECHO) " make clean"
40+
$(ECHO) " Command to remove all the generated files."
41+
42+
all: all_fft
43+
44+
all_fft:
45+
$(MAKE) all -C bitonic_fp16
46+
$(MAKE) all -C bitonic_fp1024
47+
$(MAKE) all -C sortcpp_fp16
48+
$(MAKE) all -C sortcpp_fp1024
49+
50+
clean:
51+
$(MAKE) clean -C bitonic_fp16
52+
$(MAKE) clean -C bitonic_fp1024
53+
$(MAKE) clean -C sortcpp_fp16
54+
$(MAKE) clean -C sortcpp_fp1024
55+
@/bin/rm -rf .crashReporter*
56+

AI_Engine_Development/AIE/Design_Tutorials/14-Bitonic-Sorting/README.md

Lines changed: 314 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#
2+
# Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
3+
# SPDX-License-Identifier: MIT
4+
#
5+
# Author: Mark Rollins
6+
7+
AIE_SIM_ONLY := false
8+
9+
SIM_FIFO := false
10+
11+
MY_APP := bitonic_fp1024_app
12+
MY_SOURCES := ${MY_APP}.cpp bitonic_fp1024.h bitonic_fp1024.cpp bitonic_fp1024_graph.h
13+
14+
PLATFORM_USE := xilinx_vck190_base_202320_1
15+
PLATFORM ?= ${PLATFORM_REPO_PATHS}/${PLATFORM_USE}/${PLATFORM_USE}.xpfm
16+
17+
CHECK_FIFO := --aie.evaluate-fifo-depth --aie.Xrouter=disablePathBalancing
18+
19+
AIE_OUTPUT := libadf.a
20+
21+
AIE_FLAGS := --platform=${PLATFORM} ${MY_APP}.cpp --aie.output-archive=${AIE_OUTPUT}
22+
23+
ifeq (${SIM_FIFO}, true)
24+
AIE_FLAGS := ${AIE_FLAGS} ${CHECK_FIFO}
25+
endif
26+
ifeq (${AIE_SIM_ONLY},true)
27+
AIE_FLAGS := ${AIE_FLAGS} --aie.Xpreproc="-DAIE_SIM_ONLY"
28+
endif
29+
30+
31+
.PHONY: help clean x86com x86sim sim profile throughput
32+
33+
help::
34+
@echo "Makefile Usage:"
35+
@echo " make all"
36+
@echo " Command to generate everything for this design"
37+
@echo ""
38+
@echo " make compile"
39+
@echo " Run AIE compiler and build the design"
40+
@echo ""
41+
@echo " make profile"
42+
@echo " Run AIE simulator with profiling and generate outputs suitable for Vitis Analyzer"
43+
@echo ""
44+
@echo " make analyze"
45+
@echo " Run Vitis Analyzer to inspect results"
46+
@echo ""
47+
@echo " make throughput"
48+
@echo " Evaluate the achieved throughput at the output"
49+
@echo ""
50+
@echo " make clean"
51+
@echo " Command to remove all the generated files."
52+
53+
all: ${AIE_OUTPUT} sim
54+
55+
x86all: clean x86com x86sim
56+
57+
gen_vectors:
58+
matlab -batch "gen_vectors"
59+
60+
${AIE_OUTPUT}: ${MY_SOURCES}
61+
v++ --compile --config aie.cfg --mode aie --target=hw ${AIE_FLAGS} |& tee log
62+
63+
x86com:
64+
v++ --compile --config aie.cfg --mode aie --target=x86sim ${AIE_FLAGS} |& tee log
65+
66+
sim:
67+
aiesimulator |& tee -a log
68+
69+
x86sim:
70+
x86simulator |& tee -a log
71+
72+
profile:
73+
aiesimulator --online -wdb -text --profile |& tee -a log
74+
75+
trace:
76+
aiesimulator --online -wdb -text |& tee -a log
77+
78+
throughput:
79+
@../../tools/python/throughput.py aiesimulator_output/data/sig_o.txt
80+
81+
loop_II:
82+
@../../tools/python/get_loop_II.py Work/aie
83+
84+
regression:
85+
matlab -batch regression
86+
87+
analyze:
88+
vitis_analyzer aiesimulator_output/default.aierun_summary
89+
90+
clean:
91+
rm -rf .Xil Work libadf.a
92+
rm -rf aiesimulator_output* aiesimulator*.log
93+
rm -rf x86simulator_output*
94+
rm -rf log log*
95+
rm -rf *.xpe *.elf *.db *.soln Map_* xnw* *.lp *.log .xil .Xil *.lp *.db *.log *.exe *.vcd *.json
96+
rm -rf vitis_analyzer* pl_sample_counts* pl_sample_count_*
97+
rm -rf temp ISS_RPC_SERVER_PORT .crashReporter .AIE_SIM_CMD_LINE_OPTIONS
98+
rm -rf system*.* trdata.aiesim function_wdb_dir
99+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (C) 2024, Advanced Micro Devices, Inc. All rights reserved.
3+
# SPDX-License-Identifier: MIT
4+
#
5+
# Author: Mark Rollins
6+
7+
[aie]
8+
9+
kernel-linting=true
10+
xlopt=1
11+
verbose=true
12+
pl-freq=625
13+
Xmapper=BufferOptLevel9

0 commit comments

Comments
 (0)