Skip to content

Commit 0b71944

Browse files
Randy HartgroveGitHub Enterprise
authored andcommitted
HwAccel: update multiple tutorials for 2022.1
1 parent 291e744 commit 0b71944

File tree

94 files changed

+421
-515
lines changed

Some content is hidden

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

94 files changed

+421
-515
lines changed

Getting_Started/Vitis/Part2.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
# Vitis Getting Started Tutorial
1313

14-
***Version: Vitis 2021.2***
15-
1614
## Part 2 : Installation and Configuration
1715

1816
To develop and deploy applications with Vitis, you need to install the Vitis unified software environment, the Xilinx Runtime library (XRT) and the platform files specific to the acceleration card used in your project.
@@ -74,15 +72,20 @@ The packages required for each platform can be found on the corresponding downlo
7472

7573
### Step 5 – Setup the environment to run Vitis
7674

77-
To configure the environment to run Vitis, run the following scripts which set up the environment to run in a specific command shell.
75+
To configure the environment to run Vitis, run the following script which sets up the environment to run in a specific command shell.
7876

7977
```bash
80-
source <Vitis_install_path>/Vitis/2021.2/settings64.sh
81-
source /opt/xilinx/xrt/setup.sh
78+
source <Vitis_install_path>/Vitis/2022.1/settings64.sh
8279
```
8380

8481
*NOTE: .csh scripts are also provided but this tutorial assumes a bash shell is used.*
8582

83+
To configure XRT for Alveo Data Center accelerator cards run the following script. This is not required for Embedded platforms.
84+
85+
```bash
86+
source /opt/xilinx/xrt/setup.sh
87+
```
88+
8689
To specify the location of any Data-Center or Embedded platforms you have installed, set the following environment variable:
8790

8891
```bash
@@ -114,4 +117,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
114117
See the License for the specific language governing permissions and
115118
limitations under the License.
116119

117-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
120+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>

Getting_Started/Vitis/Part3.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
# Vitis Getting Started Tutorial
1313

14-
***Version: Vitis 2021.2***
15-
1614
## Part 3 : Review the Kernel Code and Host Application
1715

1816
The example used in this tutorial is a trivial vector-add application. The simplicity of this example allows focusing on the key concepts of FPGA acceleration without being distracted by complicated algorithmic consideration.
@@ -119,4 +117,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119117
See the License for the specific language governing permissions and
120118
limitations under the License.
121119

122-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
120+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>

Getting_Started/Vitis/Part4-data_center.md

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
# Vitis Getting Started Tutorial
1313

14-
***Version: Vitis 2021.2***
15-
1614
## Part 4 : Build and Run the Data Center Application
1715

1816
In this fourth part of the Introduction to Vitis tutorial, you will compile and run the vector-add example using each of three build targets supported in the Vitis flow as described below. The overall flow is described in [Data Center Application Acceleration Flow](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Data-Center-Application-Acceleration-Development-Flow), and includes the image flow diagram shown below. From the image you can see the standard G++ compilation process for the host application, and the use of the Vitis compiler (`v++`) for building the Xilinx device binary (`xclbin`). These are the steps you will be working through in this lab.
@@ -29,7 +27,7 @@
2927

3028
### Setting up the environment
3129

32-
> IMPORTANT: This tutorial requires Vitis 2021.1 or later to run.
30+
> IMPORTANT: This tutorial requires Vitis 2022.1 or later to run.
3331
3432
*NOTE: The instructions provided below assume that you are running in a bash shell.*
3533

@@ -61,9 +59,9 @@ Then, after changing into the target build directory, enter the following comman
6159

6260
```bash
6361
g++ -Wall -g -std=c++11 ../../src/host.cpp -o app.exe -I${XILINX_XRT}/include/ -L${XILINX_XRT}/lib/ -lOpenCL -lpthread -lrt -lstdc++
64-
emconfigutil --platform xilinx_u200_gen3x16_xdma_1_202110_1 --nd 1
65-
v++ -c -t sw_emu --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
66-
v++ -l -t sw_emu --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
62+
emconfigutil --platform xilinx_u200_gen3x16_xdma_2_202110_1 --nd 1
63+
v++ -c -t sw_emu --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
64+
v++ -l -t sw_emu --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
6765
```
6866

6967
Here is a brief explanation of each of these four commands:
@@ -75,10 +73,9 @@ Here is a brief explanation of each of these four commands:
7573

7674
The `-t` option of the `v++` command specifies the build target. Here it is set to `sw_emu` so we are building for software emulation.
7775

78-
Notice also the `--config` option which is used to specify the name of a configuration file containing additional options. Here we are using this configuration file to specify the name of the targeted platform and the mapping of kernel arguments to specific memory banks.
76+
Notice also the `--config` option which is used to specify the name of a configuration file containing additional options. Here we are using this configuration file to specify the number of kernels and the mapping of kernel arguments to specific memory banks.
7977

8078
```bash
81-
platform=xilinx_u200_gen3x16_xdma_1_202110_1
8279
debug=1
8380
save-temps=1
8481

