Skip to content

FPGA: improve build instructions in the READMEs for samples that require IS_BSP #1388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
4 changes: 2 additions & 2 deletions DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
4 changes: 2 additions & 2 deletions DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ We are currently working on an API and tutorial to address both of these drawbac
>
> For more information on configuring environment variables, see [Use the setvars Script with Linux* or macOS*](https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-linux-or-macos.html) or [Use the setvars Script with Windows*](https://www.intel.com/content/www/us/en/develop/documentation/oneapi-programming-guide/top/oneapi-development-environment-setup/use-the-setvars-script-with-windows.html).


### On Linux*

1. Change to the sample directory.
Expand All @@ -158,7 +157,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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -200,7 +199,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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down Expand Up @@ -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=<board-support-package>:<board-variant>
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
> ```
>
> You will only be able to run an executable on the FPGA if you specified a BSP.
Expand Down