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
Now, we ignore statement block symbols. But in some cases, we'll trigger the dominance error. For example:
module top_module;
always @(*) begin
integer j;
for(j = 0; j < 4; j++);
end
endmodule
Error:
forLoop.sv:2:12: error: operand #0 does not dominate this use
always @(*) begin
^
forLoop.sv:2:12: note: see current operation: %20 = "moore.read"(%0) : (!moore.ref<l32>) -> !moore.l32
forLoop.sv:3:17: note: note: operand defined here (op in a parent region)
integer j;
or
module top_module;
always @(*) begin
for(int i = 0;i<4;i++);
end
endmodule
Error:
forLoop.sv:2:12: error: operand #0 does not dominate this use
always @(*) begin
^
forLoop.sv:2:12: note: see current operation: %9 = "moore.read"(%1) : (!moore.ref<i32>) -> !moore.i32
forLoop.sv:3:17: note: operand defined here (op in a parent region)
for(int i = 0;i<4;i++);
This error is caused by the moore.wait_event. When we handle always @(*), we must ensure which signal will lead to recalculating the whole always block. If we declare integer j out of the always block, we can generate the following Moore IR:
The %10 = moore.read %j : <l32> means that we must have already created the %j = moore.variable : <l32>. So I think maybe we don't ignore slang::ast::StatementBlockSymbol.
The text was updated successfully, but these errors were encountered:
Now, we ignore statement block symbols. But in some cases, we'll trigger the dominance error. For example:
Error:
or
Error:
This error is caused by the
moore.wait_event
. When we handlealways @(*)
, we must ensure which signal will lead to recalculating the whole always block. If we declareinteger j
out of the always block, we can generate the following Moore IR:The
%10 = moore.read %j : <l32>
means that we must have already created the%j = moore.variable : <l32>
. So I think maybe we don't ignoreslang::ast::StatementBlockSymbol
.The text was updated successfully, but these errors were encountered: