集成电路技术分享

 找回密码
 我要注册

QQ登录

只需一步,快速开始

搜索
查看: 7174|回复: 4

vivado HLS c综合失败

[复制链接]
RockBalladBOY 发表于 2016-3-20 17:20:15 | 显示全部楼层 |阅读模式
@E [HLS-70] Compilation errors found:
couldn't execute "clang": no such file or directory
Failed checking during preprocessing.
    while executing
"source E:/vivado_design/hls_prj/image_fusion_prj/solution1/csynth.tcl"
    invoked from within
"hls::main E:/vivado_design/hls_prj/image_fusion_prj/solution1/csynth.tcl"
    ("uplevel" body line 1)
    invoked from within
"uplevel 1 hls::main {*}$args"
    (procedure "hls_proc" line 5)
    invoked from within
"hls_proc $argv"



错误提示就是这样的,头文件.h和源文件.cpp都放在同一个根目录的文件夹里面,不知到为什么不可以综合成功,请大家帮我看看吧。

#ifndef __ARRAY_MUL_H_
#define __ARRAY_MUL_H_

#include"hls_video.h"

#define MAX_WIDTH 1024

#define MAX_HEIGHT 1024

typedef hls::stream<ap_axiu<64,1,1,1>> AXI_STREAM;

void array_mul(AXI_STREAM& img_src1_axi,AXI_STREAM& img_src2_axi,AXI_STREAM& img_result_axi,int rows,int cols);


#endif


#ifndef __ARRAY_ABS_H_
#define __ARRAY_ABS_H_

#include "hls_video.h"

#define MAX_WIDTH 1024
#define MAX_HEIGHT 1024

typedef  hls::stream<ap_axiu<32,1,1,1>> AXI_STREAM;

void array_abs(AXI_STREAM& img_src_axi,AXI_STREAM& img_result_axi);


#endif

#ifndef __ARRAY_DIY_H_
#define __ARRAY_DIY_H_
       
#include "hls_video.h"

#define MAX_WIDTH 1024
#define MAX_HEIGHT 1024

typedef hls::stream<ap_axiu<32,1,1,1>> AXI_STREAM;

void array_div(AXI_STREAM& img_src1_axi,AXI_STREAM& img_src2_axi,AXI_STREAM& img_result_axi);


#endif

#include "array_abs.h"

void array_abs(AXI_STREAM& img_src_axi,AXI_STREAM& img_result_axi)
{
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC2> img(MAX_HEIGHT,MAX_WIDTH);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_Re(MAX_HEIGHT,MAX_WIDTH);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_Im(MAX_HEIGHT,MAX_WIDTH);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result(MAX_HEIGHT,MAX_WIDTH);

        hls::AXIvideo2Mat(img_src_axi,img);
        hls::Split(img,img_Re,img_Im);

        hls::Scalar<1,unsigned char> a;
        hls::Scalar<1,unsigned char> b;
        hls::Scalar<1,unsigned char> c;

        for(int i = 0 ; i < img.cols ; i++)
        {
                for(int j = 0 ; j < img.rows ; j++)
                {

                        a = img_Re.read();
                        b = img_Im.read();
                        c = sqrt(a.val[0]*a.val[0] + b.val[0] * b.val[0]);
                        hls::Scalar<1,unsigned char> pix(c);
                        img_result.write(pix);
                }

        }
        hls::Mat2AXIvideo(img_result,img_result_axi);
}

#include"array_div.h"

void array_div(AXI_STREAM& img1_axi,AXI_STREAM& img2_axi,AXI_STREAM& img_result_axi)
{
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img1(MAX_HEIGHT,MAX_WIDTH);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img2(MAX_HEIGHT,MAX_WIDTH);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result(MAX_HEIGHT,MAX_WIDTH);

        hls::AXIvideo2Mat(img1_axi,img1);
        hls::AXIvideo2Mat(img2_axi,img2);

        hls::Scalar<1,unsigned char> a;
        hls::Scalar<1,unsigned char> b;
        hls::Scalar<1,unsigned char> c;

        for(int i = 0 ; i < img1.cols  ;i++)
                for(int j = 0 ; j < img1.rows;j++)
                {
                        a = img1.read();
                        b = img2.read();
                        c = a.val[0]/b.val[0];
                        hls::Scalar<1,unsigned char>pix(c);
                        img_result.write(pix);
                }
        hls::Mat2AXIvideo(img_result,img_result_axi);
}

#include "array_mul.h"

void array_mul(AXI_STREAM& img_src1_axi,AXI_STREAM& img_src2_axi,AXI_STREAM& img_result_axi,int rows,int cols)
{
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC2> img1(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC2> img2(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img1_Re(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img1_Im(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img2_Re(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img2_Im(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC2> img_result(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result1(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result2(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result3(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result4(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result5(rows,cols);
        hls::Mat<MAX_HEIGHT,MAX_WIDTH,HLS_8UC1> img_result6(rows,cols);

        hls::AXIvideo2Mat(img_src1_axi,img1);
        hls::AXIvideo2Mat(img_src2_axi,img2);

        hls::Split(img1,img1_Re,img1_Im);
        hls::Split(img2,img2_Re,img2_Im);

        hls::Mul(img1_Re,img2_Re,img_result1,1);
        hls::Mul(img1_Im,img2_Im,img_result2,1);
        hls::Mul(img1_Re,img2_Im,img_result3,1);
        hls::Mul(img1_Im,img2_Re,img_result4,1);

        hls::AddWeighted(img_result1,1,img_result2,1,0,img_result5);
        hls::AddWeighted(img_result4,1,img_result3,1,0,img_result6);

        hls::Merge(img_result5,img_result6,img_result);

        hls::Mat2AXIvideo(img_result,img_result_axi);













}


电子狼 发表于 2016-3-25 17:15:10 | 显示全部楼层
hls 太高端 用不上
 楼主| RockBalladBOY 发表于 2016-4-30 10:25:06 | 显示全部楼层
哦,那图像处理处理不是会用到吗?
fpga_feixiang 发表于 2024-7-12 15:46:19 | 显示全部楼层
6                     
您需要登录后才可以回帖 登录 | 我要注册

本版积分规则

关闭

站长推荐上一条 /1 下一条

QQ|小黑屋|手机版|Archiver|fpga论坛|fpga设计论坛 ( 京ICP备20003123号-1 )

GMT+8, 2024-12-23 14:22 , Processed in 0.058927 second(s), 20 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表