UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Observer yanjian
Observer
1,043 次查看
注册日期: ‎11-28-2018

vivado hls编译过程中C仿真没通过但是C综合通过了??????

Starting C simulation ...
C:/Xilinx/Vivado_HLS/2016.3/bin/vivado_hls.bat D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1/csim.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado_HLS/2016.3/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'Administrator' on host 'win-20170406dtz' (Windows NT_amd64 version 6.1) on Tue Jan 22 18:03:37 +0800 2019
INFO: [HLS 200-10] In directory 'D:/xiilx/milianke/thinn/hlx_thin'
INFO: [HLS 200-10] Opening project 'D:/xiilx/milianke/thinn/hlx_thin/hlx_thin'.
INFO: [HLS 200-10] Opening solution 'D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xq7a50tfg484-2i'
INFO: [SIM 211-2] *************** CSIM start ***************
WARNING: [SIM 211-51] HLS only supports CLANG compiler in Linux.
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
Compiling ../../../../testbench.cpp in debug mode
In file included from C:/Xilinx/Vivado_HLS/2016.3/include/floating_point_v7_0_bitacc_cmodel.h:143:0,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_half.h:40,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls/utils/x_hls_utils.h:37,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls/hls_axi_io.h:40,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_video.h:48,
from ../../../../thinn.h:3,
from ../../../../testbench.cpp:1:
C:/Xilinx/Vivado_HLS/2016.3/include/gmp.h:62:0: warning: "__GMP_LIBGMP_DLL" redefined [enabled by default]
C:/Xilinx/Vivado_HLS/2016.3/include/floating_point_v7_0_bitacc_cmodel.h:135:0: note: this is the location of the previous definition
In file included from C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/core_c.h:47:0,
from C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/opencv.hpp:46,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_opencv.h:47,
from ../../../../testbench.cpp:2:
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h: In function 'int cvRound(double)':
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h:324:28: error: call of overloaded 'lrint(double&)' is ambiguous
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h:324:28: note: candidates are:
c:\xilinx\vivado_hls\2016.3\msys\bin\../lib/gcc/mingw32/4.6.2/../../../../include/math.h:686:21: note: long int lrint(double)
C:/Xilinx/Vivado_HLS/2016.3/include/hls_half.h:2597:15: note: long int detail::lrint(half)
C:/Xilinx/Vivado_HLS/2016.3/include/hls/hls_round.h:412:10: note: long int hls::lrint(double)
make: *** [obj/testbench.o] Error 1

 

这个编译问题是什么???

vivado hls编译过程中C仿真没通过但是C综合通过了??????

0 项奖励
4 条回复4
Moderator
Moderator
997 次查看
注册日期: ‎05-27-2018

回复: vivado hls编译过程中C仿真没通过但是C综合通过了??????

Hi @yanjian,

    从你给的部分log来看,没有显示综合已完成,可以贴出/附件给出相关代码吗?

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
Observer yanjian
Observer
983 次查看
注册日期: ‎11-28-2018

回复: vivado hls编译过程中C仿真没通过但是C综合通过了??????

代码

