data/full_repos/permissive/512928021/counter/impl/counter.v
1: b"%Error: data/full_repos/permissive/512928021/counter/impl/counter.v:9: syntax error, unexpected ')', expecting '['\n);\n^\n%Error: data/full_repos/permissive/512928021/counter/impl/counter.v:13: syntax error, unexpected always\nalways @(posedge clk) begin\n^~~~~~\n%Error: Exiting due to 2 error(s)\n"
module counter #(
    parameter WIDTH = 32
) (
    input clk,
    input resetn,
    input en,
    input [WIDTH-1:0] x,
    output [WIDTH-1:0] out,
);

reg [WIDTH-1:0] counter;

always @(posedge clk) begin
    if (!resetn) begin

    end else if (en) begin
        counter <= (counter + x < counter) ? 32'hffff_ffff : (counter + x);
    end
end

assign out = counter;

endmodule
module counter #(
    parameter WIDTH = 32
) (
    input clk,
    input resetn,
    input en,
    input [WIDTH-1:0] x,
    output [WIDTH-1:0] out,
);


reg [WIDTH-1:0] counter;

always @(posedge clk) begin
    if (!resetn) begin

    end else if (en) begin
        counter <= (counter + x < counter) ? 32'hffff_ffff : (counter + x);
    end
end

assign out = counter;

endmodule