Skip to content

Commit ca7520b

Browse files
authored
FPGA: improve build instructions in the READMEs for samples that require IS_BSP (#1388)
1 parent 76ba21b commit ca7520b

File tree

17 files changed

+45
-32
lines changed

17 files changed

+45
-32
lines changed

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ The design uses the following generic header files.
166166
>
167167
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
168168
> ```
169-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
169+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
170170
> ```
171171
>
172172
> 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.
209209
>
210210
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
211211
> ```
212-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
212+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
213213
> ```
214214
>
215215
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, and `
158158
>
159159
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
160160
> ```
161-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
161+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
162162
> ```
163163
>
164164
> 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 `
201201
>
202202
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
203203
> ```
204-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
204+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
205205
> ```
206206
>
207207
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/cholesky_inversion/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Additionaly, the cmake build system can be configured using the following parame
180180
>
181181
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
182182
> ```
183-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
183+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
184184
> ```
185185
>
186186
> 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
223223
>
224224
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
225225
> ```
226-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
226+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
227227
> ```
228228
>
229229
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/decompress/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ For `constexpr_math.hpp`, `memory_utils.hpp`, `metaprogramming_utils.hpp`, `tupl
325325
>
326326
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
327327
> ```
328-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
328+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
329329
> ```
330330
>
331331
> 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
373373
>
374374
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
375375
> ```
376-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
376+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
377377
> ```
378378
>
379379
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/gzip/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ Performance results are based on testing as of October 27, 2020.
159159
>
160160
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
161161
> ```
162-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
162+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
163163
> ```
164164
>
165165
> 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.
205205
>
206206
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
207207
> ```
208-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
208+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
209209
> ```
210210
>
211211
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/merge_sort/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ For `constexpr_math.hpp`, `pipe_utils.hpp`, and `unrolled_loop.hpp` see the READ
133133
>
134134
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
135135
> ```
136-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
136+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
137137
> ```
138138
>
139139
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/mvdr_beamforming/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ The `DataProducer` kernel replaces the input IO pipe in the first image. The spl
136136
>
137137
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
138138
> ```
139-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
139+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
140140
> ```
141141
>
142142
> 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
179179
>
180180
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
181181
> ```
182-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
182+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
183183
> ```
184184
>
185185
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qrd/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ Additionaly, the cmake build system can be configured using the following parame
148148
>
149149
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
150150
> ```
151-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
151+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
152152
> ```
153153
>
154154
> 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
191191
>
192192
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
193193
> ```
194-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
194+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
195195
> ```
196196
>
197197
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/qri/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ Additionaly, the cmake build system can be configured using the following parame
137137
>
138138
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
139139
> ```
140-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
140+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
141141
> ```
142142
>
143143
> 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
180180
>
181181
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
182182
> ```
183-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
183+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
184184
> ```
185185
>
186186
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/buffered_host_streaming/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ This sample demonstrates the following concepts:
108108
>
109109
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
110110
> ```
111-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
111+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
112112
> ```
113113
>
114114
> 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:
151151
>
152152
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
153153
> ```
154-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
154+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
155155
> ```
156156
>
157157
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/explicit_data_movement/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Alternatively, there is a hybrid approach that uses some implicit data movement
122122
>
123123
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
124124
> ```
125-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
125+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
126126
> ```
127127
>
128128
> 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
164164
>
165165
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
166166
> ```
167-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
167+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
168168
> ```
169169
>
170170
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/io_streaming/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ Notice that the main kernel in the `SubmitSideChannelKernels` function in *src/S
151151
>
152152
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
153153
> ```
154-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
154+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
155155
> ```
156156
>
157157
> 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
194194
>
195195
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
196196
> ```
197-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
197+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
198198
> ```
199199
>
200200
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/simple_host_streaming/README.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ We are currently working on an API and tutorial to address both of these drawbac
141141
>
142142
> 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).
143143
144-
145144
### On Linux*
146145

147146
1. Change to the sample directory.
@@ -158,7 +157,7 @@ We are currently working on an API and tutorial to address both of these drawbac
158157
>
159158
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
160159
> ```
161-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
160+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
162161
> ```
163162
>
164163
> You will only be able to run an executable on the FPGA if you specified a BSP.
@@ -200,7 +199,7 @@ We are currently working on an API and tutorial to address both of these drawbac
200199
>
201200
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
202201
> ```
203-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
202+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
204203
> ```
205204
>
206205
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/DesignPatterns/zero_copy_data_transfer/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ This approach is not considered host streaming since the CPU and FPGA cannot (re
102102
>
103103
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
104104
> ```
105-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
105+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
106106
> ```
107107
>
108108
> 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
144144
>
145145
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
146146
> ```
147-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
147+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
148148
> ```
149149
>
150150
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/hostpipes/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ In the latter launch-collect test, the entire contents of the `in` vector are wr
304304
>
305305
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
306306
> ```
307-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
307+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
308308
> ```
309309
>
310310
> 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
346346
>
347347
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
348348
> ```
349-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
349+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
350350
> ```
351351
>
352352
> You will only be able to run an executable on the FPGA if you specified a BSP.

DirectProgramming/C++SYCL_FPGA/Tutorials/Features/experimental/invocation_interfaces/src/CMakeLists.txt

+14
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,22 @@ if(NOT DEFINED FPGA_DEVICE)
3030
\nPlease refer to the README for information on target selection.")
3131
else()
3232
message(STATUS "Configuring the design with the following target: ${FPGA_DEVICE}")
33+
34+
# Check if the target is a BSP
35+
if(IS_BSP MATCHES "1" OR FPGA_DEVICE MATCHES ".*pac_a10.*|.*pac_s10.*")
36+
set(IS_BSP "1")
37+
else()
38+
set(IS_BSP "0")
39+
message(STATUS "The selected target ${FPGA_DEVICE} is assumed to be an FPGA part number.")
40+
message(STATUS "If the target is actually a BSP, run cmake with -DIS_BSP=1.")
41+
endif()
42+
endif()
43+
44+
if((IS_BSP STREQUAL "1"))
45+
message(FATAL_ERROR "ERROR: This tutorial is only supported in the IP Authoring flow and therefore does not support BSPs as a target.")
3346
endif()
3447

48+
3549
# This is a Windows-specific flag that enables exception handling in host code
3650
if(WIN32)
3751
set(WIN_FLAG "/EHsc")

DirectProgramming/C++SYCL_FPGA/Tutorials/Features/printf/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ PRINTF("Hello: %d\n", 123);
119119
>
120120
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
121121
> ```
122-
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
122+
> cmake .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
123123
> ```
124124
>
125125
> 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);
161161
>
162162
> Alternatively, you can target an explicit FPGA board variant and BSP by using the following command:
163163
> ```
164-
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant>
164+
> cmake -G "NMake Makefiles" .. -DFPGA_DEVICE=<board-support-package>:<board-variant> -DIS_BSP=1
165165
> ```
166166
>
167167
> You will only be able to run an executable on the FPGA if you specified a BSP.

0 commit comments

Comments
 (0)