chipsalliance / yosys-f4pga-plugins

Plugins for Yosys developed as part of the F4PGA project.
https://f4pga.org
Apache License 2.0
83 stars 46 forks source link

Not supported while loop inside "initial" block #550

Open iv2nl0b9v opened 5 months ago

iv2nl0b9v commented 5 months ago

Repro:

module while_loop_inside_initial();
  initial begin
    integer a = 3;
    while (a > 1) begin
      a = a - 1;
    end
  end
endmodule : while_loop_inside_initial

Error: ERROR: While loops are only allowed in constant functions!

While loop is not supported inside non-synthesizeable inside block.