Skip to content

Commit 312129d

Browse files
SDA USRsdausr
authored and
GitHub Enterprise
committed
Squashed 'ultrasound' changes from b0ee140..bf03a6b (#838)
bf03a6b Merge pull request #96 from tianminr/next 1e4c5b5 modify for os selection 6acfd73 Merge pull request #94 from liyuanz/next f123e12 update d8dfe53 update 6af59f4 update 8679e83 Merge pull request #93 from liyuanz/add_memory2 5f3f2fa update Co-authored-by: sdausr <sdausr@xilinx.com>
1 parent 42d7d0c commit 312129d

Some content is hidden

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

75 files changed

+2831
-2544
lines changed

ultrasound/L2/tests/absV/Makefile

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2019-2022 Xilinx, Inc.
1+
# Copyright (C) 2019-2022, Xilinx, Inc.
2+
# Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -11,7 +12,7 @@
1112
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
# See the License for the specific language governing permissions and
1314
# limitations under the License.
14-
# vitis makefile-generator v2.0.8
15+
# vitis makefile-generator v2.0.9
1516

1617
############################## Help Section ##############################
1718
.PHONY: help
@@ -56,14 +57,14 @@ XFLIB_DIR = $(XF_PROJ_ROOT)
5657

5758
# setting devault value
5859
TARGET ?= aiesim
59-
HOST_ARCH ?=
60+
HOST_ARCH ?= aarch64
6061

6162
#setting PLATFORM
6263
ifeq ($(PLATFORM),)
6364
PLATFORM := $(DEVICE)
6465
endif
6566
ifeq ($(PLATFORM),)
66-
PLATFORM :=
67+
PLATFORM := xilinx_vck190_base_202310_1
6768
endif
6869

6970
# #################### Checking if PLATFORM in whitelist ############################
@@ -130,7 +131,9 @@ AIE_CXXFLAGS += $(AIE_CXXFLAGS_INC)
130131
AIE_CONTAINER = $(TEMP_DIR)/libadf.a
131132
AIE_WORK_DIR = $(CUR_DIR)/Work
132133
AIE_PKG_DIR = $(AIE_WORK_DIR)
134+
133135
AIE_CXXFLAGS += -I $(XFLIB_DIR)/L1/include/
136+
134137
$(AIE_WORK_DIR)/ps/c_rts/aie_control_xrt.cpp: $(AIE_CONTAINER)
135138

136139
EXE_FILE_DEPS += $(AIE_CONTAINER)
@@ -159,7 +162,7 @@ endif
159162
######################### binary container global settings ##########################
160163

161164
############################## Setting Rules for AIE (Building Kernels) ##################
162-
$(AIE_CONTAINER): $(XFLIB_DIR)/L2/tests/absV/test.cpp $(INST_FILES)
165+
$(AIE_CONTAINER): $(XFLIB_DIR)/L2/tests/absV/test.cpp
163166
$(ECHO) "Compiling: libadf.a"
164167
mkdir -p $(dir $@)
165168
$(AIECXX) $(AIE_CXXFLAGS) $^
@@ -284,7 +287,7 @@ endif
284287

285288
else
286289
@echo $(RUN_DEPS)
287-
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
290+
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
288291
grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1
289292

290293
endif
@@ -297,7 +300,7 @@ ifeq ($(HOST_ARCH), x86)
297300

298301
else
299302
@echo $(RUN_DEPS)
300-
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
303+
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
301304
grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1
302305

303306
endif
@@ -315,7 +318,7 @@ endif
315318

316319
############################## Setting Targets ##############################
317320

318-
.PHONY: clean cleanall emconfig
321+
.PHONY: clean cleanall emconfig gen_instances valid_params
319322
emconfig: $(EMCONFIG)
320323

321324
.PHONY: host

ultrasound/L2/tests/absV/utils.mk

+65-61
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#
2-
# Copyright 2019-2022 Xilinx, Inc.
1+
# Copyright (C) 2019-2022, Xilinx, Inc.
2+
# Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
15-
# vitis makefile-generator v2.0.8
15+
# vitis makefile-generator v2.0.9
1616
#
1717
#+-------------------------------------------------------------------------------
1818
# The following parameters are assigned with default values. These parameters can
@@ -69,23 +69,79 @@ check_device:
6969
then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\
7070
fi;
7171

72+
ifneq (,$(wildcard $(PLATFORM)))
73+
# Use PLATFORM as a file path
74+
XPLATFORM := $(PLATFORM)
75+
else
76+
# Use PLATFORM as a file name pattern
77+
# 1. search paths specified by variable
78+
ifneq (,$(PLATFORM_REPO_PATHS))
79+
# 1.1 as exact name
80+
XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm)))
81+
# 1.2 as a pattern
82+
ifeq (,$(XPLATFORM))
83+
XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm))
84+
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
85+
endif # 1.2
86+
endif # 1
87+
# 2. search Vitis installation
88+
ifeq (,$(XPLATFORM))
89+
# 2.1 as exact name vitis < 2022.2
90+
XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm))
91+
ifeq (,$(XPLATFORM))
92+
# 2.2 as exact name vitis >= 2022.2
93+
XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm))
94+
# 2.3 as a pattern vitis < 2022.2
95+
ifeq (,$(XPLATFORM))
96+
XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm)
97+
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
98+
# 2.4 as a pattern vitis >= 2022.2
99+
ifeq (,$(XPLATFORM))
100+
XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm)
101+
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
102+
endif # 2.4
103+
endif # 2.3
104+
endif # 2.2
105+
endif # 2
106+
# 3. search default locations
107+
ifeq (,$(XPLATFORM))
108+
# 3.1 as exact name
109+
XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm))
110+
# 3.2 as a pattern
111+
ifeq (,$(XPLATFORM))
112+
XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm)
113+
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
114+
endif # 3.2
115+
endif # 3
116+
endif
117+
118+
define MSG_PLATFORM
119+
No platform matched pattern '$(PLATFORM)'.
120+
Available platforms are: $(XPLATFORMS)
121+
To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file.
122+
endef
123+
export MSG_PLATFORM
124+
125+
.PHONY: check_platform
126+
check_platform:
127+
ifeq (,$(XPLATFORM))
128+
@echo "$${MSG_PLATFORM}" && false
129+
endif
130+
#Check ends
131+
72132
#get HOST_ARCH by PLATFORM
73-
ifneq (,$(PLATFORM))
74-
HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//')
133+
HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//')
75134
ifeq ($(HOST_ARCH_temp), x86)
76135
HOST_ARCH := x86
77136
else ifeq ($(HOST_ARCH_temp), cortex-a9)
78137
HOST_ARCH := aarch32
79138
else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp)))
80139
HOST_ARCH := aarch64
81140
endif
82-
endif
83-
84-
85141

