HLS_error implicit instantiation of undefined template ‘ssdm_int

error: implicit instantiation of undefined template ‘ssdm_int<3072, false>’

问题描述

在编写HLS代码过程中,使用任意精度数据ap_int<>时报错,而且是头文件出了问题。

D:/xilinx/Vivado/2018.3/common/technology/autopilot\ap_int_base.h:150:29: error: implicit instantiation of undefined template 'ssdm_int<3072, false>'
struct ap_int_base : public ssdm_int<_AP_W, _AP_S> {
                            ^
D:/xilinx/Vivado/2018.3/common/technology/autopilot\ap_int.h:194:18: note: in instantiation of template class 'ap_int_base<3072, false>' requested here
struct ap_uint : ap_int_base<_AP_W, false> {
                 ^
D:/xilinx/Vivado/2018.3/common/technology/autopilot\hls_stream.h:183:18: note: in instantiation of template class 'ap_uint<3072>' requested here
    __STREAM_T__ V;
                 ^

网上查阅问题无解,故翻阅UG902查找问题,发现一段描述:

solution.png

默认的任意精度类型ap_[u]int<N>中的N的范围为1-1024,而我的整数流数据的位宽达到了3072,因而报错。

解决方案

在包含ap_int.h头文件之前定义含正整数(小于或等于32768)的AP_INT_MAX_W 宏来覆盖,其中AP_INT_MAX_W 的值需大于代码中设置的任意精度整数的最大位宽,但也不要过大,否则会导致软件编译缓慢、运行时间延长。解决方案如下图所示:

solution1.png

  • 5
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

日拱一卒_未来可期

若复习顺利望有闲钱的同学支持下

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值