You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code has a loop dependency between the first two always blocks. It should execute to completion on the first positive clock edge.
module t (clk);
input clk;
reg ready;
initial begin
ready = 1'b0;
end
always @(posedge ready) begin
if ((ready === 1'b1)) begin
$write("*-* All Finished *-*\n");
$finish;
end
end
always @(posedge ready) begin
if ((ready === 1'b0)) begin
ready = 1'b1 ;
end
end
always @(posedge clk) begin
ready = 1'b1;
end
endmodule
This works fine on Icarus Verilog, but on Verilator fails to compile, with the error:
%Error: Internal Error: ../V3GraphAcyc.cpp:343: Non-cutable edge forms a loop VERTEX=0x8bd71c0\n ALWAYS
(The example is meaningless, but was obtained by cutting down a 1100 line proprietary code where the error occurred).
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-10T22:33:44Z
I'm not sure how to best report this error, as the code requires an event driven simulator. Perhaps as a multidriven non-blocking error. Or just change the uncuttable to a more obvious filename/line number pointer.
Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-05-11T00:41:33Z
These would have gotten a BLKSEQ warning, but BLKSEQ is a lint-style-only warning.
Looks like the loop detection logic is the only place that sees the complicated picture, so it will need to print an example path out by calling loopsVertexCb.
Author Name: Jeremy Bennett (@jeremybennett)
Original Redmine Issue: 513 from https://www.veripool.org
Original Date: 2012-05-10
Original Assignee: Wilson Snyder (@wsnyder)
The following code has a loop dependency between the first two always blocks. It should execute to completion on the first positive clock edge.
This works fine on Icarus Verilog, but on Verilator fails to compile, with the error:
(The example is meaningless, but was obtained by cutting down a 1100 line proprietary code where the error occurred).
Please pull the testcase from https://github.com/jeremybennett/verilator/tree/loop-crash.
The text was updated successfully, but these errors were encountered: