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: 
Highlighted
Observer camccarthy
Observer
8,145 Views
Registered: ‎08-19-2014

[HLS-70] Cannot find any design unit to elaborate.

Jump to solution

Hello,

 

I am new to Vivado HLS and am struggling to get a basic design synthesized. My code is a basic System C design which I have previously tested. Below is the design:

 

#include "systemc.h"

SC_MODULE ( simple ){
  sc_in <bool> clk;
  sc_in < bool > reset;
  sc_in < sc_lv<2> > control;
  sc_in < sc_lv<4> > data, key;

  sc_out < sc_lv<4> > out;

  sc_signal< sc_lv<4> > tmp;

  void tmp_assignment();
  void out_assignment();

  SC_CTOR( simple ){

    SC_METHOD( tmp_assignment );
    sensitive << clk << reset << control << data << key;

    SC_METHOD( out_assignment );
    sensitive << clk.pos();

  }

};

void simple::tmp_assignment(){
  if(control.read() == "00"){
    //cout << "In control 00" << endl;
    tmp.write(data.read());
    //cout << "tmp val is: " << tmp.read() << endl;
  }
  else if(control.read() == "01"){
    //cout << "In control 01" << endl;
    tmp.write(data.read() & key.read());
  }
  else if(control.read() == "10"){
    //cout << "In control 10" << endl;
    tmp.write(~data.read());
  }
  else{
    //cout << "In control 11" << endl;
    tmp.write("XXXX");
  }

}

void simple::out_assignment(){
  if(reset.read() == true){
    //cout << "reset is activated" << endl;
    out.write("0000");
  }
  else{
    out.write(tmp.read());
  }
}

I have not included a test bench. I have created a project with solely this code saved as "simple.h". I made the design set up for the Kintx part "xc7k160tfbg484-1" as well. When I attempt to synthesize the code (this is on Vivado 2014.3 by the way), I get the following error:

 

"@E [HLS-70] Cannot find any design unit to elaborate.
Error in linking the design.
    while executing
"csynth_design"
    (file "/fs/student/cameron1/Desktop/simple/solution1/csynth.tcl" line 15)
@I [LIC-101] Checked in feature [HLS]"

 

I am not sure what this could be from, but I believe I am missing something critical since this is my first time trying to use the tool. Can anyone correct me?

 

Thanks a lot.

 

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
14,825 Views
Registered: ‎10-24-2013

Re: [HLS-70] Cannot find any design unit to elaborate.

Jump to solution

Hi @camccarthy,

Source files must have extensions .c, .C, .cc, .cpp, .c++, .cp, or .cxx.

 

Change the source file name accordingly and rerun.

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.
1 Reply
Xilinx Employee
Xilinx Employee
14,826 Views
Registered: ‎10-24-2013

Re: [HLS-70] Cannot find any design unit to elaborate.

Jump to solution

Hi @camccarthy,

Source files must have extensions .c, .C, .cc, .cpp, .c++, .cp, or .cxx.

 

Change the source file name accordingly and rerun.

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.