Skip to content

Commit c61dbf5

Browse files
authored
Release v1.4.14 (#489)
* Added a new platform file to fix DDR bandwidth issue * Add Vitis Debug document * Updated broken link in the Testing doc
1 parent b220124 commit c61dbf5

File tree

11 files changed

+177
-20
lines changed

11 files changed

+177
-20
lines changed

RELEASE_NOTES.md

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
* 1 DDR controller implemented in the SH (always available)
2525
* 3 DDR controllers implemented in the CL (configurable number of implemented controllers allowed)
2626

27+
## Release 1.4.14 (See [ERRATA](./ERRATA.md) for unsupported features)
28+
* Updated Vitis Platform file to fix a DDR bandwidth issue
29+
* Added Vitis Debug Documentation
30+
2731
## Release 1.4.13 (See [ERRATA](./ERRATA.md) for unsupported features)
2832
* FPGA developer kit now supports Xilinx Vivado/Vitis 2019.2
2933
* To upgrade, use [Developer AMI v1.8.0](https://aws.amazon.com/marketplace/pp/B06VVYBLZZ) on the AWS Marketplace.

Vitis/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ The F1 HW Target compile time is ~50 minutes, therefore, software and hardware e
5151
## Github and Environment Setup
5252
* Clone this github repository and source the *vitis_setup.sh* script. This will take care of:
5353
* Downloading the required files:
54-
* [AWS Platform](./aws_platform/xilinx_aws-vu9p-f1_shell-v04261818_201920_1) that allows Xilinx FPGA Binary files to target AWS F1 instances
54+
* [AWS Platform](./aws_platform/xilinx_aws-vu9p-f1_shell-v04261818_201920_2) that allows Xilinx FPGA Binary files to target AWS F1 instances
5555
* [AFI Creation script](./tools/create_vitis_afi.sh) that generates an AFI and AWS FPGA Binary from a Xilinx FPGA Binary
5656
* Installing the required XRT, libraries and drivers
5757

@@ -60,7 +60,7 @@ The F1 HW Target compile time is ~50 minutes, therefore, software and hardware e
6060
$ cd $AWS_FPGA_REPO_DIR
6161
$ source vitis_setup.sh
6262
```
63-
* Valid platforms for shell_v04261818: `AWS_PLATFORM_201920_1` (Default) AWS F1 Vitis platform.
63+
* Valid platforms for shell_v04261818: `AWS_PLATFORM_201920_2` (Default) AWS F1 Vitis platform.
6464

6565
<a name="createapp"></a>
6666
# 1. Build the host application, Xilinx FPGA binary and verify you are ready for FPGA acceleration
@@ -211,4 +211,4 @@ For help with AFI creation issues, see [create-fpga-image error codes](../hdk/do
211211
212212
* [XRT Documentation](https://xilinx.github.io/XRT/master/html/)
213213
214-
* [XRT MPD Documentation](https://xilinx.github.io/XRT/master/html/cloud_vendor_support.html)
214+
* [XRT MPD Documentation](https://xilinx.github.io/XRT/master/html/cloud_vendor_support.html)
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<sdx:platform sdx:vendor="xilinx"
33
sdx:library="aws-vu9p-f1"
44
sdx:name="shell-v04261818"
5-
sdx:version="201920.1"
5+
sdx:version="201920.2"
66
sdx:schemaVersion="1.0"
77
xmlns:sdx="http://www.xilinx.com/sdx">
88
<sdx:description>
+3-3
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@
22
<sdx:platform sdx:vendor="xilinx"
33
sdx:library="aws-vu9p-f1"
44
sdx:name="shell-v04261818"
5-
sdx:version="201920.1"
5+
sdx:version="201920.2"
66
sdx:schemaVersion="1.0"
77
xmlns:sdx="http://www.xilinx.com/sdx">
88
<sdx:description>
99
{No description given}
1010
</sdx:description>
1111

1212
<sdx:hardwarePlatforms>
13-
<sdx:hardwarePlatform sdx:path="hw" sdx:name="xilinx_aws-vu9p-f1_shell-v04261818_201920_1.xsa"/>
13+
<sdx:hardwarePlatform sdx:path="hw" sdx:name="xilinx_aws-vu9p-f1_shell-v04261818_201920_2.xsa"/>
1414
</sdx:hardwarePlatforms>
1515

1616
<sdx:softwarePlatforms>
17-
<sdx:softwarePlatform sdx:path="sw" sdx:name="xilinx_aws-vu9p-f1_shell-v04261818_201920_1.spfm"/>
17+
<sdx:softwarePlatform sdx:path="sw" sdx:name="xilinx_aws-vu9p-f1_shell-v04261818_201920_2.spfm"/>
1818
</sdx:softwarePlatforms>
1919

2020
</sdx:platform>

Vitis/docs/Debug_Vitis_Kernel.md

+152
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
Hardware Debug of Vitis Kernel
2+
======================
3+
4+
This file contains the following sections:
5+
6+
1. Overview
7+
2. Enabling ChipScope Debug
8+
3. Host code changes to support debugging
9+
4. Building the executable, creating the AFI, and executing the host code
10+
5. Start debug servers
11+
12+
13+
## 1. Overview
14+
The sections below give you a brief explanation of the steps required to debug your Vitis kernel. They include enabling ChipScope debug, pausing the execution of the host code at the appropriate stage to ensure the setup of ILA triggers, building the running the host code and starting the debug servers to debug the design in hardware.
15+
16+
## 2. Enabling ChipScope Debug
17+
18+
Debug cores can be added to the AXI interfaces on the kernel itself to monitor AXI transaction level activity (part of the ChipScope Debug feature of Vitis).
19+
20+
Adding debug cores to the AXI interfaces on the kernel can be done using the v++ --dk chipscope option with the compute unit name and optional interface name.
21+
22+
This can be enabled by adding an v++ option to the CLFLAGS in the makefile. The --dk option shown below shows the general usage:
23+
24+
```
25+
--dk chipscope:<compute_unit_name>:<interface_name>
26+
```
27+
28+
For example, to add ChipScope debugging to the helloworld_ocl OpenCL example , enabling chipscope debug can be accomplished by adding the following v++ option to the CLFLAGS in the makefile:
29+
30+
```
31+
--dk chipscope:krnl_vadd_1
32+
```
33+
34+
For detailed usage and more examples, refer to the Debugging section of Vitis Application Acceleration (UG1393).
35+
36+
37+
### Adding debug cores to the RTL kernel code
38+
39+
To debug signals internal to an RTL Kernel you need to instantiate debug cores like the Integrated Logic Analyzer(ILA), Virtual Input/Output(VIO) etc in your application RTL kernel code.
40+
41+
The ILA Debug IP can be created and added to the RTL Kernel in a couple of ways.
42+
43+
44+
1. Open the ILA IP customization wizard in the Vivado GUI and customize the ILA and instantiate it in the RTL code – similar to any other IP in Vivado.
45+
46+
47+
2. Create the ILA IP on the fly using TCL. A snippet of the create_ip TCL command is shown below. The example below creates the ILA IP with 7 probes and associates properties with the IP.
48+
49+
```
50+
create_ip -name ila -vendor xilinx.com -library ip -module_name ila_0
51+
set_property -dict [list CONFIG.C_PROBE6_WIDTH {32} CONFIG.C_PROBE3_WIDTH {64}
52+
CONFIG.C_NUM_OF_PROBES {7} CONFIG.C_EN_STRG_QUAL {1} CONFIG.C_INPUT_PIPE_STAGES {2} CONFIG.C_ADV_TRIGGER {true} CONFIG.ALL_PROBE_SAME_MU_CNT {4} CONFIG.C_PROBE6_MU_CNT {4} CONFIG.C_PROBE5_MU_CNT {4} CONFIG.C_PROBE4_MU_CNT {4} CONFIG.C_PROBE3_MU_CNT {4} CONFIG.C_PROBE2_MU_CNT {4} CONFIG.C_PROBE1_MU_CNT {4} CONFIG.C_PROBE0_MU_CNT {4}] [get_ips ila_0]
53+
```
54+
55+
This TCL file should be added as an RTL Kernel source in the Makefile of your design
56+
57+
58+
Now you are ready to instantiate the ILA Debug core in your RTL Kernel. The RTL code snippet below is an ILA that monitors the output of a combinatorial adder.
59+
60+
// ILA monitoring combinatorial adder
61+
ila_0 i_ila_0 (
62+
.clk(ap_clk), // input wire clk
63+
.probe0(areset), // input wire [0:0] probe0
64+
.probe1(rd_fifo_tvalid_n), // input wire [0:0] probe1
65+
.probe2(rd_fifo_tready), // input wire [0:0] probe2
66+
.probe3(rd_fifo_tdata), // input wire [63:0] probe3
67+
.probe4(adder_tvalid), // input wire [0:0] probe4
68+
.probe5(adder_tready_n), // input wire [0:0] probe5
69+
.probe6(adder_tdata) // input wire [31:0] probe6
70+
);
71+
72+
73+
## 3. Host code changes to support debugging
74+
75+
The application host code needs to be modified to ensure you can set up the ILA trigger conditions **prior** to running the kernel.
76+
77+
78+
79+
The host code shown below introduces the wait for the setup of ILA Trigger conditions and the arming of the ILA.
80+
81+
src/host.cpp
82+
83+
void wait_for_enter(const std::string& msg)
84+
{
85+
std::cout << msg << std::endl;
86+
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
87+
}
88+
89+
...
90+
91+
cl::Program::Binaries bins = xcl::import_binary_file(binaryFile);
92+
devices.resize(1);
93+
cl::Program program(context, devices, bins);
94+
cl::Kernel krnl_vadd(program,"krnl_vadd_rtl");
95+
96+
wait_for_enter("\nPress ENTER to continue after setting up ILA trigger...");
97+
98+
//Allocate Buffer in Global Memory
99+
100+
...
101+
102+
//Launch the Kernel
103+
q.enqueueTask(krnl_vadd);
104+
105+
106+
107+
## 4. Building the executable, creating the AFI and executing the host code
108+
109+
- **Build the executable** in your design directory (`your_design_directory`) by running the steps below:
110+
111+
```
112+
cd your_design_directory
113+
114+
make all DEVICES=$AWS_PLATFORM
115+
```
116+
117+
- **Creating and registering the AFI**
118+
119+
Please note, the angle bracket directories need to be replaced according to the user setup.
120+
121+
```
122+
$VITIS_DIR/tools/create_vitis_afi.sh -xclbin=your_design.xclbin -o=your_design.awsxclbin -s3_bucket=<bucket-s3_dcp_key=<f1-dcp-folder-s3_logs_key=<f1-logs>
123+
```
124+
125+
- **Setup and Execute**
126+
127+
```
128+
$ cd $AWS_FPGA_REPO_DIR
129+
$ source vitis_runtime_setup.sh
130+
$ ./host
131+
```
132+
This produces the following output:
133+
```
134+
135+
platform Name: Xilinx
136+
Vendor Name : Xilinx
137+
Found Platform
138+
XCLBIN File Name: vadd
139+
INFO: Importing ./binary_container_1.awsxclbin
140+
Loading: './binary_container_1.awsxclbin'
141+
Successfully skipped reloading of local image.
142+
143+
Press ENTER to continue after setting up ILA trigger...
144+
```
145+
146+
147+
## 5. Start Debug Servers
148+
149+
#### Starting Debug Servers on Amazon F1 instance
150+
Instructions to start the debug servers on an Amazon F1 instance can be found [here](../../hdk/docs/Virtual_JTAG_XVC.md).
151+
Once you have setup your ILA triggers and armed the ILA core, you can now Press Enter on your host to continue execution of the application and RTL Kernel.
152+

Vitis/tools/create_vitis_afi.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -213,9 +213,9 @@ clock_main_a0=$(echo `grep -B 1 SYSTEM ${timestamp}_clocks.json | grep -o -e '[0
213213
clock_extra_b0=$(echo `grep -B 2 DATA_CLK ${timestamp}_clocks.json | grep freq | grep -o -e '[0-9]*'`)
214214
clock_extra_c0=$(echo `grep -B 2 KERNEL_CLK ${timestamp}_clocks.json | grep -o -e '[0-9]*'`)
215215

216-
if [[ "$vendor" != "xilinx" && "$board_id" != "aws-vu9p-f1" && "$plat_name" != "shell-v04261818" && "$major" != "201920" && "$minor" != "1" ]]
216+
if [[ "$vendor" != "xilinx" && "$board_id" != "aws-vu9p-f1" && "$plat_name" != "shell-v04261818" && "$major" != "201920" && "$minor" != "2" ]]
217217
then
218-
err_msg "Platform ${vendor}_${board_id}_${plat_name}_${major}_${minor} used to create xclbin is not correct, you should be using xilinx_aws-vu9p-f1_shell-v04261818_201920_1"
218+
err_msg "Platform ${vendor}_${board_id}_${plat_name}_${major}_${minor} used to create xclbin is not correct, you should be using xilinx_aws-vu9p-f1_shell-v04261818_201920_2"
219219
exit
220220
fi
221221

hdk/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ To be notified via e-mail when the build completes:
145145
1. Set up notification via SNS:
146146

147147
```
148+
$ pip install --user --upgrade boto3 # boto3 package is required by the notify_via_sns script
148149
149150
$ $AWS_FPGA_REPO_DIR/shared/bin/scripts/notify_via_sns.py
150151

hdk/hdk_version.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
HDK_VERSION=1.4.13
1+
HDK_VERSION=1.4.14

shared/lib/aws_fpga_test_utils/AwsFpgaTestBase.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def get_sdaccel_xclbin_dir(examplePath):
263263

264264
@staticmethod
265265
def get_vitis_xclbin_dir(examplePath, target='hw'):
266-
return os.path.join(AwsFpgaTestBase.get_sdaccel_example_fullpath(examplePath=examplePath), "build_dir.{}.xilinx_aws-vu9p-f1_shell-v04261818_201920_1".format(target))
266+
return os.path.join(AwsFpgaTestBase.get_sdaccel_example_fullpath(examplePath=examplePath), "build_dir.{}.xilinx_aws-vu9p-f1_shell-v04261818_201920_2".format(target))
267267

268268
@staticmethod
269269
def get_sdaccel_example_s3_root_tag(examplePath, target, rteName, xilinxVersion):
@@ -439,7 +439,7 @@ def get_vitis_example_run_cmd(examplePath, xilinxVersion):
439439
if launch_description[0].get("cmd_args", None):
440440
run_cmd += " {}".format(((launch_description[0].get("cmd_args", None).replace(".xclbin",
441441
".awsxclbin")).replace(
442-
"PROJECT", ".")).replace("BUILD", "./build_dir.hw.xilinx_aws-vu9p-f1_shell-v04261818_201920_1"))
442+
"PROJECT", ".")).replace("BUILD", "./build_dir.hw.xilinx_aws-vu9p-f1_shell-v04261818_201920_2"))
443443

444444
assert run_cmd is not None, "Could not find run_cmd(em_cmd) or (host_exe) in the example description here {}".format(
445445
examplePath)

shared/tests/TESTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The boto3 package is the AWS Python API.
5959
It can be used to start and terminate instances and any other API operation that you have
6060
permissions for.
6161

62-
Configuration of account credentials is explained in the [Quickstart](http://boto3.readthedocs.io/en/latest/guide/quickstart.html#configuration).
62+
Configuration of account credentials is explained in the [Quickstart](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/quickstart.html#configuration).
6363

6464
The following command will install the latest release.
6565

vitis_setup.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -275,18 +275,18 @@ function setup_xsa {
275275
fi
276276
}
277277

278-
#-------------------201920_1 Vitis Platform----------------------
279-
setup_xsa xilinx_aws-vu9p-f1_shell-v04261818_201920_1 xsa_v121319_shell_v04261818 AWS_PLATFORM_201920_1
280-
info_msg "AWS Platform: 201920_1 Vitis Platform is up-to-date"
281-
#-------------------201920_1 Vitis Platform----------------------
278+
#-------------------201920_2 Vitis Platform----------------------
279+
setup_xsa xilinx_aws-vu9p-f1_shell-v04261818_201920_2 xsa_v121319_shell_v04261818 AWS_PLATFORM_201920_2
280+
info_msg "AWS Platform: 201920_2 Vitis Platform is up-to-date"
281+
#-------------------201920_2 Vitis Platform----------------------
282282

283283

284284
# Setup XRT as we need it for building
285285
setup_runtime
286286

287-
export AWS_PLATFORM=$AWS_PLATFORM_201920_1
288-
info_msg "The default AWS Platform has been set to: \"AWS_PLATFORM=\$AWS_PLATFORM_201920_1\" "
287+
export AWS_PLATFORM=$AWS_PLATFORM_201920_2
288+
info_msg "The default AWS Platform has been set to: \"AWS_PLATFORM=\$AWS_PLATFORM_201920_2\" "
289289

290290
info_msg "Vitis Setup PASSED"
291291

292-
info_msg "To run a runtime example, start the MPD service by calling: \`systemctl is-active --quiet mpd || sudo systemctl start mpd\`"
292+
info_msg "To run a runtime example, start the MPD service by calling: \`systemctl is-active --quiet mpd || sudo systemctl start mpd\`"

0 commit comments

Comments
 (0)