OK here's what I am trying. I have passed an array to a function. And while returning I want to send in only those values which are defined in a array. For example, say I have an array definition of 10, I want to return only 5 values from that array, in the function.
Any suggestions!? Thanks.
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;
}
So now here is the thing, I want to return only upto 9 values of array when struct.trigger is false, else I am returning all the values of array. And this is where I am unable to find a solution.