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 #549

Open iv2nl0b9v opened 5 months ago

iv2nl0b9v commented 5 months ago

While loop not supported for synthesizeable code:

module while_loop(
  input logic [3:0] in,
  output logic [3:0] out
);
  always @(in) begin
    integer a = 3;
    while (a >= 0) begin
      out[a] = in[a];
      a = a - 1;
    end
  end
endmodule : while_loop