top of page
16.6.3. Repeat Loop
​
The repeat loop executes a fixed number of times. Unlike for loops, it doesn't use a loop counter variable and is simpler when you just need N iterations. It is NOT synthesizable.
​
Syntax and Structure
Verilog
Characteristics
​
-
Executes exactly N times (N specified at loop creation)
​
-
No loop counter variable needed
​
-
Number of iterations evaluated ONCE at the start
​
-
Simpler than for loop when counter not needed
​
-
NOT synthesizable (testbench only)
​
Basic Examples
Verilog
Repeat with Variable Count
​
The iteration count is evaluated ONCE when the repeat statement is encountered.
Verilog
Common Repeat Loop Patterns
Verilog
Repeat vs For Loop
.png)
bottom of page
