Skip to content

Commit

Permalink
PFM ZCU104: Upgrade for 2021.2 (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
imrickysu authored and GitHub Enterprise committed Dec 4, 2021
1 parent 3d607f3 commit 23e8dec
Show file tree
Hide file tree
Showing 13 changed files with 946 additions and 58 deletions.
18 changes: 11 additions & 7 deletions Vitis_Platform_Creation/Introduction/02-Edge-AI-ZCU104/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@

# Vitis Custom Embedded Platform Creation Example on ZCU104

***Version: Vitis 2021.1 + Vitis AI 1.4***
***Version: Vitis 2021.2 + Vitis AI 1.4)***

In this module, we will create a custom Vitis embedded platform for ZCU104. It will be capable to run ***Vitis acceleration applications*** including ***Vitis-AI applications***. Of course, general ***embedded software application*** can also run on this platform.

> Note: Vitis-AI 1.4 still works with Vitis 2021.2. The validation application for this custom platform may be updated after Vitis-AI for Vitis 2021.2 released.
Since ZCU104 is a validated Xilinx Evaluation Board and Vivado includes its processing system presets, we will skip step 0 mentioned in previous overview module and start to build the full hardware and generate XSA.

To prepare the software components, we will import XSA into PetaLinux project and do some configurations. After building software and hardware components, we'll package the platform. At last, we'll run several test applications including Vitis-AI application on this platform to test this customized platform.
Expand Down Expand Up @@ -61,16 +63,18 @@ We'll introduce the platform creation steps in the following pages. Each page de
***Let's start from [step 1: Vivado Design](./step1.md).***


## Change Log

### 2021.2
- The Vivado project exports XSA for hardware and hardware emulation seperatedly. When creating the platform in [step3](./step3.md), it's recommended to provide seperate XSA for hardware and hardware emulation.

## References

- [UG1393: Vitis Acceleration Flow User Guide](https://www.xilinx.com/html_docs/xilinx2020_2/vitis_doc/index.html)
- [Platform Creation General Rules](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/create_embedded_platforms.html)
- [Setting up the Vitis environment](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/settingupvitisenvironment.html)
- [Installing Xilinx Runtime](https://www.xilinx.com/html_docs/xilinx2021_1/vitis_doc/pjr1542153622642.html)
- [UG1393: Vitis Acceleration Flow User Guide](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration)
- [Platform Creation General Rules](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Creating-Embedded-Platforms-in-Vitis)
- [Setting up the Vitis environment](https://docs.xilinx.com/r/en-US/ug1393-vitis-application-acceleration/Setting-Up-the-Environment-to-Run-the-Vitis-Software-Platform)
- Platform Examples
- [zcu102](https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/2021.1/Xilinx_Official_Platforms/zcu102_base) and [zcu104](https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/2021.1/Xilinx_Official_Platforms/zcu104_base) base platform source code in [Vitis Embedded Platform Source Github Repository](https://github.com/Xilinx/Vitis_Embedded_Platform_Source)
- [Xilinx Run Time (XRT)](https://xilinx.github.io/XRT/master/html/index.html)
- [zcu102](https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/2021.2/Xilinx_Official_Platforms/zcu102_base) and [zcu104](https://github.com/Xilinx/Vitis_Embedded_Platform_Source/tree/2021.2/Xilinx_Official_Platforms/zcu104_base) base platform source code in [Vitis Embedded Platform Source Github Repository](https://github.com/Xilinx/Vitis_Embedded_Platform_Source)
- [Vitis-AI Github Repository](https://github.com/Xilinx/Vitis-AI)

<p align="center"><sup>Copyright&copy; 2021 Xilinx</sup></p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,37 @@
# See the License for the specific language governing permissions and
# limitations under the License.

.PHONY: all clean
all: step1 step2 step3
.PHONY: all clean step1 step2 step3 step4
all: step1 step2 step3 step4

step1:
XSA=step1_vivado/build/vivado/zcu104_custom_platform_hw.xsa
IMG=step2_petalinux/build/petalinux/images/image.ub
XPFM=step3_pfm/platform_repo/zcu104_custom_platform/export/zcu104_custom_platform/zcu104_custom_platform.xpfm

# Step 1: Generate XSA with Vivado
step1: $(XSA)

$(XSA):
$(MAKE) -C step1_vivado all

step2:
# Step 2: Use PetaLinux to generate Software Components
step2: $(IMG)

$(IMG): $(XSA)
$(MAKE) -C step2_petalinux all

step3:
# Step 3: Generate Platform
step3: $(XPFM)

$(XPFM): $(XSA) $(IMG)
$(MAKE) -C step3_pfm all

# Step 4: Validate Design
step4: $(XPFM)
$(MAKE) -C step4_validate all

clean:
$(MAKE) -C step1_vivado clean
$(MAKE) -C step2_petalinux clean
$(MAKE) -C step3_pfm clean
$(MAKE) -C step4_validate clean
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

{
"name": "Vitis_Platform_Creation-Introduction-02-Edge-AI-ZCU104",
"description": "Creating a custom ZCU104 platform from scratch",
"gui": "false",
"flow": "vitis",
"platform_whitelist": [],
"platform_blacklist": [],
"testinfo": {
"jobs": [
{
"max_memory_MB": 32768,
"max_time_min": {
"vitis_hw_emu": 200
}
}
],
"targets": [
"vitis_hw_emu"
],
"custom_build_target":
{
"all": "all"
},
"tasks": {
"build": {
"pre_exec": "/proj/petalinux/2021.2/petalinux-v2021.2_1014_1/tool/petalinux-v2021.2-final/settings.sh"
}
}
},
"OS_JSON":"/proj/dsv/xbot/Jenkins/configuration/vitis_tutorial_edge_os.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ generate_target all [get_files [current_bd_design].bd]


# Write expandable XSA to vivado directory
write_hw_platform -force -file ./zcu104_custom_platform.xsa
#write_hw_platform -force -file ./zcu104_custom_platform.xsa
write_hw_platform -hw -force -file ./zcu104_custom_platform_hw.xsa
write_hw_platform -hw_emu -force -file ./zcu104_custom_platform_hwemu.xsa


Loading

0 comments on commit 23e8dec

Please sign in to comment.