86142
# Special processing for tool version/platform type
87143
VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1)
88-
AIE_TYPE := $(shell platforminfo $(PLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g')
144+
AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g')
89145
ifeq (AIE ,$(findstring AIE, $(AIE_TYPE)))
90146
HAS_AIE := on
91147
else
@@ -280,58 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH)
280336
endif
281337
endif
282338

283-
ifneq (,$(wildcard $(PLATFORM)))
284-
# Use PLATFORM as a file path
285-
XPLATFORM := $(PLATFORM)
286-
else
287-
# Use PLATFORM as a file name pattern
288-
# 1. search paths specified by variable
289-
ifneq (,$(PLATFORM_REPO_PATHS))
290-
# 1.1 as exact name
291-
XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm)))
292-
# 1.2 as a pattern
293-
ifeq (,$(XPLATFORM))
294-
XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm))
295-
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
296-
endif # 1.2
297-
endif # 1
298-
# 2. search Vitis installation
299-
ifeq (,$(XPLATFORM))
300-
# 2.1 as exact name
301-
XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm))
302-
# 2.2 as a pattern
303-
ifeq (,$(XPLATFORM))
304-
XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm)
305-
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
306-
endif # 2.2
307-
endif # 2
308-
# 3. search default locations
309-
ifeq (,$(XPLATFORM))
310-
# 3.1 as exact name
311-
XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm))
312-
# 3.2 as a pattern
313-
ifeq (,$(XPLATFORM))
314-
XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm)
315-
XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/')))
316-
endif # 3.2
317-
endif # 3
318-
endif
319-
320-
define MSG_PLATFORM
321-
No platform matched pattern '$(PLATFORM)'.
322-
Available platforms are: $(XPLATFORMS)
323-
To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file.
324-
endef
325-
export MSG_PLATFORM
326-
327-
328-
.PHONY: check_platform
329-
check_platform:
330-
ifeq (,$(XPLATFORM))
331-
@echo "$${MSG_PLATFORM}" && false
332-
endif
333-
#Check ends
334-
335339
# Cleaning stuff
336340
RM = rm -f
337341
RMDIR = rm -rf

ultrasound/L2/tests/apodization/Makefile

+13-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
# Copyright 2019-2022 Xilinx, Inc.
1+
# Copyright (C) 2019-2022, Xilinx, Inc.
2+
# Copyright (C) 2022-2023, Advanced Micro Devices, Inc.
23
#
34
# Licensed under the Apache License, Version 2.0 (the "License");
45
# you may not use this file except in compliance with the License.
@@ -11,7 +12,7 @@
1112
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1213
# See the License for the specific language governing permissions and
1314
# limitations under the License.
14-
# vitis makefile-generator v2.0.8
15+
# vitis makefile-generator v2.0.9
1516

1617
############################## Help Section ##############################
1718
.PHONY: help
@@ -130,8 +131,9 @@ AIE_CXXFLAGS += $(AIE_CXXFLAGS_INC)
130131
AIE_CONTAINER = $(TEMP_DIR)/libadf.a
131132
AIE_WORK_DIR = $(CUR_DIR)/Work
132133
AIE_PKG_DIR = $(AIE_WORK_DIR)
133-
AIE_CXXFLAGS += -I $(XFLIB_DIR)/L1/include/
134-
AIE_CXXFLAGS += -I $(XFLIB_DIR)/L2/include/
134+
135+
AIE_CXXFLAGS += -I $(XFLIB_DIR)/L1/include/ -I $(XFLIB_DIR)/L2/include/
136+
135137
$(AIE_WORK_DIR)/ps/c_rts/aie_control_xrt.cpp: $(AIE_CONTAINER)
136138

137139
EXE_FILE_DEPS += $(AIE_CONTAINER)
@@ -145,12 +147,12 @@ ifeq ($(ps_on_x86), on)
145147
HOST_SRCS += $(XFLIB_DIR)/L2/tests/apodization/PS_host/host.cpp $(CUR_DIR)/Work/ps/c_rts/aie_control_xrt.cpp
146148
CXXFLAGS += -D __PS_ENABLE_AIE__
147149
CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L2/include -I $(XFLIB_DIR)/L2/tests/apodization/aie_graph
148-
CXXFLAGS += -include $(XFLIB_DIR)/L1/include/kernels.hpp
150+
CXXFLAGS += -include $(XFLIB_DIR)/L1/include/kernels.hpp
149151
else
150152
HOST_SRCS += $(XFLIB_DIR)/L2/tests/apodization/PS_host/host.cpp $(CUR_DIR)/Work/ps/c_rts/aie_control_xrt.cpp
151153
CXXFLAGS += -D __PS_ENABLE_AIE__
152154
CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L2/include -I $(XFLIB_DIR)/L2/tests/apodization/aie_graph
153-
CXXFLAGS += -include $(XFLIB_DIR)/L1/include/kernels.hpp
155+
CXXFLAGS += -include $(XFLIB_DIR)/L1/include/kernels.hpp
154156
endif
155157

156158
# workaround for opencv
@@ -234,7 +236,7 @@ $(BINARY_CONTAINERS): $(BINARY_CONTAINERS_DEPS)
234236
$(VPP) -l $(VPP_FLAGS) --temp_dir $(TEMP_DIR) --report_dir $(BUILD_REPORT_DIR)/apodization $(VPP_LDFLAGS) $(VPP_LDFLAGS_apodization) $(AIE_LDFLAGS) -o $@ $^
235237

236238
############################## Setting Rules for AIE (Building Kernels) ##################
237-
$(AIE_CONTAINER): $(XFLIB_DIR)/L2/tests/apodization/aie_graph/graph.cpp $(INST_FILES)
239+
$(AIE_CONTAINER): $(XFLIB_DIR)/L2/tests/apodization/aie_graph/graph.cpp
238240
$(ECHO) "Compiling: libadf.a"
239241
mkdir -p $(dir $@)
240242
$(AIECXX) $(AIE_CXXFLAGS) $^
@@ -272,7 +274,7 @@ endif
272274
@echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT)
273275
@echo 'exit $$return_code' >> $(RUN_SCRIPT)
274276
DATA_FILE := $(custom_data_file)
275-
DATA_DIR := $(CUR_DIR)//data $(custom_data_dir)
277+
DATA_DIR := $(CUR_DIR)/data $(custom_data_dir)
276278
SD_FILES += $(RUN_SCRIPT)
277279
SD_FILES += $(EXE_FILE)
278280
SD_FILES += $(EMCONFIG)
@@ -359,7 +361,7 @@ endif
359361

360362
else
361363
@echo $(RUN_DEPS)
362-
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
364+
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
363365
grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1
364366

365367
endif
@@ -372,7 +374,7 @@ ifeq ($(HOST_ARCH), x86)
372374

373375
else
374376
@echo $(RUN_DEPS)
375-
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
377+
$(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT))
376378
grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1
377379

378380
endif
@@ -399,7 +401,7 @@ endif
399401

400402
############################## Setting Targets ##############################
401403

402-
.PHONY: clean cleanall emconfig
404+
.PHONY: clean cleanall emconfig gen_instances valid_params
403405
emconfig: $(EMCONFIG)
404406

405407
.PHONY: host

0 commit comments

Comments
 (0)