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

Array assignment to wires - parse error on = #2240

Open
hzeller opened this issue Aug 21, 2024 · 1 comment
Open

Array assignment to wires - parse error on = #2240

hzeller opened this issue Aug 21, 2024 · 1 comment
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).

Comments

@hzeller
Copy link
Collaborator

hzeller commented Aug 21, 2024

Seen in the wild: code like this:

module foo();
 wire [8:0] someval[2] = '{42, 43}; 
endmodule

... which results in a syntax error:

/tmp/foo.sv:2:24: syntax error at token "="

Not sure how valid of system verilog code that is, or if this is just something some vendors support, but if it is something that is supported by some, maybe we should also support it. Finding LRM spec might also be good.

@hzeller hzeller added the rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017). label Aug 21, 2024
@hzeller
Copy link
Collaborator Author

hzeller commented Aug 23, 2024

@snsokolov you probably know how legal of a construct it is. I seems to be accepted by at least some proprietary tools, so I guess it is. I typically just never came across it.
I suspect it mostly something that also can/should be localparams ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rejects-valid syntax If the parser wrongly rejects syntactically valid code (according to SV-2017).
Projects
None yet
Development

No branches or pull requests

1 participant