cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
179 Views
Registered: ‎12-19-2019

Workaround for non synthesizable constructs

Hi

I am new to Vitis environment and currently working on application acceleration. The target application extensively  uses new function for creating class objects dynamically and object pointers for accessing class member functions. As per my knowledge both of these are not supported in HLS thus not synthesizable. Is there any workaround or equivalent code for such constructs that give similar functionality in hardware?

Thanks in Advance

Ramakant

0 Kudos
3 Replies
Highlighted
Contributor
Contributor
159 Views
Registered: ‎09-17-2018

Re: Workaround for non synthesizable constructs

I don't think so....

You could rewrite program to plain "C" or write it without using dynamic elements.

What about making IP container in your code and using it like big function? (still without classes tho) but usings 'if' statements you could synthesise functions and activate it accordingly to needs.

The best workaround is using zynq for abstract logic and fpga for calculations...

Highlighted
Mentor
Mentor
149 Views
Registered: ‎04-26-2015

Re: Workaround for non synthesizable constructs

@ramakant_joshi The obvious approach is to create a fixed-length array of these objects at the start and use them as required. You will need to define the maximum number you will ever use, so that HLS can define the total amount of RAM required. If the maximum is unbounded, then you need to define a sensible limit and include appropriate behaviour for when you exceed the limit.

If you also deallocate objects, then you need some memory management system to ensure that they can be reallocated as appropriate.

 

Edit: or you can find a different algorithm. As @bartokon has said, FPGAs aren't well-suited to this sort of processing.

 

Highlighted
136 Views
Registered: ‎12-19-2019

Re: Workaround for non synthesizable constructs

You mean club all the functions at one place and access individual class functions conditionally? Like hardcoding it for a given piece of code.

 

0 Kudos