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: 
Visitor drf777
Visitor
536 Views
Registered: ‎11-16-2018

SYNCHK 200-79: Cannot find the top function

I realize there have been a few other inquiries regarding the error "SYNCHK 200-79: Cannot find the top function...". However, mine seems to be different and a bit odd.

I am trying to build for a Zynq 702 board using SDSoC, with C source and header files provided by a third party. I put all the .c and .h files appropriately in the /src directory of my SDSoC Project, and can Build successfully if I put all of it on to the ARM (bare metal/standalone, not Linux OS). However, when I try to offload functions to the hardware for acceleration, I get this error (occurs for my other linear algebra functions too):

SYNCHK 200-79: Cannot find the top function 'mat_inf_norm_cols' in the design. Possible causes are: (1) the top function name is misspelled; (2) the top function is nonexistent or declared as static.

Note that 'mat_inf_norm_cols' function is indeed spelled correctly in the .c file (see below snippet), isn't declared as STATIC, and it is selected for Hardware Acceleration in the SDSoC Project (i.e. selected as a "top function"). Below is the 'mat_inf_norm_cols' function within my lin_alg.c code:

#if EMBEDDED != 1
void mat_inf_norm_cols(const csc *M, c_float *E) {
  c_int j, ptr;

  // Initialize zero max elements
  for (j = 0; j < M->n; j++) {
    E[j] = 0.;
  }

  // Compute maximum across columns
  for (j = 0; j < M->n; j++) {
    for (ptr = M->p[j]; ptr < M->p[j + 1]; ptr++) {
      E[j] = c_max(c_absval(M->x[ptr]), E[j]);
    }
  }
}

I see that the function arguments involve pointers, which I've read in the manuals is not good for SDSoC. However, the error I am getting is about not finding 'mat_inf_norm_cols', which as you can see above is clearly there and spelled correctly. I would like to fix this problem, but the hints described in the error do not seem to be true (i.e. the function is spelled correctly, is tagged as "top level", and is not declared static). Note I am using version 2018.2 for SDSoC and Vivado HLS. Please let me know how to move forward on this. Thanks.

0 Kudos
7 Replies
Xilinx Employee
Xilinx Employee
504 Views
Registered: ‎08-20-2018

Re: SYNCHK 200-79: Cannot find the top function

Hi @drf777

Please have a look at the post below,

https://forums.xilinx.com/t5/Vivado-High-Level-Synthesis-HLS/Cannot-find-the-top-function/td-p/810885

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Visitor drf777
Visitor
491 Views
Registered: ‎11-16-2018

Re: SYNCHK 200-79: Cannot find the top function

Thank you for the link, but I had already read that prior to my post. Per that solution, I did confirm that my mat_inf_norm_cols function is indeed selected for "Hardware Acceleration" in the SDSoC Application Project Settings pane, which I believe is synonymous with being a "top function". With SDSoC, we supposedly do not need to deal directly with Vivado HLS because SDSoC calls HLS on its own. Clearly my function is available in the source folder, and as shown in below snippet it is spelled correctly. It is still a mystery why I am getting the error "SYNCHK 200-79: Cannot find the top function..."

I am hoping by someone looking at my snippet, or from others having similar problems, that a path forward for me to solve this error is possible. Any advice is appreciated.

0 Kudos
Newbie nancy@
Newbie
467 Views
Registered: ‎12-10-2018

Re: SYNCHK 200-79: Cannot find the top function

HOLA, YO TENIA EL MISMO PROBLEMA "CANNOT FIND THE TOP FUNCTION", Y LO RESOLVI ASI:

PESTAÑA: PROJECT LUEGO PROJECT SETTING

 Sin título.pngSin título1.pngSin título2.png ESO ME FUNCIONO A MI, ESPERO QUE TE SIRVA.

0 Kudos
Visitor drf777
Visitor
405 Views
Registered: ‎11-16-2018

Re: SYNCHK 200-79: Cannot find the top function

Gracias nancy@. However, I do not believe a HLS Project is created when using SDSoC. But I did try your approach, and there does not appear to be a HLS Project associated with my SDSoC project (test_osqp):

noproject.png

errorproj.png

I tried every sub-directory in test_osqp above. I thought in SDSoC that the 'top function' is declared in the Application Project Settings pane:

sdsoc.png

Again, my understanding is that Vivado HLS is called by SDSoC such that we are not directly involved in the HLS settings, but rather this is all done through SDSoC. In this case, setting 'root function' to main.c as I did above, should be passed to HLS as the 'Top Function'.

Is it possible I have a path missing for Vivado HLS to 'see' my SDSoC Project?

0 Kudos
Xilinx Employee
Xilinx Employee
380 Views
Registered: ‎08-20-2018

Re: SYNCHK 200-79: Cannot find the top function

Hi @drf777

Please let me know if you have updated any parameters

Best Regards,
Nutan
-------------------------------------------------------------------------------
Please don't forget to reply, kudo and accept as a solution
0 Kudos
Visitor drf777
Visitor
369 Views
Registered: ‎11-16-2018

Re: SYNCHK 200-79: Cannot find the top function

Thanks @nutang. Could you please clarify that setting 'Root function' to 'main' in the SDSoC Application Project Settings pane (see my above image) implicitly sets 'top function' = main in Vivado HLS through the SDSoC workflow? As I stated in my last post, we do not have direct interaction with Vivado HLS while using SDSoC, and SDSoC calls HLS internally as part of the Build Project process. The Vivado HLS process suggested by nancy@ makes sense when using Vivado HLS for one's workflow, but is not accessible when using SDSoC.

Please let me know whether setting Root function = main.c in SDSoC implicitly assigns 'top function' = main.c in Vivado HLS when 'Build Project' is run on SDSoC, which then calls HLS.

0 Kudos
Visitor xxu10
Visitor
199 Views
Registered: ‎12-24-2018

Re: SYNCHK 200-79: Cannot find the top function

Hi @drf777, I am having the same problem as you. If you find something, please tell me. Thanks.

0 Kudos