void thinning(AXI_STREAM& src, Point_3f arry_out[MAX_WIDTH], int rows, int cols)
{
#pragma HLS INTERFACE axis port=src bundle=INPUT_STREAM
#pragma HLS INTERFACE s_axilite port=rows bundle=CONTROL_BUS offset=0x14
#pragma HLS INTERFACE s_axilite port=cols bundle=CONTROL_BUS offset=0x1C
#pragma HLS INTERFACE s_axilite port=return bundle=CONTROL_BUS
#pragma HLS INTERFACE ap_stable port=rows
#pragma HLS INTERFACE ap_stable port=cols
gray_IMAGE src0(rows,cols);
gray_IMAGE src1(rows,cols);
gray_IMAGE src2(rows,cols);

 

//static ap_fixed<18,4> distCoeffs[5] ={ 0.12394, -10.03379, -0.00295, 0.00988, 174.17315};
// gray_IMAGE dst(rows,cols);

#pragma HLS dataflow
hls::AXIvideo2Mat(src, src0);
assert(rows <= MAX_HEIGHT);
assert(cols <= MAX_WIDTH);
hls::Threshold(src0, src1, 240, 1, HLS_THRESH_BINARY);
hls::GaussianBlur<3,3>(src1, src2, 0,0);
int num=0;


int x;
int y;
int k1;
int num_point;
int nw;
int no;
int ne; // north (pAbove)
int we;
int me;
int ea;
int sw;
int so;
int se;



static int arry_imga[1236][1626];
static int dsst[1236][1626];
static int dsst1[1236][1626];
// uint_24 _buff[1920*1080];
static int arry_a[2009736];
//struct Point3f arry_imag[1626];
//ap_int<12> dst_array[1626][2];
//hls::bayer_8 video_data[1920][1080];
hls::Mat2Array<1626>(src2,arry_a);
thinning_label0:for(y=0;y<rows-1;y++)
{
for(x=0;x<cols-1;x++)
{
arry_imga[y][x]=arry_a[y*cols+x];
}
}

thinning_label1:do
{

thinning_label3:for(k1=0;k1<2;k1++){
//static ap_uint<1> dsst[1236][1626];
thinning_label4:for (y = 1; y <rows-1; y++) {
thinning_label5:for (x = 1; x < cols-1; x++) {
dsst[y][x]=arry_imga[y][x];
nw = arry_imga[y - 1][x - 1];
no = arry_imga[y - 1][x];
ne = arry_imga[y - 1][x + 1];
we = arry_imga[y][x - 1];
me = arry_imga[y][x];
ea = arry_imga[y][x + 1];
sw = arry_imga[y + 1][x - 1];
so = arry_imga[y + 1][x];
se = arry_imga[y + 1][x + 1];

int A = (no == 0 && ne == 1) + (ne == 0 && ea == 1) +
(ea == 0 && se == 1) + (se == 0 && so == 1) +
(so == 0 && sw == 1) + (sw == 0 && we == 1) +
(we == 0 && nw == 1) + (nw == 0 && no == 1);
int B = no + ne + ea + se + so + sw + we + nw;
int m1 = k1 == 0 ? (no * ea * so) : (no * ea * we);
int m2 = k1 == 0 ? (ea * so * we) : (no * so * we);

if (A == 1 && (B >= 2 && B <= 6) && m1 == 0 && m2 == 0)
{
dsst[y][x] = 1;
arry_imga[y][x] = arry_imga[y][x]&(~dsst[y][x]);

}

}
}
}
for (y = 0; y <rows-1; y++) {
for (x = 0; x < cols-1; x++) {
num_point = 0;
if(dsst[y][x]!=arry_imga[y][x]) num_point = num_point+1;

}
}
}while(num_point>0);


thinning_label2:for (y = 0; y <rows-1; y++) {
for (x = 0; x < cols-1; x++) {

if(dsst1[y][x]>0)
{

arry_out[num].x=y;
arry_out[num].y=x;
num++;
}

}
}

 


}

仿真结果

Starting C simulation ...
C:/Xilinx/Vivado_HLS/2016.3/bin/vivado_hls.bat D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1/csim.tcl
INFO: [HLS 200-10] Running 'C:/Xilinx/Vivado_HLS/2016.3/bin/unwrapped/win64.o/vivado_hls.exe'
INFO: [HLS 200-10] For user 'Administrator' on host 'win-20170406dtz' (Windows NT_amd64 version 6.1) on Thu Jan 24 08:55:19 +0800 2019
INFO: [HLS 200-10] In directory 'D:/xiilx/milianke/thinn/hlx_thin'
INFO: [HLS 200-10] Opening project 'D:/xiilx/milianke/thinn/hlx_thin/hlx_thin'.
INFO: [HLS 200-10] Opening solution 'D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1'.
INFO: [SYN 201-201] Setting up clock 'default' with a period of 10ns.
INFO: [HLS 200-10] Setting target device to 'xq7a50tfg484-2i'
INFO: [SIM 211-2] *************** CSIM start ***************
WARNING: [SIM 211-51] HLS only supports CLANG compiler in Linux.
INFO: [SIM 211-4] CSIM will launch GCC as the compiler.
Compiling ../../../../testbench.cpp in debug mode
In file included from C:/Xilinx/Vivado_HLS/2016.3/include/floating_point_v7_0_bitacc_cmodel.h:143:0,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_half.h:40,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls/utils/x_hls_utils.h:37,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls/hls_axi_io.h:40,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_video.h:48,
from ../../../../thinn.h:3,
from ../../../../testbench.cpp:1:
C:/Xilinx/Vivado_HLS/2016.3/include/gmp.h:62:0: warning: "__GMP_LIBGMP_DLL" redefined [enabled by default]
C:/Xilinx/Vivado_HLS/2016.3/include/floating_point_v7_0_bitacc_cmodel.h:135:0: note: this is the location of the previous definition
In file included from C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/core_c.h:47:0,
from C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/opencv.hpp:46,
from C:/Xilinx/Vivado_HLS/2016.3/include/hls_opencv.h:47,
from ../../../../testbench.cpp:2:
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h: In function 'int cvRound(double)':
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h:324:28: error: call of overloaded 'lrint(double&)' is ambiguous
C:/Xilinx/Vivado_HLS/2016.3/include/opencv2/core/types_c.h:324:28: note: candidates are:
c:\xilinx\vivado_hls\2016.3\msys\bin\../lib/gcc/mingw32/4.6.2/../../../../include/math.h:686:21: note: long int lrint(double)
C:/Xilinx/Vivado_HLS/2016.3/include/hls_half.h:2597:15: note: long int detail::lrint(half)
C:/Xilinx/Vivado_HLS/2016.3/include/hls/hls_round.h:412:10: note: long int hls::lrint(double)
make: *** [obj/testbench.o] Error 1
ERROR: [SIM 211-100] 'csim_design' failed: compilation error(s).
INFO: [SIM 211-3] *************** CSIM finish ***************
4
while executing
"source D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1/csim.tcl"
invoked from within
"hls::main D:/xiilx/milianke/thinn/hlx_thin/hlx_thin/solution1/csim.tcl"
("uplevel" body line 1)
invoked from within
"uplevel 1 hls::main {*}$args"
(procedure "hls_proc" line 5)
invoked from within
"hls_proc $argv"
Finished C simulation.

 