@@ -137,9 +134,9 @@ Then, after changing into the target build directory, enter the following comman
137134

138135
```bash
139136
g++ -Wall -g -std=c++11 ../../src/host.cpp -o app.exe -I${XILINX_XRT}/include/ -L${XILINX_XRT}/lib/ -lOpenCL -lpthread -lrt -lstdc++
140-
emconfigutil --platform xilinx_u200_gen3x16_xdma_1_202110_1 --nd 1
141-
v++ -c -t hw_emu --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
142-
v++ -l -t hw_emu --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
137+
emconfigutil --platform xilinx_u200_gen3x16_xdma_2_202110_1 --nd 1
138+
v++ -c -t hw_emu --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
139+
v++ -l -t hw_emu --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
143140
```
144141

145142
Refer to *Targeting Software Emulation* for a brief explanation of these different commands. The only difference with the previous step is the `v++` target (`-t`) option which is changed from `sw_emu` to `hw_emu`. All other options remain the same.
@@ -168,8 +165,8 @@ Then, after changing into the target build directory, enter the following comman
168165

169166
```bash
170167
g++ -Wall -g -std=c++11 ../../src/host.cpp -o app.exe -I${XILINX_XRT}/include/ -L${XILINX_XRT}/lib/ -lOpenCL -lpthread -lrt -lstdc++
171-
v++ -c -t hw --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
172-
v++ -l -t hw --platform xilinx_u200_gen3x16_xdma_1_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
168+
v++ -c -t hw --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
169+
v++ -l -t hw --platform xilinx_u200_gen3x16_xdma_2_202110_1 --config ../../src/u200.cfg ./vadd.xo -o vadd.xclbin
173170
```
174171

175172
To target Hardware, the `v++ -t` option is set to `hw` and the `emconfigutil` command is not needed, as you will be running on an actual hardware platform rather than an emulated platform. All other options remain identical.
@@ -186,7 +183,7 @@ After the build completes you can run the application on a system with the Alveo
186183

187184
You should see the same TEST PASSED message indicating that the run completed successfully. If you look in the u200/hw folder you will see some of the files that were created during this build and run process. Refer to *Targeting Software Emulation* for a brief explanation of the different files.
188185

