From 88d971c1d14a215f3496f08a9cb910f279ca7de9 Mon Sep 17 00:00:00 2001 From: Yohann Uguen Date: Mon, 27 Feb 2023 06:38:01 -0800 Subject: [PATCH] improve IS_BSP READMEs and gate invocation insterface to IPA Signed-off-by: Yohann Uguen --- .../C++SYCL_FPGA/ReferenceDesigns/anr/README.md | 4 ++-- .../ReferenceDesigns/cholesky/README.md | 4 ++-- .../ReferenceDesigns/cholesky_inversion/README.md | 4 ++-- .../ReferenceDesigns/decompress/README.md | 4 ++-- .../C++SYCL_FPGA/ReferenceDesigns/gzip/README.md | 4 ++-- .../ReferenceDesigns/merge_sort/README.md | 2 +- .../ReferenceDesigns/mvdr_beamforming/README.md | 4 ++-- .../C++SYCL_FPGA/ReferenceDesigns/qrd/README.md | 4 ++-- .../C++SYCL_FPGA/ReferenceDesigns/qri/README.md | 4 ++-- .../buffered_host_streaming/README.md | 4 ++-- .../explicit_data_movement/README.md | 4 ++-- .../DesignPatterns/io_streaming/README.md | 4 ++-- .../DesignPatterns/simple_host_streaming/README.md | 4 ++-- .../zero_copy_data_transfer/README.md | 4 ++-- .../Features/experimental/hostpipes/README.md | 4 ++-- .../invocation_interfaces/src/CMakeLists.txt | 14 ++++++++++++++ .../Tutorials/Features/printf/README.md | 4 ++-- 17 files changed, 45 insertions(+), 31 deletions(-) diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md index 31b0a80183..26f6727e22 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md @@ -166,7 +166,7 @@ The design uses the following generic header files. > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -209,7 +209,7 @@ The design uses the following generic header files. > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky/README.md index 902350a098..370583d853 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky/README.md @@ -158,7 +158,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, and ` > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -201,7 +201,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, and ` > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky_inversion/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky_inversion/README.md index 90ee24b638..02ce2b6512 100644 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky_inversion/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky_inversion/README.md @@ -180,7 +180,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -223,7 +223,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/README.md index 12bd230887..69dfc2914c 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/README.md @@ -325,7 +325,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, `tupl > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -373,7 +373,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, `tupl > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/gzip/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/gzip/README.md index abe0ea78fa..9a4e64aa39 100644 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/gzip/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/gzip/README.md @@ -159,7 +159,7 @@ Performance results are based on testing as of October 27, 2020. > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -205,7 +205,7 @@ Performance results are based on testing as of October 27, 2020. > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/README.md index 3110cccf58..6ccca54a2e 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/README.md @@ -133,7 +133,7 @@ For `constexpr_math.hpp`, `pipe_utils.hpp`, and `unrolled_loop.hpp` see the READ > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/mvdr_beamforming/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/mvdr_beamforming/README.md index 7f6cb61931..ba7be62deb 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/mvdr_beamforming/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/mvdr_beamforming/README.md @@ -136,7 +136,7 @@ The `DataProducer` kernel replaces the input IO pipe in the first image. The spl > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -179,7 +179,7 @@ The `DataProducer` kernel replaces the input IO pipe in the first image. The spl > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md index 06b9740795..5d5d79e30e 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md @@ -148,7 +148,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -191,7 +191,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md index 88ef576f88..a548b29618 100755 --- a/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md +++ b/DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md @@ -137,7 +137,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -180,7 +180,7 @@ Additionaly, the cmake build system can be configured using the following parame > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/README.md index b84b61e610..e392cc786c 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/README.md @@ -108,7 +108,7 @@ This sample demonstrates the following concepts: > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -151,7 +151,7 @@ This sample demonstrates the following concepts: > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/explicit_data_movement/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/explicit_data_movement/README.md index dce7e088b2..44473a8ca5 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/explicit_data_movement/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/explicit_data_movement/README.md @@ -122,7 +122,7 @@ Alternatively, there is a hybrid approach that uses some implicit data movement > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -164,7 +164,7 @@ Alternatively, there is a hybrid approach that uses some implicit data movement > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/README.md index 258c4e95c0..74f0ff5e8f 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/README.md @@ -151,7 +151,7 @@ Notice that the main kernel in the `SubmitSideChannelKernels` function in *src/S > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -194,7 +194,7 @@ Notice that the main kernel in the `SubmitSideChannelKernels` function in *src/S > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/README.md index 7239b89391..8a7ba04e52 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/README.md @@ -153,7 +153,7 @@ We are currently working on an API and tutorial to address both of these drawbac > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -194,7 +194,7 @@ We are currently working on an API and tutorial to address both of these drawbac > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/zero_copy_data_transfer/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/zero_copy_data_transfer/README.md index aca998c4c8..5fb9853e50 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/zero_copy_data_transfer/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/zero_copy_data_transfer/README.md @@ -102,7 +102,7 @@ This approach is not considered host streaming since the CPU and FPGA cannot (re > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -144,7 +144,7 @@ This approach is not considered host streaming since the CPU and FPGA cannot (re > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/hostpipes/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/hostpipes/README.md index 017b3af933..17ddfd5b72 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/hostpipes/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/hostpipes/README.md @@ -304,7 +304,7 @@ In the latter launch-collect test, the entire contents of the `in` vector are wr > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -346,7 +346,7 @@ In the latter launch-collect test, the entire contents of the `in` vector are wr > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/invocation_interfaces/src/CMakeLists.txt b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/invocation_interfaces/src/CMakeLists.txt index e824731e1e..48bf08aee1 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/invocation_interfaces/src/CMakeLists.txt +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/invocation_interfaces/src/CMakeLists.txt @@ -30,8 +30,22 @@ if(NOT DEFINED FPGA_DEVICE) \nPlease refer to the README for information on target selection.") else() message(STATUS "Configuring the design with the following target: ${FPGA_DEVICE}") + + # Check if the target is a BSP + if(IS_BSP MATCHES "1" OR FPGA_DEVICE MATCHES ".*pac_a10.*|.*pac_s10.*") + set(IS_BSP "1") + else() + set(IS_BSP "0") + message(STATUS "The selected target ${FPGA_DEVICE} is assumed to be an FPGA part number.") + message(STATUS "If the target is actually a BSP, run cmake with -DIS_BSP=1.") + endif() +endif() + +if((IS_BSP STREQUAL "1")) + message(FATAL_ERROR "ERROR: This tutorial is only supported in the IP Authoring flow and therefore does not support BSPs as a target.") endif() + # This is a Windows-specific flag that enables exception handling in host code if(WIN32) set(WIN_FLAG "/EHsc") diff --git a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md index baf101b50c..a3eff0df2c 100755 --- a/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md +++ b/DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md @@ -119,7 +119,7 @@ PRINTF("Hello: %d\n", 123); > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake .. -DFPGA_DEVICE=: + > cmake .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP. @@ -161,7 +161,7 @@ PRINTF("Hello: %d\n", 123); > > Alternatively, you can target an explicit FPGA board variant and BSP by using the following command: > ``` - > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: + > cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=: -DIS_BSP=1 > ``` > > You will only be able to run an executable on the FPGA if you specified a BSP.