hls不支持的c++特性 说明

Unsupported C Constructs(HLS可综合化 )

UG902 page326
虽然HLS支持大部分C语言原型,但是有部分还是不能支持,总的来说可综合化有下面几点要求:

To be synthesized:

• The C function must contain the entire functionality of the design.
• None of the functionality can be performed by system calls to the operating system.

不能系统调用操作系统
• The C constructs must be of a fixed or bounded size.

C的构造中必须是定长或者有边界的
• The implementation of those constructs must be unambiguous

必须是明确的构造

不支持以下操作

System Calls

不能在函数实现中调用系统函数,类似与printf、getc、time、等等,可以用宏 SYNTHESIS 来处理可综合与不可综合的代码。列入以下程序

include hier_func4.h
int sumsub_func(din_t *in1, din_t *in2, dint_t *outSum, dint_t *outSub)
{
   
       *outSum = *in1 + *in2;
       *outSub = *in1 - *in2;
}
int shift_func(dint_t *in1, dint_t *in2, dout_t *outA, dout_t *outB)
{
   
       *outA = *in1 >> 1;
       *outB = *in2 >> 2;
}
void hier_func4(din_t A, din_t B, dout_t *C, dout_t *D)
{
   
       dint_t apb, amb;
       sumsub_func(&A,&B,&apb,&amb);
#ifndef __SYNTHESIS__                  
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值