How to implement the Greatest Common Divisor in Xilinx ? [VHDL]
<p>I'm trying to implement a simple GCD algorithm with VHDL language but i get this error "ERROR:HDLCompiler:981: Non-static loop limit exceeded". </p>

<p>So, How the while statement can work without the error above? and if it's not adaptable with xilinx 14.7 with what statement i can replace it?  </p>

<pre><code>signal a,b,GCD: integer;

a&lt;=100; --example of a
b&lt;=50; --example of b
while NOT (a*b=0) loop
if a&gt;b then
a&lt;=a-b;
else
b&lt;=b-a;
end if;
end loop;
if a=0 then --result
GCD&lt;=b; 
else GCD&lt;=a; 
end if;
</code></pre>

<p>Thank you,</p>