当前位置:网站首页>HLS4ML/vivado HLS 报错解决方案
HLS4ML/vivado HLS 报错解决方案
2022-07-01 18:46:00 【heisenberg.liu】
用HLS4ML到 hls_model.build()的时候报错
报错内容
/opt/Xilinx/Vivado/2019.1/include/mpfr.h:724:28: error: ‘mpfr_srcptr’ was not declared in this scope
__MPFR_DECLSPEC int mpfr_custom_get_kind _MPFR_PROTO ((mpfr_srcptr));
^~~~~~~~~~~
make: *** [obj/myproject.cpp_pre.cpp.tb.o] Error 1
ERROR: [COSIM 212-317] C++ compile error.
ERROR: [COSIM 212-321] EXE file generate failed.
ERROR: [COSIM 212-321] EXE file generate failed.
ERROR: [COSIM 212-331] Aborting co-simulation: C simulation failed, compilation errors.
ERROR: [COSIM 212-5] *** C/RTL co-simulation file generation failed. ***
ERROR: [COSIM 212-4] *** C/RTL co-simulation finished: FAIL ***
command 'ap_source' returned error code
while executing
"source build_prj.tcl"
("uplevel" body line 1)
invoked from within
"uplevel \#0 [list source $arg] "
INFO: [HLS 200-112] Total elapsed time: 578.3 seconds; peak allocated memory: 1.226 GB.
INFO: [Common 17-206] Exiting vivado_hls at Tue Dec 14 15:45:32 2021...
child process exited
原因是因为GCC文件冲突,这里用的是vivado2019.2
解决方案:
- 把
/tools/Xilinx/Vivado/2019.2/include/mpfr.h中系统导入头文件<gmp.h>改为当前文件夹导入”gmp.h“
#ifndef __GMP_H__
#include "gmp.h"
#endif
- 在每个源文件(main.cpp和test.cpp,主文件路径在
my-hls-test/fireware/myproject.cpp,test文件在my-hls-test/fmyproject_test.cpp)头顶添加下面语句,这句话添加的位置靠前点儿
#include "/tools/Xilinx/Vivado/2019.2/include/gmp.h"
#define __gmp_const const
这个bug需要在每次生成my-hls-test文件夹之后手动修改cpp文件,因此不能在python文件中直接用hls_model.build(),需要命令行输入hls4ml build -p my-hls-test -a
参考:
边栏推荐
- Audio and video, encoding and decoding related e-books, gadgets, packaged for free!
- 241. Different Ways to Add Parentheses
- brpc理解
- 【无标题】
- 118. Yanghui triangle
- pickle. Load error [attributeerror: can't get attribute 'volatile' on < module '\u main']
- Crunch简介、安装,使用Crunch制作密码字典
- 大厂音视频职位面试题目--今日头条
- Shell advanced
- mysql 報錯 Can‘t create table ‘demo01.tb_Student‘ (errno: 150)*
猜你喜欢

XML syntax, constraints

Parallelism, concurrency and life cycle of threads

Intensive cultivation of channels for joint development Fuxin and Weishi Jiajie held a new product training conference

The key to the success of digital transformation enterprises is to create value with data

Summary of SQL query de duplication statistics methods

118. Yanghui triangle

Basic use of MySQL

Axure does not display catalogs

大厂音视频职位面试题目--今日头条

求各种极限的方法
随机推荐
Shell advanced
自定义插入页面标签以及实现类似通讯录的首字母搜索
Audio and video, encoding and decoding related e-books, gadgets, packaged for free!
Ubuntu14 install MySQL and configure root account local and remote access
P2433 【深基1-2】小学数学 N 合一
【AI服务器搭建】CUDA环境
Go Language Advanced
Summary of SQL query de duplication statistics methods
2022/5/23-2022/5/30
[info() method in org.slf4j.logger]
Thesis reading [distinctive late semantic graph for video capturing]
Bao, what if the O & M 100+ server is a headache? Use Xingyun housekeeper!
ubuntu14安装MySQL并配置root账户本地与远程访问
Flutter 实战-快速实现音视频通话应用
Redo和Undo的区别
【let var const】
Interview question 16.16 Partial sorting - Double finger needling
Mysql查询结果去除换行
uni-app微信小程序一键登录获取权限功能
Learning notes [Gumbel softmax]