mirror of https://github.com/zachjs/sv2v.git
jump conversion keeps timing controls at the top level
This commit is contained in:
parent
eb76d16dde
commit
7a00c36a70
|
|
@ -62,6 +62,8 @@ convertModuleItem (AlwaysC kw stmt) = convertMIStmt (AlwaysC kw) stmt
|
|||
convertModuleItem other = other
|
||||
|
||||
convertMIStmt :: (Stmt -> ModuleItem) -> Stmt -> ModuleItem
|
||||
convertMIStmt constructor (Timing c stmt) =
|
||||
convertMIStmt (constructor . Timing c) stmt
|
||||
convertMIStmt constructor stmt =
|
||||
constructor stmt''
|
||||
where
|
||||
|
|
|
|||
|
|
@ -106,4 +106,12 @@ module top;
|
|||
$display("Loop B:", i);
|
||||
end
|
||||
|
||||
always #1
|
||||
for (int i = 0; i < 10; ++i) begin
|
||||
$display("Loop C-1:", i);
|
||||
break;
|
||||
$display("UNREACHABLE ", `__LINE__);
|
||||
end
|
||||
initial #5 $finish;
|
||||
|
||||
endmodule
|
||||
|
|
|
|||
|
|
@ -80,4 +80,13 @@ module top;
|
|||
end
|
||||
end
|
||||
|
||||
always #1 begin : loop_c
|
||||
integer i;
|
||||
for (i = 0; i < 10; ++i) begin
|
||||
$display("Loop C-1:", i);
|
||||
i = 10;
|
||||
end
|
||||
end
|
||||
initial #5 $finish;
|
||||
|
||||
endmodule
|
||||
|
|
|
|||
Loading…
Reference in New Issue