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

Handling extraneous commas (SystemVerilog) #163

Open
the-moog opened this issue Nov 26, 2021 · 1 comment
Open

Handling extraneous commas (SystemVerilog) #163

the-moog opened this issue Nov 26, 2021 · 1 comment

Comments

@the-moog
Copy link

Existing code, which synthesises and simulates fine in Xilinx and Synopsys toolchains fails with hdlConverter.

The issue is extraneous commas in module parameter definitions and module instance signal connections.

This can be caused by `ifdefs removing parameters and are unused in a particular build.

e.g.
module X (input a, input b,); // Fails
module X (input a, input b); // Works

Similarly

X instX (.x(a), .y(b),); //Fails
X instX (.x(a), .y(b)); //Works

@Thomasb81
Copy link
Contributor

What you request is non conform to verilog and systemVerilog standard.

I cannot confirm your claim see my log produced by Cadence, Mentor/Siemens and Synopsys.
dc_shell.log
xrun.log
questa.log

None of them consider this file has a valid syntax.

my test.sv file:

module test (input a, input b,);
endmodule

If that's due to preprocessor result better for you to include this trailing comma in the macro directive body in order to produce legal verilog or systemVerilog code.

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

No branches or pull requests

2 participants