Here's what I am trying. I have passed a structure to a function. In the function I store the values of structure in an array. While returning I want to send in only those values which are defined in the array based on a specific criteria. For example, say I have an array definition of 10, I want to return only 5 values from that array based on a criteria, in the function. Here is a sample code:
sc_uint<8> *arrayfill(struct){
sc_uint<8> array[10];
array[1] = struct.a;
array[2] = struct.b;
...
if (struct.trigger == false){
array[10] =0;
}
else
{
array[10] = struct.j;
}
return array;
}