Example of while Loop - 2022.1 English

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2022-06-06
Version
2022.1 English

parameter P = 4; always @(ID_complete) begin : UNIDENTIFIED

integer i; reg found; unidentified = 0; i = 0;

found = 0;

while (!found && (i < P))

   begin

   found = !ID_complete[i];

   unidentified[i] = !ID_complete[i];

   i = i + 1;

end