Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎11-07-2016

Synthesis (Top Level Function Warnings)

Hi there,

I am new in HLS and i have some synthesis' problems. I am asking for help because i have no idea what to do to solve me issues. I hope that someone can help me.

I have a top level function full of pointers to a class. I understand that i have to remove them to synthesis my code bud i don't know the way.

This is my code:


class triangle{
triangle *child[3];
//triangle *Locate(int);
Edge *startingEdge; //from triangle class
int a, b, c;
triangle(int a, int b, int c);


class Edge{
Edge *nextedge; // next edge on the same face in ccw
Edge *dualedge; // dual edge of this edge
triangle *leftface; // pointer to the left face
triangle *rightface;
int origin;
int dest; // origin and destination points on the edge
int num;

class triplet{
Edge *e[3];

void InsertSite(triangle *start,int x){           // Top level function
triangle *t= mylocate(start,x);

triplet *edges = new triplet();
triplet *dualedges = new triplet();

for(int i=0;i<3;++i){
edges->e[i] = new Edge();
dualedges->e[i] = new Edge();
edges->e[i]->dualedge = dualedges->e[i];
dualedges->e[i]->dualedge = edges->e[i];
edges->e[i]->origin = x;
edges->e[i]->num = i;

Edge *se[3];
se[0] = t->startingEdge;
se[1] = se[0]->nextedge;
se[2] = se[1]->nextedge;

// setting the destination of new edges
for(int i=0;i<3;++i){
edges->e[i]->dest = se[i]->origin;
edges->e[i]->nextedge = se[i];
if(edgematrix[edges->e[i]->dest][edges->e[i]->origin] != '1'){
edgematrix[edges->e[i]->dest][edges->e[i]->origin] = '1';
edgematrix[edges->e[i]->origin][edges->e[i]->dest] = '1';

// correct the face cycles
se[0]->nextedge = edges->e[1]->dualedge;
se[1]->nextedge = edges->e[2]->dualedge;
se[2]->nextedge = edges->e[0]->dualedge;

// correct the properties of the dual edges

triangle *face[3];
for(int i=0;i<3;++i){
face[i] = new triangle();
face[i]->startingEdge = edges->e[i];
face[i]->a = x;
face[i]->b = edges->e[i]->dest;
face[i]->c = edges->e[i]->nextedge->dest;
t->child[i] = face[i];
edges->e[i]->leftface = face[i];
se[i]->leftface = face[i];
if(se[i]->dualedge != NULL)
se[i]->dualedge->rightface = face[i];

// correcting the right faces
for(int i=0;i<3;++i){
edges->e[i]->rightface = face[(i+2)%3];
dualedges->e[i]->leftface = edges->e[i]->rightface;
dualedges->e[i]->rightface = edges->e[i]->leftface;
Edge *globalstart; // the latest edge which has been added
globalstart = edges->e[2];

edgecount = edgecount+3;
for(int i=0;i<3;++i)
legalizeedge(x, se[i], face[i]);



I have the following warnings:


CRITICAL WARNING: [SYNCHK 200-11] pcd_triangulation/pcd_triangulation.cpp:105: Argument 'start' of function 'InsertSite' (pcd_triangulation/pcd_triangulation.cpp:526) has an unsynthesizable type (possible cause(s): structure variable cannot be decomposed due to (1) unsupported type conversion; (2) memory copy operation; (3) function pointer used in struct; (4) unsupported pointer comparison).
CRITICAL WARNING: [SYNCHK 200-43] pcd_triangulation/pcd_triangulation.cpp:573: use or assignment of a non-static pointer 't' (this pointer may refer to different memory locations).
CRITICAL WARNING: [SYNCHK 200-11] pcd_triangulation/pcd_triangulation.cpp:116: Variable 't' has an unsynthesizable type 'lass.triangle.25.27.31 = type { [3 x �lass.triangle.25.27...' (possible cause(s): pointer to pointer or global pointer).
CRITICAL WARNING: [SYNCHK 200-42] pcd_triangulation/pcd_triangulation.cpp:116: pointer comparison is not supported.
CRITICAL WARNING: [SYNCHK 200-71] pcd_triangulation/pcd_triangulation.cpp:529: function 'operator new(unsigned long)' has no function body.
CRITICAL WARNING: [SYNCHK 200-41] pcd_triangulation/pcd_triangulation.cpp:529: unsupported pointer reinterpretation from type 'i8*' to type '�lass.triplet.26.29.32 = type { [3 x �lass.Edge.24.28.30*]...'.
CRITICAL WARNING: [SYNCHK 200-22] pcd_triangulation/pcd_triangulation.cpp:529: memory copy is not supported unless used on bus interface possible cause(s): non-static/non-constant local array with initialization).
CRITICAL WARNING: [SYNCHK 200-61] pcd_triangulation/pcd_triangulation.cpp:43: unsupported memory access on variable which is (or contains) an array with unknown size at compile time.


Thanks in advance

0 Kudos
1 Reply
Xilinx Employee
Xilinx Employee
Registered: ‎08-01-2008

It seems some of the syntax use by in your code not supported by HLS
Thanks and Regards
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