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!

AR# 57864

2013.2 [HLS-102] Encountered an internal error when synthesizing a code involving a DATA_PACK attribute with struct

Description

In the code segment below, DATA_PACK is set in the struct my_data.

This fails with an Internal Error.

typedef struct{
unsigned char A;
unsigned char B;
unsigned char C;
} my_data;

void foo(my_data a_in[50], my_data b_out[50])
{
int i;
for(i=0; i < 50; i++){
b_out[i].A = (a_in[i].A >> 1) + 10;
b_out[i].B = (a_in[i].B >> 2);
b_out[i].C = (a_in[i].C >> 3) + 100;
}
}

typedef struct{
unsigned char A;
unsigned char B[320];
unsigned char C;
} my_data;

my_data foo(my_data a_in)
{
int i;
my_data b_out;
b_out.A = (a_in.A >> 1) + 10;
b_out.C = (a_in.C >> 3) + 100;
for(i = 0; i <= 319; i++){
b_out.B[i] = (a_in.B[i] + a_in.A + a_in.C);
}
return b_out;
}

int DoArrayTests() {
my_data input;
my_data output = foo(input);
return output.A;
}

Solution

This is fixed in Vivado 2013.3 and no Internal error is generated.
AR# 57864
Date Created 10/08/2013
Last Updated 03/23/2015
Status Active
Type Error Message
Tools
  • AutoESL
  • Vivado Design Suite - 2013.2