0 项奖励
Moderator
Moderator
955 次查看
注册日期: ‎05-27-2018

回复: vivado hls编译过程中C仿真没通过但是C综合通过了??????

Hi @yanjian,

     代码不完整,缺少头文件,无法复现工程,types_c.h 里面的fuction的数据类型有问题。

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
如果提供的信息能解决您的问题,请标记为“接受为解决方案”。
如果您认为帖子有帮助,请点击“奖励”。谢谢!
-------------------------------------------------------------------------------------------------
0 项奖励
Observer yanjian
Observer
953 次查看
注册日期: ‎11-28-2018

回复: vivado hls编译过程中C仿真没通过但是C综合通过了??????

头文件

thinn.h

#ifndef _THINN_H_
#define _THINN_H_
#include "hls_video.h"
//#include "hls_opencv.h"
#include<iostream>
#include<math.h>
#include<fstream>
#include"omp.h"
#include "ap_int.h"
//#include “ap_cint.h”
using namespace hls;
using namespace std;
#define MAX_WIDTH 1626
#define MAX_HEIGHT 1236
typedef hls::stream<ap_axiu<32,1,1,1> > AXI_STREAM;
typedef hls::Scalar<3, unsigned char> RGB_PIXEL;
typedef hls::Mat<MAX_HEIGHT, MAX_WIDTH, HLS_8UC1> gray_IMAGE;
typedef struct Point_type
{
int x;
int y;
} Point_3f;
//#include<opencv2/opencv.h>
#define INPUT_IMAGE "R_48.bmp"
void thinning(AXI_STREAM& src, Point_3f arry_out[MAX_WIDTH],int row,int col);
#endif

 

testbench.cpp

#include "thinn.h"
#include "hls_opencv.h"
using namespace cv;
using namespace std;

int main(int argc, char** argv)
{

IplImage* src=cvLoadImage(INPUT_IMAGE,0);
IplImage* dst = cvCreateImage(cvGetSize(src), src->depth, src->nChannels);
cvShowImage("hls_src", src);
Point_3f arry_out[MAX_WIDTH];
ofstream final("E://pic//test.txt");
//HLS视频库处理
AXI_STREAM src_axi;
IplImage2AXIvideo(src, src_axi);
thinning(src_axi,arry_out, src->height, src->width);
// AXIvideo2IplImage(dst_axi, dst);
// cvShowImage("hls_dst", dst);
//cvSaveImage(OUTPUT_IMAGE,dst);

// waitKey(0);

for(int i=0;i<MAX_WIDTH;i++)
{
if (final.is_open())
{
final<<arry_out[i].x<<","<<arry_out[i].y<<endl;
}


}
final.close();
waitKey(0);
return 0;


}

0 项奖励