Search code examples
loopsvhdlwaitsynthesis

Synthesis for statements of wait, infinite loop, while loop, and for loop in VHDL


I hardly use any loops in Verilog for the synthesis purpose except "for" loops on the initialization of memories.

In VHDL, it is advised that wait statement usage should be limited in synthesis. Then, under what conditions that the wait statement usage can be synthesized? How about other loop statements, such as infinite loop ([loop_label]LOOP ... END LOOP), while loop, and for loop?


Solution

  • You can use a loop to iterate over arrays or vectors. Wait statements are not synthesizable and are only used for simulation. Usually wait a x amount of time or wait until y happens is done by implementing counters and/or a state machine. Infinite loops cannot work as you would need an infinitely big chip to create the hardware.