Zero delay loop
Why Zero delay loop happened?
Due to race condition or ambiguous coding style zero delay loop may get generated which results in simulation hung or infinite simulation time
What are the causes of Zero delay loop?
One example of a common loop behaviour as follows:
always @ (x) begin y = 1'b0; ... case (x) ... 1'b1: y = 1'b1; ... endcase end always @ (y) begin x = 1'b0; ... case (y) ... 1'b1: x = 1'b1; ... endcase end
Here in this there is a possibility of loop when both x
and y
are set to 1, which causes new event and trigger case statements called zero delay loop because of event triggering at same time, to avoid use #0 delay which forces event to happen at the end of the time step, but this type of coding style is not recommended
- To debug this issue
From my understanding vcs has a switch called +vcs+loopreport which will generate a detailed report of zero delay loop and genrerate a text file, from that you can either eliminate or debug those loops effectively
Santhosh Kumar
Updated on June 14, 2022Comments
-
Santhosh Kumar almost 2 years
When we are run the design, we are getting the "Zero Delay loop" issue. What is the meaning of "Zero Delay loop" and
- Why this issue will present.
- What are the causes for zero delay loop.
The simulator is continuously running and it's not finished.
-
user1978273 about 6 yearsDo you know the filename that is generated?