From 005095adc1c4623900e142dc75b4f0d0ab685ba2 Mon Sep 17 00:00:00 2001 From: SDA USR <1391+sdausr@users.noreply.gitenterprise.xilinx.com> Date: Wed, 26 Apr 2023 09:40:42 +0800 Subject: [PATCH] Squashed 'utils' changes from f43b781..9361096 (#842) 9361096 Merge pull request #310 from liyuanz/update_makefile_hls b36d9fa update 742c178 Merge pull request #308 from liyuanz/update_makefile f9cc67a update makefile 269d83d Fix wrong buffer size in HLS tb (#307) 6edd579 Add warning to headers; add notice in doc (#306) ba4ca8b Merge pull request #305 from liyuanz/add_memory2 15ffcdc update Co-authored-by: sdausr --- .../examples/load_balance_processing/Makefile | 21 +- .../load_balance_processing/run_hls.tcl | 7 +- utils/L1/examples/multi_pu_kernel/Makefile | 21 +- utils/L1/examples/multi_pu_kernel/run_hls.tcl | 7 +- .../examples/round_robin_processing/Makefile | 21 +- .../round_robin_processing/run_hls.tcl | 7 +- .../examples/tag_select_processing/Makefile | 21 +- .../tag_select_processing/run_hls.tcl | 7 +- .../xf_datamover/check_stream_with_master.hpp | 5 + .../L1/include/hw/xf_datamover/get_count.hpp | 5 + .../hw/xf_datamover/load_master_to_stream.hpp | 5 + .../hw/xf_datamover/preloadable_ram.hpp | 5 + .../L1/include/hw/xf_datamover/read_const.hpp | 5 + .../L1/include/hw/xf_datamover/static_rom.hpp | 5 + .../xf_datamover/store_stream_to_master.hpp | 5 + utils/L1/include/hw/xf_datamover/types.hpp | 5 + .../include/hw/xf_datamover/write_result.hpp | 5 + utils/L1/include/xf_utils_hw/pl_datamover.hpp | 5 + utils/L1/tests/arg_parser/Makefile | 21 +- utils/L1/tests/arg_parser/run_hls.tcl | 7 +- utils/L1/tests/axi_to_char_stream/Makefile | 21 +- utils/L1/tests/axi_to_char_stream/run_hls.tcl | 7 +- utils/L1/tests/axi_to_multi_stream/Makefile | 21 +- .../L1/tests/axi_to_multi_stream/run_hls.tcl | 7 +- utils/L1/tests/axi_to_stream/Makefile | 21 +- utils/L1/tests/axi_to_stream/run_hls.tcl | 7 +- .../L1/tests/axi_to_stream_without_e/Makefile | 21 +- .../tests/axi_to_stream_without_e/run_hls.tcl | 7 +- utils/L1/tests/cache_ro_1DDR_with_e/Makefile | 21 +- .../L1/tests/cache_ro_1DDR_with_e/run_hls.tcl | 7 +- .../L1/tests/cache_ro_1DDR_without_e/Makefile | 21 +- .../tests/cache_ro_1DDR_without_e/run_hls.tcl | 7 +- utils/L1/tests/cache_ro_2DDR_with_e/Makefile | 21 +- .../L1/tests/cache_ro_2DDR_with_e/run_hls.tcl | 7 +- .../L1/tests/cache_ro_2DDR_without_e/Makefile | 21 +- .../cache_ro_2DDR_without_e/description.json | 4 +- .../tests/cache_ro_2DDR_without_e/run_hls.tcl | 7 +- utils/L1/tests/common/GCD/Makefile | 21 +- utils/L1/tests/common/GCD/run_hls.tcl | 7 +- utils/L1/tests/common/LCM/Makefile | 21 +- utils/L1/tests/common/LCM/run_hls.tcl | 7 +- utils/L1/tests/common/PowerOf2/Makefile | 21 +- utils/L1/tests/common/PowerOf2/run_hls.tcl | 7 +- .../hw/check_stream_with_master/Makefile | 21 +- .../hw/check_stream_with_master/run_hls.tcl | 7 +- .../tests/hw/load_master_to_stream/Makefile | 21 +- .../hw/load_master_to_stream/run_hls.tcl | 7 +- .../L1/tests/hw/preloadable_ram/bram/Makefile | 21 +- .../tests/hw/preloadable_ram/bram/run_hls.tcl | 7 +- .../L1/tests/hw/preloadable_ram/uram/Makefile | 21 +- .../tests/hw/preloadable_ram/uram/run_hls.tcl | 7 +- utils/L1/tests/hw/read_const/Makefile | 21 +- utils/L1/tests/hw/read_const/run_hls.tcl | 7 +- utils/L1/tests/hw/static_rom/Makefile | 21 +- utils/L1/tests/hw/static_rom/run_hls.tcl | 7 +- .../tests/hw/store_stream_to_master/Makefile | 21 +- .../hw/store_stream_to_master/run_hls.tcl | 7 +- utils/L1/tests/hw/write_result/Makefile | 21 +- utils/L1/tests/hw/write_result/run_hls.tcl | 7 +- utils/L1/tests/multiplexer/Makefile | 21 +- utils/L1/tests/multiplexer/run_hls.tcl | 7 +- .../pl_datamover/cuboid_read_hls/Makefile | 21 +- .../pl_datamover/cuboid_read_hls/run_hls.tcl | 6 +- .../tests/pl_datamover/cuboid_read_hls/tb.cpp | 14 +- .../pl_datamover/cuboid_write_hls/Makefile | 21 +- .../pl_datamover/cuboid_write_hls/run_hls.tcl | 6 +- .../pl_datamover/cuboid_write_hls/tb.cpp | 13 +- .../tests/stream_combine/combine_lsb/Makefile | 21 +- .../stream_combine/combine_lsb/run_hls.tcl | 7 +- .../tests/stream_combine/combine_msb/Makefile | 21 +- .../stream_combine/combine_msb/run_hls.tcl | 7 +- .../stream_combine/first_as_lsb/Makefile | 21 +- .../stream_combine/first_as_lsb/run_hls.tcl | 7 +- .../stream_combine/first_as_msb/Makefile | 21 +- .../stream_combine/first_as_msb/run_hls.tcl | 7 +- .../stream_discard/discard_array/Makefile | 21 +- .../stream_discard/discard_array/run_hls.tcl | 7 +- .../discard_one_stream/Makefile | 21 +- .../discard_one_stream/run_hls.tcl | 7 +- .../stream_discard/discard_share_e/Makefile | 21 +- .../discard_share_e/run_hls.tcl | 7 +- utils/L1/tests/stream_dup/Makefile | 21 +- utils/L1/tests/stream_dup/run_hls.tcl | 7 +- .../stream_n_to_one/load_balance/Makefile | 21 +- .../stream_n_to_one/load_balance/run_hls.tcl | 7 +- .../load_balance_type/Makefile | 21 +- .../load_balance_type/run_hls.tcl | 7 +- .../stream_n_to_one/round_robin/Makefile | 21 +- .../stream_n_to_one/round_robin/run_hls.tcl | 7 +- .../stream_n_to_one/round_robin_type/Makefile | 21 +- .../round_robin_type/run_hls.tcl | 7 +- .../tests/stream_n_to_one/tag_select/Makefile | 21 +- .../stream_n_to_one/tag_select/run_hls.tcl | 7 +- .../stream_n_to_one/tag_select_type/Makefile | 21 +- .../tag_select_type/run_hls.tcl | 7 +- .../stream_one_to_n/load_balance/Makefile | 21 +- .../stream_one_to_n/load_balance/run_hls.tcl | 7 +- .../load_balance_type/Makefile | 21 +- .../load_balance_type/run_hls.tcl | 7 +- .../stream_one_to_n/round_robin/Makefile | 21 +- .../stream_one_to_n/round_robin/run_hls.tcl | 7 +- .../stream_one_to_n/round_robin_type/Makefile | 21 +- .../round_robin_type/run_hls.tcl | 7 +- .../tests/stream_one_to_n/tag_select/Makefile | 21 +- .../stream_one_to_n/tag_select/run_hls.tcl | 7 +- .../stream_one_to_n/tag_select_type/Makefile | 21 +- .../tag_select_type/run_hls.tcl | 7 +- utils/L1/tests/stream_reorder/Makefile | 21 +- utils/L1/tests/stream_reorder/run_hls.tcl | 7 +- utils/L1/tests/stream_shuffle/Makefile | 21 +- utils/L1/tests/stream_shuffle/run_hls.tcl | 7 +- .../L1/tests/stream_split/split_lsb/Makefile | 21 +- .../tests/stream_split/split_lsb/run_hls.tcl | 7 +- .../L1/tests/stream_split/split_msb/Makefile | 21 +- .../tests/stream_split/split_msb/run_hls.tcl | 7 +- utils/L1/tests/stream_sync/Makefile | 21 +- utils/L1/tests/stream_sync/run_hls.tcl | 7 +- utils/L1/tests/stream_to_axi/Makefile | 21 +- utils/L1/tests/stream_to_axi/run_hls.tcl | 7 +- utils/L1/tests/uram_array/Makefile | 21 +- utils/L1/tests/uram_array/run_hls.tcl | 7 +- utils/L2/README.md | 2 + .../L2/tests/datamover/4D_datamover/Makefile | 64 ++- .../L2/tests/datamover/4D_datamover/utils.mk | 153 +++--- .../datamover/load_master_to_stream/Makefile | 80 +-- .../datamover/load_master_to_stream/utils.mk | 153 +++--- .../Makefile | 80 +-- .../utils.mk | 153 +++--- .../datamover/send_ram_to_stream/Makefile | 80 +-- .../datamover/send_ram_to_stream/utils.mk | 153 +++--- .../datamover/send_rom_to_stream/Makefile | 80 +-- .../datamover/send_rom_to_stream/utils.mk | 153 +++--- .../datamover/store_stream_to_master/Makefile | 80 +-- .../datamover/store_stream_to_master/utils.mk | 153 +++--- .../validate_stream_with_master/Makefile | 80 +-- .../validate_stream_with_master/utils.mk | 153 +++--- .../validate_stream_with_ram/Makefile | 80 +-- .../validate_stream_with_ram/utils.mk | 153 +++--- .../validate_stream_with_rom/Makefile | 80 +-- .../validate_stream_with_rom/utils.mk | 153 +++--- utils/L2/tests/utils_sw/shared_host/Makefile | 82 +-- utils/L2/tests/utils_sw/shared_host/utils.mk | 153 +++--- utils/docs/src/datamover/kernel_gen_guide.rst | 469 +----------------- utils/docs/src/release.rst | 6 + 144 files changed, 2383 insertions(+), 2001 deletions(-) diff --git a/utils/L1/examples/load_balance_processing/Makefile b/utils/L1/examples/load_balance_processing/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/examples/load_balance_processing/Makefile +++ b/utils/L1/examples/load_balance_processing/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/examples/load_balance_processing/run_hls.tcl b/utils/L1/examples/load_balance_processing/run_hls.tcl index c8f6b32f4c..3172fd712b 100644 --- a/utils/L1/examples/load_balance_processing/run_hls.tcl +++ b/utils/L1/examples/load_balance_processing/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/examples/multi_pu_kernel/Makefile b/utils/L1/examples/multi_pu_kernel/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/examples/multi_pu_kernel/Makefile +++ b/utils/L1/examples/multi_pu_kernel/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/examples/multi_pu_kernel/run_hls.tcl b/utils/L1/examples/multi_pu_kernel/run_hls.tcl index de6170b48d..f3de13dec0 100644 --- a/utils/L1/examples/multi_pu_kernel/run_hls.tcl +++ b/utils/L1/examples/multi_pu_kernel/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/examples/round_robin_processing/Makefile b/utils/L1/examples/round_robin_processing/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/examples/round_robin_processing/Makefile +++ b/utils/L1/examples/round_robin_processing/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/examples/round_robin_processing/run_hls.tcl b/utils/L1/examples/round_robin_processing/run_hls.tcl index 6360b418d9..192210ccdf 100644 --- a/utils/L1/examples/round_robin_processing/run_hls.tcl +++ b/utils/L1/examples/round_robin_processing/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/examples/tag_select_processing/Makefile b/utils/L1/examples/tag_select_processing/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/examples/tag_select_processing/Makefile +++ b/utils/L1/examples/tag_select_processing/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/examples/tag_select_processing/run_hls.tcl b/utils/L1/examples/tag_select_processing/run_hls.tcl index c8f6b32f4c..3172fd712b 100644 --- a/utils/L1/examples/tag_select_processing/run_hls.tcl +++ b/utils/L1/examples/tag_select_processing/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/include/hw/xf_datamover/check_stream_with_master.hpp b/utils/L1/include/hw/xf_datamover/check_stream_with_master.hpp index 2184e16783..89224b9555 100644 --- a/utils/L1/include/hw/xf_datamover/check_stream_with_master.hpp +++ b/utils/L1/include/hw/xf_datamover/check_stream_with_master.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_CHECK_STREAM_WITH_MASTER_HPP #define DATAMOVER_CHECK_STREAM_WITH_MASTER_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "hls_stream.h" #include "ap_axi_sdata.h" #include "xf_datamover/types.hpp" diff --git a/utils/L1/include/hw/xf_datamover/get_count.hpp b/utils/L1/include/hw/xf_datamover/get_count.hpp index 2eba15ca0b..6e8deb1afb 100644 --- a/utils/L1/include/hw/xf_datamover/get_count.hpp +++ b/utils/L1/include/hw/xf_datamover/get_count.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_GET_COUNTER_HPP #define DATAMOVER_GET_COUNTER_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "ap_int.h" #include "hls_stream.h" diff --git a/utils/L1/include/hw/xf_datamover/load_master_to_stream.hpp b/utils/L1/include/hw/xf_datamover/load_master_to_stream.hpp index 2f6a8fa75e..d241b8e2e7 100644 --- a/utils/L1/include/hw/xf_datamover/load_master_to_stream.hpp +++ b/utils/L1/include/hw/xf_datamover/load_master_to_stream.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_LOAD_MASTER_TO_STREAM_HPP #define DATAMOVER_LOAD_MASTER_TO_STREAM_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "ap_int.h" #include "ap_axi_sdata.h" #include "hls_stream.h" diff --git a/utils/L1/include/hw/xf_datamover/preloadable_ram.hpp b/utils/L1/include/hw/xf_datamover/preloadable_ram.hpp index 586cfce178..7abb54f79d 100644 --- a/utils/L1/include/hw/xf_datamover/preloadable_ram.hpp +++ b/utils/L1/include/hw/xf_datamover/preloadable_ram.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_PRELOADABLE_RAM_HPP #define DATAMOVER_PRELOADABLE_RAM_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "xf_datamover/types.hpp" #include "ap_axi_sdata.h" #include diff --git a/utils/L1/include/hw/xf_datamover/read_const.hpp b/utils/L1/include/hw/xf_datamover/read_const.hpp index 131a9a4a36..441a1a01c2 100644 --- a/utils/L1/include/hw/xf_datamover/read_const.hpp +++ b/utils/L1/include/hw/xf_datamover/read_const.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_READ_CONST_HPP #define DATAMOVER_READ_CONST_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "xf_datamover/types.hpp" #include diff --git a/utils/L1/include/hw/xf_datamover/static_rom.hpp b/utils/L1/include/hw/xf_datamover/static_rom.hpp index b9b396a195..c09df0a66a 100644 --- a/utils/L1/include/hw/xf_datamover/static_rom.hpp +++ b/utils/L1/include/hw/xf_datamover/static_rom.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_STATIC_ROM_HPP #define DATAMOVER_STATIC_ROM_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "xf_datamover/types.hpp" #include "ap_axi_sdata.h" #include diff --git a/utils/L1/include/hw/xf_datamover/store_stream_to_master.hpp b/utils/L1/include/hw/xf_datamover/store_stream_to_master.hpp index 715b4bb803..78138203bc 100644 --- a/utils/L1/include/hw/xf_datamover/store_stream_to_master.hpp +++ b/utils/L1/include/hw/xf_datamover/store_stream_to_master.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_STORE_STREAM_TO_MASTER_HPP #define DATAMOVER_STORE_STREAM_TO_MASTER_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "ap_int.h" #include "ap_axi_sdata.h" #include "hls_stream.h" diff --git a/utils/L1/include/hw/xf_datamover/types.hpp b/utils/L1/include/hw/xf_datamover/types.hpp index ff26bb5761..440eaadeee 100644 --- a/utils/L1/include/hw/xf_datamover/types.hpp +++ b/utils/L1/include/hw/xf_datamover/types.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_TYPES_HPP #define DATAMOVER_TYPES_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include #include diff --git a/utils/L1/include/hw/xf_datamover/write_result.hpp b/utils/L1/include/hw/xf_datamover/write_result.hpp index cdd28d84ca..3d440b1fa3 100644 --- a/utils/L1/include/hw/xf_datamover/write_result.hpp +++ b/utils/L1/include/hw/xf_datamover/write_result.hpp @@ -17,6 +17,11 @@ #ifndef DATAMOVER_WRITE_RESULT_HPP #define DATAMOVER_WRITE_RESULT_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include "xf_datamover/types.hpp" #include diff --git a/utils/L1/include/xf_utils_hw/pl_datamover.hpp b/utils/L1/include/xf_utils_hw/pl_datamover.hpp index 11f89851c0..027ac60369 100644 --- a/utils/L1/include/xf_utils_hw/pl_datamover.hpp +++ b/utils/L1/include/xf_utils_hw/pl_datamover.hpp @@ -24,6 +24,11 @@ #ifndef XF_UTILS_HW_PL_DATAMOVER_HPP #define XF_UTILS_HW_PL_DATAMOVER_HPP +#ifndef WARN_DEPR_UTILS_MOVER +#define WARN_DEPR_UTILS_MOVER +#warning Data Mover APIs in Utility Library have been moved to top-level Data Mover Library in 2023.1. Its files would be removed from Utility Library in future release. +#endif + #include #include #include diff --git a/utils/L1/tests/arg_parser/Makefile b/utils/L1/tests/arg_parser/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/arg_parser/Makefile +++ b/utils/L1/tests/arg_parser/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/arg_parser/run_hls.tcl b/utils/L1/tests/arg_parser/run_hls.tcl index facfc779c0..4cacd32a46 100644 --- a/utils/L1/tests/arg_parser/run_hls.tcl +++ b/utils/L1/tests/arg_parser/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/axi_to_char_stream/Makefile b/utils/L1/tests/axi_to_char_stream/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/axi_to_char_stream/Makefile +++ b/utils/L1/tests/axi_to_char_stream/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/axi_to_char_stream/run_hls.tcl b/utils/L1/tests/axi_to_char_stream/run_hls.tcl index 07cc613ab4..800a5b4ac2 100644 --- a/utils/L1/tests/axi_to_char_stream/run_hls.tcl +++ b/utils/L1/tests/axi_to_char_stream/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/axi_to_multi_stream/Makefile b/utils/L1/tests/axi_to_multi_stream/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/axi_to_multi_stream/Makefile +++ b/utils/L1/tests/axi_to_multi_stream/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/axi_to_multi_stream/run_hls.tcl b/utils/L1/tests/axi_to_multi_stream/run_hls.tcl index 2d97343758..2e3b1326a6 100644 --- a/utils/L1/tests/axi_to_multi_stream/run_hls.tcl +++ b/utils/L1/tests/axi_to_multi_stream/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/axi_to_stream/Makefile b/utils/L1/tests/axi_to_stream/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/axi_to_stream/Makefile +++ b/utils/L1/tests/axi_to_stream/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/axi_to_stream/run_hls.tcl b/utils/L1/tests/axi_to_stream/run_hls.tcl index 952be47d44..d369b1d7b5 100644 --- a/utils/L1/tests/axi_to_stream/run_hls.tcl +++ b/utils/L1/tests/axi_to_stream/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/axi_to_stream_without_e/Makefile b/utils/L1/tests/axi_to_stream_without_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/axi_to_stream_without_e/Makefile +++ b/utils/L1/tests/axi_to_stream_without_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/axi_to_stream_without_e/run_hls.tcl b/utils/L1/tests/axi_to_stream_without_e/run_hls.tcl index c1ace4d996..d04c0a2713 100644 --- a/utils/L1/tests/axi_to_stream_without_e/run_hls.tcl +++ b/utils/L1/tests/axi_to_stream_without_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/cache_ro_1DDR_with_e/Makefile b/utils/L1/tests/cache_ro_1DDR_with_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/cache_ro_1DDR_with_e/Makefile +++ b/utils/L1/tests/cache_ro_1DDR_with_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/cache_ro_1DDR_with_e/run_hls.tcl b/utils/L1/tests/cache_ro_1DDR_with_e/run_hls.tcl index 98cf0021c6..a7ef02693e 100644 --- a/utils/L1/tests/cache_ro_1DDR_with_e/run_hls.tcl +++ b/utils/L1/tests/cache_ro_1DDR_with_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/cache_ro_1DDR_without_e/Makefile b/utils/L1/tests/cache_ro_1DDR_without_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/cache_ro_1DDR_without_e/Makefile +++ b/utils/L1/tests/cache_ro_1DDR_without_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/cache_ro_1DDR_without_e/run_hls.tcl b/utils/L1/tests/cache_ro_1DDR_without_e/run_hls.tcl index 98cf0021c6..a7ef02693e 100644 --- a/utils/L1/tests/cache_ro_1DDR_without_e/run_hls.tcl +++ b/utils/L1/tests/cache_ro_1DDR_without_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/cache_ro_2DDR_with_e/Makefile b/utils/L1/tests/cache_ro_2DDR_with_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/cache_ro_2DDR_with_e/Makefile +++ b/utils/L1/tests/cache_ro_2DDR_with_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/cache_ro_2DDR_with_e/run_hls.tcl b/utils/L1/tests/cache_ro_2DDR_with_e/run_hls.tcl index 98cf0021c6..a7ef02693e 100644 --- a/utils/L1/tests/cache_ro_2DDR_with_e/run_hls.tcl +++ b/utils/L1/tests/cache_ro_2DDR_with_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/cache_ro_2DDR_without_e/Makefile b/utils/L1/tests/cache_ro_2DDR_without_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/cache_ro_2DDR_without_e/Makefile +++ b/utils/L1/tests/cache_ro_2DDR_without_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/cache_ro_2DDR_without_e/description.json b/utils/L1/tests/cache_ro_2DDR_without_e/description.json index 50a9bef578..a0d0d6cb6e 100644 --- a/utils/L1/tests/cache_ro_2DDR_without_e/description.json +++ b/utils/L1/tests/cache_ro_2DDR_without_e/description.json @@ -42,7 +42,7 @@ "env": "", "cmd": "", "max_memory_MB": { - "vivado_syn": 16384, + "vivado_syn": 32768, "hls_csim": 10240, "hls_cosim": 16384, "vivado_impl": 16384, @@ -66,4 +66,4 @@ ], "category": "canary" } -} \ No newline at end of file +} diff --git a/utils/L1/tests/cache_ro_2DDR_without_e/run_hls.tcl b/utils/L1/tests/cache_ro_2DDR_without_e/run_hls.tcl index 98cf0021c6..a7ef02693e 100644 --- a/utils/L1/tests/cache_ro_2DDR_without_e/run_hls.tcl +++ b/utils/L1/tests/cache_ro_2DDR_without_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/common/GCD/Makefile b/utils/L1/tests/common/GCD/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/common/GCD/Makefile +++ b/utils/L1/tests/common/GCD/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/common/GCD/run_hls.tcl b/utils/L1/tests/common/GCD/run_hls.tcl index 7755e00ba0..da77f3416f 100644 --- a/utils/L1/tests/common/GCD/run_hls.tcl +++ b/utils/L1/tests/common/GCD/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/common/LCM/Makefile b/utils/L1/tests/common/LCM/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/common/LCM/Makefile +++ b/utils/L1/tests/common/LCM/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/common/LCM/run_hls.tcl b/utils/L1/tests/common/LCM/run_hls.tcl index 7755e00ba0..da77f3416f 100644 --- a/utils/L1/tests/common/LCM/run_hls.tcl +++ b/utils/L1/tests/common/LCM/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/common/PowerOf2/Makefile b/utils/L1/tests/common/PowerOf2/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/common/PowerOf2/Makefile +++ b/utils/L1/tests/common/PowerOf2/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/common/PowerOf2/run_hls.tcl b/utils/L1/tests/common/PowerOf2/run_hls.tcl index 7755e00ba0..da77f3416f 100644 --- a/utils/L1/tests/common/PowerOf2/run_hls.tcl +++ b/utils/L1/tests/common/PowerOf2/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/check_stream_with_master/Makefile b/utils/L1/tests/hw/check_stream_with_master/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/check_stream_with_master/Makefile +++ b/utils/L1/tests/hw/check_stream_with_master/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/check_stream_with_master/run_hls.tcl b/utils/L1/tests/hw/check_stream_with_master/run_hls.tcl index 2d94922659..bc339e1fa8 100644 --- a/utils/L1/tests/hw/check_stream_with_master/run_hls.tcl +++ b/utils/L1/tests/hw/check_stream_with_master/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/load_master_to_stream/Makefile b/utils/L1/tests/hw/load_master_to_stream/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/load_master_to_stream/Makefile +++ b/utils/L1/tests/hw/load_master_to_stream/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/load_master_to_stream/run_hls.tcl b/utils/L1/tests/hw/load_master_to_stream/run_hls.tcl index ab7868df26..bb30bf2238 100644 --- a/utils/L1/tests/hw/load_master_to_stream/run_hls.tcl +++ b/utils/L1/tests/hw/load_master_to_stream/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/preloadable_ram/bram/Makefile b/utils/L1/tests/hw/preloadable_ram/bram/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/preloadable_ram/bram/Makefile +++ b/utils/L1/tests/hw/preloadable_ram/bram/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/preloadable_ram/bram/run_hls.tcl b/utils/L1/tests/hw/preloadable_ram/bram/run_hls.tcl index 47e516b414..2b6044d8a9 100644 --- a/utils/L1/tests/hw/preloadable_ram/bram/run_hls.tcl +++ b/utils/L1/tests/hw/preloadable_ram/bram/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/preloadable_ram/uram/Makefile b/utils/L1/tests/hw/preloadable_ram/uram/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/preloadable_ram/uram/Makefile +++ b/utils/L1/tests/hw/preloadable_ram/uram/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/preloadable_ram/uram/run_hls.tcl b/utils/L1/tests/hw/preloadable_ram/uram/run_hls.tcl index 47e516b414..2b6044d8a9 100644 --- a/utils/L1/tests/hw/preloadable_ram/uram/run_hls.tcl +++ b/utils/L1/tests/hw/preloadable_ram/uram/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/read_const/Makefile b/utils/L1/tests/hw/read_const/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/read_const/Makefile +++ b/utils/L1/tests/hw/read_const/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/read_const/run_hls.tcl b/utils/L1/tests/hw/read_const/run_hls.tcl index 5b170d9fb4..6fd39b448f 100644 --- a/utils/L1/tests/hw/read_const/run_hls.tcl +++ b/utils/L1/tests/hw/read_const/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/static_rom/Makefile b/utils/L1/tests/hw/static_rom/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/static_rom/Makefile +++ b/utils/L1/tests/hw/static_rom/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/static_rom/run_hls.tcl b/utils/L1/tests/hw/static_rom/run_hls.tcl index 4a37a9c8e4..0f60a6ed44 100644 --- a/utils/L1/tests/hw/static_rom/run_hls.tcl +++ b/utils/L1/tests/hw/static_rom/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/store_stream_to_master/Makefile b/utils/L1/tests/hw/store_stream_to_master/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/store_stream_to_master/Makefile +++ b/utils/L1/tests/hw/store_stream_to_master/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/store_stream_to_master/run_hls.tcl b/utils/L1/tests/hw/store_stream_to_master/run_hls.tcl index 6c7f3db87d..e89b5d0d59 100644 --- a/utils/L1/tests/hw/store_stream_to_master/run_hls.tcl +++ b/utils/L1/tests/hw/store_stream_to_master/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/hw/write_result/Makefile b/utils/L1/tests/hw/write_result/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/hw/write_result/Makefile +++ b/utils/L1/tests/hw/write_result/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/hw/write_result/run_hls.tcl b/utils/L1/tests/hw/write_result/run_hls.tcl index bea571da21..8f4286ba34 100644 --- a/utils/L1/tests/hw/write_result/run_hls.tcl +++ b/utils/L1/tests/hw/write_result/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/multiplexer/Makefile b/utils/L1/tests/multiplexer/Makefile index 6ce5792b85..2e3866ae23 100644 --- a/utils/L1/tests/multiplexer/Makefile +++ b/utils/L1/tests/multiplexer/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/multiplexer/run_hls.tcl b/utils/L1/tests/multiplexer/run_hls.tcl index 99b233dd9f..3d01d4026e 100644 --- a/utils/L1/tests/multiplexer/run_hls.tcl +++ b/utils/L1/tests/multiplexer/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/pl_datamover/cuboid_read_hls/Makefile b/utils/L1/tests/pl_datamover/cuboid_read_hls/Makefile index bd9f6a6a04..34f4188353 100644 --- a/utils/L1/tests/pl_datamover/cuboid_read_hls/Makefile +++ b/utils/L1/tests/pl_datamover/cuboid_read_hls/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/pl_datamover/cuboid_read_hls/run_hls.tcl b/utils/L1/tests/pl_datamover/cuboid_read_hls/run_hls.tcl index c660228a5b..e590e0634c 100644 --- a/utils/L1/tests/pl_datamover/cuboid_read_hls/run_hls.tcl +++ b/utils/L1/tests/pl_datamover/cuboid_read_hls/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2021 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl diff --git a/utils/L1/tests/pl_datamover/cuboid_read_hls/tb.cpp b/utils/L1/tests/pl_datamover/cuboid_read_hls/tb.cpp index 8955a22487..3498b73dc6 100644 --- a/utils/L1/tests/pl_datamover/cuboid_read_hls/tb.cpp +++ b/utils/L1/tests/pl_datamover/cuboid_read_hls/tb.cpp @@ -16,23 +16,25 @@ #include #include "xf_utils_hw/pl_datamover.hpp" -#define N 3200 + +static constexpr int N = 3200; +static constexpr int descriptor_num = 2; +static constexpr int M = (9 * descriptor_num + 1); void dut(hls::burst_maxi > data, hls::burst_maxi > descriptors, hls::stream >& w_data) { #pragma HLS interface m_axi offset = slave bundle = gmem0 port = data latency = 32 num_write_outstanding = \ - 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = 3200 + 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = N #pragma HLS interface m_axi offset = slave bundle = gmem1 port = descriptors latency = 32 num_write_outstanding = \ - 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = 3200 + 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = M #pragma HLS interface axis port = w_data xf::common::utils_hw::read4D<64, 32, 32, 32>(descriptors, data, w_data); } #ifndef __SYNTHESIS__ int main() { - const int descriptor_num = 2; - ap_uint<64> cfg[descriptor_num * 9 + 1]; + ap_uint<64> cfg[M]; cfg[0] = descriptor_num; cfg[1 + 0] = 10; cfg[1 + 1] = 1; @@ -52,6 +54,7 @@ int main() { cfg[10 + 6] = 10; cfg[10 + 7] = 1000; cfg[10 + 8] = 2; + static_assert(10 + 8 < M, "cfg overflow"); ap_uint<64>* data = (ap_uint<64>*)malloc(N * sizeof(ap_uint<64>)); for (int i = 0; i < N; i++) { @@ -61,7 +64,6 @@ int main() { hls::stream > w_data; dut(data, cfg, w_data); - // dut(offset, incr_num, total_num, cmd_num, data, w_data); bool check = true; std::cout << "start res checking" << std::endl; diff --git a/utils/L1/tests/pl_datamover/cuboid_write_hls/Makefile b/utils/L1/tests/pl_datamover/cuboid_write_hls/Makefile index bd9f6a6a04..34f4188353 100644 --- a/utils/L1/tests/pl_datamover/cuboid_write_hls/Makefile +++ b/utils/L1/tests/pl_datamover/cuboid_write_hls/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/pl_datamover/cuboid_write_hls/run_hls.tcl b/utils/L1/tests/pl_datamover/cuboid_write_hls/run_hls.tcl index c660228a5b..e590e0634c 100644 --- a/utils/L1/tests/pl_datamover/cuboid_write_hls/run_hls.tcl +++ b/utils/L1/tests/pl_datamover/cuboid_write_hls/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019-2021 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl diff --git a/utils/L1/tests/pl_datamover/cuboid_write_hls/tb.cpp b/utils/L1/tests/pl_datamover/cuboid_write_hls/tb.cpp index 724dd77289..331c19f128 100644 --- a/utils/L1/tests/pl_datamover/cuboid_write_hls/tb.cpp +++ b/utils/L1/tests/pl_datamover/cuboid_write_hls/tb.cpp @@ -16,23 +16,25 @@ #include #include "xf_utils_hw/pl_datamover.hpp" -#define N 3200 + +static constexpr int N = 3200; +static constexpr int descriptor_num = 1; +static constexpr int M = 9 * descriptor_num + 1; void dut(hls::burst_maxi > data, hls::burst_maxi > descriptors, hls::stream >& w_data) { #pragma HLS interface m_axi offset = slave bundle = gmem0 port = data latency = 32 num_write_outstanding = \ - 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = 3200 + 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = N #pragma HLS interface m_axi offset = slave bundle = gmem1 port = descriptors latency = 32 num_write_outstanding = \ - 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = 3200 + 32 num_read_outstanding = 32 max_write_burst_length = 32 max_read_burst_length = 32 depth = M #pragma HLS interface axis port = w_data xf::common::utils_hw::write4D<64, 32, 32, 32>(descriptors, w_data, data); } #ifndef __SYNTHESIS__ int main() { - const int descriptor_num = 1; - ap_uint<64> cfg[descriptor_num + 1]; + ap_uint<64> cfg[M]; cfg[0] = descriptor_num; cfg[1 + 0] = 10; cfg[1 + 1] = 1; @@ -43,6 +45,7 @@ int main() { cfg[1 + 6] = 10; cfg[1 + 7] = 1000; cfg[1 + 8] = 2; + static_assert(1 + 8 < M, "cfg overflow"); ap_uint<64>* data = (ap_uint<64>*)malloc(N * sizeof(ap_uint<64>)); for (int i = 0; i < N; i++) { diff --git a/utils/L1/tests/stream_combine/combine_lsb/Makefile b/utils/L1/tests/stream_combine/combine_lsb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_combine/combine_lsb/Makefile +++ b/utils/L1/tests/stream_combine/combine_lsb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_combine/combine_lsb/run_hls.tcl b/utils/L1/tests/stream_combine/combine_lsb/run_hls.tcl index aebc42fd28..96c5c78a93 100644 --- a/utils/L1/tests/stream_combine/combine_lsb/run_hls.tcl +++ b/utils/L1/tests/stream_combine/combine_lsb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_combine/combine_msb/Makefile b/utils/L1/tests/stream_combine/combine_msb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_combine/combine_msb/Makefile +++ b/utils/L1/tests/stream_combine/combine_msb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_combine/combine_msb/run_hls.tcl b/utils/L1/tests/stream_combine/combine_msb/run_hls.tcl index 755a12a285..c019281f88 100644 --- a/utils/L1/tests/stream_combine/combine_msb/run_hls.tcl +++ b/utils/L1/tests/stream_combine/combine_msb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_combine/first_as_lsb/Makefile b/utils/L1/tests/stream_combine/first_as_lsb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_combine/first_as_lsb/Makefile +++ b/utils/L1/tests/stream_combine/first_as_lsb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_combine/first_as_lsb/run_hls.tcl b/utils/L1/tests/stream_combine/first_as_lsb/run_hls.tcl index 7755e00ba0..da77f3416f 100644 --- a/utils/L1/tests/stream_combine/first_as_lsb/run_hls.tcl +++ b/utils/L1/tests/stream_combine/first_as_lsb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_combine/first_as_msb/Makefile b/utils/L1/tests/stream_combine/first_as_msb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_combine/first_as_msb/Makefile +++ b/utils/L1/tests/stream_combine/first_as_msb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_combine/first_as_msb/run_hls.tcl b/utils/L1/tests/stream_combine/first_as_msb/run_hls.tcl index 7755e00ba0..da77f3416f 100644 --- a/utils/L1/tests/stream_combine/first_as_msb/run_hls.tcl +++ b/utils/L1/tests/stream_combine/first_as_msb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_discard/discard_array/Makefile b/utils/L1/tests/stream_discard/discard_array/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_discard/discard_array/Makefile +++ b/utils/L1/tests/stream_discard/discard_array/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_discard/discard_array/run_hls.tcl b/utils/L1/tests/stream_discard/discard_array/run_hls.tcl index d531241bac..0c6e8b3447 100644 --- a/utils/L1/tests/stream_discard/discard_array/run_hls.tcl +++ b/utils/L1/tests/stream_discard/discard_array/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_discard/discard_one_stream/Makefile b/utils/L1/tests/stream_discard/discard_one_stream/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_discard/discard_one_stream/Makefile +++ b/utils/L1/tests/stream_discard/discard_one_stream/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_discard/discard_one_stream/run_hls.tcl b/utils/L1/tests/stream_discard/discard_one_stream/run_hls.tcl index ceb01e11d2..c45af7db30 100644 --- a/utils/L1/tests/stream_discard/discard_one_stream/run_hls.tcl +++ b/utils/L1/tests/stream_discard/discard_one_stream/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_discard/discard_share_e/Makefile b/utils/L1/tests/stream_discard/discard_share_e/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_discard/discard_share_e/Makefile +++ b/utils/L1/tests/stream_discard/discard_share_e/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_discard/discard_share_e/run_hls.tcl b/utils/L1/tests/stream_discard/discard_share_e/run_hls.tcl index 12ec82ee21..29eb57d68c 100644 --- a/utils/L1/tests/stream_discard/discard_share_e/run_hls.tcl +++ b/utils/L1/tests/stream_discard/discard_share_e/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_dup/Makefile b/utils/L1/tests/stream_dup/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_dup/Makefile +++ b/utils/L1/tests/stream_dup/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_dup/run_hls.tcl b/utils/L1/tests/stream_dup/run_hls.tcl index cf49cc138e..fc236837a3 100644 --- a/utils/L1/tests/stream_dup/run_hls.tcl +++ b/utils/L1/tests/stream_dup/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/load_balance/Makefile b/utils/L1/tests/stream_n_to_one/load_balance/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/load_balance/Makefile +++ b/utils/L1/tests/stream_n_to_one/load_balance/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/load_balance/run_hls.tcl b/utils/L1/tests/stream_n_to_one/load_balance/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/load_balance/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/load_balance/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/load_balance_type/Makefile b/utils/L1/tests/stream_n_to_one/load_balance_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/load_balance_type/Makefile +++ b/utils/L1/tests/stream_n_to_one/load_balance_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/load_balance_type/run_hls.tcl b/utils/L1/tests/stream_n_to_one/load_balance_type/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/load_balance_type/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/load_balance_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/round_robin/Makefile b/utils/L1/tests/stream_n_to_one/round_robin/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/round_robin/Makefile +++ b/utils/L1/tests/stream_n_to_one/round_robin/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/round_robin/run_hls.tcl b/utils/L1/tests/stream_n_to_one/round_robin/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/round_robin/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/round_robin/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/round_robin_type/Makefile b/utils/L1/tests/stream_n_to_one/round_robin_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/round_robin_type/Makefile +++ b/utils/L1/tests/stream_n_to_one/round_robin_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/round_robin_type/run_hls.tcl b/utils/L1/tests/stream_n_to_one/round_robin_type/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/round_robin_type/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/round_robin_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/tag_select/Makefile b/utils/L1/tests/stream_n_to_one/tag_select/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/tag_select/Makefile +++ b/utils/L1/tests/stream_n_to_one/tag_select/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/tag_select/run_hls.tcl b/utils/L1/tests/stream_n_to_one/tag_select/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/tag_select/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/tag_select/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_n_to_one/tag_select_type/Makefile b/utils/L1/tests/stream_n_to_one/tag_select_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_n_to_one/tag_select_type/Makefile +++ b/utils/L1/tests/stream_n_to_one/tag_select_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_n_to_one/tag_select_type/run_hls.tcl b/utils/L1/tests/stream_n_to_one/tag_select_type/run_hls.tcl index 96265c8cb2..cba342340c 100644 --- a/utils/L1/tests/stream_n_to_one/tag_select_type/run_hls.tcl +++ b/utils/L1/tests/stream_n_to_one/tag_select_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/load_balance/Makefile b/utils/L1/tests/stream_one_to_n/load_balance/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/load_balance/Makefile +++ b/utils/L1/tests/stream_one_to_n/load_balance/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/load_balance/run_hls.tcl b/utils/L1/tests/stream_one_to_n/load_balance/run_hls.tcl index 3c839faaf4..d022ceb510 100644 --- a/utils/L1/tests/stream_one_to_n/load_balance/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/load_balance/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/load_balance_type/Makefile b/utils/L1/tests/stream_one_to_n/load_balance_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/load_balance_type/Makefile +++ b/utils/L1/tests/stream_one_to_n/load_balance_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/load_balance_type/run_hls.tcl b/utils/L1/tests/stream_one_to_n/load_balance_type/run_hls.tcl index 3c839faaf4..d022ceb510 100644 --- a/utils/L1/tests/stream_one_to_n/load_balance_type/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/load_balance_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/round_robin/Makefile b/utils/L1/tests/stream_one_to_n/round_robin/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/round_robin/Makefile +++ b/utils/L1/tests/stream_one_to_n/round_robin/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/round_robin/run_hls.tcl b/utils/L1/tests/stream_one_to_n/round_robin/run_hls.tcl index 3c839faaf4..d022ceb510 100644 --- a/utils/L1/tests/stream_one_to_n/round_robin/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/round_robin/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/round_robin_type/Makefile b/utils/L1/tests/stream_one_to_n/round_robin_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/round_robin_type/Makefile +++ b/utils/L1/tests/stream_one_to_n/round_robin_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/round_robin_type/run_hls.tcl b/utils/L1/tests/stream_one_to_n/round_robin_type/run_hls.tcl index 3c839faaf4..d022ceb510 100644 --- a/utils/L1/tests/stream_one_to_n/round_robin_type/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/round_robin_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/tag_select/Makefile b/utils/L1/tests/stream_one_to_n/tag_select/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/tag_select/Makefile +++ b/utils/L1/tests/stream_one_to_n/tag_select/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/tag_select/run_hls.tcl b/utils/L1/tests/stream_one_to_n/tag_select/run_hls.tcl index ca05666d24..fa4ab04249 100644 --- a/utils/L1/tests/stream_one_to_n/tag_select/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/tag_select/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_one_to_n/tag_select_type/Makefile b/utils/L1/tests/stream_one_to_n/tag_select_type/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_one_to_n/tag_select_type/Makefile +++ b/utils/L1/tests/stream_one_to_n/tag_select_type/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_one_to_n/tag_select_type/run_hls.tcl b/utils/L1/tests/stream_one_to_n/tag_select_type/run_hls.tcl index ca05666d24..fa4ab04249 100644 --- a/utils/L1/tests/stream_one_to_n/tag_select_type/run_hls.tcl +++ b/utils/L1/tests/stream_one_to_n/tag_select_type/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_reorder/Makefile b/utils/L1/tests/stream_reorder/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_reorder/Makefile +++ b/utils/L1/tests/stream_reorder/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_reorder/run_hls.tcl b/utils/L1/tests/stream_reorder/run_hls.tcl index 925f03b4c0..6584eade90 100644 --- a/utils/L1/tests/stream_reorder/run_hls.tcl +++ b/utils/L1/tests/stream_reorder/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_shuffle/Makefile b/utils/L1/tests/stream_shuffle/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_shuffle/Makefile +++ b/utils/L1/tests/stream_shuffle/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_shuffle/run_hls.tcl b/utils/L1/tests/stream_shuffle/run_hls.tcl index 17b31e95b2..bca785aedf 100644 --- a/utils/L1/tests/stream_shuffle/run_hls.tcl +++ b/utils/L1/tests/stream_shuffle/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_split/split_lsb/Makefile b/utils/L1/tests/stream_split/split_lsb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_split/split_lsb/Makefile +++ b/utils/L1/tests/stream_split/split_lsb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_split/split_lsb/run_hls.tcl b/utils/L1/tests/stream_split/split_lsb/run_hls.tcl index 0bb7d00347..d65cda3c49 100644 --- a/utils/L1/tests/stream_split/split_lsb/run_hls.tcl +++ b/utils/L1/tests/stream_split/split_lsb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_split/split_msb/Makefile b/utils/L1/tests/stream_split/split_msb/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_split/split_msb/Makefile +++ b/utils/L1/tests/stream_split/split_msb/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_split/split_msb/run_hls.tcl b/utils/L1/tests/stream_split/split_msb/run_hls.tcl index c938e9cfda..fb36802c1e 100644 --- a/utils/L1/tests/stream_split/split_msb/run_hls.tcl +++ b/utils/L1/tests/stream_split/split_msb/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_sync/Makefile b/utils/L1/tests/stream_sync/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_sync/Makefile +++ b/utils/L1/tests/stream_sync/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_sync/run_hls.tcl b/utils/L1/tests/stream_sync/run_hls.tcl index b332a99d2c..15c74b46c7 100644 --- a/utils/L1/tests/stream_sync/run_hls.tcl +++ b/utils/L1/tests/stream_sync/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/stream_to_axi/Makefile b/utils/L1/tests/stream_to_axi/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/stream_to_axi/Makefile +++ b/utils/L1/tests/stream_to_axi/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/stream_to_axi/run_hls.tcl b/utils/L1/tests/stream_to_axi/run_hls.tcl index 806e7cd576..1d8b2bf05e 100644 --- a/utils/L1/tests/stream_to_axi/run_hls.tcl +++ b/utils/L1/tests/stream_to_axi/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L1/tests/uram_array/Makefile b/utils/L1/tests/uram_array/Makefile index 510835640e..b1a96397ed 100644 --- a/utils/L1/tests/uram_array/Makefile +++ b/utils/L1/tests/uram_array/Makefile @@ -1,5 +1,5 @@ -# -# Copyright 2019-2020 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 MK_PATH := $(abspath $(lastword $(MAKEFILE_LIST))) CUR_DIR := $(patsubst %/,%,$(dir $(MK_PATH))) @@ -61,7 +61,7 @@ export PATH := $(XILINX_VIVADO)/bin:$(PATH) # MK_INC_END vivado.mk -DEVICE ?= u200 +PLATFORM ?= xilinx_u200_gen3x16_xdma_2_202110_1 # MK_INC_BEGIN vitis_set_part.mk @@ -116,12 +116,21 @@ endif # 1.2 endif # 1 # 2. search Vitis installation ifeq (,$(XPLATFORM)) -# 2.1 as exact name +# 2.1 as exact name vitis < 2022.2 XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) -# 2.2 as a pattern +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(DEVICE_L)/$(DEVICE_L).xpfm)) +# 2.3 as a pattern vitis < 2022.2 ifeq (,$(XPLATFORM)) XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +# 2.4 as a pattern vitis > 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(DEVICE_L)/'))) +endif # 2.4 +endif # 2.3 endif # 2.2 endif # 2 # 3. search default locations diff --git a/utils/L1/tests/uram_array/run_hls.tcl b/utils/L1/tests/uram_array/run_hls.tcl index 3fd4ee5e30..455a74d8df 100644 --- a/utils/L1/tests/uram_array/run_hls.tcl +++ b/utils/L1/tests/uram_array/run_hls.tcl @@ -1,5 +1,5 @@ -# -# Copyright 2019 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# +# vitis hls makefile-generator v2.0.0 source settings.tcl @@ -33,7 +33,6 @@ open_solution -reset $SOLN - set_part $XPART create_clock -period $CLKP diff --git a/utils/L2/README.md b/utils/L2/README.md index bca4245e9d..fc9b1096c9 100644 --- a/utils/L2/README.md +++ b/utils/L2/README.md @@ -10,4 +10,6 @@ in hardware. No HLS kernel development experience is required to use this tool. The `src/xf_datamover` subfolder contains the template of kernels used by the tool, in [Jinja2](https://jinja.palletsprojects.com/en/2.11.x/) format. +**Attention: the data-mover APIs have be moved to new top-level Data-Mover Library. +They will be deleted from this library soon.** diff --git a/utils/L2/tests/datamover/4D_datamover/Makefile b/utils/L2/tests/datamover/4D_datamover/Makefile index 1af21c4fbb..cbf1ac4421 100644 --- a/utils/L2/tests/datamover/4D_datamover/Makefile +++ b/utils/L2/tests/datamover/4D_datamover/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_FLAGS_cuboid_read += --hls.clock 200000000:cuboid_read @@ -156,12 +151,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/cuboid_read.xo: $(CUR_DIR)/kernel/cuboid_read.cpp +$(TEMP_DIR)/cuboid_read.xo: kernel/cuboid_read.cpp $(ECHO) "Compiling Kernel: cuboid_read" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_cuboid_read) $(VPP_FLAGS) -k cuboid_read -I'$(= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/load_master_to_stream/Makefile b/utils/L2/tests/datamover/load_master_to_stream/Makefile index beb292386c..b3459c9dfb 100644 --- a/utils/L2/tests/datamover/load_master_to_stream/Makefile +++ b/utils/L2/tests/datamover/load_master_to_stream/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x2.xo: $(CUR_DIR)/kernel/m2s_x2.cpp +$(TEMP_DIR)/m2s_x2.xo: kernel/m2s_x2.cpp $(ECHO) "Compiling Kernel: m2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x2) $(VPP_FLAGS) -k m2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/load_master_to_stream/utils.mk b/utils/L2/tests/datamover/load_master_to_stream/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/load_master_to_stream/utils.mk +++ b/utils/L2/tests/datamover/load_master_to_stream/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/load_master_to_stream_with_counter/Makefile b/utils/L2/tests/datamover/load_master_to_stream_with_counter/Makefile index 213e26e2ab..fd5e6fec8d 100644 --- a/utils/L2/tests/datamover/load_master_to_stream_with_counter/Makefile +++ b/utils/L2/tests/datamover/load_master_to_stream_with_counter/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin --size $(SIZE) ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x2.xo: $(CUR_DIR)/kernel/m2s_x2.cpp +$(TEMP_DIR)/m2s_x2.xo: kernel/m2s_x2.cpp $(ECHO) "Compiling Kernel: m2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x2) $(VPP_FLAGS) -k m2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/load_master_to_stream_with_counter/utils.mk b/utils/L2/tests/datamover/load_master_to_stream_with_counter/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/load_master_to_stream_with_counter/utils.mk +++ b/utils/L2/tests/datamover/load_master_to_stream_with_counter/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/send_ram_to_stream/Makefile b/utils/L2/tests/datamover/send_ram_to_stream/Makefile index 16e44b42d9..4e430888e8 100644 --- a/utils/L2/tests/datamover/send_ram_to_stream/Makefile +++ b/utils/L2/tests/datamover/send_ram_to_stream/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/ram2s_x2.xo: $(CUR_DIR)/kernel/ram2s_x2.cpp +$(TEMP_DIR)/ram2s_x2.xo: kernel/ram2s_x2.cpp $(ECHO) "Compiling Kernel: ram2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_ram2s_x2) $(VPP_FLAGS) -k ram2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/send_ram_to_stream/utils.mk b/utils/L2/tests/datamover/send_ram_to_stream/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/send_ram_to_stream/utils.mk +++ b/utils/L2/tests/datamover/send_ram_to_stream/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/send_rom_to_stream/Makefile b/utils/L2/tests/datamover/send_rom_to_stream/Makefile index b381680230..f5d38bf7f6 100644 --- a/utils/L2/tests/datamover/send_rom_to_stream/Makefile +++ b/utils/L2/tests/datamover/send_rom_to_stream/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/rom2s_x2.xo: $(CUR_DIR)/kernel/rom2s_x2.cpp +$(TEMP_DIR)/rom2s_x2.xo: kernel/rom2s_x2.cpp $(ECHO) "Compiling Kernel: rom2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_rom2s_x2) $(VPP_FLAGS) -k rom2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/send_rom_to_stream/utils.mk b/utils/L2/tests/datamover/send_rom_to_stream/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/send_rom_to_stream/utils.mk +++ b/utils/L2/tests/datamover/send_rom_to_stream/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/store_stream_to_master/Makefile b/utils/L2/tests/datamover/store_stream_to_master/Makefile index 6604d7e753..b7abb430a7 100644 --- a/utils/L2/tests/datamover/store_stream_to_master/Makefile +++ b/utils/L2/tests/datamover/store_stream_to_master/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x1.xo: $(CUR_DIR)/kernel/m2s_x1.cpp +$(TEMP_DIR)/m2s_x1.xo: kernel/m2s_x1.cpp $(ECHO) "Compiling Kernel: m2s_x1" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x1) $(VPP_FLAGS) -k m2s_x1 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/store_stream_to_master/utils.mk b/utils/L2/tests/datamover/store_stream_to_master/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/store_stream_to_master/utils.mk +++ b/utils/L2/tests/datamover/store_stream_to_master/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/validate_stream_with_master/Makefile b/utils/L2/tests/datamover/validate_stream_with_master/Makefile index 49f69a036d..796119021d 100644 --- a/utils/L2/tests/datamover/validate_stream_with_master/Makefile +++ b/utils/L2/tests/datamover/validate_stream_with_master/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x2.xo: $(CUR_DIR)/kernel/m2s_x2.cpp +$(TEMP_DIR)/m2s_x2.xo: kernel/m2s_x2.cpp $(ECHO) "Compiling Kernel: m2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x2) $(VPP_FLAGS) -k m2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/validate_stream_with_master/utils.mk b/utils/L2/tests/datamover/validate_stream_with_master/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/validate_stream_with_master/utils.mk +++ b/utils/L2/tests/datamover/validate_stream_with_master/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/validate_stream_with_ram/Makefile b/utils/L2/tests/datamover/validate_stream_with_ram/Makefile index 3c5c9a0989..7e17eb8ea5 100644 --- a/utils/L2/tests/datamover/validate_stream_with_ram/Makefile +++ b/utils/L2/tests/datamover/validate_stream_with_ram/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x2.xo: $(CUR_DIR)/kernel/m2s_x2.cpp +$(TEMP_DIR)/m2s_x2.xo: kernel/m2s_x2.cpp $(ECHO) "Compiling Kernel: m2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x2) $(VPP_FLAGS) -k m2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/validate_stream_with_ram/utils.mk b/utils/L2/tests/datamover/validate_stream_with_ram/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/validate_stream_with_ram/utils.mk +++ b/utils/L2/tests/datamover/validate_stream_with_ram/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/datamover/validate_stream_with_rom/Makefile b/utils/L2/tests/datamover/validate_stream_with_rom/Makefile index a9873acaea..388a92a217 100644 --- a/utils/L2/tests/datamover/validate_stream_with_rom/Makefile +++ b/utils/L2/tests/datamover/validate_stream_with_rom/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -102,21 +103,15 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 else -HOST_SRCS += $(CUR_DIR)/host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp -CXXFLAGS += -I $(CUR_DIR)/host -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += host/main.cpp $(XFLIB_DIR)/ext/xcl2/xcl2.cpp +CXXFLAGS += -I host -I kernel -I $(XFLIB_DIR)/ext/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -std=c++14 endif @@ -127,7 +122,7 @@ endif EXE_NAME := test_mover.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) HOST_ARGS := --xclbin $(BUILD_DIR)/datamover.xclbin ifneq ($(HOST_ARCH), x86) @@ -135,7 +130,7 @@ PKG_HOST_ARGS = $(foreach args,$(HOST_ARGS),$(subst $(dir $(patsubst %/,%,$(args endif ########################## Kernel compiler global settings ########################## -VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I $(CUR_DIR)/kernel -I $(XFLIB_DIR)/L1/include +VPP_FLAGS += -I $(XFLIB_DIR)/L1/include/hw -I kernel -I $(XFLIB_DIR)/L1/include ######################### binary container global settings ########################## VPP_LDFLAGS_datamover_temp := --config $(CUR_DIR)/conn.cfg @@ -149,12 +144,12 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/datamover.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/m2s_x2.xo: $(CUR_DIR)/kernel/m2s_x2.cpp +$(TEMP_DIR)/m2s_x2.xo: kernel/m2s_x2.cpp $(ECHO) "Compiling Kernel: m2s_x2" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_m2s_x2) $(VPP_FLAGS) -k m2s_x2 -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -222,13 +217,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -242,17 +245,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -265,7 +277,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -295,7 +307,7 @@ endif pre_build: make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -307,23 +319,29 @@ endif .PHONY: xclbin ifeq ($(HOST_ARCH), x86) -xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_xrt pre_build $(BINARY_CONTAINERS) else -xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) +xclbin: check_vpp check_sysroot pre_build $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) $(CUR_DIR)/_krnlgen $(CUR_DIR)/kernel/.stamp $(CUR_DIR)/kernel/*.inc $(CUR_DIR)/kernel/*.cpp + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) _krnlgen kernel/.stamp kernel/*.inc kernel/*.cpp *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/datamover/validate_stream_with_rom/utils.mk b/utils/L2/tests/datamover/validate_stream_with_rom/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/datamover/validate_stream_with_rom/utils.mk +++ b/utils/L2/tests/datamover/validate_stream_with_rom/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/L2/tests/utils_sw/shared_host/Makefile b/utils/L2/tests/utils_sw/shared_host/Makefile index f78d38427f..f43f2e0b4b 100644 --- a/utils/L2/tests/utils_sw/shared_host/Makefile +++ b/utils/L2/tests/utils_sw/shared_host/Makefile @@ -1,4 +1,5 @@ -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -11,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.8 +# vitis makefile-generator v2.0.9 ############################## Help Section ############################## .PHONY: help @@ -35,7 +36,7 @@ help:: $(ECHO) " Run the sdk.sh script from the common-image directory to install sysroot using the command : ./sdk.sh -y -d ./ -p " $(ECHO) " Unzip the rootfs file : gunzip ./rootfs.ext4.gz" $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" - $(ECHO) " b. User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " + $(ECHO) " b.User could also define SYSROOT, K_IMAGE and ROOTFS by themselves: " $(ECHO) " export SYSROOT=< path-to-platform-sysroot >" $(ECHO) " export K_IMAGE=< path-to-Image-files >" $(ECHO) " export ROOTFS=< path-to-rootfs >" @@ -43,7 +44,7 @@ help:: $(ECHO) " make clean " $(ECHO) " Command to remove the generated non-hardware files." $(ECHO) "" - $(ECHO) " make cleanall" + $(ECHO) " make cleanall TARGET=" $(ECHO) " Command to remove all the generated files." $(ECHO) "" @@ -63,7 +64,7 @@ ifeq ($(PLATFORM),) PLATFORM := $(DEVICE) endif ifeq ($(PLATFORM),) -PLATFORM := xilinx_u280_gen3x16_xdma_1_202120_1 +PLATFORM := xilinx_u280_gen3x16_xdma_1_202211_1 endif # #################### Checking if PLATFORM in whitelist ############################ @@ -102,30 +103,24 @@ CXXFLAGS += $(EXTRA_CXXFLAGS) VPP_FLAGS += $(EXTRA_VPP_FLAGS) ########################## Setting up Host Variables ########################## -ifeq ($(TARGET),sw_emu) -CXXFLAGS += -D SW_EMU_TEST -endif -ifeq ($(TARGET),hw_emu) -CXXFLAGS += -D HW_EMU_TEST -endif #Inclue Required Host Source Files ifneq (,$(shell echo $(XPLATFORM) | awk '/u280/')) -HOST_SRCS += $(CUR_DIR)/test.cpp $(CUR_DIR)/xcl2/xcl2.cpp -CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(CUR_DIR)/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += test.cpp xcl2/xcl2.cpp +CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -g -O3 -D XDEVICE=$(XDEVICE) else ifneq (,$(shell echo $(XPLATFORM) | awk '/u50/')) -HOST_SRCS += $(CUR_DIR)/test.cpp $(CUR_DIR)/xcl2/xcl2.cpp -CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(CUR_DIR)/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += test.cpp xcl2/xcl2.cpp +CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -g -O3 -D XDEVICE=$(XDEVICE) else ifeq ($(ps_on_x86), on) -HOST_SRCS += $(CUR_DIR)/test.cpp $(CUR_DIR)/xcl2/xcl2.cpp -CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(CUR_DIR)/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += test.cpp xcl2/xcl2.cpp +CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -g -O3 -D XDEVICE=$(XDEVICE) else -HOST_SRCS += $(CUR_DIR)/test.cpp $(CUR_DIR)/xcl2/xcl2.cpp -CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I $(CUR_DIR)/xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include +HOST_SRCS += test.cpp xcl2/xcl2.cpp +CXXFLAGS += -I $(XFLIB_DIR)/L1/include -I xcl2 -I $(XFLIB_DIR)/L1/include -I $(XFLIB_DIR)/L1/include CXXFLAGS += -g -O3 -D XDEVICE=$(XDEVICE) endif endif @@ -136,7 +131,7 @@ endif EXE_NAME := test.exe EXE_FILE := $(BUILD_DIR)/$(EXE_NAME) -EXE_FILE_DEPS := $(HOST_SRCS) $(EXE_FILE_DEPS) +EXE_FILE_DEPS := $(HOST_SRCS) $(INSTANCE_FILES) $(EXE_FILE_DEPS) ifeq ($(TARGET),$(filter $(TARGET),sw_emu)) HOST_ARGS := @@ -183,7 +178,7 @@ BINARY_CONTAINERS_PKG += $(BUILD_DIR)/vadd.xclbin endif # ################ Setting Rules for Binary Containers (Building Kernels) ################ -$(TEMP_DIR)/vadd.xo: $(CUR_DIR)/vadd.cpp +$(TEMP_DIR)/vadd.xo: vadd.cpp $(ECHO) "Compiling Kernel: vadd" mkdir -p $(TEMP_DIR) $(VPP) -c $(VPP_FLAGS_vadd) $(VPP_FLAGS) -k vadd -I'$(> $(RUN_SCRIPT) @echo 'echo "INFO: Embedded host run completed."' >> $(RUN_SCRIPT) @echo 'exit $$return_code' >> $(RUN_SCRIPT) -DATA_FILE := -DATA_DIR := +DATA_FILE := $(custom_data_file) +DATA_DIR := $(custom_data_dir) SD_FILES += $(RUN_SCRIPT) SD_FILES += $(EXE_FILE) SD_FILES += $(EMCONFIG) @@ -251,13 +246,21 @@ ifeq ($(ps_on_x86), on) @echo "### ***** running PS X86 SE_EMU ***** ###" $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.emu_ps x86 endif -#3. General Embeded flow +# 3. AIE_ON_X86 Flow +ifeq ($(pcie_aie), on) + @echo "### ***** running AIE ON_X86 ***** ###" + ${VPP} -p $(VPP_PACKAGE) -t ${TARGET} -f ${XPLATFORM} ${AIE_CONTAINER} ${BINARY_CONTAINERS} -o $(BINARY_CONTAINERS_PKG) --package.boot_mode ospi + @echo "### ***** sd_card generation done! ***** ###" +endif +# 4. General Embeded flow ifeq ($(dfx_hw), off) ifeq ($(ps_on_x86), off) +ifeq ($(pcie_aie), off) $(VPP) -t $(TARGET) --platform $(XPLATFORM) -o $(BINARY_CONTAINERS_PKG) -p $(PACKAGE_FILES) $(VPP_PACKAGE) --package.out_dir $(SD_CARD) --package.rootfs $(ROOTFS) --package.kernel_image $(K_IMAGE) $(SD_FILES_WITH_PREFIX) $(SD_DIRS_WITH_PREFIX) @echo "### ***** sd_card generation done! ***** ###" endif endif +endif .PHONY: sd_card sd_card: $(SD_CARD) @@ -271,17 +274,26 @@ mkflag: mkdir -p $(BUILD_DIR) rm -rf $(BUILD_DIR)/makefile_args.txt @for var in $(MAKEFLAGS); do echo $$var >> $(BUILD_DIR)/makefile_args.txt; done + all: check_device check_vpp check_platform mkflag $(RUN_DEPS) + run: all #hw_emu ifneq (,$(filter hw_emu, $(TARGET))) ifeq ($(HOST_ARCH), x86) +ifeq ($(pcie_aie), on) + cp $(AIE_WORK_DIR)/reports/dma_lock_report.json ./ + cp $(AIE_WORK_DIR)/ps/c_rts/aie_control_config.json ./ + LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ + XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) $(BINARY_CONTAINERS_PKG) + +endif LD_LIBRARY_PATH=$(LIBRARY_PATH):$$LD_LIBRARY_PATH \ XCL_EMULATION_MODE=$(TARGET) $(EXE_FILE) $(HOST_ARGS) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -294,7 +306,7 @@ ifeq ($(HOST_ARCH), x86) else @echo $(RUN_DEPS) - $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) + $(SD_CARD)/launch_$(TARGET).sh -no-reboot -run-app $(notdir $(RUN_SCRIPT)) grep "TEST PASSED, RC=0" $(SD_CARD)/qemu_output.log || exit 1 endif @@ -321,7 +333,7 @@ endif ############################## Setting Targets ############################## -.PHONY: clean cleanall emconfig +.PHONY: clean cleanall emconfig gen_instances valid_params emconfig: $(EMCONFIG) .PHONY: host @@ -338,18 +350,24 @@ else xclbin: check_vpp check_sysroot $(BINARY_CONTAINERS) endif +gen_instances: $(INSTANCE_FILES) + @echo "Nothing to generate." + +valid_params: + @echo "Nothing to validate." + ############################## Cleaning Rules ############################## cleanh: - -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ - -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png + -$(RMDIR) $(EXE_FILE) vitis_* TempConfig system_estimate.xtxt *.rpt .run/ $(INST_TB_FILES) + -$(RMDIR) src/*.ll _xocc_* .Xil dltmp* xmltmp* *.log *.jou *.wcfg *.wdb sample_link.ini sample_compile.ini obj* bin* *.csv *.jpg *.jpeg *.png *.db cleank: -$(RMDIR) $(BUILD_DIR)/*.xclbin _vimage *xclbin.run_summary qemu-memory-_* emulation/ _vimage/ pl*start_simulation. sh *.xclbin - -$(RMDIR) _x_temp.* + -$(RMDIR) _x_temp.* _x* $(INST_FILES) cleanall: cleanh cleank -$(RMDIR) $(BUILD_DIR) emconfig.json *.html $(TEMP_DIR) $(CUR_DIR)/reports *.csv *.run_summary $(CUR_DIR)/*.raw package_* $(BUILD_DIR)/run_script.sh .ipcache *.str - -$(RMDIR) $(CUR_DIR)/Work $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut - -$(RMDIR) + -$(RMDIR) $(AIE_WORK_DIR) $(AIE_PKG_DIR) $(CUR_DIR)/*.xpe $(CUR_DIR)/hw.o $(CUR_DIR)/*.xsa $(CUR_DIR)/xnwOut + -$(RMDIR) *.html $(INSTANCE_FILES) clean: cleanh \ No newline at end of file diff --git a/utils/L2/tests/utils_sw/shared_host/utils.mk b/utils/L2/tests/utils_sw/shared_host/utils.mk index ffd1d938e9..8a4456fbde 100644 --- a/utils/L2/tests/utils_sw/shared_host/utils.mk +++ b/utils/L2/tests/utils_sw/shared_host/utils.mk @@ -1,5 +1,5 @@ -# -# Copyright 2019-2022 Xilinx, Inc. +# Copyright (C) 2019-2022, Xilinx, Inc. +# Copyright (C) 2022-2023, Advanced Micro Devices, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# vitis makefile-generator v2.0.7 +# vitis makefile-generator v2.0.9 # #+------------------------------------------------------------------------------- # The following parameters are assigned with default values. These parameters can @@ -23,6 +23,9 @@ REPORT := no PROFILE := no DEBUG := no +#Get PLATFORM_NAME by PLATFORM +PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) + #'estimate' for estimate report generation #'system' for system report generation ifneq ($(REPORT), no) @@ -66,9 +69,68 @@ check_device: then echo "[ERROR]: The device $(PLATFORM_NAME) in blocklist."; exit 1;\ fi; +ifneq (,$(wildcard $(PLATFORM))) +# Use PLATFORM as a file path +XPLATFORM := $(PLATFORM) +else +# Use PLATFORM as a file name pattern +# 1. search paths specified by variable +ifneq (,$(PLATFORM_REPO_PATHS)) +# 1.1 as exact name +XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) +# 1.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 1.2 +endif # 1 +# 2. search Vitis installation +ifeq (,$(XPLATFORM)) +# 2.1 as exact name vitis < 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +ifeq (,$(XPLATFORM)) +# 2.2 as exact name vitis >= 2022.2 +XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/base_platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 2.3 as a pattern vitis < 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +# 2.4 as a pattern vitis >= 2022.2 +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard $(XILINX_VITIS)/base_platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 2.4 +endif # 2.3 +endif # 2.2 +endif # 2 +# 3. search default locations +ifeq (,$(XPLATFORM)) +# 3.1 as exact name +XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) +# 3.2 as a pattern +ifeq (,$(XPLATFORM)) +XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) +XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) +endif # 3.2 +endif # 3 +endif + +define MSG_PLATFORM +No platform matched pattern '$(PLATFORM)'. +Available platforms are: $(XPLATFORMS) +To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. +endef +export MSG_PLATFORM + +.PHONY: check_platform +check_platform: +ifeq (,$(XPLATFORM)) + @echo "$${MSG_PLATFORM}" && false +endif +#Check ends + #get HOST_ARCH by PLATFORM -ifneq (,$(PLATFORM)) -HOST_ARCH_temp = $(shell platforminfo -p $(PLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') +HOST_ARCH_temp = $(shell platforminfo -p $(XPLATFORM) | grep 'CPU Type' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') ifeq ($(HOST_ARCH_temp), x86) HOST_ARCH := x86 else ifeq ($(HOST_ARCH_temp), cortex-a9) @@ -76,15 +138,17 @@ HOST_ARCH := aarch32 else ifneq (,$(findstring cortex-a, $(HOST_ARCH_temp))) HOST_ARCH := aarch64 endif -endif - - # Special processing for tool version/platform type VITIS_VER = $(shell v++ --version | grep 'v++' | sed 's/^[[:space:]]*//' | sed -e 's/^[*]* v++ v//g' | cut -d " " -f1) -# 1) for versal flow from 2022.1 -DEVICE_TYPE = $(shell platforminfo -p $(PLATFORM) | grep 'FPGA Family' | sed 's/.*://' | sed '/ai_engine/d' | sed 's/^[[:space:]]*//') -ifeq ($(DEVICE_TYPE), versal) +AIE_TYPE := $(shell platforminfo $(XPLATFORM) -f -j | grep "arch.:" | sed 's|"arch":||g' | sed 's|["|,]||g') +ifeq (AIE ,$(findstring AIE, $(AIE_TYPE))) +HAS_AIE := on +else +HAS_AIE := off +endif +# 1) for aie flow from 2022.1 +ifeq (on, $(HAS_AIE)) ifeq ($(shell expr $(VITIS_VER) \>= 2022.1), 1) LINK_TARGET_FMT := xsa else @@ -110,6 +174,13 @@ HOST_ARCH := x86 endif endif endif +# 4) for aie on x86 flow +pcie_aie := off +ifeq ($(HOST_ARCH), x86) +ifeq ($(HAS_AIE), on) +pcie_aie := on +endif +endif #when x86 arch, check XRT setup ifeq ($(HOST_ARCH), x86) @@ -129,6 +200,9 @@ endif ifeq ($(ps_on_x86), on) SD_CARD_NEEDED := on endif +ifeq ($(pcie_aie), on) +SD_CARD_NEEDED := on +endif #Checks for Device Family ifeq ($(HOST_ARCH), aarch32) @@ -262,63 +336,6 @@ LD_LIBRARY_PATH := $(XILINX_XRT)/lib:$(LD_LIBRARY_PATH) endif endif -ifneq (,$(wildcard $(PLATFORM))) -# Use PLATFORM as a file path -XPLATFORM := $(PLATFORM) -else -# Use PLATFORM as a file name pattern -# 1. search paths specified by variable -ifneq (,$(PLATFORM_REPO_PATHS)) -# 1.1 as exact name -XPLATFORM := $(strip $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/$(PLATFORM)/$(PLATFORM).xpfm))) -# 1.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(foreach p, $(subst :, ,$(PLATFORM_REPO_PATHS)), $(wildcard $(p)/*/*.xpfm)) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 1.2 -endif # 1 -# 2. search Vitis installation -ifeq (,$(XPLATFORM)) -# 2.1 as exact name -XPLATFORM := $(strip $(wildcard $(XILINX_VITIS)/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 2.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard $(XILINX_VITIS)/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 2.2 -endif # 2 -# 3. search default locations -ifeq (,$(XPLATFORM)) -# 3.1 as exact name -XPLATFORM := $(strip $(wildcard /opt/xilinx/platforms/$(PLATFORM)/$(PLATFORM).xpfm)) -# 3.2 as a pattern -ifeq (,$(XPLATFORM)) -XPLATFORMS := $(wildcard /opt/xilinx/platforms/*/*.xpfm) -XPLATFORM := $(strip $(foreach p, $(XPLATFORMS), $(shell echo $(p) | awk '$$1 ~ /$(PLATFORM)/'))) -endif # 3.2 -endif # 3 -endif - -define MSG_PLATFORM -No platform matched pattern '$(PLATFORM)'. -Available platforms are: $(XPLATFORMS) -To add more platform directories, set the PLATFORM_REPO_PATHS variable or point PLATFORM variable to the full path of platform .xpfm file. -endef -export MSG_PLATFORM - - -.PHONY: check_platform -check_platform: -ifeq (,$(XPLATFORM)) - @echo "$${MSG_PLATFORM}" && false -endif -#Check ends - -# device2xsa - create a filesystem friendly name from device name -# $(1) - full name of device -PLATFORM_NAME = $(strip $(patsubst %.xpfm, % , $(shell basename $(PLATFORM)))) - - # Cleaning stuff RM = rm -f RMDIR = rm -rf diff --git a/utils/docs/src/datamover/kernel_gen_guide.rst b/utils/docs/src/datamover/kernel_gen_guide.rst index 28d03df697..093e7877d6 100644 --- a/utils/docs/src/datamover/kernel_gen_guide.rst +++ b/utils/docs/src/datamover/kernel_gen_guide.rst @@ -10,470 +10,7 @@ Data-Mover User Guide ====================== -Overview -========= - -AIE applications often need to read data in or write data out of AIE array. -Kernel on PL is one of the way to exchange data between AIE and other types of memory. -We introduce ``Programmable 4D Data-Mover`` and ``Static Data-Mover`` to help generate kernel design and improve development efficiency. -``Programmable 4D Data-Mover`` have 2 types of kernel: ``4DCuboidRead`` and ``4DCuboidWrite`` which provide both flexible access pattern and keep high performance between DDR and AIE. -``Static Data-Mover`` has 9 types of kernel which help AIE connect with DDR / URAM and BRAM. Their access pattern is simple continously read / write. - -All Data-Mover design is "codeless" that user need to create the OpenCL kernels by simply calling the ``Kernel Generator`` with a JSON description and ROM content (if needed) as text file. - -``Kernel Generator`` consists of: - -- Kernel templates (in Jinja2), which can be instantiated through configurations from JSON -- Data converter to transform the user provided texture ROM content into usable initialization file -- Python script to automate the kernel generation from JSON to HLS C++ OpenCL kernel, which is ``L2/scripts/internal/generate_kernels.py``. - -.. ATTENTION:: - Generated kernels are not self-contained source code, they would reference low-level block implementation headers in ``L1/include`` folder. - Ensure that folder is passed to Vitis compiler as header search path when compiling project using generated PL kernels. - -Programmable 4D Data-Mover -=========================== - -Feature --------- - -AIE application often need to deal with multi-dimension data. -The mostly common cases are that AIE application need to select and read/write a regularly distributed sub-set from multi-dimensional array. -Because multi-dimension array has to be stored in linear addressing memory space, such sub-set is rarely a contiguous block in memory but always a lot of data segment. -It's not convenient for user to implement logic to calculate all segments' address and size and not efficient for AIE to do so. - -Programmable 4D Data-Mover includes: - -- Concise descriptor design that use 9x64bits to fully describe access on 4-dimension (and low-dimension) data. -- Template kernel design that can read multiple descriptor and accomplish the defined access pattern one by one. - -**Descriptor Design** - -Descriptor design is the most important part of Programmable 4D Data-Mover. It defines: - -- How 4-dimension data mapped to linear address -- Where to find the sub-set to access -- What's the dimension of sub-set -- How to serialize the sub-set - -To store 4D array ``A[W][Z][Y][X]`` in memory, it has to be mapped into linear address space which will certainly lead to addressing like ``&A[w][z][y][x] = bias + w * (Z*Y*X) + z * (Y*X) + y * (X) + x``. In such condition, adjacent elements in 4D array will have const strid. Then 9 parameters { bias (address of first element), X, X_stride, Y, Y_stride, Z, Z_stride, W, W_stride } will be enough to define the 4D array in memory. - -- &A[w][z][y][x+1] – &A[w][z][y][x] = 1 (X_stride) -- &A[w][z][y+1][x] – &A[w][z][y][x] = X (Y_stride) -- &A[w][z+1][y][x] – &A[w][z][y][x] = X * Y (Z_stride) -- &A[w+1][z][y][x] – &A[w][z][y][x] = X * Y * Z (W_stride) - -Since Programmable 4D Data Mover need to write to / read from AXI stream, it also needs to define how to serialize 4D array. -We define ``ap_int<64> cfg[9]`` as descriptor to define one access: - -- cfg[0]: bias (address of 4D array's first element in memory) -- cfg[1], cfg[2]: stride of first accessed dimension, size of first accessed dimension -- cfg[3], cfg[4]: stride of second accessed dimension, size of second accessed dimension -- cfg[5], cfg[6]: stride of third accessed dimension, size of third accessed dimension -- cfg[7], cfg[8]: stride of fourth accessed dimension, size of fourth accessed dimension - -With the descriptor above, Programmable 4D Data Mover will serialize the read/write as pseudo-code below (take read as example): -Programmable 4D Data Mover will load one or multiple descriptors from a descriptor buffer. -The descriptor buffer begins with a 64bits ``num`` which indicate how many descriptors are there in the buffer. -Then ``num`` will be followed by one or multiple 9x64bits descriptors, all compact stored. -It will start parsing the first descriptor, finish the access, then parse and finish the next descriptor. -It will keep the processing until it finishes all descriptors. - -.. code-block:: cpp - - for(ap_int<64> d4 = 0; d4 < cfg[8]; d4++) { - for(ap_int<64> d3 = 0; d3 < cfg[6]; d3++) { - for(ap_int<64> d2 = 0; d2 < cfg[4]; d2++) { - for(ap_int<64> d1 = 0; d1 < cfg[2]; d1++) { - elem_address = cfg[0] + d4 * cfg[7] + d3 * cfg[5] + d2 * cfg[3] + d1 * cfg[1]; - data_to_be_read = data[elem_address]; - } - } - } - } - -**Kernel Design** - -Programmable 4D Data Movers are templated design to access elements of 32 / 64 / 128 / 256 / 512 bits width. -They have standalone AXI master port to access descriptor buffer. -AXI master to access descriptors are configured to be 64 bits wide. Other AXI master and AXI stream port are configured to be same width of data elements. -AXI master ports share the same "latency" "outstanding" "burst length" setup, and they should be the same with the pragma setup in kernels that wrap up the data mover. -They share the same kernel generator and JSON spec, please take reference from example below. - -.. image:: /images/4d_kernl_interface.png - :alt: various pattern - :width: 100% - :align: center - -Programmable 4D Data Mover's performance depends on: - -- Compile time: data width, larger data width, larger bandwidth. -- Run time: cfg[1] of each descriptor. When cfg[1] = 1, it will lead to burst access and bandwidth will be nice, otherwise it will lead to non-burst access and bandwidth won't be as good as burst access. - -.. image:: /images/dm_perf.png - :alt: various pattern - :width: 50% - :align: center - -Build Time Configuration -------------------------- - -**Example Kernel Specification (JSON)** - -The following kernel specification in JSON describes a ``4DCuboidRead`` kernel and a ``4DCuboidWrite`` kernel. - -The ``4DCuboidRead`` kernel should have 2 data paths as we can see that there are 2 specifications in ``map`` field. -Let's take the first data path for example, it will use AXI-M port ``din_0`` to read 4D array and AXI-M ``desp_0`` to access descriptor buffer. -Both AXI-M ports have "latency", "outstanding" and "burst_len" setup in their HLS kernel pragma. Its output port is AXI-stream ``dout_0`` and both ``din_0`` and ``dout_0``'s port width are 64. - -The ``4DCuboidWrite`` kernel should have 2 data paths as we can see that there are 2 specifications in ``map`` field. -Let's take the first data path for example, it will use AXI-stream port ``din_0`` to read 4D array and AXI-M ``desp_0`` to access descriptor buffer. -It will use AXI-M port ``dout_0`` for output. Both AXI-M ports have "latency", "outstanding" and "burst_len" setup in their HLS kernel pragma. Both ``din_0`` and ``dout_0``'s port width are 64. - - -.. code-block:: JSON - - { - "cuboid_read": { - "impl": "4DCuboidRead", - "map": [ - { - "in_port": { - "buffer": "din_0", - "descriptors": "desp_0", - "latency": 32, - "outstanding": 32, - "burst_len": 32 - }, - "out_port": { - "stream": "dout_0", - "width": 64 - } - }, - { - "in_port": { - "buffer": "din_1", - "descriptors": "desp_1", - "latency": 32, - "outstanding": 32, - "burst_len": 32 - }, - "out_port": { - "stream": "dout_1", - "width": 64 - } - } - ] - }, - "cuboid_write": { - "impl": "4DCuboidWrite", - "map": [ - { - "in_port": { - "stream": "din_0", - "descriptors": "desp_0", - "width": 64 - }, - "out_port": { - "buffer": "dout_0", - "latency": 32, - "outstanding": 32, - "burst_len": 32 - } - }, - { - "in_port": { - "stream": "din_1", - "descriptors": "desp_1", - "width": 64 - }, - "out_port": { - "buffer": "dout_1", - "latency": 32, - "outstanding": 32, - "burst_len": 32 - } - } - ] - } - } - -**Example of How to generate kernels** - -.. code-block:: bash - - cd L2/tests/datamover/4D_datamover - make pre_build - # The pre_build command is as follows: - # pre_build: - # make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen - -**Example of How to run hardware emulation of hardware** - -.. code-block:: bash - - cd L2/tests/datamover/4D_datamover - source /opt/xilinx/Vitis/2022.2/settings64.sh - source /opt/xilinx/xrt/setup.sh - export PLATFORM_REPO_PATHS=/opt/xilinx/platforms - make run TARGET=hw PLATFORM=${PLATFORM_REPO_PATHS}/xilinx_vck190_base_202210_1/xilinx_vck190_base_202210_1.xpfm - -Run Time Configuration ------------------------ - -Programmable 4D Data-Mover will read multiple descriptors from descriptor buffer which can be configed from host side in run-time. -Descriptor buffer is compacted store in memory and start with 1x64bit ``num`` that indicate how many descriptors are there in the buffer. -Then ``num`` is followed by one or multiple descriptors. - -Here's examples of descriptor buffer and corresponding patterns. -The underlying array is a 3D array (due to difficulties to draw a actual 4D array): ``A[10][7][8]`` which could be treated as ``A[1][10][7][8]``. -Its first element's address is 0, which means 'bias' = 0. Its size means that W = 1, Z = 10, Y = 7, X = 8. -We can assume that its mapping lead to W_stride = 0 (), Z_stride = 56, Y_stride = 8, X_stride = 1. - -.. code-block:: cpp - - {4, - 0, 1, 8, 8, 7, 56, 10, 0, 1, - 0, 8, 7, 1, 8, 56, 10, 0, 1, - 0, 56, 10, 8, 7, 1, 8, 0, 1, - 4, 1, 4, 8, 3, 56, 2, 0, 1} - - -The first number in buffer is ``4`` which means there are 4 descriptors followed. -Their implied pattern are as below: - -Descriptor[0]: {0, 1, 8, 8, 7, 56, 10, 0, 1}. The implied pattern is: - -.. code-block:: cpp - - for(ap_int<64> d4 = 0; d4 < 1; d4++) { // cfg[8] = 1 - for(ap_int<64> d3 = 0; d3 < 10; d3++) { // cfg[6] = 10 - for(ap_int<64> d2 = 0; d2 < 7; d2++) { // cfg[4] = 7 - for(ap_int<64> d1 = 0; d1 < 8; d1++) { // cfg[2] = 8 - // cfg[7] = 0, cfg[5] = 56, cfg[3] = 8, cfg[1] = 1, cfg[0] = 0 - elem_address = d4 * 0 + d3 * 56 + d2 * 8 + d1 * 1 + 0; - data_to_be_read = data[elem_address]; - } - } - } - } - -.. image:: /images/X_Y_Z_W_pattern.png - :alt: various pattern - :width: 30% - :align: center - -Descriptor[1]: {0, 8, 7, 1, 8, 56, 10, 0, 1}. The implied pattern is: - -.. code-block:: cpp - - for(ap_int<64> d4 = 0; d4 < 1; d4++) { // cfg[8] = 1 - for(ap_int<64> d3 = 0; d3 < 10; d3++) { // cfg[6] = 10 - for(ap_int<64> d2 = 0; d2 < 8; d2++) { // cfg[4] = 8 - for(ap_int<64> d1 = 0; d1 < 7; d1++) { // cfg[2] = 7 - // cfg[7] = 0, cfg[5] = 56, cfg[3] = 1, cfg[1] = 8, cfg[0] = 0 - elem_address = d4 * 0 + d3 * 56 + d2 * 1 + d1 * 8 + 0; - data_to_be_read = data[elem_address]; - } - } - } - } - -.. image:: /images/Y_X_Z_W_pattern.png - :alt: various pattern - :width: 30% - :align: center - -Descriptor[2]: {0, 56, 10, 8, 7, 1, 8, 0, 1}. The implied pattern is: - -.. code-block:: cpp - - for(ap_int<64> d4 = 0; d4 < 1; d4++) { // cfg[8] = 1 - for(ap_int<64> d3 = 0; d3 < 8; d3++) { // cfg[6] = 8 - for(ap_int<64> d2 = 0; d2 < 7; d2++) { // cfg[4] = 7 - for(ap_int<64> d1 = 0; d1 < 10; d1++) { // cfg[2] = 10 - // cfg[7] = 0, cfg[5] = 1, cfg[3] = 8, cfg[1] = 56, cfg[0] = 0 - elem_address = d4 * 0 + d3 * 1 + d2 * 8 + d1 * 56 + 0; - data_to_be_read = data[elem_address]; - } - } - } - } - -.. image:: /images/Z_Y_X_W_pattern.png - :alt: various pattern - :width: 30% - :align: center - -Descriptor[3]: {4, 1, 4, 8, 3, 56, 2, 0, 1}. The implied pattern is: - -.. code-block:: cpp - - for(ap_int<64> d4 = 0; d4 < 1; d4++) { // cfg[8] = 1 - for(ap_int<64> d3 = 0; d3 < 2; d3++) { // cfg[6] = 2 - for(ap_int<64> d2 = 0; d2 < 3; d2++) { // cfg[4] = 3 - for(ap_int<64> d1 = 0; d1 < 4; d1++) { // cfg[2] = 4 - // cfg[7] = 0, cfg[5] = 56, cfg[3] = 8, cfg[1] = 1, cfg[0] = 4 - elem_address = d4 * 0 + d3 * 56 + d2 * 8 + d1 * 1 + 4; - data_to_be_read = data[elem_address]; - } - } - } - } - -.. image:: /images/X_Y_Z_W_sub_pattern.png - :alt: various pattern - :width: 30% - :align: center - - -Static Data-Mover -================== - -Feature --------- - -``Static Data Mover`` has 9 types of kernels in 2 different categories. -They all access certain amount of data in Memory/URAM/BRAM in a continuous style. -This is the only access pattern. - -Data to AIE: - -- LoadDdrToStream: For loading data from PL's DDR to AIE through AXI stream -- LoadDdrToStreamWithCounter: For loading data from PL's DDR to AIE through AXI stream and recording the data count sending to AIE -- SendRomToStream: For sending data from on-chip BRAM to AIE through AXI stream -- SendRamToStream: The same as ``SendRomToStream``, but the difference is that the source data is coming from URAM instead of BRAM - -Data from AIE: - -- StoreStreamToMaster: For receiving data from AIE through AXI stream and save them to PL's DDR -- StoreStreamToMasterWithCounter: For receiving data from AIE through AXI stream and saving them to PL's DDR, as well as recording the data count sending to DDR -- ValidateStreamWithMaster: For receiving data from AIE through AXI stream and comparing with the goldens in PL's DDR, as well as putting the overall pass/fail flag into PL's DDR -- ValidateStreamWithRom: For receiving data from AIE through AXI stream and comparing with the goldens in PL's BRAM, as well as putting the overall pass/fail flag into PL's DDR -- ValidateStreamWithRam: For receiving data from AIE through AXI stream and comparing with the goldens in PL's URAM, as well as putting the overall pass/fail flag into PL's DDR - -Build Time Configuration -------------------------- - -**Example Kernel Specification (JSON)** - -The following kernel specification in JSON describes a ``SendRomToStream`` kernel and a ``StoreStreamToMaster`` kernel. - -The ``SendRomToStream`` kernel should have 2 data paths as we can see that there are 2 specifications in ``map`` field. Let's take the first data path for example, it will be using texture contents for ROM initialization from file named ``din0``, and the corresponding datatype is specified as ``int64_t``. As the ``num`` is set to 512, so the depth of the internal ROM should be 512. Since we want to send the data to AXI stream in II = 1, the on-chip ROM's width will be automatically generated regarding to the output port's width, that said 64-bit. The second data path will be auto-generated with the same rules. - -The ``StoreStreamToMater`` kernel should also have 2 data paths. As we want to load the data from AIE through AXI stream in II = 1, the output port width for PL's DDR will be auto-generated regarding to the width of the corresponding AXI stream, that said 64-bit for 1st data path, 32-bit for 2nd data path. - -.. code-block:: JSON - - { - "rom2s_x2": { - "impl": "SendRomToStream", - "map": [ - { - "in_file": { - "name": "din0", - "type": "int64_t", - "num": 512 - }, - "out": { - "stream": "s0", - "width": 64 - } - }, - { - "in_file": { - "name": "din1", - "type": "int32_t", - "num": 1024 - }, - "out": { - "stream": "s1", - "width": 32 - } - } - ] - }, - "s2m_x2": { - "impl": "StoreStreamToMaster", - "map": [ - { - "in_port": { - "stream": "s0", - "width": 64 - }, - "out": { - "buffer": "p0" - } - }, - { - "in_port": { - "stream": "s1", - "width": 32 - }, - "out": { - "buffer": "p1" - } - } - ] - } - } - -Kindly refer to ``L2/tests/datamover`` for JSON format of all 9 types of kernels that can be generated. - -**Example of How to generate kernels** - -.. code-block:: bash - - cd L2/tests/datamover/load_master_to_stream - make pre_build - # The pre_build command is as follows: - # pre_build: - # make -f $(CUR_DIR)/ksrc.mk GENKERNEL=$(XFLIB_DIR)/L2/scripts/generate_kernels SPEC=$(CUR_DIR)/kernel/spec.json TOOLDIR=$(CUR_DIR)/_krnlgen - -**Example of How to run hardware emulation of hardware** - -.. code-block:: bash - - cd L2/tests/datamover/load_master_to_stream - source /opt/xilinx/Vitis/2022.2/settings64.sh - source /opt/xilinx/xrt/setup.sh - export PLATFORM_REPO_PATHS=/opt/xilinx/platforms - make run TARGET=hw PLATFORM=${PLATFORM_REPO_PATHS}/xilinx_vck190_base_202210_1/xilinx_vck190_base_202210_1.xpfm - -.. ATTENTION:: - * Only HW_EMU and HW run available - * Kernel-to-kernel streaming is not available in software emulation, design can only be enulated in hardware emulation. - - -Data Converter --------------- - -This C-based data converter is used to transform the texture ROM contents to hexadecimal string with specific width that can be directly programmed into on-chip ROMs. - -Please be noticed that there are several limitations for this data converter, so when you provide the JSON specifications or the ROM contents, these rules have to be followed: - -- Maximum width of the output data width is 512-bit -- Output data width have to be wider than input -- Input texture contents should be provided line-by-line, that said ``\n`` separated -- Only the following input data types are supoorted - -**Supported input datatypes** - -+--------------+ -| Element Type | -+==============+ -| half | -+--------------+ -| float | -+--------------+ -| double | -+--------------+ -| int8_t | -+--------------+ -| int16_t | -+--------------+ -| int32_t | -+--------------+ -| int64_t | -+--------------+ +.. attention:: + The data-mover APIs have been promoted to top-level DataMover Library. + Headers in this repo will be removed in future release. diff --git a/utils/docs/src/release.rst b/utils/docs/src/release.rst index 9d1e50c6f6..ac418f79f5 100644 --- a/utils/docs/src/release.rst +++ b/utils/docs/src/release.rst @@ -22,6 +22,12 @@ Release Note :hidden: :maxdepth: 1 +2023.1 +------ + +The data-mover APIs are promoted as a new top-level library. +They will be removed from this library in future release. + 2022.2 ------