189-
Congratulations!! You have just completed your first run of a Vitis accelerated application on the Alveo U200 card! There are additional [Vitis-Tutorials](https://github.com/Xilinx/Vitis-Tutorials) to work through to learn additional details of the Vitis tools, and [Vitis_Accel_Examples](https://github.com/Xilinx/Vitis_Accel_Examples/tree/2021.2) to use for examples of host application and kernel coding.
186+
Congratulations!! You have just completed your first run of a Vitis accelerated application on the Alveo U200 card! There are additional [Vitis-Tutorials](https://github.com/Xilinx/Vitis-Tutorials) to work through to learn additional details of the Vitis tools, and [Vitis_Accel_Examples](https://github.com/Xilinx/Vitis_Accel_Examples/tree/2022.1) to use for examples of host application and kernel coding.
190187

191188
## Next Step
192189

@@ -205,4 +202,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205202
See the License for the specific language governing permissions and
206203
limitations under the License.
207204

208-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
205+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>

Getting_Started/Vitis/Part4-embedded_platform.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
# Vitis Getting Started Tutorial
1313

14-
***Version: Vitis 2021.2***
15-
1614
## Part 4 : Build and Run the Embedded Processor Application
1715

1816
In this fourth part of the Introduction to Vitis tutorial, you will compile and run the vector-add example using each of three build targets supported in the Vitis flow as described below. The overall flow is described in [Embedded Processor Application Acceleration Flow](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Embedded-Processor-Application-Acceleration-Development-Flow), and includes the image flow diagram shown below. From the image you can see the G++ cross-compiler for building the host application for the Arm processor, and the use of the Vitis compiler (`v++`) for building the Xilinx device binary (`xclbin`). These are the steps you will be working through in this lab.
@@ -37,7 +35,6 @@
3735

3836
```bash
3937
source <VITIS_install_path>/settings64.sh
40-
source <XRT_install_path>/setup.sh
4138
unset LD_LIBRARY_PATH
4239
```
4340

@@ -72,9 +69,9 @@ Then, after changing into the target build directory, enter the following comman
7269

7370
```bash
7471
$CXX -Wall -g -std=c++11 ../../src/host.cpp -o ./app.exe -I/usr/include/xrt -lOpenCL -lpthread -lrt -lstdc++
75-
v++ -c -t sw_emu --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o ./vadd.xo
76-
v++ -l -t sw_emu --config ../../src/zcu102.cfg ./vadd.xo -o ./vadd.xclbin
77-
v++ -p -t sw_emu --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir ./package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file ./xrt.ini --package.sd_file ./app.exe --package.sd_file ./vadd.xclbin --package.sd_file ./run_sw_emu.sh
72+
v++ -c -t sw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o ./vadd.xo
73+
v++ -l -t sw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xo -o ./vadd.xclbin
74+
v++ -p -t sw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir ./package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file ./xrt.ini --package.sd_file ./app.exe --package.sd_file ./vadd.xclbin --package.sd_file ./run_sw_emu.sh
7875
```
7976

8077
Here is a brief explanation of each of these four commands:
@@ -164,9 +161,9 @@ Then, after changing into the target build directory, enter the following comman
164161

165162
```bash
166163
$CXX -Wall -g -std=c++11 ../../src/host.cpp -o app.exe -I/usr/include/xrt -lOpenCL -lpthread -lrt -lstdc++
167-
v++ -c -t hw_emu --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
168-
v++ -l -t hw_emu --config ../../src/zcu102.cfg ./vadd.xo -o vadd.xclbin
169-
v++ -p -t hw_emu --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file xrt.ini --package.sd_file app.exe --package.sd_file vadd.xclbin --package.sd_file run_app.sh
164+
v++ -c -t hw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
165+
v++ -l -t hw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xo -o vadd.xclbin
166+
v++ -p -t hw_emu --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file xrt.ini --package.sd_file app.exe --package.sd_file vadd.xclbin --package.sd_file run_app.sh
170167
```
171168

172169
Refer to *Targeting Software Emulation* for a brief explanation of these different commands. The only difference with the previous step is the `v++` target (`-t`) option which is changed from `sw_emu` to `hw_emu`. All other options remain the same.
@@ -214,9 +211,9 @@ Then, after changing into the target build directory, enter the following comman
214211

215212
```bash
216213
$CXX -Wall -g -std=c++11 ../../src/host.cpp -o app.exe -I/usr/include/xrt -lOpenCL -lpthread -lrt -lstdc++ -O
217-
v++ -c -t hw --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
218-
v++ -l -t hw --config ../../src/zcu102.cfg ./vadd.xo -o vadd.xclbin
219-
v++ -p -t hw --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file xrt.ini --package.sd_file app.exe --package.sd_file vadd.xclbin --package.sd_file run_app.sh
214+
v++ -c -t hw --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg -k vadd -I../../src ../../src/vadd.cpp -o vadd.xo
215+
v++ -l -t hw --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xo -o vadd.xclbin
216+
v++ -p -t hw --platform xilinx_zcu102_base_202210_1 --config ../../src/zcu102.cfg ./vadd.xclbin --package.out_dir package --package.rootfs ${ROOTFS}/rootfs.ext4 --package.sd_file ${ROOTFS}/Image --package.sd_file xrt.ini --package.sd_file app.exe --package.sd_file vadd.xclbin --package.sd_file run_app.sh
220217
```
221218

222219
To target Hardware, the `v++ -t` option is set to `hw` and the `emconfigutil` command is not needed, as you will be running on an actual hardware platform rather than an emulated platform. All other options remain identical.
@@ -233,7 +230,7 @@ export XILINX_XRT=/usr
233230

234231
You should see the same TEST PASSED message indicating that the run completed successfully. If you look in the zcu102/hw folder you will see some of the files that were created during this build and run process. Refer to *Targeting Software Emulation* for a brief explanation of the different files.
235232

236-
Congratulations!! You have just completed your first run of a Vitis accelerated application on the ZCU102 card! There are additional [Vitis-Tutorials](https://github.com/Xilinx/Vitis-Tutorials) to work through to learn additional details of the Vitis tools, and [Vitis_Accel_Examples](https://github.com/Xilinx/Vitis_Accel_Examples/tree/2021.2) to use for examples of host application and kernel coding.
233+
Congratulations!! You have just completed your first run of a Vitis accelerated application on the ZCU102 card! There are additional [Vitis-Tutorials](https://github.com/Xilinx/Vitis-Tutorials) to work through to learn additional details of the Vitis tools, and [Vitis_Accel_Examples](https://github.com/Xilinx/Vitis_Accel_Examples/tree/2022.1) to use for examples of host application and kernel coding.
237234

238235
## Next Step
239236

@@ -252,4 +249,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
252249
See the License for the specific language governing permissions and
253250
limitations under the License.
254251

255-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
252+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>

Getting_Started/Vitis/Part5.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
# Vitis Getting Started Tutorial
1313

14-
***Version: Vitis 2021.2***
15-
1614
## Part 5 : Visualizing Results and Analyzing Reports
1715

1816
Now that you have successfully built and run the vector-add example, now you can look at the results and reports generated along the way. This example is configured to generate build and run summaries for all three build targets (software emulation, hardware emulation and hardware). Any of these summary reports can be viewed and analyzed using the Vitis analyzer tool as described in [Using the Vitis Analyzer](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Using-the-Vitis-Analyzer).
@@ -41,11 +39,10 @@ If you look into the directory where you ran the application, you will notice th
4139

4240
*IMPORTANT: If you targeted the ZCU102 hardware, these files are stored on the SD card and must be copied back to your workstation to continue this lab. Refer to [Running Emulation on an Embedded Processor Platform](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Running-Emulation-on-an-Embedded-Processor-Platform) for more information.*
4341

44-
The generation of these files and reports is controlled by runtime options located in the `xrt.ini` file. This tutorial contains a pre-existing `xrt.ini` file which enables the generation of profile data and a timeline of execution with the following content:
42+
The generation of these files and reports is controlled by runtime options located in the `xrt.ini` file. This tutorial contains a pre-existing `xrt.ini` file which enables the generation a timeline of execution, and the profile summary data, with the following content:
4543

4644
```bash
4745
[Debug]
48-
opencl_summary=true
4946
opencl_trace=true
5047
```
5148

@@ -119,4 +116,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119116
See the License for the specific language governing permissions and
120117
limitations under the License.
121118

122-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
119+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>

Getting_Started/Vitis/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
# Vitis™ Getting Started Tutorial
1414

15-
***Version: Vitis 2021.2***
15+
***Version: Vitis 2022.1***
1616

1717
![img](./images/vitis_101.png)
1818

@@ -109,4 +109,4 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109109
See the License for the specific language governing permissions and
110110
limitations under the License.
111111

112-
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2021 Xilinx</sup></p>
112+
<p class="sphinxhide" align="center"><sup>Copyright&copy; 2020–2022 Xilinx</sup></p>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[Debug]
2-
opencl_summary=true
32
opencl_trace=true
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
[Debug]
2-
opencl_summary=true
32
opencl_trace=true

0 commit comments

Comments
 (0)