Skip to content

[ExportVerilog] Initial statement needs begin/end for single declaration #3454

Open
@uenoku

Description

@uenoku

Input:

hw.module private @Foo() -> (){
    sv.initial {
      %param_x = sv.localparam : i42 { value = 11: i42 }
    }
}

$ circt-opt -export-verilog produces:

module Foo();
  initial     
    localparam [41:0] param_x = 42'd11; 

endmodule

At least Verilator and Yosys produce a syntax error. When I added "begin" and "end" around initial statement, it parses.

  initial begin 
    localparam [41:0] param_x = 42'd11;
  end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions