title: vhdl code (while loop)
body: <p>description:
  I would like to write a vhdl while loop that will find the largest integer in an array [A] of 20 integers. </p>
  
  <p>Question:<br>
  what should my algorithm look like, to input where the sequential statements are?</p>
  
  <p>My vhdl code:</p>
  
  <pre><code>highnum: WHILE i LOOP
  if 
  (arr[i]&gt;arr[HighestSoFar]){HighestSoFar=i;}20
  i&lt;= i + 1;
  end if;
  exit;
  END LOOP highnum;
  </code></pre>
  
  <p>This does not need to be synthesizable but I dont know how to form this for loop, in fact im not sure what the syntax would look like. a detailed example explaining how to would be appreciated.</p>