Open NickOveracker opened 5 months ago
I tested this example using the simulator that comes with my FPGA design tools. It detected and reported the infinite loop. I'll have to see if I can make vvp
do the same, as it took a kill -9
to stop it.
I think loops in a continuous assignment or primitives like this may never get to a point where the keyboard Ctrl-C is noticed. Also see #1131.
I generated Verilog from the CMOS stick diagram shown below. It is intentionally a useless, nonsense, and broken circuit; I made it to test for infinite loops in the diagramming tool.
I wanted to check the Verilog output against the diagrammer's output, but the evaluation does not terminate for the final step in the included test bench below. It's not clear whether the loop is infinite, but it did not terminate after several minutes.
This is probably very low-priority because it was triggered by a circuit that could only be made by a very bad mistake or to intentionally trigger an infinite loop. But, I am reporting it just in case it's useful to know about.
Relation to #1122
I rebuilt the program from source, so https://github.com/steveicarus/iverilog/issues/1122 is patched on the computer exhibiting the infinite loop behavior. The infinite loop does not occur on a second device with an older build of iverilog.
Output
CMOS stick diagram
Module code
Testbench code