vivado HLS c综合失败
@E 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
typedefhls::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*a.val + b.val * b.val);
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/b.val;
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);
}
hls 太高端 用不上 好复杂:L ................... 哦,那图像处理处理不是会用到吗?:) 6
页:
[1]