Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unpacked localparam array support #1149

Open
lefp opened this issue Jul 23, 2024 · 0 comments
Open

Unpacked localparam array support #1149

lefp opened this issue Jul 23, 2024 · 0 comments

Comments

@lefp
Copy link

lefp commented Jul 23, 2024

As far as I can tell, IEEE 1800-2012 supports unpacked arrays as localparams, and the syntax used in the following example.

However, the following fails to compile:

module Asdf ();

    localparam int i[3] = { 1, 2, 3 };

endmodule
> iverilog -g2012 Asdf.sv
Asdf.sv:3: error: localparam must have a value.
Asdf.sv:3: syntax error
Asdf.sv:3: error: Invalid module item.

Related issues and work

There is an issue #562 about array assignment in general, which was partially addressed by #953. That seems to have solved assignment to variables, but it doesn't work for localparams.

Unpacked and multidimensional localparam support was also mentioned in discussion in #570, but since that issue was focused on function-based assignment, I have opened this one as a separate issue.

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

No branches or pull requests

2 participants