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!

cancel
Showing results for 
Search instead for 
Did you mean: 
Newbie www_wwwjs1
Newbie
4,727 Views
Registered: ‎08-10-2016

Simulation passed but synthesis failed

 Hi everybody,

 

I am trying to implement a 2D correlation function over gray scale image. The algorithm is generally an imitation of the 'hls::filter2D' function in the HLS video library. My implementation has passed the simulation and realized an expected filtered image. However, in the step of synthesis, Vivado HLS reported errors as follows.

 

errors.png

 

 

I located the mistakes into following loop by a series of modifications and experiments.
for (int bufRow = 0; bufRow < FILTER_HEIGHT; ++bufRow) {
if (row >= PATTERN_AREA_LT_Y && col >= PATTERN_AREA_LT_X && row < PATTERN_AREA_RB_Y &&
col < PATTERN_AREA_RB_X) {
int aCol1 = col - PATTERN_AREA_LT_X;
colBuf(bufRow, 0) = kBuf(bufRow, aCol1);//
}
}
Where colBuf and kBuf are LineBuffers just like col_buf and k_buf in hls::filter2D.
for(int buf_row = 0; buf_row < K_HEIGHT; buf_row++) {
// Fetch the column from the line buffer to shift into the window.
assert((x < IMG_WIDTH) && ((BORDERMODE::value == BORDER_CONSTANT::value) || (x >= 0)));

col_buf[k](buf_row,0) = ((BORDERMODE::value == BORDER_CONSTANT::value) && (x < 0)) ? fillvalue : k_buf[k](buf_row,x);
// std::cout << (int)col_buf[k](buf_row,0) << " ";
}

The project can pass the synthesis by simply calling hls::filter2D, but failed with my own implementation.

Also, I got a succeed version in experiments like,
for (int bufRow = 0; bufRow < FILTER_HEIGHT; ++bufRow) {
if (row >= PATTERN_AREA_LT_Y && col >= PATTERN_AREA_LT_X && row < PATTERN_AREA_RB_Y &&
col < PATTERN_AREA_RB_X) {
int aCol1 = col - PATTERN_AREA_LT_X;
unsigned char tmp1 = kBuf(bufRow, aCol1);
unsigned char tmp2 = 0;
colBuf(bufRow, 0) = tmp2;//
}
}
So, the problem seems come from the relationship between kBuf and colBuf.
Is there any suggestion for this situation?
Thanks in advance. The environment is Vivado HLS version 2014.4.

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
4,706 Views
Registered: ‎10-24-2013

Re: Simulation passed but synthesis failed

Hi @www_wwwjs1

This could be version specific.

Can you please try using 2016.2?

 

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos