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 garion9013
Visitor
1,720 Views
Registered: ‎04-17-2017

c++ template supports on top module (function)

I've seen documents that HLS/SDSoC completely covers c++ template and its polymorphism

Is it still true with hardware function? (top module)

I failed to build test code below

 

 

#include <iostream>

using namespace std;

template<int size>
void top_accel(int a, int b){
  std::cout << a << std::endl;
  std::cout << b << std::endl;
}

int main(int argc, char** argv) {
  top_accel<1>(1,2);
}

 

If this is not the case, does Xilinx have any plans to support this?

or this kinds of usage is completely forbidden?

0 Kudos
1 Reply
Scholar xilinxacct
Scholar
107 Views
Registered: ‎10-23-2018

Re: c++ template supports on top module (function)

@garion9013

Vivado HLS supports the use of templates in C++ for synthesis. BUT Vivado HLS does NOTsupport
templates for the top-level function.

Please mark as solution accepted to close the issue. Kudos also welcomed :-)

0 Kudos