Versal - 基础5(裸机开发 AIE-ML+Vitis2024.2界面aie report介绍)

目录

1. 简介

2. 申请 License

2.1 申请网址

2.2 填写 Host

2.3 导入 License

3. 示例

3.1 vivado_platform

3.1.1 由模板创建

3.1.2 模板参数

3.1.3 修改BD参数

3.1.4 配置CIPS和MC

3.1.5 导出PFM

3.2 vitis_platform

3.2.1 创建组件

3.2.2 导入XSA并配置

3.2.3 构建平台组件

3.3 aie_app

3.3.1 从示例中创建

3.3.2 工程结构

3.3.3 代码解读

3.3.4 Build AIE

3.3.5 Run Simulation

3.4 hls_comp

3.5.1 System project

3.5.2 修改主函数

3.5.3 添加成员组件

3.5.4 构建Bin容器

3.6 New vitis_pfm

3.7 ps_app

3.7.1 创建app组件

3.7.2 编译配置

3.7.3 链接配置

3.7.4 Build app

3.8 hw_package

3.9 Run on VD100

3.9.1 烧写

3.9.1 连接与配置

3.9.3 运行结果

4. Vitis2024.2 AIE Reports

4.1 组件设置

4.1.1 打开方式

4.1.2 设置内容

4.2 Build Reports

4.2.1 Overview

4.2.2 Summary

4.2.3 Graph

4.2.4 Array

4.2.5 Mapping Analysis

4.2.6 DMA Analysis

4.2.7 Lock Allocation

4.2.8 Kernel Guidance

4.2.9 AI Engine Compilation

4.3 Run Reports

4.3.1 Overview

4.3.2 Summary

4.3.3 Graph

4.3.4 Array

4.3.5 Simulator Output

4.3.6 Trace

4.3.7 Performance Metrics

4.3.8 Profile

5. 总结


1. 简介

本文以官方 A to Z Bare-metal Flow 为基准,在 VD100 硬件平台上实现的例子。

A to Z Bare-metal Flowhttps://github.com/Xilinx/Vitis-Tutorials/tree/2024.2/AI_Engine_Development/AIE/Feature_Tutorials/01-aie_a_to_zhttps://github.com/Xilinx/Vitis-Tutorials/tree/2024.2/AI_Engine_Development/AIE/Feature_Tutorials/01-aie_a_to_zhttps://github.com/Xilinx/Vitis-Tutorials/tree/2024.2/AI_Engine_Development/AIE/Feature_Tutorials/01-aie_a_to_z

博文包含如下内容:

  • 申请 AIE License
  • 创建 Vivado 可扩展平台(XSA)
  • 创建 Vitis 平台(XPFM)
  • 创建 AIE 应用
  • 创建 HLS 应用
  • 系统集成:VPP 链接 pl_app、aie_app
  • 创建 ps_app 应用
  • 系统集成:打包生成 sd_card.img
  • 在 VD100 硬件平台上运行
  • Vitis2024.2界面介绍
    • aie Build report
    • aie Run report

2. 申请 License

2.1 申请网址

Get Vitis Licensehttps://www.xilinx.com/getlicensehttps://www.xilinx.com/getlicensehttps://www.xilinx.com/getlicensehttps://www.xilinx.com/getlicensehttps://www.xilinx.com/getlicense

2.2 填写 Host

2.3 导入 License

导入成功后:

PS,如果没有此 License,构建 AIE 应用时将失败:

AIEMLbuild feature license not found !
 make[2]: *** [CMakeFiles/simple_aie_application_libadf.a.dir/build.make:80: libadf.a] Error 1
 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/simple_aie_application_libadf.a.dir/all] Error 2
 make[1]: Leaving directory '..../vd100_a2z/simple_aie_application/build/hw'
 make: *** [Makefile:91: all] Error 2
[ERROR] simple_aie_application build failed. 

3. 示例

3.1 vivado_platform

3.1.1 由模板创建

  • Versal Extensible Embedded Platform:基于官方开发板构建示例工程
  • Versal Extensible Embedded Platform (Part based):基于 Versal 芯片构建示例工程

点击 Next 选择工程路径和芯片型号。

3.1.2 模板参数

3.1.3 修改BD参数

  • 修改参考时钟名称为:ddr_cref
  • 修改参考时钟频率为:200 MHz
  • 修改 DDR 接口名称为:DDR4

3.1.4 配置CIPS和MC

1)按照《Versal - 基础1(PL点灯+构建CIPS+VD100+查找资料和文档)》博文中,“3.2 CIPS system” 章节,进行 CIPS 和 AXI NoC 的配置:

Versal - 基础1(PL点灯+构建CIPS+VD100+查找资料和文档)-CSDN博客文章浏览阅读1k次,点赞30次,收藏10次。本文分享学习Versal器件的一些经历记录,记录Versal初次使用过程:PL点灯构建CIPSsystem搜集了一些技术信息和参考资料https://blog.csdn.net/DongDong314/article/details/142976207https://blog.csdn.net/DongDong314/article/details/142976207https://blog.csdn.net/DongDong314/article/details/142976207https://blog.csdn.net/DongDong314/article/details/142976207https://blog.csdn.net/DongDong314/article/details/142976207

2)如上述引用博文,同样参考进行 xdc 配置。

3)Validate Design,并忽略警告:

3.1.5 导出PFM

1)生成 PDI 后,选择导出 PFM:

2)平台类型:Hardware and hardware emulation

3)查看生成后的 PFM:

ll vd100_wrapper.xsa
---
-rw-rw-r-- 1 dd dd 28130725 2月   3 18:02 vd100_wrapper.xsa

3.2 vitis_platform

3.2.1 创建组件

1)打开 Vitis IDE,并选择一个工作区

2)File → New Component → Platform 或者 Create Platform Component:

3.2.2 导入XSA并配置

1)导入 XSA 文件。

2)选择操作系统和处理器:

  • 操作系统:aie_runtime
  • 处理器:ai_engine

3)点击完成,即可创建平台组件。

3.2.3 构建平台组件

完成上一步操作后,单击下面的 Build 即可构建对应的组件。

构建完毕后,可以在 Output 中查看生成的文件(xpfm)

3.3 aie_app

  • 输出内容由 aiecompiler 工具执行
  • 输出内容包含 Work 目录和 libadf.a 文件。
  • libadf.a 文件包含编译的编译的 AI 引擎配置、Graph 和 Kernel.elf 文件。

3.3.1 从示例中创建

  • Create AI Engine Component from Template
  • Name: simple_aie_application

注意描述:

A simple 2-kernel graph with window based data communication. Note: This template works only for AIE Emulation and SW(x86) Emulation.

模板仅适用于 AI 引擎仿真和软件(x86)模拟。但后续也可硬件上实现它。

选择平台后,完成示例工程创建:

 

3.3.2 工程结构

创建成功后的 aie 工程结构:

  • src 包含 kernels 和 graph
  • data 包含模拟输入( input.txt )和输出参考( golden.txt )的数据

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值