Skip to content

Parse Error: Cannot parse a function #124

Open
@KatCe

Description

@KatCe

Hello, the following module can not be parsed:

module minimized_in (
	clk_i,
	rst_ni,
	use_sign_i,
	sign_i,
	result_o
);
	input wire clk_i;
	input wire rst_ni;
	input wire use_sign_i;
	input wire sign_i;
	output wire [63:0] result_o;
	function automatic [2:0] sv2v_cast_19B92;
		input reg [2:0] inp;
		sv2v_cast_19B92 = inp;
	endfunction
endmodule

Got the following error:

raise ParseError("%s: %s" % (coord, msg))
pyverilog.vparser.parser.ParseError:  line:13: before: "["

Pyverilog commit: 81838bc


My setup:
Python 3.9.5
iverilog/focal,now 10.3-1build1 amd64 [installed]
Name: Jinja2
Version: 3.1.2
Name: ply
Version: 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions