Difference between while and do-while loop
Difference between while and do-while loop
Model answer
while checks the condition **first**; the body may run zero times. do-while (SystemVerilog only) runs the body **first** and checks the condition afterwards, so it always runs at least once.