I have created a module that is this:
module testX(input [6:0]n, input [6:0]offset, output result);
I want to run this module increasing the offset until result returns a specific condition. When I use a loop, the code is compiled so all of the iterations run at the same time like normally synthesized code.
I want to make testX use all the resources of the FPGA and then by changing the offset loop it multiple times in order to make a massive parallel application.
I understand that loops are not to be used like this according to this source, so how would I accomplish something like this? In a normal programming language, I would just do something like this:
while result==0
testX(n,offset,result)
offset=offset+C
end while
Another side question is how would I know then the testX operation is complete? Would I need a status variable to indicate it was finished and to change the offset when I saw that the status changed?
Note: This could probably be done with a clock and always statement also, but I am looking for a asynchronous method.