Open robstewart57 opened 9 years ago
Hi Rob, Actually there is a memory limitations in Forge that prevents to operate on huge arrays. It is a know bug, that I have not yet figure it out.
But by the way your array need 255 * 255 * 255 * 32 bits --> 64 MB it will "probably" not fit on the FPGA :)
Does it work with smaller array size like 16 * 16 * 16
Hi Endri,
Thanks. The dimensionality of the hist
array is constrained by the nature of 3-element vector RGB values, each with a range from 0 to 255, i.e. within 16 bit range. If I rewrite for constructing a histogram over grey images, i.e. a 1 element vector for each pixel, then Xronos can compile the following code:
actor fold_grey() uint(size=16) img1 ==> uint(size=16) my_histogram :
uint(size=16) hist[255];
uint(size=16) height = 512;
uint(size=16) width = 256;
int i := 0;
fold: action img1:[grey] ==>
guard i < (height * width)
do
hist[grey] := hist[grey] + 1;
i := i+1 ;
end
send: action ==> my_histogram:[[hist[grey] : for uint(size=16) grey in 0 .. 254 ]] repeat (255)
do
i := 0;
end
schedule fsm fold:
fold (fold) --> fold;
fold (send) --> send;
send (fold) --> fold;
end
priority fold > send;
end
end
Hi Endri,
Given this actor:
I'm getting the following error when attempting to compile with Xronos:
I suspect it is to do with the output pattern for the
send
action, i.e.